diff --git a/README.md b/README.md index eed0970..b635325 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -isp_helper +stroto ========== -This stores different projects that ISP Helper is working on. +The stroto app. diff --git a/StoryApp/StoryPackSite/html/index.php b/StoryApp/StoryPackSite/html/index.php index 4adddbb..3d82a57 100644 --- a/StoryApp/StoryPackSite/html/index.php +++ b/StoryApp/StoryPackSite/html/index.php @@ -1,8 +1,15 @@ st_request)) { @@ -10,7 +17,6 @@ include('include/error_reply.php'); } -include_once('config/db_config.php'); switch ($json_data->st_request) { case "get_free_list": diff --git a/StoryApp/StoryPackSite/html/request/purchase.php b/StoryApp/StoryPackSite/html/request/purchase.php index 86cb055..71910bc 100644 --- a/StoryApp/StoryPackSite/html/request/purchase.php +++ b/StoryApp/StoryPackSite/html/request/purchase.php @@ -13,6 +13,10 @@ include('include/error_reply.php'); } +if (trim($apple_receipt) == "APPLE DOWN") { + $error_txt = "Apple Server Down"; + include('include/error_reply.php'); +} //Save Purchase diff --git a/StoryApp/StoryPackSite/sql/database.sql b/StoryApp/StoryPackSite/sql/database.sql index 7cb2505..6a1275a 100644 --- a/StoryApp/StoryPackSite/sql/database.sql +++ b/StoryApp/StoryPackSite/sql/database.sql @@ -43,3 +43,9 @@ CREATE TABLE `Purchase` ( KEY (`StoryPackID`), KEY (`PurchaseDate`) ); + +CREATE TABLE `Log` ( + `LogDateTime` datetime, + `IPAddress` varchar(30), + `JSON` varchar(100) +); diff --git a/StrotoBasic/StrotoBasic/StoryPacks/9nrv8bown84l5l0e312yrcx07.db b/StoryApp/StoryPacks/goldilocks.db similarity index 100% rename from StrotoBasic/StrotoBasic/StoryPacks/9nrv8bown84l5l0e312yrcx07.db rename to StoryApp/StoryPacks/goldilocks.db diff --git a/StoryApp/iOS/StoryTelling/StoryPacks/goldilocks.db b/StoryApp/iOS/StoryTelling/StoryPacks/goldilocks.db new file mode 100644 index 0000000..a3b11da Binary files /dev/null and b/StoryApp/iOS/StoryTelling/StoryPacks/goldilocks.db differ diff --git a/StrotoBasic/StrotoBasic/StoryPacks/20wirglbitgv76sj4dpacusnm.db b/StoryApp/iOS/StoryTelling/StoryPacks/threepigs.db similarity index 100% rename from StrotoBasic/StrotoBasic/StoryPacks/20wirglbitgv76sj4dpacusnm.db rename to StoryApp/iOS/StoryTelling/StoryPacks/threepigs.db diff --git a/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.pbxproj b/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.pbxproj index 40313d3..95ab224 100644 --- a/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.pbxproj +++ b/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.pbxproj @@ -26,7 +26,6 @@ 4D2A0A811780B81800C78EE0 /* STStage.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D2A0A801780B81800C78EE0 /* STStage.m */; }; 4D2A0A8417810F8900C78EE0 /* STModifierImageInstanceFlip.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D2A0A8317810F8900C78EE0 /* STModifierImageInstanceFlip.m */; }; 4D2A0A871781108300C78EE0 /* STStageRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D2A0A861781108200C78EE0 /* STStageRecorder.m */; }; - 4D2A0A8A178110B200C78EE0 /* STStagePlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D2A0A89178110B000C78EE0 /* STStagePlayer.m */; }; 4D2A0A9017811AA800C78EE0 /* STImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D2A0A8F17811AA600C78EE0 /* STImage.m */; }; 4D2A0A931783758600C78EE0 /* STStoryFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D2A0A921783758600C78EE0 /* STStoryFile.m */; }; 4D3CFDA517A1FE5C004EB904 /* app_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 4D3CFDA417A1FE5C004EB904 /* app_bg.png */; }; @@ -40,6 +39,7 @@ 4D908E7117FA3A7D00B309FA /* color_red.png in Resources */ = {isa = PBXBuildFile; fileRef = 4D908E6D17FA3A7D00B309FA /* color_red.png */; }; 4DBE3DE11816440700ED3A12 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4DBE3DE01816440700ED3A12 /* Images.xcassets */; }; 4DD126F717D9640C001DD0AC /* STStoryPackDownload.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DD126F617D9640C001DD0AC /* STStoryPackDownload.m */; }; + DB0BF94418C0593600F9B095 /* STStagePlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = DB0BF94318C0593600F9B095 /* STStagePlayerView.m */; }; DB0F459B17FAA5CC00CE8173 /* GTLCommon_Sources.m in Sources */ = {isa = PBXBuildFile; fileRef = DB0F459917FAA5CC00CE8173 /* GTLCommon_Sources.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; DB0F459C17FAA5CC00CE8173 /* GTLNetworking_Sources.m in Sources */ = {isa = PBXBuildFile; fileRef = DB0F459A17FAA5CC00CE8173 /* GTLNetworking_Sources.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; DB0F459E17FAA8D500CE8173 /* GTLYouTube_Sources.m in Sources */ = {isa = PBXBuildFile; fileRef = DB0F459D17FAA8D500CE8173 /* GTLYouTube_Sources.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; @@ -49,6 +49,7 @@ DB0F45A717FAB21B00CE8173 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB0F45A617FAB21A00CE8173 /* SystemConfiguration.framework */; }; DB21F8CF17445B0300FA7D52 /* UIView+Hierarchy.m in Sources */ = {isa = PBXBuildFile; fileRef = DB21F8CE17445B0300FA7D52 /* UIView+Hierarchy.m */; }; DB21F8D017445B0300FA7D52 /* UIView+Hierarchy.m in Sources */ = {isa = PBXBuildFile; fileRef = DB21F8CE17445B0300FA7D52 /* UIView+Hierarchy.m */; }; + DB224D9218A49121007948A5 /* STAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = DB224D9118A49121007948A5 /* STAudio.m */; }; DB28D70D1742E1460071B5C2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB28D70C1742E1460071B5C2 /* UIKit.framework */; }; DB28D70F1742E1460071B5C2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB28D70E1742E1460071B5C2 /* Foundation.framework */; }; DB28D7111742E1460071B5C2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB28D7101742E1460071B5C2 /* CoreGraphics.framework */; }; @@ -77,15 +78,22 @@ DB28D76E1742F4CE0071B5C2 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB28D76D1742F4CE0071B5C2 /* CoreVideo.framework */; }; DB28D7701742F4D30071B5C2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB28D76F1742F4D30071B5C2 /* QuartzCore.framework */; }; DB28D7711742F5F50071B5C2 /* ThumbImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = DB28D7641742E8BE0071B5C2 /* ThumbImageView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + DB32244918BDB8A4006A5D4E /* STStagePlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = DB32244818BDB8A4006A5D4E /* STStagePlayer.m */; }; + DB32244A18BDB8A4006A5D4E /* STStagePlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = DB32244818BDB8A4006A5D4E /* STStagePlayer.m */; }; + DB32244D18BDB987006A5D4E /* STStagePlayerFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = DB32244C18BDB987006A5D4E /* STStagePlayerFrame.m */; }; + DB32244E18BDB987006A5D4E /* STStagePlayerFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = DB32244C18BDB987006A5D4E /* STStagePlayerFrame.m */; }; + DB33AC5418C9876F00BFE800 /* STStageAudioFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = DB33AC5318C9876F00BFE800 /* STStageAudioFrame.m */; }; DB38441E1781B07C0036469D /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DB38441D1781B07C0036469D /* libsqlite3.dylib */; }; DB4CA88817A23B1900C21E7D /* CvGrabCutController.mm in Sources */ = {isa = PBXBuildFile; fileRef = DB4CA88717A23B1900C21E7D /* CvGrabCutController.mm */; }; DB4CA88F17A25D4900C21E7D /* CvGrabCutController.mm in Sources */ = {isa = PBXBuildFile; fileRef = DB4CA88717A23B1900C21E7D /* CvGrabCutController.mm */; }; DB4DF527178D6C7F00E90492 /* STCropBackgroundViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DB4DF525178D6C7F00E90492 /* STCropBackgroundViewController.m */; }; DB4DF52B178D98C700E90492 /* STCropForegroundViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DB4DF52A178D98C700E90492 /* STCropForegroundViewController.m */; }; + DB4E0B2F18A88E22009B6CEE /* STModifierToolbar.m in Sources */ = {isa = PBXBuildFile; fileRef = DB4E0B2E18A88E22009B6CEE /* STModifierToolbar.m */; }; DB4E38A6179F81E000413100 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DB4E38A5179F81E000413100 /* libz.dylib */; }; DB4E38AC179FA20A00413100 /* opencv2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB4E38AB179FA20A00413100 /* opencv2.framework */; }; DB8ADED21770D97C0094BB3A /* 57.png in Resources */ = {isa = PBXBuildFile; fileRef = DB8ADED11770D97C0094BB3A /* 57.png */; }; DB8ADED41770D99E0094BB3A /* 57@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DB8ADED31770D99E0094BB3A /* 57@2x.png */; }; + DB8EF1B91890CAB500950DA9 /* STPlayerToolbar.m in Sources */ = {isa = PBXBuildFile; fileRef = DB8EF1B81890CAB500950DA9 /* STPlayerToolbar.m */; }; DB93D7061774E36000437F40 /* Back.png in Resources */ = {isa = PBXBuildFile; fileRef = DB93D7001774E36000437F40 /* Back.png */; }; DB93D7071774E36000437F40 /* BottomBar.png in Resources */ = {isa = PBXBuildFile; fileRef = DB93D7011774E36000437F40 /* BottomBar.png */; }; DB93D7081774E36000437F40 /* RecordArea.png in Resources */ = {isa = PBXBuildFile; fileRef = DB93D7021774E36000437F40 /* RecordArea.png */; }; @@ -111,6 +119,9 @@ DB9A00651815198900244040 /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DB9A00641815198900244040 /* MainStoryboard_iPad.storyboard */; }; DB9C8BCB1778F48900BA146A /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DB9C8BCA1778F48900BA146A /* MainStoryboard_iPhone.storyboard */; }; DB9D34F917CD997500845670 /* STStageExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = DB9D34F617CD98CC00845670 /* STStageExporter.m */; }; + DB9E3517187FE648002A891F /* STStagePlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DB9E3516187FE648002A891F /* STStagePlayerViewController.m */; }; + DB9E3518187FE648002A891F /* STStagePlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DB9E3516187FE648002A891F /* STStagePlayerViewController.m */; }; + DB9E5ADF18ED2546003FB695 /* STStageExporterFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = DB9E5ADE18ED2546003FB695 /* STStageExporterFrame.m */; }; DB9E979D17E002C1009BD697 /* navbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = DB9E979C17E002C1009BD697 /* navbutton.png */; }; DB9E9E841764A79B00788373 /* StoryTellingRootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DB9E9E831764A79B00788373 /* StoryTellingRootViewController.m */; }; DB9E9E851764A79B00788373 /* StoryTellingRootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DB9E9E831764A79B00788373 /* StoryTellingRootViewController.m */; }; @@ -140,6 +151,7 @@ DBE496D517B372FC009B5C31 /* ACMagnifyingGlass.m in Sources */ = {isa = PBXBuildFile; fileRef = DBE496CF17B372FC009B5C31 /* ACMagnifyingGlass.m */; }; DBE496D617B372FC009B5C31 /* ACMagnifyingView.m in Sources */ = {isa = PBXBuildFile; fileRef = DBE496D117B372FC009B5C31 /* ACMagnifyingView.m */; }; DBE496D717B372FC009B5C31 /* kb-loupe-hi.png in Resources */ = {isa = PBXBuildFile; fileRef = DBE496D317B372FC009B5C31 /* kb-loupe-hi.png */; }; + DBE62E9C191C880300449D27 /* STStageExporterFrameTransformHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = DBE62E9B191C880300449D27 /* STStageExporterFrameTransformHelper.m */; }; DBFA4AA6174D66B4001DFCDC /* RecordStop.png in Resources */ = {isa = PBXBuildFile; fileRef = DBFA4AA5174D66B4001DFCDC /* RecordStop.png */; }; DBFA4AA7174D66B4001DFCDC /* RecordStop.png in Resources */ = {isa = PBXBuildFile; fileRef = DBFA4AA5174D66B4001DFCDC /* RecordStop.png */; }; DBFA4AAD174D6718001DFCDC /* AddButton.png in Resources */ = {isa = PBXBuildFile; fileRef = DBFA4AAB174D6718001DFCDC /* AddButton.png */; }; @@ -153,6 +165,10 @@ DBFA4AC2174D7F1C001DFCDC /* StartRecordingButton.png in Resources */ = {isa = PBXBuildFile; fileRef = DBFA4AC0174D7F1C001DFCDC /* StartRecordingButton.png */; }; DBFA4AC5174D8206001DFCDC /* AudioRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = DBFA4AC4174D8206001DFCDC /* AudioRecorder.m */; }; DBFA4AC6174D8206001DFCDC /* AudioRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = DBFA4AC4174D8206001DFCDC /* AudioRecorder.m */; }; + DBFE101D185FFBC800FDAAC7 /* STBGImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = DBFE101A185FFBC800FDAAC7 /* STBGImageView.m */; }; + DBFE101E185FFBC800FDAAC7 /* STBGImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = DBFE101A185FFBC800FDAAC7 /* STBGImageView.m */; }; + DBFE101F185FFBC800FDAAC7 /* STFGImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = DBFE101C185FFBC800FDAAC7 /* STFGImageView.m */; }; + DBFE1020185FFBC800FDAAC7 /* STFGImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = DBFE101C185FFBC800FDAAC7 /* STFGImageView.m */; }; EB00E64717FE7E59002CE208 /* FacebookSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB00E64617FE7E59002CE208 /* FacebookSDK.framework */; }; EB14BB4E180BD6AA009F38E6 /* STFacebookViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB00E64417FE74AE002CE208 /* STFacebookViewController.m */; }; EB14BB50180BD6B9009F38E6 /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB14BB4F180BD6B9009F38E6 /* Social.framework */; }; @@ -161,6 +177,7 @@ EB382FC217EFF36800A3FB1F /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = EB382FC017EFF36800A3FB1F /* NSData+Base64.m */; }; EB382FC317EFF3A700A3FB1F /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = EB382FC017EFF36800A3FB1F /* NSData+Base64.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; EB63BB3E17E1A4B90044B23A /* STInstalledStoryPacksViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB63BB3D17E1A4B90044B23A /* STInstalledStoryPacksViewController.m */; }; + EB6EEDD2183591B30050F3CD /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = EB6EEDD1183591B30050F3CD /* Reachability.m */; }; EB743B7317F41119002D3B34 /* lightGray.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = EB743B7217F41119002D3B34 /* lightGray.jpeg */; }; EB7FE48417C7176500E28B4F /* STStoryPacksViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB7FE48317C7176500E28B4F /* STStoryPacksViewController.m */; }; EB7FE48717C7439B00E28B4F /* STPaidStoryPacksViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB7FE48617C7439B00E28B4F /* STPaidStoryPacksViewController.m */; }; @@ -168,6 +185,10 @@ EB9ACE6D17FD092300FCF6EE /* STSelectImagesFromStoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB9ACE6A17FD092300FCF6EE /* STSelectImagesFromStoryViewController.m */; }; EB9ACE6E17FD092300FCF6EE /* STSelectStoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB9ACE6C17FD092300FCF6EE /* STSelectStoryViewController.m */; }; EBA21FB7181783F8006BB6B7 /* STListStoryiPad.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA21FB6181783F8006BB6B7 /* STListStoryiPad.m */; }; + EBD4BB44184022F8000558EE /* StoryPacks in Resources */ = {isa = PBXBuildFile; fileRef = EBD4BB43184022F8000558EE /* StoryPacks */; }; + EBDDB3A7182D93B200B73149 /* STExportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EBDDB3A6182D93B200B73149 /* STExportViewController.m */; }; + EBDDB3AA182DA71A00B73149 /* uicheckbox_unchecked.png in Resources */ = {isa = PBXBuildFile; fileRef = EBDDB3A8182DA71A00B73149 /* uicheckbox_unchecked.png */; }; + EBDDB3AB182DA71A00B73149 /* uicheckbox_checked.png in Resources */ = {isa = PBXBuildFile; fileRef = EBDDB3A9182DA71A00B73149 /* uicheckbox_checked.png */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -218,8 +239,6 @@ 4D2A0A8317810F8900C78EE0 /* STModifierImageInstanceFlip.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STModifierImageInstanceFlip.m; sourceTree = ""; }; 4D2A0A851781108100C78EE0 /* STStageRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStageRecorder.h; sourceTree = ""; }; 4D2A0A861781108200C78EE0 /* STStageRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStageRecorder.m; sourceTree = ""; }; - 4D2A0A88178110B000C78EE0 /* STStagePlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStagePlayer.h; sourceTree = ""; }; - 4D2A0A89178110B000C78EE0 /* STStagePlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStagePlayer.m; sourceTree = ""; }; 4D2A0A8E17811AA500C78EE0 /* STImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STImage.h; sourceTree = ""; }; 4D2A0A8F17811AA600C78EE0 /* STImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STImage.m; sourceTree = ""; }; 4D2A0A911783758600C78EE0 /* STStoryFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStoryFile.h; sourceTree = ""; }; @@ -256,6 +275,8 @@ 4DD126F517D9640C001DD0AC /* STStoryPackDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStoryPackDownload.h; sourceTree = ""; }; 4DD126F617D9640C001DD0AC /* STStoryPackDownload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStoryPackDownload.m; sourceTree = ""; }; DB01F4D41785ADF300BC2D73 /* StoryTellingRootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StoryTellingRootViewController.h; sourceTree = ""; }; + DB0BF94218C0593600F9B095 /* STStagePlayerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStagePlayerView.h; sourceTree = ""; }; + DB0BF94318C0593600F9B095 /* STStagePlayerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStagePlayerView.m; sourceTree = ""; }; DB0F459917FAA5CC00CE8173 /* GTLCommon_Sources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLCommon_Sources.m; sourceTree = ""; }; DB0F459A17FAA5CC00CE8173 /* GTLNetworking_Sources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLNetworking_Sources.m; sourceTree = ""; }; DB0F459D17FAA8D500CE8173 /* GTLYouTube_Sources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLYouTube_Sources.m; sourceTree = ""; }; @@ -266,6 +287,8 @@ DB0F45A617FAB21A00CE8173 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; DB21F8CD17445B0300FA7D52 /* UIView+Hierarchy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Hierarchy.h"; sourceTree = ""; }; DB21F8CE17445B0300FA7D52 /* UIView+Hierarchy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Hierarchy.m"; sourceTree = ""; }; + DB224D9018A49121007948A5 /* STAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STAudio.h; sourceTree = ""; }; + DB224D9118A49121007948A5 /* STAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STAudio.m; sourceTree = ""; }; DB28D7081742E1460071B5C2 /* Stroto.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Stroto.app; sourceTree = BUILT_PRODUCTS_DIR; }; DB28D70C1742E1460071B5C2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; DB28D70E1742E1460071B5C2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -302,6 +325,12 @@ DB28D76B1742F4C50071B5C2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; DB28D76D1742F4CE0071B5C2 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; DB28D76F1742F4D30071B5C2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + DB32244718BDB8A4006A5D4E /* STStagePlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStagePlayer.h; sourceTree = ""; }; + DB32244818BDB8A4006A5D4E /* STStagePlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStagePlayer.m; sourceTree = ""; }; + DB32244B18BDB987006A5D4E /* STStagePlayerFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStagePlayerFrame.h; sourceTree = ""; }; + DB32244C18BDB987006A5D4E /* STStagePlayerFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStagePlayerFrame.m; sourceTree = ""; }; + DB33AC5218C9876F00BFE800 /* STStageAudioFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStageAudioFrame.h; sourceTree = ""; }; + DB33AC5318C9876F00BFE800 /* STStageAudioFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStageAudioFrame.m; sourceTree = ""; }; DB38441D1781B07C0036469D /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; DB4CA88617A23B0800C21E7D /* CvGrabCutController.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = CvGrabCutController.hh; sourceTree = ""; }; DB4CA88717A23B1900C21E7D /* CvGrabCutController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CvGrabCutController.mm; sourceTree = ""; }; @@ -309,10 +338,14 @@ DB4DF525178D6C7F00E90492 /* STCropBackgroundViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STCropBackgroundViewController.m; sourceTree = ""; }; DB4DF529178D98C600E90492 /* STCropForegroundViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STCropForegroundViewController.h; sourceTree = ""; }; DB4DF52A178D98C700E90492 /* STCropForegroundViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STCropForegroundViewController.m; sourceTree = ""; }; + DB4E0B2D18A88E22009B6CEE /* STModifierToolbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STModifierToolbar.h; sourceTree = ""; }; + DB4E0B2E18A88E22009B6CEE /* STModifierToolbar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STModifierToolbar.m; sourceTree = ""; }; DB4E38A5179F81E000413100 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; DB4E38AB179FA20A00413100 /* opencv2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = opencv2.framework; sourceTree = ""; }; DB8ADED11770D97C0094BB3A /* 57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 57.png; sourceTree = ""; }; DB8ADED31770D99E0094BB3A /* 57@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "57@2x.png"; sourceTree = ""; }; + DB8EF1B71890CAB500950DA9 /* STPlayerToolbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STPlayerToolbar.h; sourceTree = ""; }; + DB8EF1B81890CAB500950DA9 /* STPlayerToolbar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STPlayerToolbar.m; sourceTree = ""; }; DB93D7001774E36000437F40 /* Back.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Back.png; sourceTree = ""; }; DB93D7011774E36000437F40 /* BottomBar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = BottomBar.png; sourceTree = ""; }; DB93D7021774E36000437F40 /* RecordArea.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = RecordArea.png; sourceTree = ""; }; @@ -338,6 +371,10 @@ DB9C8BCA1778F48900BA146A /* MainStoryboard_iPhone.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard_iPhone.storyboard; sourceTree = ""; }; DB9D34F517CD98CC00845670 /* STStageExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStageExporter.h; sourceTree = ""; }; DB9D34F617CD98CC00845670 /* STStageExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStageExporter.m; sourceTree = ""; }; + DB9E3515187FE648002A891F /* STStagePlayerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStagePlayerViewController.h; sourceTree = ""; }; + DB9E3516187FE648002A891F /* STStagePlayerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStagePlayerViewController.m; sourceTree = ""; }; + DB9E5ADD18ED2546003FB695 /* STStageExporterFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStageExporterFrame.h; sourceTree = ""; }; + DB9E5ADE18ED2546003FB695 /* STStageExporterFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStageExporterFrame.m; sourceTree = ""; }; DB9E979C17E002C1009BD697 /* navbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = navbutton.png; sourceTree = ""; }; DB9E9E831764A79B00788373 /* StoryTellingRootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StoryTellingRootViewController.m; sourceTree = SOURCE_ROOT; }; DB9E9E871764A7DC00788373 /* CreateStoryRootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CreateStoryRootViewController.h; sourceTree = ""; }; @@ -368,6 +405,8 @@ DBE496D017B372FC009B5C31 /* ACMagnifyingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ACMagnifyingView.h; sourceTree = ""; }; DBE496D117B372FC009B5C31 /* ACMagnifyingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ACMagnifyingView.m; sourceTree = ""; }; DBE496D317B372FC009B5C31 /* kb-loupe-hi.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "kb-loupe-hi.png"; sourceTree = ""; }; + DBE62E9A191C880300449D27 /* STStageExporterFrameTransformHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStageExporterFrameTransformHelper.h; sourceTree = ""; }; + DBE62E9B191C880300449D27 /* STStageExporterFrameTransformHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStageExporterFrameTransformHelper.m; sourceTree = ""; }; DBFA4AA5174D66B4001DFCDC /* RecordStop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = RecordStop.png; sourceTree = ""; }; DBFA4AAB174D6718001DFCDC /* AddButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AddButton.png; sourceTree = ""; }; DBFA4AB0174D79F7001DFCDC /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; @@ -376,6 +415,10 @@ DBFA4AC0174D7F1C001DFCDC /* StartRecordingButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = StartRecordingButton.png; sourceTree = ""; }; DBFA4AC3174D8206001DFCDC /* AudioRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioRecorder.h; sourceTree = ""; }; DBFA4AC4174D8206001DFCDC /* AudioRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AudioRecorder.m; sourceTree = ""; }; + DBFE1019185FFBC800FDAAC7 /* STBGImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STBGImageView.h; sourceTree = ""; }; + DBFE101A185FFBC800FDAAC7 /* STBGImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STBGImageView.m; sourceTree = ""; }; + DBFE101B185FFBC800FDAAC7 /* STFGImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STFGImageView.h; sourceTree = ""; }; + DBFE101C185FFBC800FDAAC7 /* STFGImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STFGImageView.m; sourceTree = ""; }; EB00E64317FE74AE002CE208 /* STFacebookViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STFacebookViewController.h; sourceTree = ""; }; EB00E64417FE74AE002CE208 /* STFacebookViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STFacebookViewController.m; sourceTree = ""; }; EB00E64617FE7E59002CE208 /* FacebookSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FacebookSDK.framework; sourceTree = ""; }; @@ -386,6 +429,8 @@ EB382FC017EFF36800A3FB1F /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+Base64.m"; path = "StoryTelling/NSData+Base64.m"; sourceTree = ""; }; EB63BB3C17E1A4B90044B23A /* STInstalledStoryPacksViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STInstalledStoryPacksViewController.h; sourceTree = ""; }; EB63BB3D17E1A4B90044B23A /* STInstalledStoryPacksViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STInstalledStoryPacksViewController.m; sourceTree = ""; }; + EB6EEDD0183591B30050F3CD /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = ""; }; + EB6EEDD1183591B30050F3CD /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = ""; }; EB743B7217F41119002D3B34 /* lightGray.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = lightGray.jpeg; sourceTree = ""; }; EB7FE48217C7176500E28B4F /* STStoryPacksViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STStoryPacksViewController.h; sourceTree = ""; }; EB7FE48317C7176500E28B4F /* STStoryPacksViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STStoryPacksViewController.m; sourceTree = ""; }; @@ -399,6 +444,11 @@ EB9ACE6C17FD092300FCF6EE /* STSelectStoryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STSelectStoryViewController.m; sourceTree = ""; }; EBA21FB5181783F8006BB6B7 /* STListStoryiPad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STListStoryiPad.h; sourceTree = ""; }; EBA21FB6181783F8006BB6B7 /* STListStoryiPad.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STListStoryiPad.m; sourceTree = ""; }; + EBD4BB43184022F8000558EE /* StoryPacks */ = {isa = PBXFileReference; lastKnownFileType = folder; path = StoryPacks; sourceTree = ""; }; + EBDDB3A5182D93B200B73149 /* STExportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STExportViewController.h; sourceTree = ""; }; + EBDDB3A6182D93B200B73149 /* STExportViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STExportViewController.m; sourceTree = ""; }; + EBDDB3A8182DA71A00B73149 /* uicheckbox_unchecked.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = uicheckbox_unchecked.png; sourceTree = ""; }; + EBDDB3A9182DA71A00B73149 /* uicheckbox_checked.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = uicheckbox_checked.png; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -479,6 +529,8 @@ children = ( DB9D34F517CD98CC00845670 /* STStageExporter.h */, DB9D34F617CD98CC00845670 /* STStageExporter.m */, + DB9E5ADD18ED2546003FB695 /* STStageExporterFrame.h */, + DB9E5ADE18ED2546003FB695 /* STStageExporterFrame.m */, 4D2A0A641780B44200C78EE0 /* STImageInstance.h */, 4D2A0A651780B44200C78EE0 /* STImageInstance.m */, 4D2A0A671780B47D00C78EE0 /* STImageInstanceBackground.h */, @@ -489,14 +541,30 @@ 4D2A0A6E1780B53E00C78EE0 /* STAudioRecording.m */, 4D2A0A701780B56900C78EE0 /* STSound.h */, 4D2A0A711780B56900C78EE0 /* STSound.m */, + DB224D9018A49121007948A5 /* STAudio.h */, + DB224D9118A49121007948A5 /* STAudio.m */, 4D2A0A7F1780B81800C78EE0 /* STStage.h */, 4D2A0A801780B81800C78EE0 /* STStage.m */, - 4D2A0A88178110B000C78EE0 /* STStagePlayer.h */, - 4D2A0A89178110B000C78EE0 /* STStagePlayer.m */, + DB9E3515187FE648002A891F /* STStagePlayerViewController.h */, + DB9E3516187FE648002A891F /* STStagePlayerViewController.m */, + DB0BF94218C0593600F9B095 /* STStagePlayerView.h */, + DB0BF94318C0593600F9B095 /* STStagePlayerView.m */, + DB8EF1B71890CAB500950DA9 /* STPlayerToolbar.h */, + DB8EF1B81890CAB500950DA9 /* STPlayerToolbar.m */, + DB32244718BDB8A4006A5D4E /* STStagePlayer.h */, + DB32244818BDB8A4006A5D4E /* STStagePlayer.m */, + DB32244B18BDB987006A5D4E /* STStagePlayerFrame.h */, + DB32244C18BDB987006A5D4E /* STStagePlayerFrame.m */, + DB4E0B2D18A88E22009B6CEE /* STModifierToolbar.h */, + DB4E0B2E18A88E22009B6CEE /* STModifierToolbar.m */, 4D2A0A851781108100C78EE0 /* STStageRecorder.h */, 4D2A0A861781108200C78EE0 /* STStageRecorder.m */, 4D2A0A8E17811AA500C78EE0 /* STImage.h */, 4D2A0A8F17811AA600C78EE0 /* STImage.m */, + DB33AC5218C9876F00BFE800 /* STStageAudioFrame.h */, + DB33AC5318C9876F00BFE800 /* STStageAudioFrame.m */, + DBE62E9A191C880300449D27 /* STStageExporterFrameTransformHelper.h */, + DBE62E9B191C880300449D27 /* STStageExporterFrameTransformHelper.m */, ); name = StageItems; sourceTree = ""; @@ -531,6 +599,7 @@ DB28D6FD1742E1460071B5C2 = { isa = PBXGroup; children = ( + EBD4BB43184022F8000558EE /* StoryPacks */, 4D97F65418163A820077ABB0 /* ipad_portrate.png */, 4D97F65318163A680077ABB0 /* ipad_portrate_retina.png */, 4D97F65218163A4A0077ABB0 /* Default-Landscape@2x~ipad.png */, @@ -612,6 +681,8 @@ DB9E9E861764A7C300788373 /* Create New Story */, DB28D71B1742E1460071B5C2 /* AppDelegate.h */, DB28D71C1742E1460071B5C2 /* AppDelegate.m */, + EB6EEDD0183591B30050F3CD /* Reachability.h */, + EB6EEDD1183591B30050F3CD /* Reachability.m */, DB01F4D41785ADF300BC2D73 /* StoryTellingRootViewController.h */, DB9E9E831764A79B00788373 /* StoryTellingRootViewController.m */, EBA21FB5181783F8006BB6B7 /* STListStoryiPad.h */, @@ -624,6 +695,8 @@ DB4DF52A178D98C700E90492 /* STCropForegroundViewController.m */, EB00E64317FE74AE002CE208 /* STFacebookViewController.h */, EB00E64417FE74AE002CE208 /* STFacebookViewController.m */, + EBDDB3A5182D93B200B73149 /* STExportViewController.h */, + EBDDB3A6182D93B200B73149 /* STExportViewController.m */, DB0F459F17FAA95B00CE8173 /* STYoutubeViewController.h */, DB0F45A017FAA95B00CE8173 /* STYoutubeViewController.m */, 4DBE3DE01816440700ED3A12 /* Images.xcassets */, @@ -741,6 +814,10 @@ DB9E9E931764A83B00788373 /* WorkArea */ = { isa = PBXGroup; children = ( + DBFE1019185FFBC800FDAAC7 /* STBGImageView.h */, + DBFE101A185FFBC800FDAAC7 /* STBGImageView.m */, + DBFE101B185FFBC800FDAAC7 /* STFGImageView.h */, + DBFE101C185FFBC800FDAAC7 /* STFGImageView.m */, DB28D7511742E4900071B5C2 /* WorkAreaController.h */, DB28D7521742E4900071B5C2 /* WorkAreaController.m */, DB28D74B1742E2390071B5C2 /* ScreenCaptureView.h */, @@ -794,6 +871,8 @@ DBFA4AB2174D7B07001DFCDC /* VideoPlayButton.png */, DBFA4ABD174D7EA3001DFCDC /* StartRecording.png */, DBFA4AC0174D7F1C001DFCDC /* StartRecordingButton.png */, + EBDDB3A8182DA71A00B73149 /* uicheckbox_unchecked.png */, + EBDDB3A9182DA71A00B73149 /* uicheckbox_checked.png */, DB93D6FF1774E33600437F40 /* WorArea Images */, ); name = Images; @@ -941,6 +1020,7 @@ DBFA4ABE174D7EA3001DFCDC /* StartRecording.png in Resources */, DBFA4AC1174D7F1C001DFCDC /* StartRecordingButton.png in Resources */, DB9E9E9D1764BA9F00788373 /* Overlay.png in Resources */, + EBDDB3AB182DA71A00B73149 /* uicheckbox_checked.png in Resources */, DB9A00651815198900244040 /* MainStoryboard_iPad.storyboard in Resources */, DB9E9E9F1764BA9F00788373 /* Overlay@2x.png in Resources */, DB8ADED21770D97C0094BB3A /* 57.png in Resources */, @@ -967,12 +1047,14 @@ 4D8127071801D6A1001737C2 /* ButtonDoneR.png in Resources */, DB989C8117CF2ED20056299D /* ModifierButtonFollowTangent.png in Resources */, DB989C8217CF2ED20056299D /* ModifierButtonPerspectiveGround.png in Resources */, + EBD4BB44184022F8000558EE /* StoryPacks in Resources */, DB989C8317CF2ED20056299D /* ModifierButtonPerspectiveSky.png in Resources */, DB989C8417CF2ED20056299D /* ModifierButtonRotateLeft.png in Resources */, DB989C8517CF2ED20056299D /* ModifierButtonRotateRight.png in Resources */, 4DBE3DE11816440700ED3A12 /* Images.xcassets in Resources */, DB989C8617CF2ED20056299D /* ModifierButtonZoomLarger.png in Resources */, DB989C8717CF2ED20056299D /* ModifierButtonZoomSmaller.png in Resources */, + EBDDB3AA182DA71A00B73149 /* uicheckbox_unchecked.png in Resources */, DB9E979D17E002C1009BD697 /* navbutton.png in Resources */, 4D908E6E17FA3A7D00B309FA /* color_trans.png in Resources */, EB743B7317F41119002D3B34 /* lightGray.jpeg in Resources */, @@ -1023,7 +1105,9 @@ DB9D34F917CD997500845670 /* STStageExporter.m in Sources */, DB98581F17C3596A001AD854 /* UIImageCVMatConverter.mm in Sources */, DB4CA88F17A25D4900C21E7D /* CvGrabCutController.mm in Sources */, + DB9E5ADF18ED2546003FB695 /* STStageExporterFrame.m in Sources */, DB28D7711742F5F50071B5C2 /* ThumbImageView.m in Sources */, + DB224D9218A49121007948A5 /* STAudio.m in Sources */, DB28D7191742E1460071B5C2 /* main.m in Sources */, DB28D71D1742E1460071B5C2 /* AppDelegate.m in Sources */, DB28D74F1742E2390071B5C2 /* ScreenCaptureView.m in Sources */, @@ -1032,22 +1116,29 @@ DB28D75B1742E8840071B5C2 /* SlideDownView.m in Sources */, EB9ACE6E17FD092300FCF6EE /* STSelectStoryViewController.m in Sources */, EB9ACE6D17FD092300FCF6EE /* STSelectImagesFromStoryViewController.m in Sources */, + DB33AC5418C9876F00BFE800 /* STStageAudioFrame.m in Sources */, DB28D75F1742E8950071B5C2 /* SlideLeftView.m in Sources */, + DBFE101D185FFBC800FDAAC7 /* STBGImageView.m in Sources */, DB21F8CF17445B0300FA7D52 /* UIView+Hierarchy.m in Sources */, DBFA4AC5174D8206001DFCDC /* AudioRecorder.m in Sources */, DB9E9E841764A79B00788373 /* StoryTellingRootViewController.m in Sources */, + DBFE101F185FFBC800FDAAC7 /* STFGImageView.m in Sources */, DB9E9E891764A7DC00788373 /* CreateStoryRootViewController.m in Sources */, DB9E9E8D1764A81000788373 /* AddBackgroundViewController.m in Sources */, DB9E9E911764A82100788373 /* AddForegroundViewController.m in Sources */, + DB9E3517187FE648002A891F /* STStagePlayerViewController.m in Sources */, DB9E9E971764A91C00788373 /* SavedStoryDetailsViewController.m in Sources */, DB9E9EAD1764BE4100788373 /* ELCAlbumPickerController.m in Sources */, + DB8EF1B91890CAB500950DA9 /* STPlayerToolbar.m in Sources */, DB9E9EAF1764BE4100788373 /* ELCAsset.m in Sources */, DB9E9EB11764BE4100788373 /* ELCAssetCell.m in Sources */, DB9E9EB31764BE4100788373 /* ELCAssetTablePicker.m in Sources */, DB9E9EB51764BE4100788373 /* ELCImagePickerController.m in Sources */, DB93D70E1774EBEE00437F40 /* TopRightView.m in Sources */, + EBDDB3A7182D93B200B73149 /* STExportViewController.m in Sources */, DB93D7121774EC0000437F40 /* BottomRight.m in Sources */, 4D2A0A58177F8D0F00C78EE0 /* STStoryDB.m in Sources */, + DB0BF94418C0593600F9B095 /* STStagePlayerView.m in Sources */, 4D2A0A5B177FB11300C78EE0 /* STImageInstancePosition.m in Sources */, 4D2A0A5F1780B28100C78EE0 /* STModifier.m in Sources */, 4D2A0A621780B37A00C78EE0 /* STModifierImageInstance.m in Sources */, @@ -1055,8 +1146,10 @@ EBA21FB7181783F8006BB6B7 /* STListStoryiPad.m in Sources */, 4D2A0A691780B47D00C78EE0 /* STImageInstanceBackground.m in Sources */, 4D2A0A6C1780B4BB00C78EE0 /* STImageInstanceForeground.m in Sources */, + DB32244918BDB8A4006A5D4E /* STStagePlayer.m in Sources */, 4D2A0A6F1780B53E00C78EE0 /* STAudioRecording.m in Sources */, 4D2A0A721780B56900C78EE0 /* STSound.m in Sources */, + EB6EEDD2183591B30050F3CD /* Reachability.m in Sources */, 4D2A0A751780B5A000C78EE0 /* STModiferImageInstanceZoom.m in Sources */, 4D2A0A781780B5C900C78EE0 /* STModifierImageInstanceRotate.m in Sources */, 4D2A0A7B1780B5EA00C78EE0 /* STModifierImageInstanceFollowTangent.m in Sources */, @@ -1064,8 +1157,8 @@ 4D2A0A811780B81800C78EE0 /* STStage.m in Sources */, 4D2A0A8417810F8900C78EE0 /* STModifierImageInstanceFlip.m in Sources */, 4D2A0A871781108300C78EE0 /* STStageRecorder.m in Sources */, - 4D2A0A8A178110B200C78EE0 /* STStagePlayer.m in Sources */, 4D2A0A9017811AA800C78EE0 /* STImage.m in Sources */, + DB4E0B2F18A88E22009B6CEE /* STModifierToolbar.m in Sources */, 4D2A0A931783758600C78EE0 /* STStoryFile.m in Sources */, DB4DF527178D6C7F00E90492 /* STCropBackgroundViewController.m in Sources */, DB4DF52B178D98C700E90492 /* STCropForegroundViewController.m in Sources */, @@ -1077,7 +1170,9 @@ EB7FE48717C7439B00E28B4F /* STPaidStoryPacksViewController.m in Sources */, EB7FE48A17C743F000E28B4F /* STFreeStoryPacksViewController.m in Sources */, 4DD126F717D9640C001DD0AC /* STStoryPackDownload.m in Sources */, + DB32244D18BDB987006A5D4E /* STStagePlayerFrame.m in Sources */, EB63BB3E17E1A4B90044B23A /* STInstalledStoryPacksViewController.m in Sources */, + DBE62E9C191C880300449D27 /* STStageExporterFrameTransformHelper.m in Sources */, DB0F459B17FAA5CC00CE8173 /* GTLCommon_Sources.m in Sources */, DB0F459C17FAA5CC00CE8173 /* GTLNetworking_Sources.m in Sources */, DB0F459E17FAA8D500CE8173 /* GTLYouTube_Sources.m in Sources */, @@ -1095,20 +1190,25 @@ DB28D7581742E86A0071B5C2 /* SlideUpView.m in Sources */, DB28D75C1742E8840071B5C2 /* SlideDownView.m in Sources */, DB28D7601742E8950071B5C2 /* SlideLeftView.m in Sources */, + DB32244A18BDB8A4006A5D4E /* STStagePlayer.m in Sources */, DB28D7661742E8BE0071B5C2 /* ThumbImageView.m in Sources */, DB21F8D017445B0300FA7D52 /* UIView+Hierarchy.m in Sources */, DBFA4AC6174D8206001DFCDC /* AudioRecorder.m in Sources */, DB9E9E851764A79B00788373 /* StoryTellingRootViewController.m in Sources */, + DBFE1020185FFBC800FDAAC7 /* STFGImageView.m in Sources */, DB9E9E8A1764A7DC00788373 /* CreateStoryRootViewController.m in Sources */, DB9E9E8E1764A81000788373 /* AddBackgroundViewController.m in Sources */, DB9E9E921764A82100788373 /* AddForegroundViewController.m in Sources */, + DBFE101E185FFBC800FDAAC7 /* STBGImageView.m in Sources */, DB9E9E981764A91C00788373 /* SavedStoryDetailsViewController.m in Sources */, DB9E9EAE1764BE4100788373 /* ELCAlbumPickerController.m in Sources */, DB9E9EB01764BE4100788373 /* ELCAsset.m in Sources */, DB9E9EB21764BE4100788373 /* ELCAssetCell.m in Sources */, DB9E9EB41764BE4100788373 /* ELCAssetTablePicker.m in Sources */, DB9E9EB61764BE4100788373 /* ELCImagePickerController.m in Sources */, + DB32244E18BDB987006A5D4E /* STStagePlayerFrame.m in Sources */, DB93D70F1774EBEE00437F40 /* TopRightView.m in Sources */, + DB9E3518187FE648002A891F /* STStagePlayerViewController.m in Sources */, DB93D7131774EC0000437F40 /* BottomRight.m in Sources */, DB4CA88817A23B1900C21E7D /* CvGrabCutController.mm in Sources */, DB98581D17C35751001AD854 /* UIImageCVMatConverter.mm in Sources */, @@ -1203,7 +1303,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer: Spencer Lambert (N6B543ASYT)"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Spencer Lambert (N6B543ASYT)"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -1236,7 +1336,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer: Spencer Lambert (N6B543ASYT)"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Spencer Lambert (N6B543ASYT)"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.xcworkspace/xcshareddata/StoryTelling.xccheckout b/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.xcworkspace/xcshareddata/StoryTelling.xccheckout index 7fe683c..311bb4a 100644 --- a/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.xcworkspace/xcshareddata/StoryTelling.xccheckout +++ b/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.xcworkspace/xcshareddata/StoryTelling.xccheckout @@ -5,36 +5,48 @@ IDESourceControlProjectFavoriteDictionaryKey IDESourceControlProjectIdentifier - CCF74EAA-60C7-410B-955E-AA995DFF8F14 + 6EC8D052-2F83-4861-AEC0-864C4341EFA3 IDESourceControlProjectName StoryTelling IDESourceControlProjectOriginsDictionary - 699C2B5F-CB76-4312-9054-A8BCAACA5C01 - ssh://github.com/spencerlambert/isp_helper.git + 4A26DFB6-4001-471B-8E25-B404841432BE + https://github.com/vnspencer/StoryTelling.git + D4E0416E-CB9E-474E-9525-0FD76BE3306F + https://github.com/spencerlambert/isp_helper.git IDESourceControlProjectPath StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.xcworkspace IDESourceControlProjectRelativeInstallPathDictionary - 699C2B5F-CB76-4312-9054-A8BCAACA5C01 + 4A26DFB6-4001-471B-8E25-B404841432BE + ../.. + D4E0416E-CB9E-474E-9525-0FD76BE3306F ../../../../.. IDESourceControlProjectURL - ssh://github.com/spencerlambert/isp_helper.git + https://github.com/vnspencer/StoryTelling.git IDESourceControlProjectVersion 110 IDESourceControlProjectWCCIdentifier - 699C2B5F-CB76-4312-9054-A8BCAACA5C01 + D4E0416E-CB9E-474E-9525-0FD76BE3306F IDESourceControlProjectWCConfigurations IDESourceControlRepositoryExtensionIdentifierKey public.vcs.git IDESourceControlWCCIdentifierKey - 699C2B5F-CB76-4312-9054-A8BCAACA5C01 + D4E0416E-CB9E-474E-9525-0FD76BE3306F IDESourceControlWCCName - isp_helper + spence + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 4A26DFB6-4001-471B-8E25-B404841432BE + IDESourceControlWCCName + StoryTelling diff --git a/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.xcworkspace/xcuserdata/aaswini.xcuserdatad/UserInterfaceState.xcuserstate b/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.xcworkspace/xcuserdata/aaswini.xcuserdatad/UserInterfaceState.xcuserstate index e41132a..7ca82af 100644 Binary files a/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.xcworkspace/xcuserdata/aaswini.xcuserdatad/UserInterfaceState.xcuserstate and b/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/project.xcworkspace/xcuserdata/aaswini.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/xcuserdata/aaswini.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/xcuserdata/aaswini.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..1dd1658 --- /dev/null +++ b/StoryApp/iOS/StoryTelling/StoryTelling.xcodeproj/xcuserdata/aaswini.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StoryApp/iOS/StoryTelling/StoryTelling/AppDelegate.h b/StoryApp/iOS/StoryTelling/StoryTelling/AppDelegate.h index 9f6bb63..e96c1ef 100644 --- a/StoryApp/iOS/StoryTelling/StoryTelling/AppDelegate.h +++ b/StoryApp/iOS/StoryTelling/StoryTelling/AppDelegate.h @@ -14,7 +14,9 @@ @property (nonatomic,retain) NSMutableArray *backgroundImagesArray; @property (nonatomic,retain) NSMutableArray *foregroundImagesArray; @property (nonatomic,retain) NSString *isNewStory; +@property BOOL internetAvailable; +(CGSize)deviceSize; +-(void)internetAvailableNotifier; @end diff --git a/StoryApp/iOS/StoryTelling/StoryTelling/AppDelegate.m b/StoryApp/iOS/StoryTelling/StoryTelling/AppDelegate.m index 5a25175..914a514 100644 --- a/StoryApp/iOS/StoryTelling/StoryTelling/AppDelegate.m +++ b/StoryApp/iOS/StoryTelling/StoryTelling/AppDelegate.m @@ -7,6 +7,7 @@ // #import "AppDelegate.h" +#import "Reachability.h" @implementation AppDelegate @synthesize backgroundImagesArray; @@ -16,9 +17,11 @@ @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. + [self internetAvailableNotifier]; backgroundImagesArray = [[NSMutableArray alloc]init]; foregroundImagesArray = [[NSMutableArray alloc]init]; isNewStory=@"true"; + [self clearTmpDirectory]; return YES; } @@ -47,6 +50,15 @@ - (void)applicationDidBecomeActive:(UIApplication *)application - (void)applicationWillTerminate:(UIApplication *)application { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + [self clearTmpDirectory]; +} + +- (void)clearTmpDirectory +{ + NSArray* tmpDirectory = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:NSTemporaryDirectory() error:NULL]; + for (NSString *file in tmpDirectory) { + [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@%@", NSTemporaryDirectory(), file] error:NULL]; + } } +(CGSize )deviceSize @@ -78,4 +90,31 @@ +(CGSize )deviceSize } } +-(void)internetAvailableNotifier{ + Reachability *internetReachable; + + internetReachable = [Reachability reachabilityWithHostname:@"storypacks.stroto.com"]; + + // Internet is reachable + internetReachable.reachableBlock = ^(Reachability*reach) + { + // Update the UI on the main thread + dispatch_async(dispatch_get_main_queue(), ^{ + self.internetAvailable = YES; + }); + }; + + // Internet is not reachable + internetReachable.unreachableBlock = ^(Reachability*reach) + { + // Update the UI on the main thread + dispatch_async(dispatch_get_main_queue(), ^{ + self.internetAvailable = NO; + }); + }; + + [internetReachable startNotifier]; + +} + @end diff --git a/StoryApp/iOS/StoryTelling/StoryTelling/AudioRecorder.m b/StoryApp/iOS/StoryTelling/StoryTelling/AudioRecorder.m index c2223a6..3ce0065 100644 --- a/StoryApp/iOS/StoryTelling/StoryTelling/AudioRecorder.m +++ b/StoryApp/iOS/StoryTelling/StoryTelling/AudioRecorder.m @@ -12,7 +12,7 @@ @implementation AudioRecorder - (id)init{ startedRecording = NO; - NSString *soundFilePath = [[NSString alloc] initWithFormat:@"%@/%@", [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0], @"sound.caf"]; + NSString *soundFilePath = [[NSString alloc] initWithFormat:@"%@/%@", NSTemporaryDirectory(), @"sound.caf"]; NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath]; NSDictionary *recordSettings = [NSDictionary dictionaryWithObjectsAndKeys: diff --git a/StoryApp/iOS/StoryTelling/StoryTelling/BottomRight.h b/StoryApp/iOS/StoryTelling/StoryTelling/BottomRight.h index e78a9f4..9978ee9 100644 --- a/StoryApp/iOS/StoryTelling/StoryTelling/BottomRight.h +++ b/StoryApp/iOS/StoryTelling/StoryTelling/BottomRight.h @@ -17,6 +17,7 @@ - (void)pausecapturingview; - (void)resumecapturingview; + @end @interface BottomRight : UIView{ diff --git a/StoryApp/iOS/StoryTelling/StoryTelling/MainStoryboard_iPad.storyboard b/StoryApp/iOS/StoryTelling/StoryTelling/MainStoryboard_iPad.storyboard index fd35f0f..f11cde4 100644 --- a/StoryApp/iOS/StoryTelling/StoryTelling/MainStoryboard_iPad.storyboard +++ b/StoryApp/iOS/StoryTelling/StoryTelling/MainStoryboard_iPad.storyboard @@ -1,5 +1,5 @@ - + @@ -158,7 +158,7 @@ \ No newline at end of file diff --git a/StoryApp/iOS/StoryTelling/StoryTelling/MainStoryboard_iPhone.storyboard b/StoryApp/iOS/StoryTelling/StoryTelling/MainStoryboard_iPhone.storyboard index 89c1ec9..6cb3564 100644 --- a/StoryApp/iOS/StoryTelling/StoryTelling/MainStoryboard_iPhone.storyboard +++ b/StoryApp/iOS/StoryTelling/StoryTelling/MainStoryboard_iPhone.storyboard @@ -1,5 +1,5 @@ - + @@ -41,11 +41,11 @@ - + + + + + + + + + + + @@ -41,18 +94,18 @@ - - - - - + + + + + @@ -64,6 +117,7 @@ + diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Base.lproj/Main_iPhone.storyboard b/StrotoBasic/StrotoBasic/StrotoBasic/Base.lproj/Main_iPhone.storyboard index 7f5a401..1a60a27 100644 --- a/StrotoBasic/StrotoBasic/StrotoBasic/Base.lproj/Main_iPhone.storyboard +++ b/StrotoBasic/StrotoBasic/StrotoBasic/Base.lproj/Main_iPhone.storyboard @@ -1,7 +1,7 @@ - + - + @@ -20,6 +20,49 @@ + + + + + + @@ -27,7 +70,16 @@ + + + + + + + + + @@ -39,21 +91,21 @@ - + - - - - - + + + + + @@ -65,6 +117,7 @@ + diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/100.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/100.png new file mode 100644 index 0000000..1bb9baa Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/100.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/114.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/114.png new file mode 100644 index 0000000..e8317ef Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/114.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/120.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/120.png new file mode 100644 index 0000000..ec1646b Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/120.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/144.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/144.png new file mode 100644 index 0000000..001b93e Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/144.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/152.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/152.png new file mode 100644 index 0000000..e397df1 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/152.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/29-1.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/29-1.png new file mode 100644 index 0000000..75e13cc Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/29-1.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/29.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/29.png new file mode 100644 index 0000000..75e13cc Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/29.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/40.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/40.png new file mode 100644 index 0000000..2b67476 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/40.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/50.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/50.png new file mode 100644 index 0000000..f6393c4 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/50.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/57.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/57.png new file mode 100644 index 0000000..8a41b87 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/57.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/58-1.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/58-1.png new file mode 100644 index 0000000..c63e4bb Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/58-1.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/58.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/58.png new file mode 100644 index 0000000..c63e4bb Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/58.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/72.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/72.png new file mode 100644 index 0000000..6a01d9d Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/72.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/76.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/76.png new file mode 100644 index 0000000..fd57b27 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/76.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/80-1.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/80-1.png new file mode 100644 index 0000000..89ee2e0 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/80-1.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/80.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/80.png new file mode 100644 index 0000000..89ee2e0 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/80.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/Contents.json b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/Contents.json index 91bf9c1..31a282a 100644 --- a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,53 +1,107 @@ { "images" : [ { + "size" : "29x29", "idiom" : "iphone", + "filename" : "29.png", + "scale" : "1x" + }, + { "size" : "29x29", + "idiom" : "iphone", + "filename" : "58.png", "scale" : "2x" }, { - "idiom" : "iphone", "size" : "40x40", + "idiom" : "iphone", + "filename" : "80.png", "scale" : "2x" }, { + "size" : "57x57", + "idiom" : "iphone", + "filename" : "57.png", + "scale" : "1x" + }, + { + "size" : "57x57", "idiom" : "iphone", + "filename" : "114.png", + "scale" : "2x" + }, + { "size" : "60x60", + "idiom" : "iphone", + "filename" : "120.png", "scale" : "2x" }, { - "idiom" : "ipad", "size" : "29x29", + "idiom" : "ipad", + "filename" : "29-1.png", "scale" : "1x" }, { - "idiom" : "ipad", "size" : "29x29", + "idiom" : "ipad", + "filename" : "58-1.png", "scale" : "2x" }, { + "size" : "40x40", "idiom" : "ipad", + "filename" : "40.png", + "scale" : "1x" + }, + { "size" : "40x40", + "idiom" : "ipad", + "filename" : "80-1.png", + "scale" : "2x" + }, + { + "size" : "50x50", + "idiom" : "ipad", + "filename" : "50.png", "scale" : "1x" }, { + "size" : "50x50", "idiom" : "ipad", - "size" : "40x40", + "filename" : "100.png", "scale" : "2x" }, { + "size" : "72x72", "idiom" : "ipad", - "size" : "76x76", + "filename" : "72.png", "scale" : "1x" }, { + "size" : "72x72", "idiom" : "ipad", + "filename" : "144.png", + "scale" : "2x" + }, + { "size" : "76x76", + "idiom" : "ipad", + "filename" : "76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "152.png", "scale" : "2x" } ], "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "pre-rendered" : true } } \ No newline at end of file diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/Contents.json b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/Contents.json index 6f870a4..be27b98 100644 --- a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/Contents.json +++ b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -5,14 +5,16 @@ "idiom" : "iphone", "extent" : "full-screen", "minimum-system-version" : "7.0", + "filename" : "LaunchImage640x960.png", "scale" : "2x" }, { - "orientation" : "portrait", + "extent" : "full-screen", "idiom" : "iphone", "subtype" : "retina4", - "extent" : "full-screen", + "filename" : "LaunchImage640x1136.png", "minimum-system-version" : "7.0", + "orientation" : "portrait", "scale" : "2x" }, { @@ -20,6 +22,7 @@ "idiom" : "ipad", "extent" : "full-screen", "minimum-system-version" : "7.0", + "filename" : "ipad_portrate.png", "scale" : "1x" }, { @@ -27,6 +30,7 @@ "idiom" : "ipad", "extent" : "full-screen", "minimum-system-version" : "7.0", + "filename" : "ipad_lanscape.png", "scale" : "1x" }, { @@ -34,6 +38,7 @@ "idiom" : "ipad", "extent" : "full-screen", "minimum-system-version" : "7.0", + "filename" : "ipad_portrate_retina.png", "scale" : "2x" }, { @@ -41,6 +46,81 @@ "idiom" : "ipad", "extent" : "full-screen", "minimum-system-version" : "7.0", + "filename" : "ipad_lanscape_retina.png", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "filename" : "LaunchImage320x480.png", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "filename" : "LaunchImage640x960-1.png", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "filename" : "LaunchImage640x1136-1.png", + "subtype" : "retina4", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "filename" : "ipad_portrate-2.png", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "filename" : "ipad_lanscape-2.png", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "filename" : "ipad_portrate_retina-2.png", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "filename" : "ipad_lanscape_retina-2.png", "scale" : "2x" } ], diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage320x480.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage320x480.png new file mode 100644 index 0000000..ac412bd Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage320x480.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x1136-1.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x1136-1.png new file mode 100644 index 0000000..0d77741 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x1136-1.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x1136.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x1136.png new file mode 100644 index 0000000..0d77741 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x1136.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x960-1.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x960-1.png new file mode 100644 index 0000000..f45e44e Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x960-1.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x960.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x960.png new file mode 100644 index 0000000..f45e44e Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/LaunchImage640x960.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape-2.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape-2.png new file mode 100644 index 0000000..50c016d Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape-2.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape.png new file mode 100644 index 0000000..50c016d Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape_retina-2.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape_retina-2.png new file mode 100644 index 0000000..67d122a Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape_retina-2.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape_retina.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape_retina.png new file mode 100644 index 0000000..67d122a Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_lanscape_retina.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate-2.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate-2.png new file mode 100644 index 0000000..60df1b8 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate-2.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate.png new file mode 100644 index 0000000..60df1b8 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate_retina-2.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate_retina-2.png new file mode 100644 index 0000000..2b8bf7b Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate_retina-2.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate_retina.png b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate_retina.png new file mode 100644 index 0000000..2b8bf7b Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/Images.xcassets/LaunchImage.launchimage/ipad_portrate_retina.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Reachability.h b/StrotoBasic/StrotoBasic/StrotoBasic/Reachability.h new file mode 100644 index 0000000..4c839bc --- /dev/null +++ b/StrotoBasic/StrotoBasic/StrotoBasic/Reachability.h @@ -0,0 +1,109 @@ +/* + Copyright (c) 2011, Tony Million. + All rights reserved.res + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import + +#import +#import +#import +#import +#import +#import + +/** + * Does ARC support GCD objects? + * It does if the minimum deployment target is iOS 6+ or Mac OS X 8+ + * + * @see http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h + **/ +#if OS_OBJECT_USE_OBJC +#define NEEDS_DISPATCH_RETAIN_RELEASE 0 +#else +#define NEEDS_DISPATCH_RETAIN_RELEASE 1 +#endif + +/** + * Create NS_ENUM macro if it does not exist on the targeted version of iOS or OS X. + * + * @see http://nshipster.com/ns_enum-ns_options/ + **/ +#ifndef NS_ENUM +#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type +#endif + +extern NSString *const kReachabilityChangedNotification; + +typedef NS_ENUM(NSInteger, NetworkStatus) { + // Apple NetworkStatus Compatible Names. + NotReachable = 0, + ReachableViaWiFi = 2, + ReachableViaWWAN = 1 +}; + +@class Reachability; + +typedef void (^NetworkReachable)(Reachability * reachability); +typedef void (^NetworkUnreachable)(Reachability * reachability); + +@interface Reachability : NSObject + +@property (nonatomic, copy) NetworkReachable reachableBlock; +@property (nonatomic, copy) NetworkUnreachable unreachableBlock; + + +@property (nonatomic, assign) BOOL reachableOnWWAN; + ++(Reachability*)reachabilityWithHostname:(NSString*)hostname; ++(Reachability*)reachabilityForInternetConnection; ++(Reachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress; ++(Reachability*)reachabilityForLocalWiFi; + +-(Reachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref; + +-(BOOL)startNotifier; +-(void)stopNotifier; + +-(BOOL)isReachable; +-(BOOL)isReachableViaWWAN; +-(BOOL)isReachableViaWiFi; + +// WWAN may be available, but not active until a connection has been established. +// WiFi may require a connection for VPN on Demand. +-(BOOL)isConnectionRequired; // Identical DDG variant. +-(BOOL)connectionRequired; // Apple's routine. +// Dynamic, on demand connection? +-(BOOL)isConnectionOnDemand; +// Is user intervention required? +-(BOOL)isInterventionRequired; + +-(NetworkStatus)currentReachabilityStatus; +-(SCNetworkReachabilityFlags)reachabilityFlags; +-(NSString*)currentReachabilityString; +-(NSString*)currentReachabilityFlags; + +@end diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Reachability.m b/StrotoBasic/StrotoBasic/StrotoBasic/Reachability.m new file mode 100644 index 0000000..99aa9f5 --- /dev/null +++ b/StrotoBasic/StrotoBasic/StrotoBasic/Reachability.m @@ -0,0 +1,527 @@ +/* + Copyright (c) 2011, Tony Million. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ + +#import "Reachability.h" + + +NSString *const kReachabilityChangedNotification = @"kReachabilityChangedNotification"; + +@interface Reachability () + +@property (nonatomic, assign) SCNetworkReachabilityRef reachabilityRef; + + +#if NEEDS_DISPATCH_RETAIN_RELEASE +@property (nonatomic, assign) dispatch_queue_t reachabilitySerialQueue; +#else +@property (nonatomic, strong) dispatch_queue_t reachabilitySerialQueue; +#endif + + +@property (nonatomic, strong) id reachabilityObject; + +-(void)reachabilityChanged:(SCNetworkReachabilityFlags)flags; +-(BOOL)isReachableWithFlags:(SCNetworkReachabilityFlags)flags; + +@end + +static NSString *reachabilityFlags(SCNetworkReachabilityFlags flags) +{ + return [NSString stringWithFormat:@"%c%c %c%c%c%c%c%c%c", +#if TARGET_OS_IPHONE + (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-', +#else + 'X', +#endif + (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-', + (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-', + (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-', + (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-', + (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-']; +} + +// Start listening for reachability notifications on the current run loop +static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info) +{ +#pragma unused (target) +#if __has_feature(objc_arc) + Reachability *reachability = ((__bridge Reachability*)info); +#else + Reachability *reachability = ((Reachability*)info); +#endif + + // We probably don't need an autoreleasepool here, as GCD docs state each queue has its own autorelease pool, + // but what the heck eh? + @autoreleasepool + { + [reachability reachabilityChanged:flags]; + } +} + + +@implementation Reachability + +@synthesize reachabilityRef; +@synthesize reachabilitySerialQueue; + +@synthesize reachableOnWWAN; + +@synthesize reachableBlock; +@synthesize unreachableBlock; + +@synthesize reachabilityObject; + +#pragma mark - Class Constructor Methods + ++(Reachability*)reachabilityWithHostName:(NSString*)hostname +{ + return [Reachability reachabilityWithHostname:hostname]; +} + ++(Reachability*)reachabilityWithHostname:(NSString*)hostname +{ + SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithName(NULL, [hostname UTF8String]); + if (ref) + { + id reachability = [[self alloc] initWithReachabilityRef:ref]; + +#if __has_feature(objc_arc) + return reachability; +#else + return [reachability autorelease]; +#endif + + } + + return nil; +} + ++(Reachability *)reachabilityWithAddress:(const struct sockaddr_in *)hostAddress +{ + SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)hostAddress); + if (ref) + { + id reachability = [[self alloc] initWithReachabilityRef:ref]; + +#if __has_feature(objc_arc) + return reachability; +#else + return [reachability autorelease]; +#endif + } + + return nil; +} + ++(Reachability *)reachabilityForInternetConnection +{ + struct sockaddr_in zeroAddress; + bzero(&zeroAddress, sizeof(zeroAddress)); + zeroAddress.sin_len = sizeof(zeroAddress); + zeroAddress.sin_family = AF_INET; + + return [self reachabilityWithAddress:&zeroAddress]; +} + ++(Reachability*)reachabilityForLocalWiFi +{ + struct sockaddr_in localWifiAddress; + bzero(&localWifiAddress, sizeof(localWifiAddress)); + localWifiAddress.sin_len = sizeof(localWifiAddress); + localWifiAddress.sin_family = AF_INET; + // IN_LINKLOCALNETNUM is defined in as 169.254.0.0 + localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM); + + return [self reachabilityWithAddress:&localWifiAddress]; +} + + +// Initialization methods + +-(Reachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref +{ + self = [super init]; + if (self != nil) + { + self.reachableOnWWAN = YES; + self.reachabilityRef = ref; + } + + return self; +} + +-(void)dealloc +{ + [self stopNotifier]; + + if(self.reachabilityRef) + { + CFRelease(self.reachabilityRef); + self.reachabilityRef = nil; + } + + self.reachableBlock = nil; + self.unreachableBlock = nil; + +#if !(__has_feature(objc_arc)) + [super dealloc]; +#endif + + +} + +#pragma mark - Notifier Methods + +// Notifier +// NOTE: This uses GCD to trigger the blocks - they *WILL NOT* be called on THE MAIN THREAD +// - In other words DO NOT DO ANY UI UPDATES IN THE BLOCKS. +// INSTEAD USE dispatch_async(dispatch_get_main_queue(), ^{UISTUFF}) (or dispatch_sync if you want) + +-(BOOL)startNotifier +{ + SCNetworkReachabilityContext context = { 0, NULL, NULL, NULL, NULL }; + + // this should do a retain on ourself, so as long as we're in notifier mode we shouldn't disappear out from under ourselves + // woah + self.reachabilityObject = self; + + + + // First, we need to create a serial queue. + // We allocate this once for the lifetime of the notifier. + self.reachabilitySerialQueue = dispatch_queue_create("com.tonymillion.reachability", NULL); + if(!self.reachabilitySerialQueue) + { + return NO; + } + +#if __has_feature(objc_arc) + context.info = (__bridge void *)self; +#else + context.info = (void *)self; +#endif + + if (!SCNetworkReachabilitySetCallback(self.reachabilityRef, TMReachabilityCallback, &context)) + { +#ifdef DEBUG + NSLog(@"SCNetworkReachabilitySetCallback() failed: %s", SCErrorString(SCError())); +#endif + + // Clear out the dispatch queue + if(self.reachabilitySerialQueue) + { +#if NEEDS_DISPATCH_RETAIN_RELEASE + dispatch_release(self.reachabilitySerialQueue); +#endif + self.reachabilitySerialQueue = nil; + } + + self.reachabilityObject = nil; + + return NO; + } + + // Set it as our reachability queue, which will retain the queue + if(!SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, self.reachabilitySerialQueue)) + { +#ifdef DEBUG + NSLog(@"SCNetworkReachabilitySetDispatchQueue() failed: %s", SCErrorString(SCError())); +#endif + + // UH OH - FAILURE! + + // First stop, any callbacks! + SCNetworkReachabilitySetCallback(self.reachabilityRef, NULL, NULL); + + // Then clear out the dispatch queue. + if(self.reachabilitySerialQueue) + { +#if NEEDS_DISPATCH_RETAIN_RELEASE + dispatch_release(self.reachabilitySerialQueue); +#endif + self.reachabilitySerialQueue = nil; + } + + self.reachabilityObject = nil; + + return NO; + } + + return YES; +} + +-(void)stopNotifier +{ + // First stop, any callbacks! + SCNetworkReachabilitySetCallback(self.reachabilityRef, NULL, NULL); + + // Unregister target from the GCD serial dispatch queue. + SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, NULL); + + if(self.reachabilitySerialQueue) + { +#if NEEDS_DISPATCH_RETAIN_RELEASE + dispatch_release(self.reachabilitySerialQueue); +#endif + self.reachabilitySerialQueue = nil; + } + + self.reachabilityObject = nil; +} + +#pragma mark - reachability tests + +// This is for the case where you flick the airplane mode; +// you end up getting something like this: +//Reachability: WR ct----- +//Reachability: -- ------- +//Reachability: WR ct----- +//Reachability: -- ------- +// We treat this as 4 UNREACHABLE triggers - really apple should do better than this + +#define testcase (kSCNetworkReachabilityFlagsConnectionRequired | kSCNetworkReachabilityFlagsTransientConnection) + +-(BOOL)isReachableWithFlags:(SCNetworkReachabilityFlags)flags +{ + BOOL connectionUP = YES; + + if(!(flags & kSCNetworkReachabilityFlagsReachable)) + connectionUP = NO; + + if( (flags & testcase) == testcase ) + connectionUP = NO; + +#if TARGET_OS_IPHONE + if(flags & kSCNetworkReachabilityFlagsIsWWAN) + { + // We're on 3G. + if(!self.reachableOnWWAN) + { + // We don't want to connect when on 3G. + connectionUP = NO; + } + } +#endif + + return connectionUP; +} + +-(BOOL)isReachable +{ + SCNetworkReachabilityFlags flags; + + if(!SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) + return NO; + + return [self isReachableWithFlags:flags]; +} + +-(BOOL)isReachableViaWWAN +{ +#if TARGET_OS_IPHONE + + SCNetworkReachabilityFlags flags = 0; + + if(SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) + { + // Check we're REACHABLE + if(flags & kSCNetworkReachabilityFlagsReachable) + { + // Now, check we're on WWAN + if(flags & kSCNetworkReachabilityFlagsIsWWAN) + { + return YES; + } + } + } +#endif + + return NO; +} + +-(BOOL)isReachableViaWiFi +{ + SCNetworkReachabilityFlags flags = 0; + + if(SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) + { + // Check we're reachable + if((flags & kSCNetworkReachabilityFlagsReachable)) + { +#if TARGET_OS_IPHONE + // Check we're NOT on WWAN + if((flags & kSCNetworkReachabilityFlagsIsWWAN)) + { + return NO; + } +#endif + return YES; + } + } + + return NO; +} + + +// WWAN may be available, but not active until a connection has been established. +// WiFi may require a connection for VPN on Demand. +-(BOOL)isConnectionRequired +{ + return [self connectionRequired]; +} + +-(BOOL)connectionRequired +{ + SCNetworkReachabilityFlags flags; + + if(SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) + { + return (flags & kSCNetworkReachabilityFlagsConnectionRequired); + } + + return NO; +} + +// Dynamic, on demand connection? +-(BOOL)isConnectionOnDemand +{ + SCNetworkReachabilityFlags flags; + + if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) + { + return ((flags & kSCNetworkReachabilityFlagsConnectionRequired) && + (flags & (kSCNetworkReachabilityFlagsConnectionOnTraffic | kSCNetworkReachabilityFlagsConnectionOnDemand))); + } + + return NO; +} + +// Is user intervention required? +-(BOOL)isInterventionRequired +{ + SCNetworkReachabilityFlags flags; + + if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) + { + return ((flags & kSCNetworkReachabilityFlagsConnectionRequired) && + (flags & kSCNetworkReachabilityFlagsInterventionRequired)); + } + + return NO; +} + + +#pragma mark - reachability status stuff + +-(NetworkStatus)currentReachabilityStatus +{ + if([self isReachable]) + { + if([self isReachableViaWiFi]) + return ReachableViaWiFi; + +#if TARGET_OS_IPHONE + return ReachableViaWWAN; +#endif + } + + return NotReachable; +} + +-(SCNetworkReachabilityFlags)reachabilityFlags +{ + SCNetworkReachabilityFlags flags = 0; + + if(SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) + { + return flags; + } + + return 0; +} + +-(NSString*)currentReachabilityString +{ + NetworkStatus temp = [self currentReachabilityStatus]; + + if(temp == reachableOnWWAN) + { + // Updated for the fact that we have CDMA phones now! + return NSLocalizedString(@"Cellular", @""); + } + if (temp == ReachableViaWiFi) + { + return NSLocalizedString(@"WiFi", @""); + } + + return NSLocalizedString(@"No Connection", @""); +} + +-(NSString*)currentReachabilityFlags +{ + return reachabilityFlags([self reachabilityFlags]); +} + +#pragma mark - Callback function calls this method + +-(void)reachabilityChanged:(SCNetworkReachabilityFlags)flags +{ + if([self isReachableWithFlags:flags]) + { + if(self.reachableBlock) + { + self.reachableBlock(self); + } + } + else + { + if(self.unreachableBlock) + { + self.unreachableBlock(self); + } + } + + // this makes sure the change notification happens on the MAIN THREAD + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:kReachabilityChangedNotification + object:self]; + }); +} + +#pragma mark - Debug Description + +- (NSString *) description +{ + NSString *description = [NSString stringWithFormat:@"<%@: %#x>", + NSStringFromClass([self class]), (unsigned int) self]; + return description; +} + +@end diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/RecordArea.png b/StrotoBasic/StrotoBasic/StrotoBasic/RecordArea.png index bf3f7bd..6984368 100644 Binary files a/StrotoBasic/StrotoBasic/StrotoBasic/RecordArea.png and b/StrotoBasic/StrotoBasic/StrotoBasic/RecordArea.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/STStoryPackDownload.h b/StrotoBasic/StrotoBasic/StrotoBasic/STStoryPackDownload.h new file mode 100644 index 0000000..1e71c2f --- /dev/null +++ b/StrotoBasic/StrotoBasic/StrotoBasic/STStoryPackDownload.h @@ -0,0 +1,28 @@ +// +// STStoryPackDownload.h +// StoryTelling +// +// Created by Nandakumar on 05/09/13. +// Copyright (c) 2013 Stroto, LLC. All rights reserved. +// + +#import + +@protocol STStoryPackDownloadDelegate + +-(void)updateProgress:(float)progress; +-(void)finishedDownloadingDB:(NSString*)DBFilePath; + +@end + +@interface STStoryPackDownload : NSObject + + +@property (nonatomic, weak) NSString *installedFilePath; +@property (nonatomic, strong) NSMutableData *fileData; +@property (nonatomic, strong) id progressDelegate; +@property (nonatomic, strong) NSString *filename; + +-(void)downloadStoryPack:(NSString*)downloadURL; + +@end diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/STStoryPackDownload.m b/StrotoBasic/StrotoBasic/StrotoBasic/STStoryPackDownload.m new file mode 100644 index 0000000..d9f26c3 --- /dev/null +++ b/StrotoBasic/StrotoBasic/StrotoBasic/STStoryPackDownload.m @@ -0,0 +1,91 @@ +// +// STStoryPackDownload.m +// StoryTelling +// +// Created by Nandakumar on 05/09/13. +// Copyright (c) 2013 Stroto, LLC. All rights reserved. +// + +#import "STStoryPackDownload.h" + + +@implementation STStoryPackDownload + +@synthesize installedFilePath; +@synthesize fileData; +@synthesize progressDelegate; +@synthesize filename; + +long long int dbSize; +-(void)downloadStoryPack:(NSString*)downloadURL +{ + NSLog(@"URL : %@",downloadURL); +// filename = [downloadURL lastPathComponent]; + NSLog(@"filename: %@",self.filename); + self.fileData = [[NSMutableData alloc]init]; + NSURLConnection *downloadConnection = [[NSURLConnection alloc] initWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:downloadURL]] delegate:self startImmediately:NO] ; + [downloadConnection scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; + [downloadConnection start]; + + +// [NSTimer scheduledTimerWithTimeInterval:3.0 target:self.progressDelegate selector:@selector(updateProgress:) userInfo:Nil repeats:NO]; +} + +#pragma mark - URLConnection delegate methods +-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response +{ + NSLog(@"Response : %@",response); + NSLog(@"Response.expectedContentLength : %lld",response.expectedContentLength); + dbSize = response.expectedContentLength; +} +-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data +{ + NSLog(@"data length : %d", [data length]); +// NSLog(@"fileData length : %@",fileData); +// NSLog(@"dbSize : %d",dbSize); + float progress = (float)[fileData length]/(float)dbSize; + [progressDelegate updateProgress:progress]; + [self.fileData appendData:data]; + } + + +-(void)connectionDidFinishLoading:(NSURLConnection *)connection +{ + installedFilePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]stringByAppendingPathComponent:@"story_dir/story_packs/"]; + NSLog(@"installedFilePath : %@",installedFilePath); + NSFileManager *fileManger = [NSFileManager defaultManager]; + NSError *error = nil; + [fileManger createDirectoryAtPath:installedFilePath withIntermediateDirectories:YES attributes:nil error:&error]; + if (error != nil) { + NSLog(@"error creating directory: %@", error); + } + installedFilePath = [installedFilePath stringByAppendingPathComponent:filename]; + BOOL dbSuccess = [self.fileData writeToFile:installedFilePath atomically:YES]; + NSLog(@"Save Success : %@",dbSuccess?@"Yes":@"No"); + if(dbSuccess) + { + NSLog(@"DB writing success!!"); + NSURL *installedFileUrl = [NSURL fileURLWithPath:installedFilePath]; + [self addSkipBackupAttributeToItemAtURL:installedFileUrl]; + [progressDelegate finishedDownloadingDB:installedFilePath]; + } + else + { + NSLog(@"DB writing not success!!"); + } +} + +- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL +{ + assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]); + + NSError *error = nil; + BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES] + forKey: NSURLIsExcludedFromBackupKey error: &error]; + if(!success){ + NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error); + } + return success; +} + +@end \ No newline at end of file diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/SlideDownView.h b/StrotoBasic/StrotoBasic/StrotoBasic/SlideDownView.h index 25f57f7..3811ec4 100644 --- a/StrotoBasic/StrotoBasic/StrotoBasic/SlideDownView.h +++ b/StrotoBasic/StrotoBasic/StrotoBasic/SlideDownView.h @@ -24,7 +24,7 @@ - (void)toggleThumbView; - (void) getPhotosFromLibrary; + (ALAssetsLibrary *)defaultAssetsLibrary; - +- (void)clearBorder; @end @protocol SlideDownViewDelegate diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/SlideDownView.m b/StrotoBasic/StrotoBasic/StrotoBasic/SlideDownView.m index f0ccbcc..c17c193 100644 --- a/StrotoBasic/StrotoBasic/StrotoBasic/SlideDownView.m +++ b/StrotoBasic/StrotoBasic/StrotoBasic/SlideDownView.m @@ -36,7 +36,7 @@ - (id)initWithFrame:(CGRect)frame if (IS_IPHONE_5) { frame = CGRectMake(0, CGRectGetMaxY(bounds)-thumbHeight-STATUS_BAR_HEIGHT-IPHONE_5_ADDITIONAL, bounds.size.width, thumbHeight); } else { - frame = CGRectMake(0, CGRectGetMaxY(bounds)-thumbHeight-STATUS_BAR_HEIGHT, bounds.size.width - thumbHeight, thumbHeight); + frame = CGRectMake(0, CGRectGetMaxY(bounds)-thumbHeight-STATUS_BAR_HEIGHT, bounds.size.width, thumbHeight); } self = [super initWithFrame:frame]; /*** @@ -194,10 +194,22 @@ - (NSString *)getOriginalUrlOfThumbnail:(ThumbImageView *)tiv{ -(void)thumbImageViewWasTapped:(ThumbImageView *)tiv { if ([self.mydelegate respondsToSelector:@selector(setForegroundImage:)]){ + if(tiv.layer.borderWidth != 0){ + [self clearBorder]; + [self.mydelegate setForegroundImage:nil]; + }else{ + [self clearBorder]; + tiv.layer.borderWidth = 1; + tiv.layer.borderColor = [UIColor redColor].CGColor; [self.mydelegate setForegroundImage:[tiv originalImage]]; } + } +} +-(void)clearBorder{ + for (UIView *subviews in CutoutImagesHolder.subviews) { + subviews.layer.borderWidth = 0; + } } - /* // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/SlideUpView.m b/StrotoBasic/StrotoBasic/StrotoBasic/SlideUpView.m index d5aa10a..a0767e8 100644 --- a/StrotoBasic/StrotoBasic/StrotoBasic/SlideUpView.m +++ b/StrotoBasic/StrotoBasic/StrotoBasic/SlideUpView.m @@ -28,7 +28,8 @@ - (id)initWithFrame:(CGRect)frame { CGRect bounds = [[UIScreen mainScreen] bounds]; float thumbHeight = THUMB_HEIGHT + THUMB_V_PADDING * 2 ; - if (IS_IPHONE_5) { + if (IS_IPHONE_5 + ) { frame = CGRectMake(CGRectGetMinX(bounds), CGRectGetMinY(bounds), bounds.size.width, thumbHeight); } else { frame = CGRectMake(CGRectGetMinX(bounds), CGRectGetMinY(bounds), bounds.size.width - thumbHeight, thumbHeight); diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/Stroto Basic-Info.plist b/StrotoBasic/StrotoBasic/StrotoBasic/Stroto Basic-Info.plist new file mode 100644 index 0000000..0b5f519 --- /dev/null +++ b/StrotoBasic/StrotoBasic/StrotoBasic/Stroto Basic-Info.plist @@ -0,0 +1,67 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + + + UIPrerenderedIcon + + + + CFBundlePrimaryIcon + + UIPrerenderedIcon + + + CFBundleIdentifier + com.stroto.ios-basic + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main_iPhone + UIMainStoryboardFile~ipad + Main_iPad + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarHidden + + UIStatusBarStyle + UIStatusBarStyleDefault + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/StrotoBasic-Prefix.pch b/StrotoBasic/StrotoBasic/StrotoBasic/Stroto Basic-Prefix.pch similarity index 100% rename from StrotoBasic/StrotoBasic/StrotoBasic/StrotoBasic-Prefix.pch rename to StrotoBasic/StrotoBasic/StrotoBasic/Stroto Basic-Prefix.pch diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/StrotoBasic-Info.plist b/StrotoBasic/StrotoBasic/StrotoBasic/StrotoBasic-Info.plist index fff9f04..329afc5 100644 --- a/StrotoBasic/StrotoBasic/StrotoBasic/StrotoBasic-Info.plist +++ b/StrotoBasic/StrotoBasic/StrotoBasic/StrotoBasic-Info.plist @@ -8,8 +8,22 @@ ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + + + UIPrerenderedIcon + + + + CFBundleIcons~ipad + CFBundleIdentifier - com.stroto.${PRODUCT_NAME:rfc1034identifier} + com.stroto.storyapptest1 CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -22,12 +36,16 @@ ???? CFBundleVersion 1.0 + LSApplicationCategoryType + LSRequiresIPhoneOS UIMainStoryboardFile Main_iPhone UIMainStoryboardFile~ipad Main_iPad + UIPrerenderedIcon + UIRequiredDeviceCapabilities armv7 @@ -39,15 +57,10 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UIViewControllerBasedStatusBarAppearance diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/ViewController.h b/StrotoBasic/StrotoBasic/StrotoBasic/ViewController.h index 484939e..39c6170 100644 --- a/StrotoBasic/StrotoBasic/StrotoBasic/ViewController.h +++ b/StrotoBasic/StrotoBasic/StrotoBasic/ViewController.h @@ -11,7 +11,21 @@ #import "NSData+Base64.h" #import #import "playViewController.h" +#import "STStoryPackDownload.h" + +@interface ViewController : UIViewController -@interface ViewController : UIViewController @property (weak, nonatomic) IBOutlet UIView *storyPacksView; +@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *spinner; +@property (weak, nonatomic) IBOutlet UILabel *loadingLabel; + +@property (weak, nonatomic) IBOutlet UIView *downloadRectView; +@property (weak, nonatomic) IBOutlet UIProgressView *progressView; +@property (weak, nonatomic) IBOutlet UILabel *downloadPercentageLabel; +@property (weak, nonatomic) IBOutlet UIButton *BGHideDownload; + +@property (assign, nonatomic) int storyPackID; +@property (strong, nonatomic) NSString *storyDBName; +@property (strong, nonatomic) NSDictionary *basicJsonDict; + @end diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/ViewController.m b/StrotoBasic/StrotoBasic/StrotoBasic/ViewController.m index dae9bd9..901f835 100644 --- a/StrotoBasic/StrotoBasic/StrotoBasic/ViewController.m +++ b/StrotoBasic/StrotoBasic/StrotoBasic/ViewController.m @@ -12,37 +12,142 @@ #define THUMB_H_PADDING (IS_IPAD ? 25 : 18) #define RADIUS (IS_IPAD ? 25 :15 ) +#define urlAsString [NSString stringWithFormat:@"http://storypacks.stroto.com"] +#define freeBody [NSString stringWithFormat:@"{\"st_request\":\"get_free_list\"}"] +#define basic [NSString stringWithFormat:@"{\"st_request\":\"purchase\",\"st_story_id\":\"%d\",\"apple_receipt\":\"BASIC VERSION\"}",storyPackID] + #import "ViewController.h" +#import "AppDelegate.h" +#import "STStoryPackDownload.h" @interface ViewController () @end @implementation ViewController +{ + BOOL internetAvailable; + BOOL download; + NSDictionary *jsonData; +} + @synthesize storyPacksView; +@synthesize basicJsonDict; +@synthesize spinner; +@synthesize loadingLabel; +@synthesize storyPackID; +@synthesize storyDBName; +@synthesize downloadRectView; +@synthesize progressView; +@synthesize downloadPercentageLabel; +@synthesize BGHideDownload; float scrollViewHeight,scrollViewWidth,xPosition,yPosition; UIScrollView *storyPacksHolder; -NSArray *storyPacksList; + +-(void)viewWillAppear:(BOOL)animated +{ + + } - (void)viewDidLoad { [super viewDidLoad]; - - [self showStoryPacks]; - // Do any additional setup after loading the view, typically from a nib. + // Do any additional setup after loading the view, typically from a nib. + + NSLog(@"download bool: %hhd",download); + [self startSpin]; + basicJsonDict = [[NSDictionary alloc] init]; + [self performSelector:@selector(startRequest) withObject:nil afterDelay:1]; +// [self performSelector:@selector(showStoryPacks) withObject:nil afterDelay:3]; + [self performSelector:@selector(dismissLoader) withObject:nil afterDelay:60]; +} +-(void)startRequest +{ + internetAvailable = ((AppDelegate *)[[UIApplication sharedApplication]delegate]).internetAvailable; + if(internetAvailable) + { + NSLog(@"internet Available"); + [self performSelectorInBackground:@selector(jsonRequest:) withObject:freeBody]; + } + else{ + NSLog(@"internet Unavailable"); + UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil message:@"The device data is off, please turn it on to access the downloadable Story Packs" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; + [alert show]; + [self stopSpin]; + } + } -- (void)didReceiveMemoryWarning +-(void)dismissLoader{ + [self stopSpin]; + [((AppDelegate *)[[UIApplication sharedApplication]delegate]) internetAvailableNotifier]; + internetAvailable = ((AppDelegate *)[[UIApplication sharedApplication]delegate]).internetAvailable; + // NSLog(@"internet availability : %hhd", ((AppDelegate *)[[UIApplication sharedApplication]delegate]).internetAvailable); + if (!internetAvailable){ + UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil message:@"The device data is off, please turn it on to access the downloadable Story Packs" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; + [alert show]; + [self stopSpin]; + } +} + +-(void)startSpin { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. + //start activity indicator + [self.spinner startAnimating]; + [self.spinner setHidden:NO]; + [self.loadingLabel setHidden:NO]; +} + +-(void)stopSpin +{ + //stop activity indicator + [self.spinner stopAnimating]; + [self.spinner setHidden:YES]; + [self.loadingLabel setHidden:YES]; +} + +- (void) jsonRequest:(NSString *)body{ + jsonData = [[NSDictionary alloc] init]; + NSURL *url = [NSURL URLWithString:urlAsString]; + NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:15 ]; + NSData *requestData = [NSData dataWithBytes:[body UTF8String] length:[body length]]; + [urlRequest setHTTPMethod:@"POST"]; + [urlRequest setValue:@"application/json" forHTTPHeaderField:@"Accept"]; + [urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; + [urlRequest setValue:[NSString stringWithFormat:@"%d", [requestData length]] forHTTPHeaderField:@"Content-Length"]; + [urlRequest setHTTPBody:requestData]; + NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + [NSURLConnection sendAsynchronousRequest:urlRequest queue:queue completionHandler:^(NSURLResponse *response,NSData *data,NSError *error) { + if ([data length] >0 && error == nil){ + jsonData = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error]; + NSLog(@"jsonData : %@",jsonData); + if(download) + { +// [self performSelector:@selector(callDownload) withObject:nil afterDelay:0]; + [self callDownload]; + } + else + { +// [self performSelector:@selector(showStoryPacks) withObject:nil afterDelay:0]; + [self showStoryPacks]; + } + } + else if ([data length] == 0 && error == nil){ + NSLog(@"Nothing was downloaded."); + } + else if (error != nil){ + [self performSelectorOnMainThread:@selector(showAlert:) withObject:[error.userInfo objectForKey:NSLocalizedDescriptionKey] waitUntilDone:NO]; + NSLog(@"Error happened = %@", error); + [self performSelectorOnMainThread:@selector(showError) withObject:nil waitUntilDone:YES]; + } + }]; } -(void)showStoryPacks { - storyPacksList= [[NSBundle mainBundle] pathsForResourcesOfType:@"db" inDirectory:@"StoryPacks"]; -//NSLog(@"StoryPacksList : %@",storyPacksList); - int count = [storyPacksList count]; + basicJsonDict = jsonData; + NSLog(@"basicjsonDict after: %@",jsonData); + int count = [[basicJsonDict valueForKey:@"st_list"] count]; NSLog (@"number of story packs :%i",count); float holderWidth=0; scrollViewHeight = [storyPacksView bounds].size.height; @@ -68,60 +173,45 @@ -(void)showStoryPacks { for(int j=0; j<2;j++) { - sqlite3 *db; - if([[[storyPacksList[i] lastPathComponent] pathExtension] isEqualToString:@"db"]) - { - const char *dbpath = [storyPacksList[i] UTF8String]; -//NSLog(@"database path UTF8String: %s",dbpath); - if (sqlite3_open(dbpath, & db) == SQLITE_OK){ -//NSLog(@"storyPacksList[%d] : %@ successfully opened.",i,storyPacksList[i]); - NSString *sql = [NSString stringWithFormat:@"SELECT Name,ImageDataPNG_Base64 FROM StoryPackInfo;"]; - const char *sql_stmt = [sql UTF8String]; - sqlite3_stmt *compiled_stmt; - int success = sqlite3_prepare_v2(db, sql_stmt, -1, &compiled_stmt, nil); -// NSLog(@"%s SQLITE_ERROR '%s' (%1d)", __FUNCTION__, sqlite3_errmsg(db), sqlite3_errcode(db)); -// NSLog(@"success : %d",success); - if(success == SQLITE_OK){ -// NSLog(@"SQL query Statement preparation on database success."); - if(sqlite3_step(compiled_stmt) == SQLITE_ROW){ - NSString *dataAsString = [NSString stringWithUTF8String:(char*) sqlite3_column_text(compiled_stmt, 1)]; - NSData *data = [NSData dataFromBase64String:dataAsString]; - UIImage *image = [UIImage imageWithData:data]; -// STImage *stimage = [[STImage alloc] initWithCGImage:[image CGImage]]; - UIImageView *thumbView = [[UIImageView alloc] initWithImage:image]; -// thumbView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin; - thumbView.layer.cornerRadius = RADIUS; - thumbView.clipsToBounds = YES; - CGRect frame = [thumbView frame]; - [thumbView setContentMode:UIViewContentModeScaleAspectFit]; - frame.origin.y = yPosition; - frame.origin.x = xPosition;//thumb_H_padding - frame.size.width = THUMB_HEIGHT; //thumbImage.size.width; - frame.size.height = THUMB_HEIGHT; // thumbImage.size.height; - [thumbView setFrame:frame]; - [thumbView setUserInteractionEnabled:YES]; - [thumbView setHidden:NO]; - //setting tap. - [thumbView setTag:i]; - UITapGestureRecognizer *click = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handleTap:)]; - click.numberOfTapsRequired = 1; - [thumbView addGestureRecognizer:click]; - [thumbView setUserInteractionEnabled:YES]; - NSLog(@"thumbView autoresizing mask = %d",thumbView.autoresizingMask); - [storyPacksHolder addSubview:thumbView]; - xPosition += (THUMB_HEIGHT + THUMB_H_PADDING); - - } - } - - sqlite3_finalize(compiled_stmt); - sqlite3_close(db); + if(i== count) + { + [self stopSpin]; + break; } - NSLog(@"Story i = %d ,\n xPos = %f , ypos = %f",i,xPosition,yPosition); + if([[[basicJsonDict valueForKey:@"st_list"] objectAtIndex:i] valueForKey:@"ThumbnailURL"]) + { + NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:[[[basicJsonDict valueForKey:@"st_list"] objectAtIndex:i] valueForKey:@"ThumbnailURL"]]]; + UIImage *image = [UIImage imageWithData:data]; + UIImageView *thumbView = [[UIImageView alloc] initWithImage:image]; + thumbView.layer.cornerRadius = RADIUS; + thumbView.clipsToBounds = YES; + CGRect frame = [thumbView frame]; + [thumbView setContentMode:UIViewContentModeScaleAspectFit]; + frame.origin.y = yPosition; + frame.origin.x = xPosition;//thumb_H_padding + frame.size.width = THUMB_HEIGHT; //thumbImage.size.width; + frame.size.height = THUMB_HEIGHT; // thumbImage.size.height; + [thumbView setFrame:frame]; + [thumbView setUserInteractionEnabled:YES]; + [thumbView setHidden:NO]; + //setting tap. +// [thumbView setTag:[[[[basicJsonDict valueForKey:@"st_list"] objectAtIndex:i] valueForKey:@"StoryPackID"] integerValue]]; + [thumbView setTag:i]; + NSLog(@"thumb.view.tag : %d",thumbView.tag); + UITapGestureRecognizer *click = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handleTap:)]; + click.numberOfTapsRequired = 1; + [thumbView addGestureRecognizer:click]; + [thumbView setUserInteractionEnabled:YES]; + [storyPacksHolder addSubview:thumbView]; + xPosition += (THUMB_HEIGHT + THUMB_H_PADDING); +// NSLog(@"Story i = %d ,\n xPos = %f , ypos = %f",i,xPosition,yPosition); } i++; if(i == count) + { + [self stopSpin]; break; + } } holderWidth +=xPosition; // xPosition = storyPacksView.bounds.size.width * page + THUMB_H_PADDING ; @@ -130,6 +220,7 @@ -(void)showStoryPacks // yPosition += (THUMB_HEIGHT + 30); if(i == count) { + [self stopSpin]; break; } } @@ -142,19 +233,108 @@ -(void)showStoryPacks } // NSLog(@"Width : %f",storyPacksView.bounds.size.width); holderWidth=storyPacksView.bounds.size.width*page; - }while(page<(count/6)); + }while(page<=(count/6)); [storyPacksHolder setContentSize:CGSizeMake(holderWidth, scrollViewHeight)]; - NSLog(@"storyPacksHolder default autoresizesSubviews = %hhd",storyPacksHolder.autoresizesSubviews); +// NSLog(@"storyPacksHolder default autoresizesSubviews = %hhd",storyPacksHolder.autoresizesSubviews); [storyPacksView addSubview:storyPacksHolder]; } + -(void)handleTap:(UITapGestureRecognizer*)recognizer { - playViewController *playGround = [[playViewController alloc] init]; - if(IS_IPAD) - playGround = [[UIStoryboard storyboardWithName:@"Main_iPad" bundle:nil] instantiateViewControllerWithIdentifier:@"playGround"]; - else - playGround = [[UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"playGround"]; - playGround.dbName =storyPacksList[recognizer.view.tag]; - [self presentViewController:playGround animated:YES completion:nil]; + NSLog(@"tag: %d",recognizer.view.tag); +// [self startSpin]; + self.storyPackID = [[[[self.basicJsonDict valueForKey:@"st_list"] objectAtIndex:recognizer.view.tag] valueForKey:@"StoryPackID"] integerValue]; +NSLog(@"self.storypackID : %d",self.storyPackID); + self.storyDBName = [[[self.basicJsonDict valueForKey:@"st_list"] objectAtIndex:recognizer.view.tag] valueForKey:@"AppleStoreKey"]; +NSLog(@"self.storyDBName :%@",self.storyDBName); + + NSLog(@"%@",[[basicJsonDict valueForKey:@"st_list"] objectAtIndex:recognizer.view.tag]); + NSLog(@"basic : %@",basic); + download = 1; + [self performSelector:@selector(jsonRequest:) withObject:basic]; +// [self performSelector:@selector(callDownload) withObject:nil afterDelay:3]; +} + +-(void)callDownload +{ + [self startSpin]; + [self.downloadRectView.layer setCornerRadius:9]; + [self.downloadRectView.layer setMasksToBounds:YES]; + [self.downloadRectView setHidden:NO]; +// [self.navigationItem setHidesBackButton:YES]; + [self.progressView setHidden:NO]; + [self.downloadPercentageLabel setHidden:NO]; + [self.BGHideDownload setHidden:NO]; + self.storyDBName = [self.storyDBName stringByAppendingPathExtension:@"db"]; + STStoryPackDownload *freedownload = [[STStoryPackDownload alloc] init]; + [freedownload setFilename:self.storyDBName]; + [freedownload downloadStoryPack:[jsonData valueForKey:@"st_storypack_url" ]]; + // playViewController *playGround = [[playViewController alloc] init]; + // if(IS_IPAD) + // playGround = [[UIStoryboard storyboardWithName:@"Main_iPad" bundle:nil] instantiateViewControllerWithIdentifier:@"playGround"]; + // else + // playGround = [[UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"playGround"]; + // playGround.dbName =storyPacksList[recognizer.view.tag]; + // [self presentViewController:playGround animated:YES completion:nil]; + +} + +-(void)updateProgress:(float)progress{ + NSLog(@"progress : %f",progress); + self.downloadPercentageLabel.text = [NSString stringWithFormat:@"Downloading %0.0f%%",(progress*100)]; + [self.progressView setProgress:progress animated:YES]; + [self.progressView setProgressTintColor:[UIColor blueColor]]; +} + +-(void)finishedDownloadingDB:(NSString *)DBFilePath +{ + NSLog(@"finished downloading DB, moving to play!!"); + playViewController *playGround = [[playViewController alloc] init]; + if(IS_IPAD) + playGround = [[UIStoryboard storyboardWithName:@"Main_iPad" bundle:nil] instantiateViewControllerWithIdentifier:@"playGround"]; + else + playGround = [[UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"playGround"]; + playGround.dbName =DBFilePath; + [self presentViewController:playGround animated:YES completion:nil]; +} + +-(void)showAlert:(NSString*)message{ + UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; + [alert show]; +} + +- (void) showError{ + UILabel *txtView = [[UILabel alloc] initWithFrame:IS_IPAD?CGRectMake(276, 487, 217, 50):CGRectMake(75, 170, 185, 50)]; + [txtView setTextAlignment:NSTextAlignmentJustified]; + [txtView setTextColor:[UIColor whiteColor]]; + [txtView setText:@"Can't reach Story Pack Server, please try again."]; + [txtView setNumberOfLines:IS_IPAD?2:3]; + [txtView setLineBreakMode:NSLineBreakByTruncatingTail]; + UIButton *button; + button= [UIButton buttonWithType:UIButtonTypeRoundedRect]; + [button addTarget:self action:@selector(retry) forControlEvents:UIControlEventTouchDown]; + [button setTitle:@"Retry Server" forState:UIControlStateNormal]; + button.frame = IS_IPAD?CGRectMake(315, 529, 100, 40.0):CGRectMake(70, 200, 200.0, 60.0); +// [txtView setBackgroundColor:[UIColor whiteColor]]; + [self.storyPacksView addSubview:txtView]; + [self.storyPacksView addSubview:button]; +} + +- (void) retry{ + if(download) + { + + } + else{ + [self performSelector:@selector(startRequest) withObject:nil afterDelay:1]; + } + +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. } + @end diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/color_trans.png b/StrotoBasic/StrotoBasic/StrotoBasic/color_trans.png new file mode 100644 index 0000000..518e305 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/color_trans.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/en.lproj/Main_iPad.storyboard b/StrotoBasic/StrotoBasic/StrotoBasic/en.lproj/Main_iPad.storyboard new file mode 100644 index 0000000..f3185e6 --- /dev/null +++ b/StrotoBasic/StrotoBasic/StrotoBasic/en.lproj/Main_iPad.storyboard @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/100.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/100.png new file mode 100644 index 0000000..1bb9baa Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/100.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/1024.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/1024.png new file mode 100644 index 0000000..59e1796 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/1024.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/114.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/114.png new file mode 100644 index 0000000..e8317ef Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/114.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/120.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/120.png new file mode 100644 index 0000000..ec1646b Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/120.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/1253.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/1253.png new file mode 100644 index 0000000..75c4d58 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/1253.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/144.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/144.png new file mode 100644 index 0000000..001b93e Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/144.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/152.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/152.png new file mode 100644 index 0000000..e397df1 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/152.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/29.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/29.png new file mode 100644 index 0000000..75e13cc Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/29.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/40.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/40.png new file mode 100644 index 0000000..2b67476 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/40.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/50.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/50.png new file mode 100644 index 0000000..f6393c4 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/50.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/512.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/512.png new file mode 100644 index 0000000..5c0a339 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/512.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/57.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/57.png new file mode 100644 index 0000000..8a41b87 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/57.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/58.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/58.png new file mode 100644 index 0000000..c63e4bb Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/58.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/72.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/72.png new file mode 100644 index 0000000..6a01d9d Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/72.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/76.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/76.png new file mode 100644 index 0000000..fd57b27 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/76.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/images/80.png b/StrotoBasic/StrotoBasic/StrotoBasic/images/80.png new file mode 100644 index 0000000..89ee2e0 Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/images/80.png differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/lightGray.jpeg b/StrotoBasic/StrotoBasic/StrotoBasic/lightGray.jpeg new file mode 100644 index 0000000..b68deee Binary files /dev/null and b/StrotoBasic/StrotoBasic/StrotoBasic/lightGray.jpeg differ diff --git a/StrotoBasic/StrotoBasic/StrotoBasic/playViewController.m b/StrotoBasic/StrotoBasic/StrotoBasic/playViewController.m index 5aa5fe8..e438b27 100644 --- a/StrotoBasic/StrotoBasic/StrotoBasic/playViewController.m +++ b/StrotoBasic/StrotoBasic/StrotoBasic/playViewController.m @@ -63,6 +63,9 @@ - (void)viewDidLoad CGRect playbounds = [[UIScreen mainScreen] bounds]; float thumbHeight = THUMB_HEIGHT + THUMB_V_PADDING * 2 ; float thumbHeightBottom = THUMB_HEIGHT + THUMB_V_PADDING * 2 ; + if(IS_IPHONE_5) { + thumbHeightBottom = THUMB_HEIGHT + THUMB_V_PADDING + IPHONE_5_ADDITIONAL * 2 ; + } imageSelected = NO; pickedImages = [[NSMutableArray alloc]init]; @@ -78,7 +81,7 @@ - (void)viewDidLoad bgImageView.contentMode = UIViewContentModeScaleToFill; [bgImageView setUserInteractionEnabled:YES]; [playView addSubview:bgImageView]; - bgImageView.image = [UIImage imageNamed:@"recordArea.png"]; + bgImageView.image = [UIImage imageNamed:@"RecordArea.png"]; CGRect frame = CGRectMake(0, CGRectGetMaxY(playbounds)-thumbHeightBottom, playbounds.size.width, thumbHeightBottom); UIImageView *bottombar = [[UIImageView alloc]initWithFrame:frame]; @@ -110,6 +113,19 @@ - (void)viewDidLoad TopRightView *doneView = [[TopRightView alloc]initWithFrame:CGRectMake(0, 0, 0, 0)]; [doneView setMydelegate:self]; [self.view addSubview:doneView]; + + button= [UIButton buttonWithType:UIButtonTypeRoundedRect]; + [button addTarget:self + action:@selector(closeBtn) + forControlEvents:UIControlEventTouchDown]; + [button setTitle:@"" forState:UIControlStateNormal]; + button.frame = IS_IPAD?CGRectMake(703, 28.0, 40.0, 40.0):CGRectMake(294.0, 15.0, 20.0, 20.0); + [button setBackgroundImage:[UIImage imageNamed:@"color_trans.png" ]forState:UIControlStateNormal]; + [bgImageView addSubview:button]; +} +-(void)closeBtn{ + bgImageView.image = [UIImage imageNamed:@"RecordAreaBlank.png"]; + [button setEnabled:NO]; } -(void)goBack{ ViewController *stories = [[ViewController alloc] init]; @@ -201,6 +217,11 @@ - (void) doSingleTap:(UIGestureRecognizer *) gestureRecognizer { [imageview addGestureRecognizer:tap]; [self setSelectedForegroundImage:nil]; + [fgImages clearBorder]; + for(UIView *subviews in [playView subviews]) + { + [subviews setUserInteractionEnabled:YES]; + } } } @@ -224,13 +245,25 @@ - (BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiv - (void) setWorkspaceBackground:(UIImage *)selectedImage{ bgImageView.image = selectedImage; // [captureview actortoStage:selectedImage]; + [button setEnabled:NO]; } //adding foreground image to work area -(void) setForegroundImage:(UIImage *)selectedImage{ + if(selectedImage != nil) + { + for (UIView *subviews in [playView subviews]) { + [subviews setUserInteractionEnabled:NO]; + } [self setSelectedForegroundImage:selectedImage]; NSLog(@"%@", [selectedImage description]); NSLog(@"foreground image set"); + } + else{ + for (UIView *subviews in [playView subviews]) { + [subviews setUserInteractionEnabled:YES]; + } + } } #pragma mark UIGestureRecognizerDelegate methods diff --git a/StrotoBasic/StrotoBasic/StrotoBasicTests/StrotoBasicTests-Info.plist b/StrotoBasic/StrotoBasic/StrotoBasicTests/Stroto BasicTests-Info.plist similarity index 100% rename from StrotoBasic/StrotoBasic/StrotoBasicTests/StrotoBasicTests-Info.plist rename to StrotoBasic/StrotoBasic/StrotoBasicTests/Stroto BasicTests-Info.plist