diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit.xcodeproj/project.pbxproj b/263-cloudkit-references/CloudKitReferences/HelloCloudKit.xcodeproj/project.pbxproj new file mode 100644 index 0000000..09a9c25 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit.xcodeproj/project.pbxproj @@ -0,0 +1,459 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 7C045973B0CA707E5E4706F0 /* Pods_HelloCloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 383201322E7C8EF5925BFC0A /* Pods_HelloCloudKit.framework */; }; + B508C6741E3F833300C83C6A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B508C6731E3F833300C83C6A /* AppDelegate.swift */; }; + B508C6791E3F833300C83C6A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B508C6771E3F833300C83C6A /* Main.storyboard */; }; + B508C67B1E3F833300C83C6A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B508C67A1E3F833300C83C6A /* Assets.xcassets */; }; + B508C67E1E3F833300C83C6A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B508C67C1E3F833300C83C6A /* LaunchScreen.storyboard */; }; + B582983B1E771E2100B91EAB /* Restaurant.swift in Sources */ = {isa = PBXBuildFile; fileRef = B582983A1E771E2100B91EAB /* Restaurant.swift */; }; + B582983E1E771E3100B91EAB /* RestaurantsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B582983D1E771E3100B91EAB /* RestaurantsViewController.swift */; }; + B5877ACC1E8AE69200B4A7E2 /* RestaurantViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5877ACB1E8AE69200B4A7E2 /* RestaurantViewController.swift */; }; + B5877ACF1E8AF20F00B4A7E2 /* RestaurantCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5877ACE1E8AF20F00B4A7E2 /* RestaurantCell.swift */; }; + B5877AD11E8C19DC00B4A7E2 /* AddressCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5877AD01E8C19DC00B4A7E2 /* AddressCell.swift */; }; + B5877AD51E8C422C00B4A7E2 /* Restaurants.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5877AD41E8C422C00B4A7E2 /* Restaurants.swift */; }; + B5877AD71E8C48E200B4A7E2 /* ReviewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5877AD61E8C48E200B4A7E2 /* ReviewCell.swift */; }; + B5877AD91E8C778D00B4A7E2 /* ReviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5877AD81E8C778D00B4A7E2 /* ReviewViewController.swift */; }; + B5E5F75F1E64821F00280CC5 /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5E5F75E1E64821F00280CC5 /* CloudKit.framework */; }; + B5E639EF1E8EB005004CE999 /* Review.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E639EE1E8EB005004CE999 /* Review.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 383201322E7C8EF5925BFC0A /* Pods_HelloCloudKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HelloCloudKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 52D05E8BF85629B348B815C4 /* Pods-HelloCloudKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloCloudKit.release.xcconfig"; path = "Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.release.xcconfig"; sourceTree = ""; }; + 5B0657AC5DDAD53E6A8770FB /* Pods-HelloCloudKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloCloudKit.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.debug.xcconfig"; sourceTree = ""; }; + B508C6701E3F833300C83C6A /* HelloCloudKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloCloudKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; + B508C6731E3F833300C83C6A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + B508C6781E3F833300C83C6A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + B508C67A1E3F833300C83C6A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B508C67D1E3F833300C83C6A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + B508C67F1E3F833300C83C6A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B582983A1E771E2100B91EAB /* Restaurant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Restaurant.swift; sourceTree = ""; }; + B582983D1E771E3100B91EAB /* RestaurantsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestaurantsViewController.swift; sourceTree = ""; }; + B5877ACB1E8AE69200B4A7E2 /* RestaurantViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestaurantViewController.swift; sourceTree = ""; }; + B5877ACE1E8AF20F00B4A7E2 /* RestaurantCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestaurantCell.swift; sourceTree = ""; }; + B5877AD01E8C19DC00B4A7E2 /* AddressCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddressCell.swift; sourceTree = ""; }; + B5877AD41E8C422C00B4A7E2 /* Restaurants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Restaurants.swift; sourceTree = ""; }; + B5877AD61E8C48E200B4A7E2 /* ReviewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReviewCell.swift; sourceTree = ""; }; + B5877AD81E8C778D00B4A7E2 /* ReviewViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReviewViewController.swift; sourceTree = ""; }; + B5E5F75D1E64821300280CC5 /* HelloCloudKit.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HelloCloudKit.entitlements; sourceTree = ""; }; + B5E5F75E1E64821F00280CC5 /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; }; + B5E639EE1E8EB005004CE999 /* Review.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Review.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B508C66D1E3F833200C83C6A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B5E5F75F1E64821F00280CC5 /* CloudKit.framework in Frameworks */, + 7C045973B0CA707E5E4706F0 /* Pods_HelloCloudKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B508C6671E3F833200C83C6A = { + isa = PBXGroup; + children = ( + B508C6721E3F833300C83C6A /* HelloCloudKit */, + B508C6711E3F833300C83C6A /* Products */, + B508C6861E3F834D00C83C6A /* Frameworks */, + D58C08298FA14704E48A3B3C /* Pods */, + ); + sourceTree = ""; + }; + B508C6711E3F833300C83C6A /* Products */ = { + isa = PBXGroup; + children = ( + B508C6701E3F833300C83C6A /* HelloCloudKit.app */, + ); + name = Products; + sourceTree = ""; + }; + B508C6721E3F833300C83C6A /* HelloCloudKit */ = { + isa = PBXGroup; + children = ( + B5877ACD1E8AF20500B4A7E2 /* Views */, + B582983C1E771E2600B91EAB /* Controllers */, + B58298391E771E1700B91EAB /* Models */, + B5E5F75D1E64821300280CC5 /* HelloCloudKit.entitlements */, + B508C6731E3F833300C83C6A /* AppDelegate.swift */, + B508C6771E3F833300C83C6A /* Main.storyboard */, + B508C67A1E3F833300C83C6A /* Assets.xcassets */, + B508C67C1E3F833300C83C6A /* LaunchScreen.storyboard */, + B508C67F1E3F833300C83C6A /* Info.plist */, + ); + path = HelloCloudKit; + sourceTree = ""; + }; + B508C6861E3F834D00C83C6A /* Frameworks */ = { + isa = PBXGroup; + children = ( + B5E5F75E1E64821F00280CC5 /* CloudKit.framework */, + 383201322E7C8EF5925BFC0A /* Pods_HelloCloudKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + B58298391E771E1700B91EAB /* Models */ = { + isa = PBXGroup; + children = ( + B582983A1E771E2100B91EAB /* Restaurant.swift */, + B5877AD41E8C422C00B4A7E2 /* Restaurants.swift */, + B5E639EE1E8EB005004CE999 /* Review.swift */, + ); + name = Models; + sourceTree = ""; + }; + B582983C1E771E2600B91EAB /* Controllers */ = { + isa = PBXGroup; + children = ( + B582983D1E771E3100B91EAB /* RestaurantsViewController.swift */, + B5877ACB1E8AE69200B4A7E2 /* RestaurantViewController.swift */, + B5877AD81E8C778D00B4A7E2 /* ReviewViewController.swift */, + ); + name = Controllers; + sourceTree = ""; + }; + B5877ACD1E8AF20500B4A7E2 /* Views */ = { + isa = PBXGroup; + children = ( + B5877ACE1E8AF20F00B4A7E2 /* RestaurantCell.swift */, + B5877AD01E8C19DC00B4A7E2 /* AddressCell.swift */, + B5877AD61E8C48E200B4A7E2 /* ReviewCell.swift */, + ); + name = Views; + sourceTree = ""; + }; + D58C08298FA14704E48A3B3C /* Pods */ = { + isa = PBXGroup; + children = ( + 5B0657AC5DDAD53E6A8770FB /* Pods-HelloCloudKit.debug.xcconfig */, + 52D05E8BF85629B348B815C4 /* Pods-HelloCloudKit.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B508C66F1E3F833200C83C6A /* HelloCloudKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = B508C6821E3F833300C83C6A /* Build configuration list for PBXNativeTarget "HelloCloudKit" */; + buildPhases = ( + 83381993993EB898F8D16976 /* [CP] Check Pods Manifest.lock */, + B508C66C1E3F833200C83C6A /* Sources */, + B508C66D1E3F833200C83C6A /* Frameworks */, + B508C66E1E3F833200C83C6A /* Resources */, + 47D6C33820C0E56B87EFF767 /* [CP] Embed Pods Frameworks */, + F2D3483BC35DC6C3BDBE0D44 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HelloCloudKit; + productName = HelloCloudKit; + productReference = B508C6701E3F833300C83C6A /* HelloCloudKit.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B508C6681E3F833200C83C6A /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0820; + LastUpgradeCheck = 0820; + ORGANIZATIONNAME = NSScreencast; + TargetAttributes = { + B508C66F1E3F833200C83C6A = { + CreatedOnToolsVersion = 8.2.1; + DevelopmentTeam = C2K3864N2N; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Push = { + enabled = 1; + }; + com.apple.iCloud = { + enabled = 1; + }; + }; + }; + }; + }; + buildConfigurationList = B508C66B1E3F833200C83C6A /* Build configuration list for PBXProject "HelloCloudKit" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B508C6671E3F833200C83C6A; + productRefGroup = B508C6711E3F833300C83C6A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B508C66F1E3F833200C83C6A /* HelloCloudKit */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B508C66E1E3F833200C83C6A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B508C67E1E3F833300C83C6A /* LaunchScreen.storyboard in Resources */, + B508C67B1E3F833300C83C6A /* Assets.xcassets in Resources */, + B508C6791E3F833300C83C6A /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 47D6C33820C0E56B87EFF767 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 83381993993EB898F8D16976 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + F2D3483BC35DC6C3BDBE0D44 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B508C66C1E3F833200C83C6A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B5877AD51E8C422C00B4A7E2 /* Restaurants.swift in Sources */, + B5877ACF1E8AF20F00B4A7E2 /* RestaurantCell.swift in Sources */, + B5877AD91E8C778D00B4A7E2 /* ReviewViewController.swift in Sources */, + B582983B1E771E2100B91EAB /* Restaurant.swift in Sources */, + B5877AD71E8C48E200B4A7E2 /* ReviewCell.swift in Sources */, + B5E639EF1E8EB005004CE999 /* Review.swift in Sources */, + B5877ACC1E8AE69200B4A7E2 /* RestaurantViewController.swift in Sources */, + B582983E1E771E3100B91EAB /* RestaurantsViewController.swift in Sources */, + B5877AD11E8C19DC00B4A7E2 /* AddressCell.swift in Sources */, + B508C6741E3F833300C83C6A /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + B508C6771E3F833300C83C6A /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B508C6781E3F833300C83C6A /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + B508C67C1E3F833300C83C6A /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B508C67D1E3F833300C83C6A /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + B508C6801E3F833300C83C6A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + 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_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + B508C6811E3F833300C83C6A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + 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_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + B508C6831E3F833300C83C6A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5B0657AC5DDAD53E6A8770FB /* Pods-HelloCloudKit.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = HelloCloudKit/HelloCloudKit.entitlements; + DEVELOPMENT_TEAM = C2K3864N2N; + INFOPLIST_FILE = HelloCloudKit/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.nsscreencast.HelloCloudKit; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + B508C6841E3F833300C83C6A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 52D05E8BF85629B348B815C4 /* Pods-HelloCloudKit.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = HelloCloudKit/HelloCloudKit.entitlements; + DEVELOPMENT_TEAM = C2K3864N2N; + INFOPLIST_FILE = HelloCloudKit/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.nsscreencast.HelloCloudKit; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B508C66B1E3F833200C83C6A /* Build configuration list for PBXProject "HelloCloudKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B508C6801E3F833300C83C6A /* Debug */, + B508C6811E3F833300C83C6A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B508C6821E3F833300C83C6A /* Build configuration list for PBXNativeTarget "HelloCloudKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B508C6831E3F833300C83C6A /* Debug */, + B508C6841E3F833300C83C6A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B508C6681E3F833200C83C6A /* Project object */; +} diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit.xcworkspace/contents.xcworkspacedata b/263-cloudkit-references/CloudKitReferences/HelloCloudKit.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..009dd60 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/AddressCell.swift b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/AddressCell.swift new file mode 100644 index 0000000..27e8c20 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/AddressCell.swift @@ -0,0 +1,13 @@ +// +// AddressCell.swift +// HelloCloudKit +// +// Created by Ben Scheirman on 3/29/17. +// Copyright © 2017 NSScreencast. All rights reserved. +// + +import UIKit + +class AddressCell : UITableViewCell { + @IBOutlet weak var addressLabel: UILabel! +} diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/AppDelegate.swift b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/AppDelegate.swift new file mode 100644 index 0000000..4de097d --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/AppDelegate.swift @@ -0,0 +1,102 @@ +// +// AppDelegate.swift +// HelloCloudKit +// +// Created by Ben Scheirman on 1/30/17. +// Copyright © 2017 NSScreencast. All rights reserved. +// + +import UIKit +import CoreLocation +import CloudKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + + + setupAppearance() + checkAccountStatus() + + + NotificationCenter.default.addObserver(forName: .CKAccountChanged, + object: nil, + queue: nil) { [weak self] (note) in + print("Identity changed.") + self?.checkAccountStatus() + } + + return true + } + + func checkAccountStatus() { + print("Checking account status:") + let container = CKContainer.default() + container.accountStatus { (accountStatus, error) in + + print("Account status: \(accountStatus.rawValue)") + + switch accountStatus { + case .available: + break + + case .noAccount: + self.promptForICloud() + + case .couldNotDetermine: + if let e = error { + print("Error checking account status: \(e)") + } + + case .restricted: + print("restricted") + } + } + } + + func promptForICloud() { + print("Prompt for iCloud") + + let alert = UIAlertController(title: "iCloud Login Required", + message: "This app uses iCloud to store data about restaurants. Please log in in the Settings app", + preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "OK", style: .cancel, handler: nil)) + window?.rootViewController?.present(alert, animated: true, completion: nil) + } + + func applicationWillResignActive(_ application: UIApplication) { + // 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 invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // 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. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // 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. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + + private func setupAppearance() { + window?.tintColor = #colorLiteral(red: 0.5226279145, green: 0.02596991433, blue: 0, alpha: 1) + + let navbar = UINavigationBar.appearance() + navbar.titleTextAttributes = [ + NSForegroundColorAttributeName: UIColor(red:0.46, green:0.38, blue:0.22, alpha:1.00) + ] + } +} + diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/AppIcon.appiconset/Contents.json b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..b8236c6 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,48 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/Contents.json b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/user.imageset/Contents.json b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/user.imageset/Contents.json new file mode 100644 index 0000000..3a7d612 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/user.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "user@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/user.imageset/user@2x.png b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/user.imageset/user@2x.png new file mode 100644 index 0000000..80b0e7d Binary files /dev/null and b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Assets.xcassets/user.imageset/user@2x.png differ diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Base.lproj/LaunchScreen.storyboard b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..fdf3f97 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Base.lproj/Main.storyboard b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Base.lproj/Main.storyboard new file mode 100644 index 0000000..b97e85b --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Base.lproj/Main.storyboard @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/HelloCloudKit.entitlements b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/HelloCloudKit.entitlements new file mode 100644 index 0000000..c97793b --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/HelloCloudKit.entitlements @@ -0,0 +1,18 @@ + + + + + aps-environment + development + com.apple.developer.icloud-container-identifiers + + iCloud.$(CFBundleIdentifier) + + com.apple.developer.icloud-services + + CloudKit + + com.apple.developer.ubiquity-kvstore-identifier + $(TeamIdentifierPrefix)$(CFBundleIdentifier) + + diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Info.plist b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Info.plist new file mode 100644 index 0000000..38e98af --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Restaurant.swift b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Restaurant.swift new file mode 100644 index 0000000..44c22f8 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Restaurant.swift @@ -0,0 +1,35 @@ +// +// Restaurant.swift +// HelloCloudKit +// +// Created by Ben Scheirman on 3/13/17. +// Copyright © 2017 NSScreencast. All rights reserved. +// + +import Foundation +import CloudKit + +class Restaurant { + static let recordType = "Restaurant" + + let name: String + let address: String + let location: CLLocation + let imageFileURL: URL? + + var recordID: CKRecordID? + + init(record: CKRecord) { + recordID = record.recordID + name = record["name"] as! String + address = record["address"] as! String + location = record["location"] as! CLLocation + if let asset = record["image"] as? CKAsset { + imageFileURL = asset.fileURL + } else { + imageFileURL = nil + } + } +} + + diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/RestaurantCell.swift b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/RestaurantCell.swift new file mode 100644 index 0000000..f86f078 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/RestaurantCell.swift @@ -0,0 +1,32 @@ +// +// RestaurantCell.swift +// HelloCloudKit +// +// Created by Ben Scheirman on 3/28/17. +// Copyright © 2017 NSScreencast. All rights reserved. +// + +import UIKit + +class RestaurantCell : UITableViewCell { + + let ImageViewWidth: CGFloat = 84 + let LabelPadding: CGFloat = 10 + + override func layoutSubviews() { + super.layoutSubviews() + + guard let imageView = self.imageView, + let textLabel = self.textLabel + else { return } + + var frame = imageView.frame + frame.size.width = ImageViewWidth + imageView.frame = frame + + textLabel.frame.origin.x = imageView.frame.origin.x + imageView.frame.size.width + LabelPadding + detailTextLabel?.frame.origin.x = textLabel.frame.origin.x + } + + +} diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/RestaurantViewController.swift b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/RestaurantViewController.swift new file mode 100644 index 0000000..d54b3f2 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/RestaurantViewController.swift @@ -0,0 +1,107 @@ +// +// RestaurantViewController.swift +// HelloCloudKit +// +// Created by Ben Scheirman on 3/28/17. +// Copyright © 2017 NSScreencast. All rights reserved. +// + +import UIKit +import CloudKit + +class RestaurantViewController : UITableViewController { + + enum Sections : Int { + case info + case reviews + case count + } + + var restaurant: Restaurant? + var reviews: [Review] = [] + + @IBOutlet weak var imageView: UIImageView! + + override func viewDidLoad() { + super.viewDidLoad() + + tableView.rowHeight = UITableViewAutomaticDimension + tableView.estimatedRowHeight = 64 + + configureUI() + loadReviews() + } + + private func loadReviews() { + guard let restaurantID = restaurant?.recordID else { return } + + Restaurants.reviews(for: restaurantID) { (reviews, _) in + self.reviews = reviews + self.tableView.reloadSections([Sections.reviews.rawValue], with: .automatic) + } + } + + private func configureUI() { + guard let restaurant = self.restaurant else { return } + title = restaurant.name + if let imageURL = restaurant.imageFileURL { + let data = try! Data(contentsOf: imageURL) + imageView.image = UIImage(data: data) + } + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + guard let restaurantID = restaurant?.recordID else { return } + + + if segue.identifier == "addReviewSegue" { + let destinationNav = segue.destination as! UINavigationController + let destination = destinationNav.viewControllers.first as! ReviewViewController + destination.addReviewBlock = { [weak self] vc in + let review = Review(author: vc.nameTextField.text ?? "", + comment: vc.commentTextView.text, + rating: Float(vc.ratingView.value), + restaurantID: restaurantID) + Restaurants.save(review: review) + self?.reviews.insert(review, at: 0) + + self?.dismiss(animated: true, completion: { + let indexPath = IndexPath(row: 0, section: Sections.reviews.rawValue) + self?.tableView.insertRows(at: [indexPath], with: .top) + }) + } + } + } + + override func numberOfSections(in tableView: UITableView) -> Int { + return Sections.count.rawValue + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + if section == Sections.info.rawValue { + return restaurant?.address == nil ? 0 : 1 + } else if section == Sections.reviews.rawValue { + return reviews.count + } + + return 0 + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if indexPath.section == Sections.info.rawValue { + let cell = tableView.dequeueReusableCell(withIdentifier: "AddressCell") as! AddressCell + cell.addressLabel.text = restaurant?.address ?? "" + return cell + } else if indexPath.section == Sections.reviews.rawValue { + let cell = tableView.dequeueReusableCell(withIdentifier: "ReviewCell", for: indexPath) as! ReviewCell + let review = reviews[indexPath.row] + cell.authorLabel.text = review.authorName + cell.commentLabel.text = review.comment + cell.ratingView.value = CGFloat(review.rating) + return cell + } else { + let cell = UITableViewCell() + return cell + } + } +} diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Restaurants.swift b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Restaurants.swift new file mode 100644 index 0000000..9b75169 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Restaurants.swift @@ -0,0 +1,57 @@ +// +// Restaurants.swift +// HelloCloudKit +// +// Created by Ben Scheirman on 3/29/17. +// Copyright © 2017 NSScreencast. All rights reserved. +// + +import Foundation +import CloudKit + +class Restaurants { + static var container = CKContainer.default() + + static func all(completion: @escaping ([Restaurant], Error?) -> Void) { + let predicate = NSPredicate(value: true) + let query = CKQuery(recordType: Restaurant.recordType, predicate: predicate) + let queryOperation = CKQueryOperation(query: query) + + var results = [Restaurant]() + queryOperation.recordFetchedBlock = { record in + results.append(Restaurant(record: record)) + } + queryOperation.queryCompletionBlock = { _, e in + DispatchQueue.main.async { + completion(results, e) + } + } + + container.publicCloudDatabase.add(queryOperation) + } + + static func reviews(for restaurantID: CKRecordID, completion: @escaping ([Review], Error?) -> Void) { + let ref = CKReference(recordID: restaurantID, action: .deleteSelf) + let predicate = NSPredicate(format: "restaurant == %@", ref) + let query = CKQuery(recordType: Review.recordType, predicate: predicate) + let queryOperation = CKQueryOperation(query: query) + + var results = [Review]() + queryOperation.recordFetchedBlock = { record in + results.append(Review(record: record)) + } + queryOperation.queryCompletionBlock = { _, e in + DispatchQueue.main.async { + completion(results, e) + } + } + + container.publicCloudDatabase.add(queryOperation) + } + + static func save(review: Review) { + container.publicCloudDatabase.save(review.record) { (record, error) in + print("Saved record? \(record?.recordID) (Error: \(error))") + } + } +} diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/RestaurantsViewController.swift b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/RestaurantsViewController.swift new file mode 100644 index 0000000..682affe --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/RestaurantsViewController.swift @@ -0,0 +1,64 @@ +// +// RestaurantsViewController.swift +// HelloCloudKit +// +// Created by Ben Scheirman on 3/13/17. +// Copyright © 2017 NSScreencast. All rights reserved. +// + +import UIKit + +class RestaurantsViewController : UITableViewController { + + var restaurants: [Restaurant] = [] + + override func viewDidLoad() { + super.viewDidLoad() + tableView.tableFooterView = UIView() + loadRestaurants() + } + + func loadRestaurants() { + Restaurants.all { (restaurants, error) in + if let e = error { + print("Error fetching restaurants: \(e)") + } else { + self.restaurants = restaurants + self.tableView.reloadData() + } + } + } + + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + if segue.identifier == "restaurantSegue", let indexPath = tableView.indexPathForSelectedRow { + let destination = segue.destination as! RestaurantViewController + let restaurant = restaurants[indexPath.row] + destination.restaurant = restaurant + } + } + + // MARK - UITableViewDataSource + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return restaurants.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "restaurantCell", for: indexPath) + let restaurant = restaurants[indexPath.row] + + if let imageURL = restaurant.imageFileURL { + if let data = try? Data(contentsOf: imageURL) { + cell.imageView?.image = UIImage(data: data) + cell.imageView?.contentMode = UIViewContentMode.scaleAspectFill + cell.imageView?.clipsToBounds = true + } + } else { + cell.imageView?.image = nil + } + + cell.textLabel?.text = restaurant.name + cell.detailTextLabel?.text = restaurant.address + return cell + } +} diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Review.swift b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Review.swift new file mode 100644 index 0000000..2b8850f --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/Review.swift @@ -0,0 +1,39 @@ +// +// Review.swift +// HelloCloudKit +// +// Created by Ben Scheirman on 3/31/17. +// Copyright © 2017 NSScreencast. All rights reserved. +// + +import CloudKit + +class Review { + static let recordType = "Review" + + let authorName: String + let comment: String + let rating: Float + let restaurantReference: CKReference + + var recordID: CKRecordID? + let record: CKRecord + + init(record: CKRecord) { + self.record = record + recordID = record.recordID + authorName = record["author_name"] as! String + comment = record["comment"] as! String + rating = (record["stars"] as! NSNumber).floatValue + restaurantReference = record["restaurant"] as! CKReference + } + + convenience init(author: String, comment: String, rating: Float, restaurantID: CKRecordID) { + let record = CKRecord(recordType: Review.recordType) + record["author_name"] = author as NSString + record["comment"] = comment as NSString + record["stars"] = rating as NSNumber + record["restaurant"] = CKReference(recordID: restaurantID, action: .deleteSelf) + self.init(record: record) + } +} diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/ReviewCell.swift b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/ReviewCell.swift new file mode 100644 index 0000000..5823ba7 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/ReviewCell.swift @@ -0,0 +1,25 @@ +// +// ReviewCell.swift +// HelloCloudKit +// +// Created by Ben Scheirman on 3/29/17. +// Copyright © 2017 NSScreencast. All rights reserved. +// + +import UIKit +import HCSStarRatingView + +class ReviewCell : UITableViewCell { + @IBOutlet weak var userImageView: UIImageView! + @IBOutlet weak var ratingView: HCSStarRatingView! + @IBOutlet weak var authorLabel: UILabel! + @IBOutlet weak var commentLabel: UILabel! + + override func layoutSubviews() { + super.layoutSubviews() + userImageView.layer.cornerRadius = userImageView.bounds.size.width / 2 + userImageView.clipsToBounds = true + userImageView.layer.borderColor = UIColor(white: 0.86, alpha: 1.0).cgColor + userImageView.layer.borderWidth = 1 + } +} diff --git a/263-cloudkit-references/CloudKitReferences/HelloCloudKit/ReviewViewController.swift b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/ReviewViewController.swift new file mode 100644 index 0000000..a520627 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/HelloCloudKit/ReviewViewController.swift @@ -0,0 +1,31 @@ +// +// ReviewViewController.swift +// HelloCloudKit +// +// Created by Ben Scheirman on 3/29/17. +// Copyright © 2017 NSScreencast. All rights reserved. +// + +import UIKit +import HCSStarRatingView + +class ReviewViewController : UIViewController { + @IBOutlet weak var nameTextField: UITextField! + @IBOutlet weak var ratingView: HCSStarRatingView! + @IBOutlet weak var commentTextView: UITextView! + + var addReviewBlock: (ReviewViewController) -> () = { _ in } + + override func viewDidLoad() { + super.viewDidLoad() + nameTextField.becomeFirstResponder() + } + + @IBAction func cancel() { + dismiss(animated: true, completion: nil) + } + + @IBAction func done() { + addReviewBlock(self) + } +} diff --git a/263-cloudkit-references/CloudKitReferences/Podfile b/263-cloudkit-references/CloudKitReferences/Podfile new file mode 100644 index 0000000..2af8aa4 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Podfile @@ -0,0 +1,7 @@ + +target 'HelloCloudKit' do + use_frameworks! + + pod 'HCSStarRatingView' + +end diff --git a/263-cloudkit-references/CloudKitReferences/Podfile.lock b/263-cloudkit-references/CloudKitReferences/Podfile.lock new file mode 100644 index 0000000..a6eca34 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Podfile.lock @@ -0,0 +1,12 @@ +PODS: + - HCSStarRatingView (1.5) + +DEPENDENCIES: + - HCSStarRatingView + +SPEC CHECKSUMS: + HCSStarRatingView: 1d18f79654735514cd6f00e6d90e38cb6320dc31 + +PODFILE CHECKSUM: cb758b772909aed5b2db49eed82a9b87c7104b6f + +COCOAPODS: 1.2.0 diff --git a/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/HCSStarRatingView/HCSStarRatingView.h b/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/HCSStarRatingView/HCSStarRatingView.h new file mode 100644 index 0000000..04e483b --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/HCSStarRatingView/HCSStarRatingView.h @@ -0,0 +1,51 @@ +// HCSStarRatingView.h +// +// Copyright (c) 2015 Hugo Sousa +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +@import UIKit; + +typedef BOOL(^HCSStarRatingViewShouldBeginGestureRecognizerBlock)(UIGestureRecognizer *gestureRecognizer); + +IB_DESIGNABLE +@interface HCSStarRatingView : UIControl +@property (nonatomic) IBInspectable NSUInteger maximumValue; +@property (nonatomic) IBInspectable CGFloat minimumValue; +@property (nonatomic) IBInspectable CGFloat value; +@property (nonatomic) IBInspectable CGFloat spacing; +@property (nonatomic) IBInspectable BOOL allowsHalfStars; +@property (nonatomic) IBInspectable BOOL accurateHalfStars; +@property (nonatomic) IBInspectable BOOL continuous; + +@property (nonatomic) BOOL shouldBecomeFirstResponder; + +// Optional: if `nil` method will return `NO`. +@property (nonatomic, copy) HCSStarRatingViewShouldBeginGestureRecognizerBlock shouldBeginGestureRecognizerBlock; + +@property (nonatomic, strong) IBInspectable UIColor *starBorderColor; +@property (nonatomic) IBInspectable CGFloat starBorderWidth; + +@property (nonatomic, strong) IBInspectable UIColor *emptyStarColor; + +@property (nonatomic, strong) IBInspectable UIImage *emptyStarImage; +@property (nonatomic, strong) IBInspectable UIImage *halfStarImage; +@property (nonatomic, strong) IBInspectable UIImage *filledStarImage; +@end + diff --git a/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/HCSStarRatingView/HCSStarRatingView.m b/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/HCSStarRatingView/HCSStarRatingView.m new file mode 100644 index 0000000..4e9ad8c --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/HCSStarRatingView/HCSStarRatingView.m @@ -0,0 +1,463 @@ +// HCSStarRatingView.m +// +// Copyright (c) 2015 Hugo Sousa +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "HCSStarRatingView.h" + +@interface HCSStarRatingView () +@property (nonatomic, readonly) BOOL shouldUseImages; +@end + +@implementation HCSStarRatingView { + CGFloat _minimumValue; + NSUInteger _maximumValue; + CGFloat _value; + UIColor *_starBorderColor; +} + +@dynamic minimumValue; +@dynamic maximumValue; +@dynamic value; +@dynamic shouldUseImages; +@dynamic starBorderColor; + +#pragma mark - Initialization + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self _customInit]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self _customInit]; + } + return self; +} + +- (void)_customInit { + self.exclusiveTouch = YES; + _minimumValue = 0; + _maximumValue = 5; + _value = 0; + _spacing = 5.f; + _continuous = YES; + _starBorderWidth = 1.0f; + _emptyStarColor = [UIColor clearColor]; + + [self _updateAppearanceForState:self.enabled]; +} + +- (void)setNeedsLayout { + [super setNeedsLayout]; + [self setNeedsDisplay]; +} + +#pragma mark - Properties + +- (UIColor *)backgroundColor { + if ([super backgroundColor]) { + return [super backgroundColor]; + } else { + return self.isOpaque ? [UIColor whiteColor] : [UIColor clearColor]; + }; +} + +- (CGFloat)minimumValue { + return MAX(_minimumValue, 0); +} + +- (void)setMinimumValue:(CGFloat)minimumValue { + if (_minimumValue != minimumValue) { + _minimumValue = minimumValue; + [self setNeedsDisplay]; + } +} + +- (NSUInteger)maximumValue { + return MAX(_minimumValue, _maximumValue); +} + +- (void)setMaximumValue:(NSUInteger)maximumValue { + if (_maximumValue != maximumValue) { + _maximumValue = maximumValue; + [self setNeedsDisplay]; + [self invalidateIntrinsicContentSize]; + } +} + +- (CGFloat)value { + return MIN(MAX(_value, _minimumValue), _maximumValue); +} + +- (void)setValue:(CGFloat)value { + [self setValue:value sendValueChangedAction:NO]; +} + +- (void)setValue:(CGFloat)value sendValueChangedAction:(BOOL)sendAction { + [self willChangeValueForKey:NSStringFromSelector(@selector(value))]; + if (_value != value && value >= _minimumValue && value <= _maximumValue) { + _value = value; + if (sendAction) [self sendActionsForControlEvents:UIControlEventValueChanged]; + [self setNeedsDisplay]; + } + [self didChangeValueForKey:NSStringFromSelector(@selector(value))]; +} + +- (void)setSpacing:(CGFloat)spacing { + _spacing = MAX(spacing, 0); + [self setNeedsDisplay]; +} + +- (void)setAllowsHalfStars:(BOOL)allowsHalfStars { + if (_allowsHalfStars != allowsHalfStars) { + _allowsHalfStars = allowsHalfStars; + [self setNeedsDisplay]; + } +} + +- (void)setAccurateHalfStars:(BOOL)accurateHalfStars { + if (_accurateHalfStars != accurateHalfStars) { + _accurateHalfStars = accurateHalfStars; + [self setNeedsDisplay]; + } +} + +- (void)setEmptyStarImage:(UIImage *)emptyStarImage { + if (_emptyStarImage != emptyStarImage) { + _emptyStarImage = emptyStarImage; + [self setNeedsDisplay]; + } +} + +- (void)setHalfStarImage:(UIImage *)halfStarImage { + if (_halfStarImage != halfStarImage) { + _halfStarImage = halfStarImage; + [self setNeedsDisplay]; + } +} + +- (void)setFilledStarImage:(UIImage *)filledStarImage { + if (_filledStarImage != filledStarImage) { + _filledStarImage = filledStarImage; + [self setNeedsDisplay]; + } +} + +- (void)setEmptyStarColor:(UIColor *)emptyStarColor { + if (_emptyStarColor != emptyStarColor) { + _emptyStarColor = emptyStarColor; + [self setNeedsDisplay]; + } +} + +- (void)setStarBorderColor:(UIColor *)starBorderColor { + if (_starBorderColor != starBorderColor) { + _starBorderColor = starBorderColor; + [self setNeedsDisplay]; + } +} + +- (UIColor *)starBorderColor { + if (_starBorderColor == nil) { + return self.tintColor; + } else { + return _starBorderColor; + } +} + +- (void)setStarBorderWidth:(CGFloat)starBorderWidth { + _starBorderWidth = MAX(0, starBorderWidth); + [self setNeedsDisplay]; +} + + +- (BOOL)shouldUseImages { + return (self.emptyStarImage!=nil && self.filledStarImage!=nil); +} + +#pragma mark - State + +- (void)setEnabled:(BOOL)enabled +{ + [self _updateAppearanceForState:enabled]; + [super setEnabled:enabled]; +} + +- (void)_updateAppearanceForState:(BOOL)enabled +{ + self.alpha = enabled ? 1.f : .5f; +} + +#pragma mark - Image Drawing + +- (void)_drawStarImageWithFrame:(CGRect)frame tintColor:(UIColor*)tintColor highlighted:(BOOL)highlighted { + UIImage *image = highlighted ? self.filledStarImage : self.emptyStarImage; + [self _drawImage:image frame:frame tintColor:tintColor]; +} + +- (void)_drawHalfStarImageWithFrame:(CGRect)frame tintColor:(UIColor *)tintColor { + [self _drawAccurateHalfStarImageWithFrame:frame tintColor:tintColor progress:.5f]; +} + +- (void)_drawAccurateHalfStarImageWithFrame:(CGRect)frame tintColor:(UIColor *)tintColor progress:(CGFloat)progress { + UIImage *image = self.halfStarImage; + if (image == nil) { + // first draw star outline + [self _drawStarImageWithFrame:frame tintColor:tintColor highlighted:NO]; + + image = self.filledStarImage; + CGRect imageFrame = CGRectMake(0, 0, image.size.width * image.scale * progress, image.size.height * image.scale); + frame.size.width *= progress; + CGImageRef imageRef = CGImageCreateWithImageInRect(image.CGImage, imageFrame); + UIImage *halfImage = [UIImage imageWithCGImage:imageRef scale:image.scale orientation:image.imageOrientation]; + image = [halfImage imageWithRenderingMode:image.renderingMode]; + CGImageRelease(imageRef); + } + [self _drawImage:image frame:frame tintColor:tintColor]; +} + +- (void)_drawImage:(UIImage *)image frame:(CGRect)frame tintColor:(UIColor *)tintColor { + if (image.renderingMode == UIImageRenderingModeAlwaysTemplate) { + [tintColor setFill]; + } + [image drawInRect:frame]; +} + +#pragma mark - Shape Drawing + +- (void)_drawStarShapeWithFrame:(CGRect)frame tintColor:(UIColor*)tintColor highlighted:(BOOL)highlighted { + [self _drawAccurateHalfStarShapeWithFrame:frame tintColor:tintColor progress:highlighted ? 1.f : 0.f]; +} + +- (void)_drawHalfStarShapeWithFrame:(CGRect)frame tintColor:(UIColor *)tintColor { + [self _drawAccurateHalfStarShapeWithFrame:frame tintColor:tintColor progress:.5f]; +} + +- (void)_drawAccurateHalfStarShapeWithFrame:(CGRect)frame tintColor:(UIColor *)tintColor progress:(CGFloat)progress { + UIBezierPath* starShapePath = UIBezierPath.bezierPath; + [starShapePath moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.62723 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.37309 * CGRectGetHeight(frame))]; + [starShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.50000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.02500 * CGRectGetHeight(frame))]; + [starShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.37292 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.37309 * CGRectGetHeight(frame))]; + [starShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.02500 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.39112 * CGRectGetHeight(frame))]; + [starShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.30504 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.62908 * CGRectGetHeight(frame))]; + [starShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.20642 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.97500 * CGRectGetHeight(frame))]; + [starShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.50000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.78265 * CGRectGetHeight(frame))]; + [starShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.79358 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.97500 * CGRectGetHeight(frame))]; + [starShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.69501 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.62908 * CGRectGetHeight(frame))]; + [starShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.97500 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.39112 * CGRectGetHeight(frame))]; + [starShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.62723 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.37309 * CGRectGetHeight(frame))]; + [starShapePath closePath]; + starShapePath.miterLimit = 4; + + CGFloat frameWidth = frame.size.width; + CGRect rightRectOfStar = CGRectMake(frame.origin.x + progress * frameWidth, frame.origin.y, frameWidth - progress * frameWidth, frame.size.height); + UIBezierPath *clipPath = [UIBezierPath bezierPathWithRect:CGRectInfinite]; + [clipPath appendPath:[UIBezierPath bezierPathWithRect:rightRectOfStar]]; + clipPath.usesEvenOddFillRule = YES; + + [_emptyStarColor setFill]; + [starShapePath fill]; + + CGContextSaveGState(UIGraphicsGetCurrentContext()); { + [clipPath addClip]; + [tintColor setFill]; + [starShapePath fill]; + } + CGContextRestoreGState(UIGraphicsGetCurrentContext()); + + [self.starBorderColor setStroke]; + starShapePath.lineWidth = _starBorderWidth; + [starShapePath stroke]; +} + +#pragma mark - Drawing + +- (void)drawRect:(CGRect)rect { + CGContextRef context = UIGraphicsGetCurrentContext(); + CGContextSetFillColorWithColor(context, self.backgroundColor.CGColor); + CGContextFillRect(context, rect); + + CGFloat availableWidth = rect.size.width - (_spacing * (_maximumValue - 1)) - 2; + CGFloat cellWidth = (availableWidth / _maximumValue); + CGFloat starSide = (cellWidth <= rect.size.height) ? cellWidth : rect.size.height; + starSide = (self.shouldUseImages) ? starSide : (starSide - _starBorderWidth); + + for (int idx = 0; idx < _maximumValue; idx++) { + CGPoint center = CGPointMake(cellWidth*idx + cellWidth/2 + _spacing*idx + 1, rect.size.height/2); + CGRect frame = CGRectMake(center.x - starSide/2, center.y - starSide/2, starSide, starSide); + BOOL highlighted = (idx+1 <= ceilf(_value)); + if (_allowsHalfStars && highlighted && (idx+1 > _value)) { + if (_accurateHalfStars) { + [self _drawAccurateStarWithFrame:frame tintColor:self.tintColor progress:_value - idx]; + } + else { + [self _drawHalfStarWithFrame:frame tintColor:self.tintColor]; + } + } else { + [self _drawStarWithFrame:frame tintColor:self.tintColor highlighted:highlighted]; + } + } +} + +- (void)_drawStarWithFrame:(CGRect)frame tintColor:(UIColor *)tintColor highlighted:(BOOL)highlighted { + if (self.shouldUseImages) { + [self _drawStarImageWithFrame:frame tintColor:tintColor highlighted:highlighted]; + } else { + [self _drawStarShapeWithFrame:frame tintColor:tintColor highlighted:highlighted]; + } +} + +- (void)_drawHalfStarWithFrame:(CGRect)frame tintColor:(UIColor *)tintColor { + if (self.shouldUseImages) { + [self _drawHalfStarImageWithFrame:frame tintColor:tintColor]; + } else { + [self _drawHalfStarShapeWithFrame:frame tintColor:tintColor]; + } +} +- (void)_drawAccurateStarWithFrame:(CGRect)frame tintColor:(UIColor *)tintColor progress:(CGFloat)progress { + if (self.shouldUseImages) { + [self _drawAccurateHalfStarImageWithFrame:frame tintColor:tintColor progress:progress]; + } else { + [self _drawAccurateHalfStarShapeWithFrame:frame tintColor:tintColor progress:progress]; + } +} +#pragma mark - Touches + +- (BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event { + if (self.isEnabled) { + [super beginTrackingWithTouch:touch withEvent:event]; + if (_shouldBecomeFirstResponder && ![self isFirstResponder]) { + [self becomeFirstResponder]; + } + [self _handleTouch:touch]; + return YES; + } else { + return NO; + } +} + +- (BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event { + if (self.isEnabled) { + [super continueTrackingWithTouch:touch withEvent:event]; + [self _handleTouch:touch]; + return YES; + } else { + return NO; + } +} + +- (void)endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event { + [super endTrackingWithTouch:touch withEvent:event]; + if (_shouldBecomeFirstResponder && [self isFirstResponder]) { + [self resignFirstResponder]; + } + [self _handleTouch:touch]; + if (!_continuous) { + [self sendActionsForControlEvents:UIControlEventValueChanged]; + } +} + +- (void)cancelTrackingWithEvent:(UIEvent *)event { + [super cancelTrackingWithEvent:event]; + if (_shouldBecomeFirstResponder && [self isFirstResponder]) { + [self resignFirstResponder]; + } +} + +- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { + if ([gestureRecognizer.view isEqual:self]) { + return !self.isUserInteractionEnabled; + } + return self.shouldBeginGestureRecognizerBlock ? self.shouldBeginGestureRecognizerBlock(gestureRecognizer) : NO; +} + +- (void)_handleTouch:(UITouch *)touch { + CGFloat cellWidth = self.bounds.size.width / _maximumValue; + CGPoint location = [touch locationInView:self]; + CGFloat value = location.x / cellWidth; + if (_allowsHalfStars) { + if (_accurateHalfStars) { + value = value; + } + else { + if (value+.5f < ceilf(value)) { + value = floor(value)+.5f; + } else { + value = ceilf(value); + } + } + } else { + value = ceilf(value); + } + [self setValue:value sendValueChangedAction:_continuous]; +} + +#pragma mark - First responder + +- (BOOL)canBecomeFirstResponder { + return _shouldBecomeFirstResponder; +} + +#pragma mark - Intrinsic Content Size + +- (CGSize)intrinsicContentSize { + CGFloat height = 44.f; + return CGSizeMake(_maximumValue * height + (_maximumValue-1) * _spacing, height); +} + +#pragma mark - Accessibility + +- (BOOL)isAccessibilityElement { + return YES; +} + +- (NSString *)accessibilityLabel { + return [super accessibilityLabel] ?: NSLocalizedString(@"Rating", @"Accessibility label for star rating control."); +} + +- (UIAccessibilityTraits)accessibilityTraits { + return ([super accessibilityTraits] | UIAccessibilityTraitAdjustable); +} + +- (NSString *)accessibilityValue { + return [@(self.value) description]; +} + +- (BOOL)accessibilityActivate { + return YES; +} + +- (void)accessibilityIncrement { + CGFloat value = self.value + (self.allowsHalfStars ? .5f : 1.f); + [self setValue:value sendValueChangedAction:YES]; +} + +- (void)accessibilityDecrement { + CGFloat value = self.value - (self.allowsHalfStars ? .5f : 1.f); + [self setValue:value sendValueChangedAction:YES]; +} + +@end diff --git a/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/LICENSE b/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/LICENSE new file mode 100644 index 0000000..6d72a2e --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Hugo Sousa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/README.md b/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/README.md new file mode 100644 index 0000000..f71d281 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/HCSStarRatingView/README.md @@ -0,0 +1,102 @@ +# HCSStarRatingView + +`HCSStarRatingView` is a `UIControl` subclass to easily provide users with a basic star rating interface. + +It supports all device resolutions and although it requires no images to render the stars (thanks PaintCode), you can provide custom ones if you so desire. + + + +## Installation + +### Carthage + +``` +github "hsousa/HCSStarRatingView" +``` + +### CocoaPods + +``` +use_frameworks! + +(...) + +pod 'HCSStarRatingView', '~> 1.5' +``` + +and run `pod install` + +### Manually + +You can also install it manually by copying `HCSStarRatingView.{h|m}` into your project or including the project in your own project/workspace, similar to what's being done in `Sample`. + +## Usage + +### Programatically + +Create a new instance and set the properties you desire to customize. + +```objective-c +HCSStarRatingView *starRatingView = [[HCSStarRatingView alloc] initWithFrame:CGRectMake(50, 200, 200, 50)]; +starRatingView.maximumValue = 10; +starRatingView.minimumValue = 0; +starRatingView.value = 0; +starRatingView.tintColor = [UIColor redColor]; +[starRatingView addTarget:self action:@selector(didChangeValue:) forControlEvents:UIControlEventValueChanged]; +[self.view addSubview:starRatingView]; +``` + +`HCSStarRatingView` also works great with Auto Layout, so feel free to set some constraints instead of just giving it a frame (check sample project)! + +#### Half-star ratings: + +```objective-c +starRatingView.allowsHalfStars = YES; +starRatingView.value = 2.5f; +``` + +Enable `accurateHalfStars` to get more precise ratings (works with images too)! +```objective-c +starRatingView.accurateHalfStars = YES; +``` + +#### Custom images: + +Using custom images in `HCSStarRatingView` is as easy as setting a property. You only need to set `emptyStarImage` and `filledStarImage`, but you can also provide the half image to `halfStarImage`, if your design requires you to: + +```objective-c +starRatingView.emptyStarImage = [UIImage imageNamed:@"heart-empty"]; +starRatingView.halfStarImage = [UIImage imageNamed:@"heart-half"]; // optional +starRatingView.filledStarImage = [UIImage imageNamed:@"heart-full"]; +``` + +If you want to use template images programatically, just make sure they have the proper `Rendering Mode`: + +```objective-c +starRatingView.emptyStarImage = [[UIImage imageNamed:@"heart-empty"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; +starRatingView.halfStarImage = [[UIImage imageNamed:@"heart-half"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; // optional +starRatingView.filledStarImage = [[UIImage imageNamed:@"heart-full"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; +``` + +### Interface Builder + +`HCSStarRatingView` also implements `IB_DESIGNABLE` and `IBInspectable` so you can fully customize it in Interface Builder. + + + +PS: In order to use template images in Interface Builder you must go to that image's properties in your Asset Catalog and change the `Render As` setting to `Template Image`. + +## Accessibility + +Users with specific needs should be able to fully read and interact with `HCSStarRatingView`, since it fully supports VoiceOver. + +If you or your users have other specific needs and you're having issues with this control, please contact me so we can figure it out! :-) + +## Contact +Hugo Sousa +* [github.com/hsousa](http://github.com/hsousa) +* [twitter/hsousa](http://twitter.com/hsousa) +* [hsousa@me.com](hsousa@me.com) + +## License +HCSStarRatingView is available under the MIT license. See the LICENSE file for more info. diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Manifest.lock b/263-cloudkit-references/CloudKitReferences/Pods/Manifest.lock new file mode 100644 index 0000000..a6eca34 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Manifest.lock @@ -0,0 +1,12 @@ +PODS: + - HCSStarRatingView (1.5) + +DEPENDENCIES: + - HCSStarRatingView + +SPEC CHECKSUMS: + HCSStarRatingView: 1d18f79654735514cd6f00e6d90e38cb6320dc31 + +PODFILE CHECKSUM: cb758b772909aed5b2db49eed82a9b87c7104b6f + +COCOAPODS: 1.2.0 diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Pods.xcodeproj/project.pbxproj b/263-cloudkit-references/CloudKitReferences/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..92b33c4 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,536 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 03D333EDC8DBB032A5D3D615C34CEE34 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; + 47552DDB734A9C015A6D74F7E5B898FE /* Pods-HelloCloudKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C682B6C59F1F9F9053F7FFDB1C22B10 /* Pods-HelloCloudKit-dummy.m */; }; + 67D34CF37EE40AC99BE94603EFD0A2B4 /* HCSStarRatingView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 819081F73EAD2E059430F760EA48A6BF /* HCSStarRatingView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8FE8E50E5A993B612213EC65C7E3768D /* Pods-HelloCloudKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D078ABFACCCE17CCECF496487B6230A0 /* Pods-HelloCloudKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9C90C92859024A636EE91D6EEBDDDCFB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; + CEC56FA07B6B2AC76C2793AD2E25483B /* HCSStarRatingView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3D648A133ADC3501BB421C185853C8 /* HCSStarRatingView-dummy.m */; }; + E456C905FBC55EE412B56D0D175375F9 /* HCSStarRatingView.h in Headers */ = {isa = PBXBuildFile; fileRef = 710D285FA1CDBDB864333F7F1D1011E9 /* HCSStarRatingView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F5A493266E718EAC3F68314C59A9F0D7 /* HCSStarRatingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BA4111CCCCF9B5842D71FE637756458 /* HCSStarRatingView.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + A2644C08F2DF0D36F11118B742724796 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 45FF4A7AFE5D8E17D01023C53AED87FF; + remoteInfo = HCSStarRatingView; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1143BB7ABF203BB57A15580FE3C90FA2 /* Pods-HelloCloudKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-HelloCloudKit.release.xcconfig"; sourceTree = ""; }; + 1978C49B2AE3771804F600FF8C27E990 /* HCSStarRatingView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "HCSStarRatingView-prefix.pch"; sourceTree = ""; }; + 1BA4111CCCCF9B5842D71FE637756458 /* HCSStarRatingView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCSStarRatingView.m; path = HCSStarRatingView/HCSStarRatingView.m; sourceTree = ""; }; + 1CDEC55C267A121C2DE1E5C56861C1D6 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 221B30579C15937957C9BC08D5C2CF39 /* Pods-HelloCloudKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-HelloCloudKit.modulemap"; sourceTree = ""; }; + 249002371369CD0CB5A79BE8DCF59365 /* HCSStarRatingView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = HCSStarRatingView.modulemap; sourceTree = ""; }; + 2C682B6C59F1F9F9053F7FFDB1C22B10 /* Pods-HelloCloudKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-HelloCloudKit-dummy.m"; sourceTree = ""; }; + 450F1DF2B932C36289DE10DC73966045 /* HCSStarRatingView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = HCSStarRatingView.framework; path = HCSStarRatingView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 53D0306BF2ADF66FB440E7605A98A95A /* Pods-HelloCloudKit-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-HelloCloudKit-acknowledgements.markdown"; sourceTree = ""; }; + 61033B2A0354894C1823D7C12DA098D1 /* Pods-HelloCloudKit-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-HelloCloudKit-frameworks.sh"; sourceTree = ""; }; + 710D285FA1CDBDB864333F7F1D1011E9 /* HCSStarRatingView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCSStarRatingView.h; path = HCSStarRatingView/HCSStarRatingView.h; sourceTree = ""; }; + 819081F73EAD2E059430F760EA48A6BF /* HCSStarRatingView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "HCSStarRatingView-umbrella.h"; sourceTree = ""; }; + 9155AFED78AA487FB779B5BD976891E2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + A266520A34355DA9A7E387651FD35972 /* Pods-HelloCloudKit-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-HelloCloudKit-resources.sh"; sourceTree = ""; }; + BC3D648A133ADC3501BB421C185853C8 /* HCSStarRatingView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "HCSStarRatingView-dummy.m"; sourceTree = ""; }; + C0861CFAAF677DE90E3707175C2EBEDD /* Pods-HelloCloudKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-HelloCloudKit.debug.xcconfig"; sourceTree = ""; }; + CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + CC39F4D60D2C3A24D1009AD0905DFAC4 /* Pods-HelloCloudKit-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-HelloCloudKit-acknowledgements.plist"; sourceTree = ""; }; + D078ABFACCCE17CCECF496487B6230A0 /* Pods-HelloCloudKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-HelloCloudKit-umbrella.h"; sourceTree = ""; }; + E09A28C980E510BB19D8CA4E7EBAB472 /* Pods_HelloCloudKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_HelloCloudKit.framework; path = "Pods-HelloCloudKit.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + E621C97CDE256FCFAEB09D236A9B2064 /* HCSStarRatingView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = HCSStarRatingView.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D0DF17D60974F08291E4D24DF5743A50 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9C90C92859024A636EE91D6EEBDDDCFB /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F2347C9F8B6F61BEA97B0A557D516743 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 03D333EDC8DBB032A5D3D615C34CEE34 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4D312422988AA57DBFB2142F1B3F26E9 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 610E3E9F577ADB5C6992472B96F36C21 /* Pods-HelloCloudKit */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 610E3E9F577ADB5C6992472B96F36C21 /* Pods-HelloCloudKit */ = { + isa = PBXGroup; + children = ( + 1CDEC55C267A121C2DE1E5C56861C1D6 /* Info.plist */, + 221B30579C15937957C9BC08D5C2CF39 /* Pods-HelloCloudKit.modulemap */, + 53D0306BF2ADF66FB440E7605A98A95A /* Pods-HelloCloudKit-acknowledgements.markdown */, + CC39F4D60D2C3A24D1009AD0905DFAC4 /* Pods-HelloCloudKit-acknowledgements.plist */, + 2C682B6C59F1F9F9053F7FFDB1C22B10 /* Pods-HelloCloudKit-dummy.m */, + 61033B2A0354894C1823D7C12DA098D1 /* Pods-HelloCloudKit-frameworks.sh */, + A266520A34355DA9A7E387651FD35972 /* Pods-HelloCloudKit-resources.sh */, + D078ABFACCCE17CCECF496487B6230A0 /* Pods-HelloCloudKit-umbrella.h */, + C0861CFAAF677DE90E3707175C2EBEDD /* Pods-HelloCloudKit.debug.xcconfig */, + 1143BB7ABF203BB57A15580FE3C90FA2 /* Pods-HelloCloudKit.release.xcconfig */, + ); + name = "Pods-HelloCloudKit"; + path = "Target Support Files/Pods-HelloCloudKit"; + sourceTree = ""; + }; + 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { + isa = PBXGroup; + children = ( + CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, + 9EF26EB72DF2312AC6BBE947B4FE383E /* Pods */, + F05585E4FEA8C8D6B64696DCFB6D893E /* Products */, + 4D312422988AA57DBFB2142F1B3F26E9 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 9EF26EB72DF2312AC6BBE947B4FE383E /* Pods */ = { + isa = PBXGroup; + children = ( + C1E38FD8A11841A27105A84A195DD167 /* HCSStarRatingView */, + ); + name = Pods; + sourceTree = ""; + }; + B76022DB974438E6752B70A76B215E32 /* Support Files */ = { + isa = PBXGroup; + children = ( + 249002371369CD0CB5A79BE8DCF59365 /* HCSStarRatingView.modulemap */, + E621C97CDE256FCFAEB09D236A9B2064 /* HCSStarRatingView.xcconfig */, + BC3D648A133ADC3501BB421C185853C8 /* HCSStarRatingView-dummy.m */, + 1978C49B2AE3771804F600FF8C27E990 /* HCSStarRatingView-prefix.pch */, + 819081F73EAD2E059430F760EA48A6BF /* HCSStarRatingView-umbrella.h */, + 9155AFED78AA487FB779B5BD976891E2 /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/HCSStarRatingView"; + sourceTree = ""; + }; + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + C1E38FD8A11841A27105A84A195DD167 /* HCSStarRatingView */ = { + isa = PBXGroup; + children = ( + 710D285FA1CDBDB864333F7F1D1011E9 /* HCSStarRatingView.h */, + 1BA4111CCCCF9B5842D71FE637756458 /* HCSStarRatingView.m */, + B76022DB974438E6752B70A76B215E32 /* Support Files */, + ); + name = HCSStarRatingView; + path = HCSStarRatingView; + sourceTree = ""; + }; + F05585E4FEA8C8D6B64696DCFB6D893E /* Products */ = { + isa = PBXGroup; + children = ( + 450F1DF2B932C36289DE10DC73966045 /* HCSStarRatingView.framework */, + E09A28C980E510BB19D8CA4E7EBAB472 /* Pods_HelloCloudKit.framework */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 2D0D208839C2B6438DCEAD45BCF5E382 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 67D34CF37EE40AC99BE94603EFD0A2B4 /* HCSStarRatingView-umbrella.h in Headers */, + E456C905FBC55EE412B56D0D175375F9 /* HCSStarRatingView.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 95C261B00A6435E3748441FFA7097CB0 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8FE8E50E5A993B612213EC65C7E3768D /* Pods-HelloCloudKit-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 210F3F8E1ECCD1CB97B692F0B0008738 /* Pods-HelloCloudKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 725C8540458AF85701F0731E0482ED97 /* Build configuration list for PBXNativeTarget "Pods-HelloCloudKit" */; + buildPhases = ( + 877A8EFAF53036D8B0AC35A4753DC5C3 /* Sources */, + F2347C9F8B6F61BEA97B0A557D516743 /* Frameworks */, + 95C261B00A6435E3748441FFA7097CB0 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 2EBDB86D3B58F584D4FD50EBDD0472C9 /* PBXTargetDependency */, + ); + name = "Pods-HelloCloudKit"; + productName = "Pods-HelloCloudKit"; + productReference = E09A28C980E510BB19D8CA4E7EBAB472 /* Pods_HelloCloudKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 45FF4A7AFE5D8E17D01023C53AED87FF /* HCSStarRatingView */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3BD70FC42AAD1801AB60199B569A5CD3 /* Build configuration list for PBXNativeTarget "HCSStarRatingView" */; + buildPhases = ( + 46A39D27CF5388CFAEECCC643BAB1C2E /* Sources */, + D0DF17D60974F08291E4D24DF5743A50 /* Frameworks */, + 2D0D208839C2B6438DCEAD45BCF5E382 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HCSStarRatingView; + productName = HCSStarRatingView; + productReference = 450F1DF2B932C36289DE10DC73966045 /* HCSStarRatingView.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = F05585E4FEA8C8D6B64696DCFB6D893E /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 45FF4A7AFE5D8E17D01023C53AED87FF /* HCSStarRatingView */, + 210F3F8E1ECCD1CB97B692F0B0008738 /* Pods-HelloCloudKit */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 46A39D27CF5388CFAEECCC643BAB1C2E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CEC56FA07B6B2AC76C2793AD2E25483B /* HCSStarRatingView-dummy.m in Sources */, + F5A493266E718EAC3F68314C59A9F0D7 /* HCSStarRatingView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 877A8EFAF53036D8B0AC35A4753DC5C3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 47552DDB734A9C015A6D74F7E5B898FE /* Pods-HelloCloudKit-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 2EBDB86D3B58F584D4FD50EBDD0472C9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = HCSStarRatingView; + target = 45FF4A7AFE5D8E17D01023C53AED87FF /* HCSStarRatingView */; + targetProxy = A2644C08F2DF0D36F11118B742724796 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 22F52E15DC8DA84E8B1268E869F1F2CA /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C0861CFAAF677DE90E3707175C2EBEDD /* Pods-HelloCloudKit.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-HelloCloudKit/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_HelloCloudKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 47ACE4EB86E74AB9CFA1AD928923849E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1143BB7ABF203BB57A15580FE3C90FA2 /* Pods-HelloCloudKit.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-HelloCloudKit/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_HelloCloudKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 49F9650D1F3DC4D178D35077C1A83E53 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E621C97CDE256FCFAEB09D236A9B2064 /* HCSStarRatingView.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/HCSStarRatingView/HCSStarRatingView-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/HCSStarRatingView/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/HCSStarRatingView/HCSStarRatingView.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = HCSStarRatingView; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + B7324857C38B065FEB1EEE3105C2367A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + E0F3704C0586636C2FB6A646CEB5DECB /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E621C97CDE256FCFAEB09D236A9B2064 /* HCSStarRatingView.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/HCSStarRatingView/HCSStarRatingView-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/HCSStarRatingView/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/HCSStarRatingView/HCSStarRatingView.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = HCSStarRatingView; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */, + B7324857C38B065FEB1EEE3105C2367A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3BD70FC42AAD1801AB60199B569A5CD3 /* Build configuration list for PBXNativeTarget "HCSStarRatingView" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E0F3704C0586636C2FB6A646CEB5DECB /* Debug */, + 49F9650D1F3DC4D178D35077C1A83E53 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 725C8540458AF85701F0731E0482ED97 /* Build configuration list for PBXNativeTarget "Pods-HelloCloudKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 22F52E15DC8DA84E8B1268E869F1F2CA /* Debug */, + 47ACE4EB86E74AB9CFA1AD928923849E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView-dummy.m b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView-dummy.m new file mode 100644 index 0000000..f899d2f --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_HCSStarRatingView : NSObject +@end +@implementation PodsDummy_HCSStarRatingView +@end diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView-prefix.pch b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView-umbrella.h b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView-umbrella.h new file mode 100644 index 0000000..42724eb --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "HCSStarRatingView.h" + +FOUNDATION_EXPORT double HCSStarRatingViewVersionNumber; +FOUNDATION_EXPORT const unsigned char HCSStarRatingViewVersionString[]; + diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView.modulemap b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView.modulemap new file mode 100644 index 0000000..364455e --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView.modulemap @@ -0,0 +1,6 @@ +framework module HCSStarRatingView { + umbrella header "HCSStarRatingView-umbrella.h" + + export * + module * { export * } +} diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView.xcconfig b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView.xcconfig new file mode 100644 index 0000000..442e5ae --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/HCSStarRatingView.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/HCSStarRatingView +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/HCSStarRatingView +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/Info.plist b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/Info.plist new file mode 100644 index 0000000..a7a6daf --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/HCSStarRatingView/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.5.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Info.plist b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-acknowledgements.markdown b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-acknowledgements.markdown new file mode 100644 index 0000000..7d4b46d --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## HCSStarRatingView + +Copyright (c) 2015 Hugo Sousa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Generated by CocoaPods - https://cocoapods.org diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-acknowledgements.plist b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-acknowledgements.plist new file mode 100644 index 0000000..aab21ef --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-acknowledgements.plist @@ -0,0 +1,58 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2015 Hugo Sousa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + License + MIT + Title + HCSStarRatingView + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-dummy.m b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-dummy.m new file mode 100644 index 0000000..eecacf9 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_HelloCloudKit : NSObject +@end +@implementation PodsDummy_Pods_HelloCloudKit +@end diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-frameworks.sh b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-frameworks.sh new file mode 100755 index 0000000..a65c3d9 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-frameworks.sh @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/HCSStarRatingView/HCSStarRatingView.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/HCSStarRatingView/HCSStarRatingView.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-resources.sh b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-resources.sh new file mode 100755 index 0000000..4602c68 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-resources.sh @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-umbrella.h b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-umbrella.h new file mode 100644 index 0000000..e516df4 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_HelloCloudKitVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_HelloCloudKitVersionString[]; + diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.debug.xcconfig b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.debug.xcconfig new file mode 100644 index 0000000..f250108 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.debug.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/HCSStarRatingView" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/HCSStarRatingView/HCSStarRatingView.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "HCSStarRatingView" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.modulemap b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.modulemap new file mode 100644 index 0000000..922fed0 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.modulemap @@ -0,0 +1,6 @@ +framework module Pods_HelloCloudKit { + umbrella header "Pods-HelloCloudKit-umbrella.h" + + export * + module * { export * } +} diff --git a/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.release.xcconfig b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.release.xcconfig new file mode 100644 index 0000000..f250108 --- /dev/null +++ b/263-cloudkit-references/CloudKitReferences/Pods/Target Support Files/Pods-HelloCloudKit/Pods-HelloCloudKit.release.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/HCSStarRatingView" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/HCSStarRatingView/HCSStarRatingView.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "HCSStarRatingView" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods