diff --git a/clients/ios-objc/README b/clients/ios-objc/README deleted file mode 100644 index fdafc7220..000000000 --- a/clients/ios-objc/README +++ /dev/null @@ -1 +0,0 @@ -See https://github.com/nickoneill/LACamliClient diff --git a/clients/ios-objc/photobackup.xcodeproj/project.pbxproj b/clients/ios-objc/photobackup.xcodeproj/project.pbxproj new file mode 100644 index 000000000..9ef669dc3 --- /dev/null +++ b/clients/ios-objc/photobackup.xcodeproj/project.pbxproj @@ -0,0 +1,540 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D0180BEA185007C000E3487F /* credentials.plist in Resources */ = {isa = PBXBuildFile; fileRef = D0180BE9185007C000E3487F /* credentials.plist */; }; + D075B282184944330054FED3 /* LACamliUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = D075B281184944330054FED3 /* LACamliUtil.m */; }; + D075B28518494DB20054FED3 /* LACamliUploadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = D075B28418494DB20054FED3 /* LACamliUploadOperation.m */; }; + D095AE131814AF10008163F2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D095AE121814AF10008163F2 /* Foundation.framework */; }; + D095AE151814AF10008163F2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D095AE141814AF10008163F2 /* CoreGraphics.framework */; }; + D095AE171814AF10008163F2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D095AE161814AF10008163F2 /* UIKit.framework */; }; + D095AE1D1814AF10008163F2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D095AE1B1814AF10008163F2 /* InfoPlist.strings */; }; + D095AE1F1814AF10008163F2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D095AE1E1814AF10008163F2 /* main.m */; }; + D095AE231814AF10008163F2 /* LAAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D095AE221814AF10008163F2 /* LAAppDelegate.m */; }; + D095AE261814AF10008163F2 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D095AE241814AF10008163F2 /* Main_iPhone.storyboard */; }; + D095AE291814AF10008163F2 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D095AE271814AF10008163F2 /* Main_iPad.storyboard */; }; + D095AE2C1814AF10008163F2 /* LAViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D095AE2B1814AF10008163F2 /* LAViewController.m */; }; + D095AE2E1814AF10008163F2 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D095AE2D1814AF10008163F2 /* Images.xcassets */; }; + D095AE351814AF10008163F2 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D095AE341814AF10008163F2 /* XCTest.framework */; }; + D095AE361814AF10008163F2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D095AE121814AF10008163F2 /* Foundation.framework */; }; + D095AE371814AF10008163F2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D095AE161814AF10008163F2 /* UIKit.framework */; }; + D095AE3F1814AF10008163F2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D095AE3D1814AF10008163F2 /* InfoPlist.strings */; }; + D095AE411814AF10008163F2 /* photobackupTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D095AE401814AF10008163F2 /* photobackupTests.m */; }; + D095AE501814B1B9008163F2 /* LACamliFile.m in Sources */ = {isa = PBXBuildFile; fileRef = D095AE4C1814B1B9008163F2 /* LACamliFile.m */; }; + D095AE511814B1B9008163F2 /* LACamliClient.m in Sources */ = {isa = PBXBuildFile; fileRef = D095AE4E1814B1B9008163F2 /* LACamliClient.m */; }; + D0AC217118503A8E004BD4F3 /* CamliCollectionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D0AC217018503A8E004BD4F3 /* CamliCollectionCell.m */; }; + D0AC217418503B0D004BD4F3 /* LACamliRecentFile.m in Sources */ = {isa = PBXBuildFile; fileRef = D0AC217318503B0D004BD4F3 /* LACamliRecentFile.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + D095AE381814AF10008163F2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D095AE071814AF10008163F2 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D095AE0E1814AF10008163F2; + remoteInfo = photobackup; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + D0180BE9185007C000E3487F /* credentials.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = credentials.plist; sourceTree = ""; }; + D075B280184944330054FED3 /* LACamliUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LACamliUtil.h; sourceTree = ""; }; + D075B281184944330054FED3 /* LACamliUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LACamliUtil.m; sourceTree = ""; }; + D075B28318494DB20054FED3 /* LACamliUploadOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LACamliUploadOperation.h; sourceTree = ""; }; + D075B28418494DB20054FED3 /* LACamliUploadOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LACamliUploadOperation.m; sourceTree = ""; }; + D095AE0F1814AF10008163F2 /* photobackup.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = photobackup.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D095AE121814AF10008163F2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + D095AE141814AF10008163F2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + D095AE161814AF10008163F2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + D095AE1A1814AF10008163F2 /* photobackup-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "photobackup-Info.plist"; sourceTree = ""; }; + D095AE1C1814AF10008163F2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + D095AE1E1814AF10008163F2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + D095AE201814AF10008163F2 /* photobackup-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "photobackup-Prefix.pch"; sourceTree = ""; }; + D095AE211814AF10008163F2 /* LAAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LAAppDelegate.h; sourceTree = ""; }; + D095AE221814AF10008163F2 /* LAAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LAAppDelegate.m; sourceTree = ""; }; + D095AE251814AF10008163F2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = ""; }; + D095AE281814AF10008163F2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = ""; }; + D095AE2A1814AF10008163F2 /* LAViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LAViewController.h; sourceTree = ""; }; + D095AE2B1814AF10008163F2 /* LAViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LAViewController.m; sourceTree = ""; }; + D095AE2D1814AF10008163F2 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + D095AE331814AF10008163F2 /* photobackupTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = photobackupTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D095AE341814AF10008163F2 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + D095AE3C1814AF10008163F2 /* photobackupTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "photobackupTests-Info.plist"; sourceTree = ""; }; + D095AE3E1814AF10008163F2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + D095AE401814AF10008163F2 /* photobackupTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = photobackupTests.m; sourceTree = ""; }; + D095AE4B1814B1B9008163F2 /* LACamliFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LACamliFile.h; sourceTree = ""; }; + D095AE4C1814B1B9008163F2 /* LACamliFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LACamliFile.m; sourceTree = ""; }; + D095AE4D1814B1B9008163F2 /* LACamliClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LACamliClient.h; sourceTree = ""; }; + D095AE4E1814B1B9008163F2 /* LACamliClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LACamliClient.m; sourceTree = ""; }; + D0AC216F18503A8E004BD4F3 /* CamliCollectionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CamliCollectionCell.h; path = photobackup/CamliCollectionCell.h; sourceTree = ""; }; + D0AC217018503A8E004BD4F3 /* CamliCollectionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CamliCollectionCell.m; path = photobackup/CamliCollectionCell.m; sourceTree = ""; }; + D0AC217218503B0D004BD4F3 /* LACamliRecentFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LACamliRecentFile.h; sourceTree = ""; }; + D0AC217318503B0D004BD4F3 /* LACamliRecentFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LACamliRecentFile.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D095AE0C1814AF10008163F2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D095AE151814AF10008163F2 /* CoreGraphics.framework in Frameworks */, + D095AE171814AF10008163F2 /* UIKit.framework in Frameworks */, + D095AE131814AF10008163F2 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D095AE301814AF10008163F2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D095AE351814AF10008163F2 /* XCTest.framework in Frameworks */, + D095AE371814AF10008163F2 /* UIKit.framework in Frameworks */, + D095AE361814AF10008163F2 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D095AE061814AF10008163F2 = { + isa = PBXGroup; + children = ( + D0AC216F18503A8E004BD4F3 /* CamliCollectionCell.h */, + D0AC217018503A8E004BD4F3 /* CamliCollectionCell.m */, + D095AE181814AF10008163F2 /* photobackup */, + D095AE3A1814AF10008163F2 /* photobackupTests */, + D095AE111814AF10008163F2 /* Frameworks */, + D095AE101814AF10008163F2 /* Products */, + ); + sourceTree = ""; + }; + D095AE101814AF10008163F2 /* Products */ = { + isa = PBXGroup; + children = ( + D095AE0F1814AF10008163F2 /* photobackup.app */, + D095AE331814AF10008163F2 /* photobackupTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + D095AE111814AF10008163F2 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D095AE121814AF10008163F2 /* Foundation.framework */, + D095AE141814AF10008163F2 /* CoreGraphics.framework */, + D095AE161814AF10008163F2 /* UIKit.framework */, + D095AE341814AF10008163F2 /* XCTest.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + D095AE181814AF10008163F2 /* photobackup */ = { + isa = PBXGroup; + children = ( + D095AE4A1814B1B9008163F2 /* LACamliClient */, + D095AE211814AF10008163F2 /* LAAppDelegate.h */, + D095AE221814AF10008163F2 /* LAAppDelegate.m */, + D095AE2A1814AF10008163F2 /* LAViewController.h */, + D095AE2B1814AF10008163F2 /* LAViewController.m */, + D095AE241814AF10008163F2 /* Main_iPhone.storyboard */, + D095AE271814AF10008163F2 /* Main_iPad.storyboard */, + D095AE2D1814AF10008163F2 /* Images.xcassets */, + D095AE191814AF10008163F2 /* Supporting Files */, + D0180BE9185007C000E3487F /* credentials.plist */, + ); + path = photobackup; + sourceTree = ""; + }; + D095AE191814AF10008163F2 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + D095AE1A1814AF10008163F2 /* photobackup-Info.plist */, + D095AE1B1814AF10008163F2 /* InfoPlist.strings */, + D095AE1E1814AF10008163F2 /* main.m */, + D095AE201814AF10008163F2 /* photobackup-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + D095AE3A1814AF10008163F2 /* photobackupTests */ = { + isa = PBXGroup; + children = ( + D095AE401814AF10008163F2 /* photobackupTests.m */, + D095AE3B1814AF10008163F2 /* Supporting Files */, + ); + path = photobackupTests; + sourceTree = ""; + }; + D095AE3B1814AF10008163F2 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + D095AE3C1814AF10008163F2 /* photobackupTests-Info.plist */, + D095AE3D1814AF10008163F2 /* InfoPlist.strings */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + D095AE4A1814B1B9008163F2 /* LACamliClient */ = { + isa = PBXGroup; + children = ( + D095AE4B1814B1B9008163F2 /* LACamliFile.h */, + D095AE4C1814B1B9008163F2 /* LACamliFile.m */, + D0AC217218503B0D004BD4F3 /* LACamliRecentFile.h */, + D0AC217318503B0D004BD4F3 /* LACamliRecentFile.m */, + D095AE4D1814B1B9008163F2 /* LACamliClient.h */, + D095AE4E1814B1B9008163F2 /* LACamliClient.m */, + D075B280184944330054FED3 /* LACamliUtil.h */, + D075B281184944330054FED3 /* LACamliUtil.m */, + D075B28318494DB20054FED3 /* LACamliUploadOperation.h */, + D075B28418494DB20054FED3 /* LACamliUploadOperation.m */, + ); + path = LACamliClient; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D095AE0E1814AF10008163F2 /* photobackup */ = { + isa = PBXNativeTarget; + buildConfigurationList = D095AE441814AF10008163F2 /* Build configuration list for PBXNativeTarget "photobackup" */; + buildPhases = ( + D095AE0B1814AF10008163F2 /* Sources */, + D095AE0C1814AF10008163F2 /* Frameworks */, + D095AE0D1814AF10008163F2 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = photobackup; + productName = photobackup; + productReference = D095AE0F1814AF10008163F2 /* photobackup.app */; + productType = "com.apple.product-type.application"; + }; + D095AE321814AF10008163F2 /* photobackupTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = D095AE471814AF10008163F2 /* Build configuration list for PBXNativeTarget "photobackupTests" */; + buildPhases = ( + D095AE2F1814AF10008163F2 /* Sources */, + D095AE301814AF10008163F2 /* Frameworks */, + D095AE311814AF10008163F2 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D095AE391814AF10008163F2 /* PBXTargetDependency */, + ); + name = photobackupTests; + productName = photobackupTests; + productReference = D095AE331814AF10008163F2 /* photobackupTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D095AE071814AF10008163F2 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = LA; + LastUpgradeCheck = 0500; + ORGANIZATIONNAME = "Nick O'Neill"; + TargetAttributes = { + D095AE321814AF10008163F2 = { + TestTargetID = D095AE0E1814AF10008163F2; + }; + }; + }; + buildConfigurationList = D095AE0A1814AF10008163F2 /* Build configuration list for PBXProject "photobackup" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = D095AE061814AF10008163F2; + productRefGroup = D095AE101814AF10008163F2 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D095AE0E1814AF10008163F2 /* photobackup */, + D095AE321814AF10008163F2 /* photobackupTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D095AE0D1814AF10008163F2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D095AE291814AF10008163F2 /* Main_iPad.storyboard in Resources */, + D0180BEA185007C000E3487F /* credentials.plist in Resources */, + D095AE2E1814AF10008163F2 /* Images.xcassets in Resources */, + D095AE261814AF10008163F2 /* Main_iPhone.storyboard in Resources */, + D095AE1D1814AF10008163F2 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D095AE311814AF10008163F2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D095AE3F1814AF10008163F2 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D095AE0B1814AF10008163F2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D095AE1F1814AF10008163F2 /* main.m in Sources */, + D095AE511814B1B9008163F2 /* LACamliClient.m in Sources */, + D0AC217118503A8E004BD4F3 /* CamliCollectionCell.m in Sources */, + D095AE501814B1B9008163F2 /* LACamliFile.m in Sources */, + D075B282184944330054FED3 /* LACamliUtil.m in Sources */, + D095AE231814AF10008163F2 /* LAAppDelegate.m in Sources */, + D0AC217418503B0D004BD4F3 /* LACamliRecentFile.m in Sources */, + D095AE2C1814AF10008163F2 /* LAViewController.m in Sources */, + D075B28518494DB20054FED3 /* LACamliUploadOperation.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D095AE2F1814AF10008163F2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D095AE411814AF10008163F2 /* photobackupTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + D095AE391814AF10008163F2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D095AE0E1814AF10008163F2 /* photobackup */; + targetProxy = D095AE381814AF10008163F2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + D095AE1B1814AF10008163F2 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + D095AE1C1814AF10008163F2 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + D095AE241814AF10008163F2 /* Main_iPhone.storyboard */ = { + isa = PBXVariantGroup; + children = ( + D095AE251814AF10008163F2 /* Base */, + ); + name = Main_iPhone.storyboard; + sourceTree = ""; + }; + D095AE271814AF10008163F2 /* Main_iPad.storyboard */ = { + isa = PBXVariantGroup; + children = ( + D095AE281814AF10008163F2 /* Base */, + ); + name = Main_iPad.storyboard; + sourceTree = ""; + }; + D095AE3D1814AF10008163F2 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + D095AE3E1814AF10008163F2 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + D095AE421814AF10008163F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + D095AE431814AF10008163F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + D095AE451814AF10008163F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "photobackup/photobackup-Prefix.pch"; + INFOPLIST_FILE = "photobackup/photobackup-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + D095AE461814AF10008163F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "photobackup/photobackup-Prefix.pch"; + INFOPLIST_FILE = "photobackup/photobackup-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + D095AE481814AF10008163F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/photobackup.app/photobackup"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "photobackup/photobackup-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "photobackupTests/photobackupTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + D095AE491814AF10008163F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/photobackup.app/photobackup"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "photobackup/photobackup-Prefix.pch"; + INFOPLIST_FILE = "photobackupTests/photobackupTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D095AE0A1814AF10008163F2 /* Build configuration list for PBXProject "photobackup" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D095AE421814AF10008163F2 /* Debug */, + D095AE431814AF10008163F2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D095AE441814AF10008163F2 /* Build configuration list for PBXNativeTarget "photobackup" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D095AE451814AF10008163F2 /* Debug */, + D095AE461814AF10008163F2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D095AE471814AF10008163F2 /* Build configuration list for PBXNativeTarget "photobackupTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D095AE481814AF10008163F2 /* Debug */, + D095AE491814AF10008163F2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D095AE071814AF10008163F2 /* Project object */; +} diff --git a/clients/ios-objc/photobackup/Base.lproj/Main_iPad.storyboard b/clients/ios-objc/photobackup/Base.lproj/Main_iPad.storyboard new file mode 100644 index 000000000..7e2236e41 --- /dev/null +++ b/clients/ios-objc/photobackup/Base.lproj/Main_iPad.storyboard @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/clients/ios-objc/photobackup/Base.lproj/Main_iPhone.storyboard b/clients/ios-objc/photobackup/Base.lproj/Main_iPhone.storyboard new file mode 100644 index 000000000..d97ef3892 --- /dev/null +++ b/clients/ios-objc/photobackup/Base.lproj/Main_iPhone.storyboard @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/clients/ios-objc/photobackup/CamliCollectionCell.h b/clients/ios-objc/photobackup/CamliCollectionCell.h new file mode 100644 index 000000000..4ee7d584b --- /dev/null +++ b/clients/ios-objc/photobackup/CamliCollectionCell.h @@ -0,0 +1,13 @@ +// +// CamliCollectionCell.h +// photobackup +// +// Created by Nick O'Neill on 12/4/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import + +@interface CamliCollectionCell : UICollectionViewCell + +@end diff --git a/clients/ios-objc/photobackup/CamliCollectionCell.m b/clients/ios-objc/photobackup/CamliCollectionCell.m new file mode 100644 index 000000000..f49309cf2 --- /dev/null +++ b/clients/ios-objc/photobackup/CamliCollectionCell.m @@ -0,0 +1,22 @@ +// +// CamliCollectionCell.m +// photobackup +// +// Created by Nick O'Neill on 12/4/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import "CamliCollectionCell.h" + +@implementation CamliCollectionCell + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + // Initialization code + } + return self; +} + +@end diff --git a/clients/ios-objc/photobackup/Images.xcassets/AppIcon.appiconset/Contents.json b/clients/ios-objc/photobackup/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..91bf9c14a --- /dev/null +++ b/clients/ios-objc/photobackup/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/clients/ios-objc/photobackup/Images.xcassets/LaunchImage.launchimage/Contents.json b/clients/ios-objc/photobackup/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 000000000..6f870a462 --- /dev/null +++ b/clients/ios-objc/photobackup/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,51 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "subtype" : "retina4", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/clients/ios-objc/photobackup/LAAppDelegate.h b/clients/ios-objc/photobackup/LAAppDelegate.h new file mode 100644 index 000000000..7d0f64a28 --- /dev/null +++ b/clients/ios-objc/photobackup/LAAppDelegate.h @@ -0,0 +1,15 @@ +// +// LAAppDelegate.h +// photobackup +// +// Created by Nick O'Neill on 10/20/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import + +@interface LAAppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/clients/ios-objc/photobackup/LAAppDelegate.m b/clients/ios-objc/photobackup/LAAppDelegate.m new file mode 100644 index 000000000..6f2cbf761 --- /dev/null +++ b/clients/ios-objc/photobackup/LAAppDelegate.m @@ -0,0 +1,46 @@ +// +// LAAppDelegate.m +// photobackup +// +// Created by Nick O'Neill on 10/20/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import "LAAppDelegate.h" + +@implementation LAAppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + // Override point for customization after application launch. + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/clients/ios-objc/photobackup/LACamliClient/LACamliClient.h b/clients/ios-objc/photobackup/LACamliClient/LACamliClient.h new file mode 100644 index 000000000..f17a4fb65 --- /dev/null +++ b/clients/ios-objc/photobackup/LACamliClient/LACamliClient.h @@ -0,0 +1,38 @@ +// +// LACamliClient.h +// +// Created by Nick O'Neill on 1/10/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import + +@class LACamliFile; + +@interface LACamliClient : NSObject + +@property NSURLSession *session; + +@property NSURL *serverURL; +@property NSString *username; +@property NSString *password; + +@property NSString *blobRoot; +@property NSURL *uploadUrl; +@property NSOperationQueue *uploadQueue; + +@property NSMutableArray *uploadedBlobRefs; + +@property BOOL isAuthorized; +@property BOOL authorizing; + +- (id)initWithServer:(NSURL *)server username:(NSString *)username andPassword:(NSString *)password; + +- (void)discoveryWithUsername:(NSString *)user andPassword:(NSString *)pass; + +- (BOOL)fileAlreadyUploaded:(LACamliFile *)file; +- (void)addFile:(LACamliFile *)file; + +- (NSURL *)statUrl; + +@end diff --git a/clients/ios-objc/photobackup/LACamliClient/LACamliClient.m b/clients/ios-objc/photobackup/LACamliClient/LACamliClient.m new file mode 100644 index 000000000..1c2ce909e --- /dev/null +++ b/clients/ios-objc/photobackup/LACamliClient/LACamliClient.m @@ -0,0 +1,138 @@ +// +// LACamliClient.m +// +// Created by Nick O'Neill on 1/10/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import "LACamliClient.h" +#import "LACamliUploadOperation.h" +#import "LACamliFile.h" +#import "LACamliUtil.h" + +@implementation LACamliClient + +- (id)initWithServer:(NSURL *)server username:(NSString *)username andPassword:(NSString *)password +{ + NSParameterAssert(server); + NSParameterAssert(username); + NSParameterAssert(password); + + if (self = [super init]) { + self.serverURL = server; + self.username = username; + self.password = password; + + if ([[NSFileManager defaultManager] fileExistsAtPath:[self uploadedBlobRefArchivePath]]) { + self.uploadedBlobRefs = [NSMutableArray arrayWithContentsOfFile:[self uploadedBlobRefArchivePath]]; + } + if (!self.uploadedBlobRefs) { + self.uploadedBlobRefs = [NSMutableArray array]; + } + + self.uploadQueue = [[NSOperationQueue alloc] init]; + self.uploadQueue.maxConcurrentOperationCount = 1; + + self.isAuthorized = false; + self.authorizing = false; + + NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration]; + config.HTTPAdditionalHeaders = @{@"Authorization": [NSString stringWithFormat:@"Basic %@",[self encodedAuth]]}; + self.session = [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil]; + } + + return self; +} + +- (BOOL)fileAlreadyUploaded:(LACamliFile *)file +{ + NSParameterAssert(file); + + if ([self.uploadedBlobRefs containsObject:file.blobRef]) { + return YES; + } + + return NO; +} + +// starts uploading immediately +- (void)addFile:(LACamliFile *)file +{ + NSParameterAssert(file); + + if (![self isAuthorized]) { + [self.uploadQueue setSuspended:YES]; + + if (!self.authorizing) { + [self discoveryWithUsername:self.username andPassword:self.password]; + } + } + + LACamliUploadOperation *op = [[LACamliUploadOperation alloc] initWithFile:file andClient:self]; + op.completionBlock = ^{ + LALog(@"finished op %@",file.blobRef); + [self.uploadedBlobRefs addObject:file.blobRef]; + [self.uploadedBlobRefs writeToFile:[self uploadedBlobRefArchivePath] atomically:YES]; + }; + + [self.uploadQueue addOperation:op]; +} + +// if we don't have blobroot with which to make these requests, we need to find it first +- (void)discoveryWithUsername:(NSString *)user andPassword:(NSString *)pass +{ + self.authorizing = YES; + + NSURLSessionConfiguration *discoverConfig = [NSURLSessionConfiguration defaultSessionConfiguration]; + discoverConfig.HTTPAdditionalHeaders = @{@"Accept": @"text/x-camli-configuration", @"Authorization": [NSString stringWithFormat:@"Basic %@",[self encodedAuth]]}; + NSURLSession *discoverSession = [NSURLSession sessionWithConfiguration:discoverConfig delegate:self delegateQueue:nil]; + + NSURL *discoveryURL = [self.serverURL URLByAppendingPathComponent:@"ui/"]; + + NSURLSessionDataTask *data = [discoverSession dataTaskWithURL:discoveryURL completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + self.authorizing = NO; + + if (error) { + LALog(@"error discovery: %@",error); + } else { + + NSHTTPURLResponse *res = (NSHTTPURLResponse *)response; + + if (res.statusCode != 200) { + LALog(@"error with discovery: %@",[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); + } else { + NSError *parseError; + NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError]; + + self.blobRoot = json[@"blobRoot"]; + self.isAuthorized = YES; + [self.uploadQueue setSuspended:NO]; + + LALog(@"good discovery"); + } + } + }]; + + [data resume]; +} + +- (NSURL *)statUrl +{ + return [[self.serverURL URLByAppendingPathComponent:self.blobRoot] URLByAppendingPathComponent:@"camli/stat"]; +} + +- (NSString *)encodedAuth +{ + NSString *auth = [NSString stringWithFormat:@"%@:%@",self.username,self.password]; + + return [LACamliUtil base64EncodedStringFromString:auth]; +} + +- (NSString *)uploadedBlobRefArchivePath +{ + NSString *documents = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; + + return [documents stringByAppendingPathComponent:@"uploadedRefs.plist"]; +} + +@end diff --git a/clients/ios-objc/photobackup/LACamliClient/LACamliFile.h b/clients/ios-objc/photobackup/LACamliClient/LACamliFile.h new file mode 100644 index 000000000..4674ef603 --- /dev/null +++ b/clients/ios-objc/photobackup/LACamliClient/LACamliFile.h @@ -0,0 +1,27 @@ +// +// LACamliFile.h +// +// Created by Nick O'Neill on 1/13/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import + +@class ALAsset; + +@interface LACamliFile : NSObject + +@property ALAsset *asset; +@property NSMutableArray *allBlobs; +@property NSMutableArray *uploadMarks; +@property NSArray *allBlobRefs; + +@property NSString *blobRef; + +- (id)initWithAsset:(ALAsset *)asset; +- (NSArray *)blobsToUpload; + +- (long long)size; +- (NSDate *)creation; + +@end diff --git a/clients/ios-objc/photobackup/LACamliClient/LACamliFile.m b/clients/ios-objc/photobackup/LACamliClient/LACamliFile.m new file mode 100644 index 000000000..466108f35 --- /dev/null +++ b/clients/ios-objc/photobackup/LACamliClient/LACamliFile.m @@ -0,0 +1,149 @@ +// +// LACamliFile.m +// +// Created by Nick O'Neill on 1/13/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import "LACamliFile.h" +#import "LACamliUtil.h" +#import + +@implementation LACamliFile + +@synthesize allBlobs = _allBlobs; +@synthesize allBlobRefs = _allBlobRefs; + +static NSUInteger const ChunkSize = 64000; + +- (id)initWithAsset:(ALAsset *)asset +{ + if (self = [super init]) { + self.asset = asset; + + [self setBlobRef:[LACamliUtil blobRef:[self fileData]]]; + + float chunkCount = (float)[self size] / (float)ChunkSize; + + self.uploadMarks = [NSMutableArray array]; + for (int i = 0; i < chunkCount; i++) { + [self.uploadMarks addObject:@YES]; + } + } + + return self; +} + +- (id)initWithPath:(NSString *)path +{ + // TODO, can init from random path to file + + if (self = [super init]) { +// [self setBlobRef:[LACamliClient blobRef:data]]; +// [self setFileData:data]; + + // set time, size and other properties here? + } + + return self; +} + +#pragma mark - convenience + +- (NSData *)fileData +{ + ALAssetRepresentation *rep = [self.asset defaultRepresentation]; + Byte *buf = (Byte*)malloc((int)rep.size); + NSUInteger bufferLength = [rep getBytes:buf fromOffset:0.0 length:(int)rep.size error:nil]; + + return [NSData dataWithBytesNoCopy:buf length:bufferLength freeWhenDone:YES]; +} + +- (long long)size +{ + return [self.asset defaultRepresentation].size; +} + +- (NSDate *)creation +{ + return [self.asset valueForProperty:ALAssetPropertyDate]; +} + +- (NSArray *)blobsToUpload +{ + NSMutableArray *blobs = [NSMutableArray array]; + + int i = 0; + for (NSData *blob in self.allBlobs) { + if ([[self.uploadMarks objectAtIndex:i] boolValue]) { + [blobs addObject:blob]; + } + i++; + } + + return blobs; +} + +#pragma mark - delayed creation methods + +- (void)setAllBlobs:(NSMutableArray *)allBlobs +{ + _allBlobs = allBlobs; +} + +- (NSMutableArray *)allBlobs +{ + if (!_allBlobs) { + [self makeBlobsAndRefs]; + } + + // not a huge fan of how this doesn't obviously assign to _allBlobs + return _allBlobs; +} + +- (void)setAllBlobRefs:(NSArray *)allBlobRefs +{ + _allBlobRefs = allBlobRefs; +} + +- (NSArray *)allBlobRefs +{ + if (!_allBlobRefs) { + [self makeBlobsAndRefs]; + } + + // not a huge fan of how this doesn't obviously assign to _allBlobRefs + return _allBlobRefs; +} + + +- (void)makeBlobsAndRefs +{ + LALog(@"making blob refs"); + + NSMutableArray *chunks = [NSMutableArray array]; + NSMutableArray *blobRefs = [NSMutableArray array]; + + float chunkCount = (float)self.size / (float)ChunkSize; + + NSData *fileData = [self fileData]; + + for (int i = 0; i < chunkCount; i++) { + + // ChunkSize size chunks, unless the last one is less + NSData *chunkData; + if (ChunkSize*(i+1) <= [self size]) { + chunkData = [fileData subdataWithRange:NSMakeRange(ChunkSize*i, ChunkSize)]; + } else { + chunkData = [fileData subdataWithRange:NSMakeRange(ChunkSize*i, (int)[self size]-(ChunkSize*i))]; + } + + [chunks addObject:chunkData]; + [blobRefs addObject:[LACamliUtil blobRef:chunkData]]; + } + + self.allBlobs = chunks; + self.allBlobRefs = blobRefs; +} + +@end diff --git a/clients/ios-objc/photobackup/LACamliClient/LACamliRecentFile.h b/clients/ios-objc/photobackup/LACamliClient/LACamliRecentFile.h new file mode 100644 index 000000000..142947c29 --- /dev/null +++ b/clients/ios-objc/photobackup/LACamliClient/LACamliRecentFile.h @@ -0,0 +1,17 @@ +// +// LACamliRecentFile.h +// photobackup +// +// Created by Nick O'Neill on 12/4/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import + +@interface LACamliRecentFile : NSObject + +@property NSString *blobRef; + +- (NSString *)localThumbPath; + +@end diff --git a/clients/ios-objc/photobackup/LACamliClient/LACamliRecentFile.m b/clients/ios-objc/photobackup/LACamliClient/LACamliRecentFile.m new file mode 100644 index 000000000..39028b98e --- /dev/null +++ b/clients/ios-objc/photobackup/LACamliClient/LACamliRecentFile.m @@ -0,0 +1,13 @@ +// +// LACamliRecentFile.m +// photobackup +// +// Created by Nick O'Neill on 12/4/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import "LACamliRecentFile.h" + +@implementation LACamliRecentFile + +@end diff --git a/clients/ios-objc/photobackup/LACamliClient/LACamliUploadOperation.h b/clients/ios-objc/photobackup/LACamliClient/LACamliUploadOperation.h new file mode 100644 index 000000000..926fff4f1 --- /dev/null +++ b/clients/ios-objc/photobackup/LACamliClient/LACamliUploadOperation.h @@ -0,0 +1,24 @@ +// +// LACamliUploadOperation.h +// photobackup +// +// Created by Nick O'Neill on 11/29/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import + +@class LACamliFile,LACamliClient; + +@interface LACamliUploadOperation : NSOperation + +@property LACamliClient *client; +@property LACamliFile *file; + +@property (readonly) BOOL isExecuting; +@property (readonly) BOOL isFinished; + +- (BOOL)isConcurrent; +- (id)initWithFile:(LACamliFile *)file andClient:(LACamliClient *)client; + +@end diff --git a/clients/ios-objc/photobackup/LACamliClient/LACamliUploadOperation.m b/clients/ios-objc/photobackup/LACamliClient/LACamliUploadOperation.m new file mode 100644 index 000000000..b81746b30 --- /dev/null +++ b/clients/ios-objc/photobackup/LACamliClient/LACamliUploadOperation.m @@ -0,0 +1,231 @@ +// +// LACamliUploadOperation.m +// photobackup +// +// Created by Nick O'Neill on 11/29/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import "LACamliUploadOperation.h" +#import "LACamliFile.h" +#import "LACamliClient.h" +#import "LACamliUtil.h" + +static NSUInteger const camliVersion = 1; +static NSString *const multipartBoundary = @"Qe43VdbVVaGtkkMd"; + +@implementation LACamliUploadOperation + +- (id)initWithFile:(LACamliFile *)file andClient:(LACamliClient *)client +{ + NSParameterAssert(file); + NSParameterAssert(client); + + if (self = [super init]) { + self.file = file; + self.client = client; + _isExecuting = NO; + _isFinished = NO; + } + + return self; +} + +- (BOOL)isConcurrent +{ + return YES; +} + +// request stats for each chunk, making sure the server doesn't already have the chunk +- (void)start +{ + [self willChangeValueForKey:@"isExecuting"]; + _isExecuting = YES; + [self didChangeValueForKey:@"isExecuting"]; + + LALog(@"stat"); + + NSMutableDictionary *params = [NSMutableDictionary dictionary]; + [params setObject:[NSNumber numberWithInt:camliVersion] forKey:@"camliversion"]; + + int i = 1; + for (NSString *blobRef in self.file.allBlobRefs) { + [params setObject:blobRef forKey:[NSString stringWithFormat:@"blob%d",i]]; + i++; + } + + NSString *formValues = @""; + for (NSString *key in params) { + formValues = [formValues stringByAppendingString:[NSString stringWithFormat:@"%@=%@&",key,params[key]]]; + } + + NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:[self.client statUrl]]; + [req setHTTPMethod:@"POST"]; + [req setHTTPBody:[formValues dataUsingEncoding:NSUTF8StringEncoding]]; + + NSURLSessionDataTask *statTask = [self.client.session dataTaskWithRequest:req completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + + if (!error) { + LALog(@"data: %@",[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); + + // we can remove any chunks that the server claims it already has + NSError *err; + NSMutableDictionary *resObj = [NSJSONSerialization JSONObjectWithData:data options:0 error:&err]; + if (err) { + LALog(@"error serializing json: %@",err); + } + + for (NSDictionary *stat in resObj[@"stat"]) { + for (NSString *blobRef in self.file.allBlobRefs) { + if ([stat[@"blobRef"] isEqualToString:blobRef]) { + [self.file.uploadMarks replaceObjectAtIndex:[self.file.allBlobRefs indexOfObject:blobRef] withObject:@NO]; + } + } + } + + BOOL allUploaded = YES; + for (NSNumber *upload in self.file.uploadMarks) { + if ([upload boolValue]) { + allUploaded = NO; + } + } + + // TODO: there's a posibility all chunks have been uploaded but no permanode exists + if (allUploaded) { + LALog(@"everything's been uploaded already for this file"); + [self finished]; + return; + } + + self.client.uploadUrl = [NSURL URLWithString:resObj[@"uploadUrl"]]; + + LALog(@"stat end"); + + [self uploadChunks]; + } else { + LALog(@"failed stat: %@",error); + [self finished]; + } + }]; + + [statTask resume]; +} + +// post the chunks in a multipart request +// +- (void)uploadChunks +{ + NSMutableURLRequest *uploadReq = [NSMutableURLRequest requestWithURL:self.client.uploadUrl]; + [uploadReq setHTTPMethod:@"POST"]; + [uploadReq setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", multipartBoundary] forHTTPHeaderField:@"Content-Type"]; + + NSMutableData *uploadData = [self multipartDataForChunks]; + + NSURLSessionUploadTask *upload = [self.client.session uploadTaskWithRequest:uploadReq fromData:uploadData completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + +// LALog(@"upload response: %@",[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]); + + if (error) { + LALog(@"upload error: %@",error); + [self finished]; + } else { + [self vivifyChunks]; + } + }]; + + [upload resume]; +} + +- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didSendBodyData:(int64_t)bytesSent totalBytesSent:(int64_t)totalBytesSent totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend +{ + // LALog(@"%lld %lld upload progress",totalBytesSent,totalBytesExpectedToSend); +} + +// ask the server to vivify the blobrefs into a file +- (void)vivifyChunks +{ + NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:self.client.uploadUrl]; + [req setHTTPMethod:@"POST"]; + [req setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", multipartBoundary] forHTTPHeaderField:@"Content-Type"]; + [req addValue:@"1" forHTTPHeaderField:@"X-Camlistore-Vivify"]; + + NSMutableData *vivifyData = [self multipartVivifyDataForChunks]; + + NSURLSessionUploadTask *vivify = [self.client.session uploadTaskWithRequest:req fromData:vivifyData completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + +// LALog(@"response: %@",[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); + + if (error) { + LALog(@"error vivifying: %@",error); + } + + [self finished]; + }]; + + [vivify resume]; +} + +- (void)finished +{ + LALog(@"finished op %@",self.file.blobRef); + + [self willChangeValueForKey:@"isExecuting"]; + [self willChangeValueForKey:@"isFinished"]; + + _isExecuting = NO; + _isFinished = YES; + + [self didChangeValueForKey:@"isExecuting"]; + [self didChangeValueForKey:@"isFinished"]; +} + +#pragma mark - multipart bits + +- (NSMutableData *)multipartDataForChunks +{ + NSMutableData *data = [NSMutableData data]; + + for (NSData *chunk in [self.file blobsToUpload]) { + [data appendData:[[NSString stringWithFormat:@"--%@\r\n", multipartBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; + // TODO change this image/jpeg to something, even though the server ignores it + [data appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"; filename=\"image.jpg\"\r\n", [LACamliUtil blobRef:chunk]] dataUsingEncoding:NSUTF8StringEncoding]]; + [data appendData:[@"Content-Type: image/jpeg\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; + [data appendData:chunk]; + [data appendData:[[NSString stringWithFormat:@"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; + } + + [data appendData:[[NSString stringWithFormat:@"--%@--\r\n", multipartBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; + + return data; +} + +- (NSMutableData *)multipartVivifyDataForChunks +{ + NSMutableData *data = [NSMutableData data]; + + NSMutableDictionary *schemaBlob = [NSMutableDictionary dictionaryWithObjectsAndKeys:@1, @"camliVersion", @"file", @"camliType", [LACamliUtil rfc3339StringFromDate:self.file.creation], @"unixMTime", nil]; + + NSMutableArray *parts = [NSMutableArray array]; + int i = 0; + for (NSString *blobRef in self.file.allBlobRefs) { + [parts addObject:@{@"blobRef":blobRef,@"size":[NSNumber numberWithInteger:[[self.file.allBlobs objectAtIndex:i] length]]}]; + i++; + } + [schemaBlob setObject:parts forKey:@"parts"]; + + NSData *schemaData = [NSJSONSerialization dataWithJSONObject:schemaBlob options:NSJSONWritingPrettyPrinted error:nil]; + + LALog(@"schema: %@",[[NSString alloc] initWithData:schemaData encoding:NSUTF8StringEncoding]); + + [data appendData:[[NSString stringWithFormat:@"--%@\r\n", multipartBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; + [data appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"; filename=\"json\"\r\n", [LACamliUtil blobRef:schemaData]] dataUsingEncoding:NSUTF8StringEncoding]]; + [data appendData:[@"Content-Type: application/json\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; + [data appendData:schemaData]; + [data appendData:[[NSString stringWithFormat:@"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; + + [data appendData:[[NSString stringWithFormat:@"--%@--\r\n", multipartBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; + + return data; +} + +@end diff --git a/clients/ios-objc/photobackup/LACamliClient/LACamliUtil.h b/clients/ios-objc/photobackup/LACamliClient/LACamliUtil.h new file mode 100644 index 000000000..247d6ec61 --- /dev/null +++ b/clients/ios-objc/photobackup/LACamliClient/LACamliUtil.h @@ -0,0 +1,17 @@ +// +// LACamliUtil.h +// photobackup +// +// Created by Nick O'Neill on 11/29/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import + +@interface LACamliUtil : NSObject + ++ (NSString *)base64EncodedStringFromString:(NSString *)string; ++ (NSString *)blobRef:(NSData *)data; ++ (NSString *)rfc3339StringFromDate:(NSDate *)date; + +@end diff --git a/clients/ios-objc/photobackup/LACamliClient/LACamliUtil.m b/clients/ios-objc/photobackup/LACamliClient/LACamliUtil.m new file mode 100644 index 000000000..4b4f26130 --- /dev/null +++ b/clients/ios-objc/photobackup/LACamliClient/LACamliUtil.m @@ -0,0 +1,75 @@ +// +// LACamliUtil.m +// photobackup +// +// Created by Nick O'Neill on 11/29/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import "LACamliUtil.h" +#import + +@implementation LACamliUtil + +// h/t AFNetworking ++ (NSString *)base64EncodedStringFromString:(NSString *)string +{ + NSData *data = [NSData dataWithBytes:[string UTF8String] length:[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]]; + NSUInteger length = [data length]; + NSMutableData *mutableData = [NSMutableData dataWithLength:((length + 2) / 3) * 4]; + + uint8_t *input = (uint8_t *)[data bytes]; + uint8_t *output = (uint8_t *)[mutableData mutableBytes]; + + for (NSUInteger i = 0; i < length; i += 3) { + NSUInteger value = 0; + for (NSUInteger j = i; j < (i + 3); j++) { + value <<= 8; + if (j < length) { + value |= (0xFF & input[j]); + } + } + + static uint8_t const kAFBase64EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + NSUInteger idx = (i / 3) * 4; + output[idx + 0] = kAFBase64EncodingTable[(value >> 18) & 0x3F]; + output[idx + 1] = kAFBase64EncodingTable[(value >> 12) & 0x3F]; + output[idx + 2] = (i + 1) < length ? kAFBase64EncodingTable[(value >> 6) & 0x3F] : '='; + output[idx + 3] = (i + 2) < length ? kAFBase64EncodingTable[(value >> 0) & 0x3F] : '='; + } + + return [[NSString alloc] initWithData:mutableData encoding:NSASCIIStringEncoding]; +} + ++ (NSString *)blobRef:(NSData *)data +{ + uint8_t digest[CC_SHA1_DIGEST_LENGTH]; + + CC_SHA1(data.bytes, data.length, digest); + + NSMutableString* output = [NSMutableString stringWithCapacity:(CC_SHA1_DIGEST_LENGTH * 2) + 5]; + [output appendString:@"sha1-"]; + + for(int i = 0; i < CC_SHA1_DIGEST_LENGTH; i++) { + [output appendFormat:@"%02x", digest[i]]; + } + + return output; +} + ++ (NSString *)rfc3339StringFromDate:(NSDate *)date +{ + NSDateFormatter *rfc3339DateFormatter = [[NSDateFormatter alloc] init]; + + NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; + + [rfc3339DateFormatter setLocale:enUSPOSIXLocale]; + [rfc3339DateFormatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'"]; + [rfc3339DateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]]; + + return [rfc3339DateFormatter stringFromDate:date]; +} + + +@end diff --git a/clients/ios-objc/photobackup/LAViewController.h b/clients/ios-objc/photobackup/LAViewController.h new file mode 100644 index 000000000..73eb20f9a --- /dev/null +++ b/clients/ios-objc/photobackup/LAViewController.h @@ -0,0 +1,20 @@ +// +// LAViewController.h +// photobackup +// +// Created by Nick O'Neill on 10/20/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import +#import "LACamliClient.h" + +@class ALAssetsLibrary; + +@interface LAViewController : UIViewController + +@property LACamliClient *client; +// kicked out of the library if we don't have a reference and still want to play with the books +@property ALAssetsLibrary *library; + +@end diff --git a/clients/ios-objc/photobackup/LAViewController.m b/clients/ios-objc/photobackup/LAViewController.m new file mode 100644 index 000000000..78b368ff1 --- /dev/null +++ b/clients/ios-objc/photobackup/LAViewController.m @@ -0,0 +1,85 @@ +// +// LAViewController.m +// photobackup +// +// Created by Nick O'Neill on 10/20/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import "LAViewController.h" +#import "LACamliFile.h" +#import + +@interface LAViewController () + +@end + +@implementation LAViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + NSString *credentialsPath = [[NSBundle mainBundle] pathForResource:@"credentials" ofType:@"plist"]; + NSDictionary *credentials = [NSDictionary dictionaryWithContentsOfFile:credentialsPath]; + + NSAssert(credentials[@"camlistore_url"], @"no camlistore url specified"); + NSAssert(credentials[@"camlistore_username"], @"no camlistore username specified"); + NSAssert(credentials[@"camlistore_password"], @"no camlistore password specified"); + + self.client = [[LACamliClient alloc] initWithServer:[NSURL URLWithString:credentials[@"camlistore_url"]] username:credentials[@"camlistore_username"] andPassword:credentials[@"camlistore_password"]]; + + NSUInteger __block filesToUpload = 0; + + self.library = [[ALAssetsLibrary alloc] init]; + [self.library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) { + LALog(@"group: %@",group); + [group enumerateAssetsUsingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop) { + LALog(@"asset: %@",result); + + if (result && [result valueForProperty:ALAssetPropertyType] != ALAssetTypeVideo) { // enumerate returns null after the last item + LACamliFile *file = [[LACamliFile alloc] initWithAsset:result]; + + if (![self.client fileAlreadyUploaded:file]) { + filesToUpload++; + [self.client addFile:file]; + } else { + LALog(@"file already uploaded: %@",file.blobRef); + } + } + }]; + } failureBlock:^(NSError *error) { + LALog(@"failed enumerate: %@",error); + }]; + + // TODO: set badge number to filesToUpload +} + +#pragma mark - collection methods + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section +{ + return 5; +} + +- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView +{ + return 1; +} + +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath +{ + UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"collectionCell" forIndexPath:indexPath]; + + cell.backgroundColor = [UIColor redColor]; + + return cell; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/clients/ios-objc/photobackup/credentials.plist b/clients/ios-objc/photobackup/credentials.plist new file mode 100644 index 000000000..0beda600e --- /dev/null +++ b/clients/ios-objc/photobackup/credentials.plist @@ -0,0 +1,12 @@ + + + + + camlistore_url + + camlistore_username + + camlistore_password + + + diff --git a/clients/ios-objc/photobackup/en.lproj/InfoPlist.strings b/clients/ios-objc/photobackup/en.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/clients/ios-objc/photobackup/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/clients/ios-objc/photobackup/main.m b/clients/ios-objc/photobackup/main.m new file mode 100644 index 000000000..5a06d4863 --- /dev/null +++ b/clients/ios-objc/photobackup/main.m @@ -0,0 +1,18 @@ +// +// main.m +// photobackup +// +// Created by Nick O'Neill on 10/20/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import + +#import "LAAppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([LAAppDelegate class])); + } +} diff --git a/clients/ios-objc/photobackup/photobackup-Info.plist b/clients/ios-objc/photobackup/photobackup-Info.plist new file mode 100644 index 000000000..5afab2a55 --- /dev/null +++ b/clients/ios-objc/photobackup/photobackup-Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + net.launchapps.${PRODUCT_NAME:rfc1034identifier} + 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 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/clients/ios-objc/photobackup/photobackup-Prefix.pch b/clients/ios-objc/photobackup/photobackup-Prefix.pch new file mode 100644 index 000000000..faff9b37a --- /dev/null +++ b/clients/ios-objc/photobackup/photobackup-Prefix.pch @@ -0,0 +1,22 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#import + +#ifndef __IPHONE_5_0 +#warning "This project uses features only available in iOS SDK 5.0 and later." +#endif + +#ifdef DEBUG +# define LALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) +#else +# define LALog(...) +#endif + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/clients/ios-objc/photobackupTests/en.lproj/InfoPlist.strings b/clients/ios-objc/photobackupTests/en.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/clients/ios-objc/photobackupTests/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/clients/ios-objc/photobackupTests/photobackupTests-Info.plist b/clients/ios-objc/photobackupTests/photobackupTests-Info.plist new file mode 100644 index 000000000..35e2b971b --- /dev/null +++ b/clients/ios-objc/photobackupTests/photobackupTests-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + net.launchapps.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/clients/ios-objc/photobackupTests/photobackupTests.m b/clients/ios-objc/photobackupTests/photobackupTests.m new file mode 100644 index 000000000..e8947f21b --- /dev/null +++ b/clients/ios-objc/photobackupTests/photobackupTests.m @@ -0,0 +1,34 @@ +// +// photobackupTests.m +// photobackupTests +// +// Created by Nick O'Neill on 10/20/13. +// Copyright (c) 2013 The Camlistore Authors. All rights reserved. +// + +#import + +@interface photobackupTests : XCTestCase + +@end + +@implementation photobackupTests + +- (void)setUp +{ + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown +{ + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample +{ + XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); +} + +@end