diff --git a/Examples/SwiftExample/Podfile b/Examples/SwiftExample/Podfile index dd87762d8b..509b2384f3 100644 --- a/Examples/SwiftExample/Podfile +++ b/Examples/SwiftExample/Podfile @@ -7,3 +7,10 @@ target 'SwiftExample' do pod 'Purchases', :path => '../../' end + +target 'WatchExample Extension' do + + # Pods for SwiftExample + pod 'Purchases', :path => '../../' + +end diff --git a/Examples/SwiftExample/Podfile.lock b/Examples/SwiftExample/Podfile.lock index 89a7e04e25..f42cd6b457 100644 --- a/Examples/SwiftExample/Podfile.lock +++ b/Examples/SwiftExample/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - Purchases (3.4.0-SNAPSHOT) + - Purchases (3.5.0-SNAPSHOT) DEPENDENCIES: - Purchases (from `../../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - Purchases: 6bf68ed9926fefa775649bec025878c4de9175b5 + Purchases: a7ec2fa5d18658bd6fddd0eb9eb6d2e2d3aea6c8 -PODFILE CHECKSUM: b6ad00ca1e6fc400e0898ad2ac4a293958616d2e +PODFILE CHECKSUM: 0b953383523796d33de4db49d07a5c6e3a56c27e COCOAPODS: 1.9.1 diff --git a/Examples/SwiftExample/SwiftExample.xcodeproj/project.pbxproj b/Examples/SwiftExample/SwiftExample.xcodeproj/project.pbxproj index ee2aeb90ce..bcf4f9e61e 100644 --- a/Examples/SwiftExample/SwiftExample.xcodeproj/project.pbxproj +++ b/Examples/SwiftExample/SwiftExample.xcodeproj/project.pbxproj @@ -7,6 +7,16 @@ objects = { /* Begin PBXBuildFile section */ + 2D54BF652437DED800FF4EE4 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2D54BF632437DED800FF4EE4 /* Interface.storyboard */; }; + 2D54BF672437DED900FF4EE4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2D54BF662437DED900FF4EE4 /* Assets.xcassets */; }; + 2D54BF732437DED900FF4EE4 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D54BF722437DED900FF4EE4 /* InterfaceController.swift */; }; + 2D54BF752437DED900FF4EE4 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D54BF742437DED900FF4EE4 /* ExtensionDelegate.swift */; }; + 2D54BF772437DED900FF4EE4 /* NotificationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D54BF762437DED900FF4EE4 /* NotificationController.swift */; }; + 2D54BF792437DEDA00FF4EE4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2D54BF782437DEDA00FF4EE4 /* Assets.xcassets */; }; + 2D54BF7E2437DEDA00FF4EE4 /* WatchExample.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 2D54BF612437DED800FF4EE4 /* WatchExample.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 2D6FCB222437E56200C398CF /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D6FCB212437E56200C398CF /* StoreKit.framework */; }; + 2D6FCB232437E5F100C398CF /* WatchExample Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 2D54BF6D2437DED900FF4EE4 /* WatchExample Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 2D6FCB282437E8FA00C398CF /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D6FCB272437E8F900C398CF /* StoreKit.framework */; }; 2D95540F240EF9F100289461 /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D95540E240EF9F100289461 /* UserNotifications.framework */; }; 3493336121E6935F007AAAB9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3493336021E6935F007AAAB9 /* AppDelegate.swift */; }; 3493336321E6935F007AAAB9 /* InitialViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3493336221E6935F007AAAB9 /* InitialViewController.swift */; }; @@ -15,12 +25,70 @@ 3493336B21E69360007AAAB9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3493336921E69360007AAAB9 /* LaunchScreen.storyboard */; }; 3493337521E694D6007AAAB9 /* CatsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3493337421E694D6007AAAB9 /* CatsViewController.swift */; }; 34D05817233C1A3700343134 /* SwiftPaywall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D05816233C1A3700343134 /* SwiftPaywall.swift */; }; + 41223BBC2C9D443988BB8DE0 /* libPods-WatchExample Extension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 17D0C275B4B2F174BACA291F /* libPods-WatchExample Extension.a */; }; 612312EC8EFEAE0D4472F1D9 /* libPods-SwiftExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D95AC7213243D08744E89F6 /* libPods-SwiftExample.a */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 2D54BF7C2437DEDA00FF4EE4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3493335521E6935E007AAAB9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2D54BF602437DED800FF4EE4; + remoteInfo = WatchExample; + }; + 2D6FCB242437E5F100C398CF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3493335521E6935E007AAAB9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2D54BF6C2437DED900FF4EE4; + remoteInfo = "WatchExample Extension"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 2D54BF7F2437DEDA00FF4EE4 /* Embed Watch Content */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; + dstSubfolderSpec = 16; + files = ( + 2D54BF7E2437DEDA00FF4EE4 /* WatchExample.app in Embed Watch Content */, + ); + name = "Embed Watch Content"; + runOnlyForDeploymentPostprocessing = 0; + }; + 2D6FCB262437E5F100C398CF /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 2D6FCB232437E5F100C398CF /* WatchExample Extension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ + 05DF17969D158C5471E19884 /* Pods-WatchExample Extension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WatchExample Extension.debug.xcconfig"; path = "Target Support Files/Pods-WatchExample Extension/Pods-WatchExample Extension.debug.xcconfig"; sourceTree = ""; }; 164A5AED2A65F70448049504 /* Pods-SwiftExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftExample.release.xcconfig"; path = "Target Support Files/Pods-SwiftExample/Pods-SwiftExample.release.xcconfig"; sourceTree = ""; }; + 17D0C275B4B2F174BACA291F /* libPods-WatchExample Extension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-WatchExample Extension.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D2458A7240EF4EA007E6BE8 /* SwiftExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SwiftExample.entitlements; sourceTree = ""; }; + 2D54BF612437DED800FF4EE4 /* WatchExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WatchExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D54BF642437DED800FF4EE4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; + 2D54BF662437DED900FF4EE4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2D54BF682437DED900FF4EE4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2D54BF6D2437DED900FF4EE4 /* WatchExample Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "WatchExample Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D54BF722437DED900FF4EE4 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = ""; }; + 2D54BF742437DED900FF4EE4 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; + 2D54BF762437DED900FF4EE4 /* NotificationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationController.swift; sourceTree = ""; }; + 2D54BF782437DEDA00FF4EE4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2D54BF7A2437DEDA00FF4EE4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2D54BF7B2437DEDA00FF4EE4 /* PushNotificationPayload.apns */ = {isa = PBXFileReference; lastKnownFileType = text; path = PushNotificationPayload.apns; sourceTree = ""; }; + 2D6FCB212437E56200C398CF /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; + 2D6FCB272437E8F900C398CF /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = Platforms/WatchOS.platform/Developer/SDKs/WatchOS6.2.sdk/System/Library/Frameworks/StoreKit.framework; sourceTree = DEVELOPER_DIR; }; 2D95540E240EF9F100289461 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; 3493335D21E6935F007AAAB9 /* SwiftExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 3493336021E6935F007AAAB9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -31,15 +99,34 @@ 3493336C21E69360007AAAB9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3493337421E694D6007AAAB9 /* CatsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatsViewController.swift; sourceTree = ""; }; 34D05816233C1A3700343134 /* SwiftPaywall.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftPaywall.swift; sourceTree = ""; }; + 34EA88DD56F541EAD6B9D1D4 /* libPods-WatchExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-WatchExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 4D95AC7213243D08744E89F6 /* libPods-SwiftExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwiftExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + C7A95EBC8058CE87D0E2B60A /* Pods-WatchExample Extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WatchExample Extension.release.xcconfig"; path = "Target Support Files/Pods-WatchExample Extension/Pods-WatchExample Extension.release.xcconfig"; sourceTree = ""; }; F47D44DA0C1FBE5A9FCA7E55 /* Pods-SwiftExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftExample.debug.xcconfig"; path = "Target Support Files/Pods-SwiftExample/Pods-SwiftExample.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 2D54BF6A2437DED900FF4EE4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 41223BBC2C9D443988BB8DE0 /* libPods-WatchExample Extension.a in Frameworks */, + 2D6FCB282437E8FA00C398CF /* StoreKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2EE90BD32DD6E7920E120D3B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 3493335A21E6935F007AAAB9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 2D6FCB222437E56200C398CF /* StoreKit.framework in Frameworks */, 2D95540F240EF9F100289461 /* UserNotifications.framework in Frameworks */, 612312EC8EFEAE0D4472F1D9 /* libPods-SwiftExample.a in Frameworks */, ); @@ -48,10 +135,35 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 2D54BF622437DED800FF4EE4 /* WatchExample */ = { + isa = PBXGroup; + children = ( + 2D54BF632437DED800FF4EE4 /* Interface.storyboard */, + 2D54BF662437DED900FF4EE4 /* Assets.xcassets */, + 2D54BF682437DED900FF4EE4 /* Info.plist */, + ); + path = WatchExample; + sourceTree = ""; + }; + 2D54BF712437DED900FF4EE4 /* WatchExample Extension */ = { + isa = PBXGroup; + children = ( + 2D54BF722437DED900FF4EE4 /* InterfaceController.swift */, + 2D54BF742437DED900FF4EE4 /* ExtensionDelegate.swift */, + 2D54BF762437DED900FF4EE4 /* NotificationController.swift */, + 2D54BF782437DEDA00FF4EE4 /* Assets.xcassets */, + 2D54BF7A2437DEDA00FF4EE4 /* Info.plist */, + 2D54BF7B2437DEDA00FF4EE4 /* PushNotificationPayload.apns */, + ); + path = "WatchExample Extension"; + sourceTree = ""; + }; 3493335421E6935E007AAAB9 = { isa = PBXGroup; children = ( 3493335F21E6935F007AAAB9 /* SwiftExample */, + 2D54BF622437DED800FF4EE4 /* WatchExample */, + 2D54BF712437DED900FF4EE4 /* WatchExample Extension */, 3493335E21E6935F007AAAB9 /* Products */, A001EA8E0BF8324F03F6DF58 /* Pods */, C40A83F5FB23D02C73486501 /* Frameworks */, @@ -62,6 +174,8 @@ isa = PBXGroup; children = ( 3493335D21E6935F007AAAB9 /* SwiftExample.app */, + 2D54BF612437DED800FF4EE4 /* WatchExample.app */, + 2D54BF6D2437DED900FF4EE4 /* WatchExample Extension.appex */, ); name = Products; sourceTree = ""; @@ -87,6 +201,8 @@ children = ( F47D44DA0C1FBE5A9FCA7E55 /* Pods-SwiftExample.debug.xcconfig */, 164A5AED2A65F70448049504 /* Pods-SwiftExample.release.xcconfig */, + 05DF17969D158C5471E19884 /* Pods-WatchExample Extension.debug.xcconfig */, + C7A95EBC8058CE87D0E2B60A /* Pods-WatchExample Extension.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -94,8 +210,12 @@ C40A83F5FB23D02C73486501 /* Frameworks */ = { isa = PBXGroup; children = ( + 2D6FCB212437E56200C398CF /* StoreKit.framework */, + 2D6FCB272437E8F900C398CF /* StoreKit.framework */, 2D95540E240EF9F100289461 /* UserNotifications.framework */, 4D95AC7213243D08744E89F6 /* libPods-SwiftExample.a */, + 34EA88DD56F541EAD6B9D1D4 /* libPods-WatchExample.a */, + 17D0C275B4B2F174BACA291F /* libPods-WatchExample Extension.a */, ); name = Frameworks; sourceTree = ""; @@ -103,6 +223,42 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 2D54BF602437DED800FF4EE4 /* WatchExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D54BF862437DEDA00FF4EE4 /* Build configuration list for PBXNativeTarget "WatchExample" */; + buildPhases = ( + 2D54BF5F2437DED800FF4EE4 /* Resources */, + 2EE90BD32DD6E7920E120D3B /* Frameworks */, + 2D6FCB262437E5F100C398CF /* Embed App Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 2D6FCB252437E5F100C398CF /* PBXTargetDependency */, + ); + name = WatchExample; + productName = WatchExample; + productReference = 2D54BF612437DED800FF4EE4 /* WatchExample.app */; + productType = "com.apple.product-type.application.watchapp2"; + }; + 2D54BF6C2437DED900FF4EE4 /* WatchExample Extension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D54BF852437DEDA00FF4EE4 /* Build configuration list for PBXNativeTarget "WatchExample Extension" */; + buildPhases = ( + 8F88A6AF47337FF6AE547810 /* [CP] Check Pods Manifest.lock */, + 2D54BF692437DED900FF4EE4 /* Sources */, + 2D54BF6A2437DED900FF4EE4 /* Frameworks */, + 2D54BF6B2437DED900FF4EE4 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "WatchExample Extension"; + productName = "WatchExample Extension"; + productReference = 2D54BF6D2437DED900FF4EE4 /* WatchExample Extension.appex */; + productType = "com.apple.product-type.watchkit2-extension"; + }; 3493335C21E6935F007AAAB9 /* SwiftExample */ = { isa = PBXNativeTarget; buildConfigurationList = 3493336F21E69360007AAAB9 /* Build configuration list for PBXNativeTarget "SwiftExample" */; @@ -111,10 +267,12 @@ 3493335921E6935F007AAAB9 /* Sources */, 3493335A21E6935F007AAAB9 /* Frameworks */, 3493335B21E6935F007AAAB9 /* Resources */, + 2D54BF7F2437DEDA00FF4EE4 /* Embed Watch Content */, ); buildRules = ( ); dependencies = ( + 2D54BF7D2437DEDA00FF4EE4 /* PBXTargetDependency */, ); name = SwiftExample; productName = SwiftExample; @@ -127,10 +285,16 @@ 3493335521E6935E007AAAB9 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 1010; + LastSwiftUpdateCheck = 1140; LastUpgradeCheck = 1010; ORGANIZATIONNAME = RevenueCat; TargetAttributes = { + 2D54BF602437DED800FF4EE4 = { + CreatedOnToolsVersion = 11.4; + }; + 2D54BF6C2437DED900FF4EE4 = { + CreatedOnToolsVersion = 11.4; + }; 3493335C21E6935F007AAAB9 = { CreatedOnToolsVersion = 10.1; LastSwiftMigration = 1100; @@ -151,11 +315,30 @@ projectRoot = ""; targets = ( 3493335C21E6935F007AAAB9 /* SwiftExample */, + 2D54BF602437DED800FF4EE4 /* WatchExample */, + 2D54BF6C2437DED900FF4EE4 /* WatchExample Extension */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 2D54BF5F2437DED800FF4EE4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D54BF672437DED900FF4EE4 /* Assets.xcassets in Resources */, + 2D54BF652437DED800FF4EE4 /* Interface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D54BF6B2437DED900FF4EE4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D54BF792437DEDA00FF4EE4 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 3493335B21E6935F007AAAB9 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -191,9 +374,41 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 8F88A6AF47337FF6AE547810 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-WatchExample Extension-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 2D54BF692437DED900FF4EE4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D54BF772437DED900FF4EE4 /* NotificationController.swift in Sources */, + 2D54BF752437DED900FF4EE4 /* ExtensionDelegate.swift in Sources */, + 2D54BF732437DED900FF4EE4 /* InterfaceController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 3493335921E6935F007AAAB9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -207,7 +422,28 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 2D54BF7D2437DEDA00FF4EE4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2D54BF602437DED800FF4EE4 /* WatchExample */; + targetProxy = 2D54BF7C2437DEDA00FF4EE4 /* PBXContainerItemProxy */; + }; + 2D6FCB252437E5F100C398CF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2D54BF6C2437DED900FF4EE4 /* WatchExample Extension */; + targetProxy = 2D6FCB242437E5F100C398CF /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ + 2D54BF632437DED800FF4EE4 /* Interface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 2D54BF642437DED800FF4EE4 /* Base */, + ); + name = Interface.storyboard; + sourceTree = ""; + }; 3493336421E6935F007AAAB9 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -227,6 +463,94 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 2D54BF802437DEDA00FF4EE4 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 4; + DEVELOPMENT_TEAM = 8SXR2327BM; + IBSC_MODULE = WatchExample_Extension; + INFOPLIST_FILE = WatchExample/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.sampleapp.watchkitapp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 6.2; + }; + name = Debug; + }; + 2D54BF812437DEDA00FF4EE4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 4; + DEVELOPMENT_TEAM = 8SXR2327BM; + IBSC_MODULE = WatchExample_Extension; + INFOPLIST_FILE = WatchExample/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.sampleapp.watchkitapp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 6.2; + }; + name = Release; + }; + 2D54BF832437DEDA00FF4EE4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 05DF17969D158C5471E19884 /* Pods-WatchExample Extension.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 4; + DEVELOPMENT_TEAM = 8SXR2327BM; + INFOPLIST_FILE = "WatchExample Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.sampleapp.watchkitapp.watchkitextension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 6.2; + }; + name = Debug; + }; + 2D54BF842437DEDA00FF4EE4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C7A95EBC8058CE87D0E2B60A /* Pods-WatchExample Extension.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 4; + DEVELOPMENT_TEAM = 8SXR2327BM; + INFOPLIST_FILE = "WatchExample Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.sampleapp.watchkitapp.watchkitextension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 6.2; + }; + name = Release; + }; 3493336D21E69360007AAAB9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -351,6 +675,7 @@ CODE_SIGN_ENTITLEMENTS = SwiftExample/SwiftExample.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 8SXR2327BM; INFOPLIST_FILE = SwiftExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -374,6 +699,7 @@ CODE_SIGN_ENTITLEMENTS = SwiftExample/SwiftExample.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 8SXR2327BM; INFOPLIST_FILE = SwiftExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -392,6 +718,24 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 2D54BF852437DEDA00FF4EE4 /* Build configuration list for PBXNativeTarget "WatchExample Extension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D54BF832437DEDA00FF4EE4 /* Debug */, + 2D54BF842437DEDA00FF4EE4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D54BF862437DEDA00FF4EE4 /* Build configuration list for PBXNativeTarget "WatchExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D54BF802437DEDA00FF4EE4 /* Debug */, + 2D54BF812437DEDA00FF4EE4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 3493335821E6935E007AAAB9 /* Build configuration list for PBXProject "SwiftExample" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Contents.json index d8db8d65fd..83e978c1ab 100644 --- a/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -2,97 +2,101 @@ "images" : [ { "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" + "scale" : "3x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" }, { + "filename" : "Sliceiphone.png", "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "60x60" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "60x60" }, { "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" + "scale" : "1x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" + "scale" : "1x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" + "scale" : "1x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" + "scale" : "1x", + "size" : "76x76" }, { + "filename" : "Sliceipad2.png", "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" + "scale" : "2x", + "size" : "76x76" }, { + "filename" : "Sliceipad1.png", "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" + "scale" : "2x", + "size" : "83.5x83.5" }, { + "filename" : "revenuecat logo.png", "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Sliceipad1.png b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Sliceipad1.png new file mode 100644 index 0000000000..4a05d61c3e Binary files /dev/null and b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Sliceipad1.png differ diff --git a/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Sliceipad2.png b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Sliceipad2.png new file mode 100644 index 0000000000..42e55c5a73 Binary files /dev/null and b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Sliceipad2.png differ diff --git a/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Sliceiphone.png b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Sliceiphone.png new file mode 100644 index 0000000000..4fd8a719ee Binary files /dev/null and b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Sliceiphone.png differ diff --git a/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/revenuecat logo.png b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/revenuecat logo.png new file mode 100644 index 0000000000..30197ba4f7 Binary files /dev/null and b/Examples/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/revenuecat logo.png differ diff --git a/Examples/SwiftExample/SwiftExample/Info.plist b/Examples/SwiftExample/SwiftExample/Info.plist index 16be3b6811..bcdc776330 100644 --- a/Examples/SwiftExample/SwiftExample/Info.plist +++ b/Examples/SwiftExample/SwiftExample/Info.plist @@ -17,7 +17,7 @@ CFBundleShortVersionString 1.0 CFBundleVersion - 1 + $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json new file mode 100644 index 0000000000..ed7de25e57 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Contents.json b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Contents.json new file mode 100644 index 0000000000..df73a6bba4 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Contents.json @@ -0,0 +1,48 @@ +{ + "assets" : [ + { + "filename" : "Circular.imageset", + "idiom" : "watch", + "role" : "circular" + }, + { + "filename" : "Extra Large.imageset", + "idiom" : "watch", + "role" : "extra-large" + }, + { + "filename" : "Graphic Bezel.imageset", + "idiom" : "watch", + "role" : "graphic-bezel" + }, + { + "filename" : "Graphic Circular.imageset", + "idiom" : "watch", + "role" : "graphic-circular" + }, + { + "filename" : "Graphic Corner.imageset", + "idiom" : "watch", + "role" : "graphic-corner" + }, + { + "filename" : "Graphic Large Rectangular.imageset", + "idiom" : "watch", + "role" : "graphic-large-rectangular" + }, + { + "filename" : "Modular.imageset", + "idiom" : "watch", + "role" : "modular" + }, + { + "filename" : "Utilitarian.imageset", + "idiom" : "watch", + "role" : "utilitarian" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json new file mode 100644 index 0000000000..ed7de25e57 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json new file mode 100644 index 0000000000..ed7de25e57 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json new file mode 100644 index 0000000000..ed7de25e57 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json new file mode 100644 index 0000000000..ed7de25e57 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json new file mode 100644 index 0000000000..ed7de25e57 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json new file mode 100644 index 0000000000..ed7de25e57 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json new file mode 100644 index 0000000000..ed7de25e57 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json @@ -0,0 +1,28 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Contents.json b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Contents.json new file mode 100644 index 0000000000..73c00596a7 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/ExtensionDelegate.swift b/Examples/SwiftExample/WatchExample Extension/ExtensionDelegate.swift new file mode 100644 index 0000000000..e183994f69 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/ExtensionDelegate.swift @@ -0,0 +1,58 @@ +// +// ExtensionDelegate.swift +// watchSample Extension +// +// Created by RevenueCat on 2/12/20. +// Copyright © 2020 RevenueCat. All rights reserved. +// + +import WatchKit +import Purchases + +class ExtensionDelegate: NSObject, WKExtensionDelegate { + + func applicationDidFinishLaunching() { + Purchases.debugLogsEnabled = true + Purchases.configure(withAPIKey: ) + } + + func applicationDidBecomeActive() { + // 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 applicationWillResignActive() { + // 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, etc. + } + + func handle(_ backgroundTasks: Set) { + // Sent when the system needs to launch the application in the background to process tasks. Tasks arrive in a set, so loop through and process each one. + for task in backgroundTasks { + // Use a switch statement to check the task type + switch task { + case let backgroundTask as WKApplicationRefreshBackgroundTask: + // Be sure to complete the background task once you’re done. + backgroundTask.setTaskCompletedWithSnapshot(false) + case let snapshotTask as WKSnapshotRefreshBackgroundTask: + // Snapshot tasks have a unique completion call, make sure to set your expiration date + snapshotTask.setTaskCompleted(restoredDefaultState: true, estimatedSnapshotExpiration: Date.distantFuture, userInfo: nil) + case let connectivityTask as WKWatchConnectivityRefreshBackgroundTask: + // Be sure to complete the connectivity task once you’re done. + connectivityTask.setTaskCompletedWithSnapshot(false) + case let urlSessionTask as WKURLSessionRefreshBackgroundTask: + // Be sure to complete the URL session task once you’re done. + urlSessionTask.setTaskCompletedWithSnapshot(false) + case let relevantShortcutTask as WKRelevantShortcutRefreshBackgroundTask: + // Be sure to complete the relevant-shortcut task once you're done. + relevantShortcutTask.setTaskCompletedWithSnapshot(false) + case let intentDidRunTask as WKIntentDidRunRefreshBackgroundTask: + // Be sure to complete the intent-did-run task once you're done. + intentDidRunTask.setTaskCompletedWithSnapshot(false) + default: + // make sure to complete unhandled task types + task.setTaskCompletedWithSnapshot(false) + } + } + } + +} diff --git a/Examples/SwiftExample/WatchExample Extension/Info.plist b/Examples/SwiftExample/WatchExample Extension/Info.plist new file mode 100644 index 0000000000..c03cdc8552 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + WatchExample Extension + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSExtension + + NSExtensionAttributes + + WKAppBundleIdentifier + com.revenuecat.sampleapp.watchkitapp + + NSExtensionPointIdentifier + com.apple.watchkit + + WKExtensionDelegateClassName + $(PRODUCT_MODULE_NAME).ExtensionDelegate + + diff --git a/Examples/SwiftExample/WatchExample Extension/InterfaceController.swift b/Examples/SwiftExample/WatchExample Extension/InterfaceController.swift new file mode 100644 index 0000000000..eb5cb65af3 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/InterfaceController.swift @@ -0,0 +1,116 @@ +// +// InterfaceController.swift +// watchPurchasesCocoapods2 WatchKit Extension +// +// Created by RevenueCat on 2/11/20. +// Copyright © 2020 RevenueCat. All rights reserved. +// + +import WatchKit +import Foundation +import Purchases + +class InterfaceController: WKInterfaceController { + private var offering : Purchases.Offering? + + @IBOutlet weak var expiryDateLabel: WKInterfaceLabel! + @IBOutlet weak var purchaseDateLabel: WKInterfaceLabel! + @IBOutlet weak var proStatusLabel: WKInterfaceLabel! + @IBOutlet weak var buyButton: WKInterfaceButton! + + override func awake(withContext context: Any?) { + super.awake(withContext: context) + configure() + loadOfferings() + // Configure interface objects here. + } + + override func willActivate() { + // This method is called when watch view controller is about to be visible to user + super.willActivate() + } + + override func didDeactivate() { + // This method is called when watch view controller is no longer visible + super.didDeactivate() + } + + + @IBAction func didPressBuy() { + purchase() + } +} + +private extension InterfaceController { + + func purchase() { + guard let offering = offering else { + print("No available offerings") + return + } + let package = offering.availablePackages[0] + + proStatusLabel.setText("purchasing...") + Purchases.shared.purchasePackage(package) { [weak self] (trans, info, error, cancelled) in + guard let self = self else { return } + + if let error = error { + print(error.localizedDescription) + self.proStatusLabel.setText("error while purchasing!") + } else if cancelled { + self.proStatusLabel.setText("purchase cancelled!") + } else { + self.configure() + } + } + } + + + func loadOfferings() { + + proStatusLabel.setText("Loading...") + buyButton.setHidden(true) + + Purchases.shared.offerings { [weak self] (offerings, error) in + guard let self = self else { return } + if let error = error { + print(error.localizedDescription) + self.proStatusLabel.setText("Error fetching offerings 😿") + return + } + + guard let offerings = offerings, let offering = offerings.current else { fatalError("didn't get an error but didn't get offerings") } + + self.offering = offering + self.buyButton.setHidden(false) + self.configure() + } + } + + func configure() { + Purchases.shared.purchaserInfo { [weak self] (purchaserInfo, error) in + guard let self = self else { return } + if let error = error { + print(error.localizedDescription) + return + } + + guard let purchaserInfo = purchaserInfo else { fatalError("didn't get purchaser info but error was nil") } + // Route the view depending if we have a pro cat user or not + + let hasPro = purchaserInfo.entitlements["pro_cat"]?.isActive == true + self.proStatusLabel.setText(hasPro ? "pro 😻" : "free 🐱") + self.buyButton.setHidden(hasPro) + + let dateFormatter = DateFormatter() + dateFormatter.dateStyle = .short + + if let purchaseDate = purchaserInfo.purchaseDate(forEntitlement: "pro_cat") { + self.purchaseDateLabel.setText("Purchased: \(dateFormatter.string(from: purchaseDate))") + } + if let expirationDate = purchaserInfo.expirationDate(forEntitlement: "pro_cat") { + self.expiryDateLabel.setText("Expires: \(dateFormatter.string(from: expirationDate))") + } + } + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/NotificationController.swift b/Examples/SwiftExample/WatchExample Extension/NotificationController.swift new file mode 100644 index 0000000000..d68ec0a2e4 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/NotificationController.swift @@ -0,0 +1,38 @@ +// +// NotificationController.swift +// WatchExample Extension +// +// Created by Andrés Boedo on 4/3/20. +// Copyright © 2020 RevenueCat. All rights reserved. +// + +import WatchKit +import Foundation +import UserNotifications + + +class NotificationController: WKUserNotificationInterfaceController { + + override init() { + // Initialize variables here. + super.init() + + // Configure interface objects here. + } + + override func willActivate() { + // This method is called when watch view controller is about to be visible to user + super.willActivate() + } + + override func didDeactivate() { + // This method is called when watch view controller is no longer visible + super.didDeactivate() + } + + override func didReceive(_ notification: UNNotification) { + // This method is called when a notification needs to be presented. + // Implement it if you use a dynamic notification interface. + // Populate your dynamic notification interface as quickly as possible. + } +} diff --git a/Examples/SwiftExample/WatchExample Extension/PushNotificationPayload.apns b/Examples/SwiftExample/WatchExample Extension/PushNotificationPayload.apns new file mode 100644 index 0000000000..c18b00ad94 --- /dev/null +++ b/Examples/SwiftExample/WatchExample Extension/PushNotificationPayload.apns @@ -0,0 +1,20 @@ +{ + "aps": { + "alert": { + "body": "Test message", + "title": "Optional title", + "subtitle": "Optional subtitle" + }, + "category": "myCategory", + "thread-id": "5280" + }, + + "WatchKit Simulator Actions": [ + { + "title": "First Button", + "identifier": "firstButtonAction" + } + ], + + "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App." +} diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..a046e0d49f --- /dev/null +++ b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,92 @@ +{ + "images" : [ + { + "filename" : "Slicewatch5.png", + "idiom" : "watch", + "role" : "notificationCenter", + "scale" : "2x", + "size" : "24x24", + "subtype" : "38mm" + }, + { + "filename" : "Slicewatch7.png", + "idiom" : "watch", + "role" : "notificationCenter", + "scale" : "2x", + "size" : "27.5x27.5", + "subtype" : "42mm" + }, + { + "filename" : "Slicewatch3.png", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Slicewatch2.png", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x", + "size" : "29x29" + }, + { + "filename" : "Slicewatch8.png", + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "40x40", + "subtype" : "38mm" + }, + { + "filename" : "Slicewatch1.png", + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "44x44", + "subtype" : "40mm" + }, + { + "filename" : "Slicewatch9.png", + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "50x50", + "subtype" : "44mm" + }, + { + "filename" : "Slicewatch4.png", + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "86x86", + "subtype" : "38mm" + }, + { + "filename" : "Slicewatch6.png", + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "98x98", + "subtype" : "42mm" + }, + { + "filename" : "Slicewatch10.png", + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "108x108", + "subtype" : "44mm" + }, + { + "filename" : "revenuecat logo.png", + "idiom" : "watch-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch1.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch1.png new file mode 100644 index 0000000000..7b0b32b694 Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch1.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch10.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch10.png new file mode 100644 index 0000000000..0dbed12480 Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch10.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch2.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch2.png new file mode 100644 index 0000000000..b1f7cd55c1 Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch2.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch3.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch3.png new file mode 100644 index 0000000000..6f2d1f2741 Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch3.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch4.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch4.png new file mode 100644 index 0000000000..c6899d29e6 Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch4.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch5.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch5.png new file mode 100644 index 0000000000..5a511854d1 Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch5.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch6.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch6.png new file mode 100644 index 0000000000..73fd48c31e Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch6.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch7.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch7.png new file mode 100644 index 0000000000..33726adab6 Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch7.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch8.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch8.png new file mode 100644 index 0000000000..5e3a5bfdbc Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch8.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch9.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch9.png new file mode 100644 index 0000000000..98cb79ba68 Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/Slicewatch9.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/revenuecat logo.png b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/revenuecat logo.png new file mode 100644 index 0000000000..30197ba4f7 Binary files /dev/null and b/Examples/SwiftExample/WatchExample/Assets.xcassets/AppIcon.appiconset/revenuecat logo.png differ diff --git a/Examples/SwiftExample/WatchExample/Assets.xcassets/Contents.json b/Examples/SwiftExample/WatchExample/Assets.xcassets/Contents.json new file mode 100644 index 0000000000..73c00596a7 --- /dev/null +++ b/Examples/SwiftExample/WatchExample/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SwiftExample/WatchExample/Base.lproj/Interface.storyboard b/Examples/SwiftExample/WatchExample/Base.lproj/Interface.storyboard new file mode 100644 index 0000000000..ab72bbc986 --- /dev/null +++ b/Examples/SwiftExample/WatchExample/Base.lproj/Interface.storyboard @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SwiftExample/WatchExample/Info.plist b/Examples/SwiftExample/WatchExample/Info.plist new file mode 100644 index 0000000000..4015b017e4 --- /dev/null +++ b/Examples/SwiftExample/WatchExample/Info.plist @@ -0,0 +1,33 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + SwiftExample + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + WKCompanionAppBundleIdentifier + com.revenuecat.sampleapp + WKWatchKitApp + + + diff --git a/Purchases/Purchasing/RCReceiptFetcher.m b/Purchases/Purchasing/RCReceiptFetcher.m index 59024da384..eec0e3a0fa 100644 --- a/Purchases/Purchasing/RCReceiptFetcher.m +++ b/Purchases/Purchasing/RCReceiptFetcher.m @@ -8,12 +8,27 @@ #import "RCReceiptFetcher.h" #import "RCLogUtils.h" +#import "RCSystemInfo.h" @implementation RCReceiptFetcher : NSObject -- (NSData *)receiptData -{ +- (NSData *)receiptData { NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; + +#if TARGET_OS_WATCH + // as of watchOS 6.2.8, there's a bug where the receipt is stored in the sandbox receipt location, + // but the appStoreReceiptURL method returns the URL for the production receipt. + // This code replaces "sandboxReceipt" with "receipt" as the last component of the receiptURL so that we get the + // correct receipt. + // This has been filed as radar FB7699277. More info in https://github.com/RevenueCat/purchases-ios/issues/207. + + if (RCSystemInfo.isSandbox) { + NSString *receiptURLFolder = [[receiptURL absoluteString] stringByDeletingLastPathComponent]; + NSURL *productionReceiptURL = [NSURL URLWithString:[receiptURLFolder stringByAppendingPathComponent:@"receipt"]]; + receiptURL = productionReceiptURL; + } +#endif + NSData *data = [NSData dataWithContentsOfURL:receiptURL]; RCDebugLog(@"Loaded receipt from %@", receiptURL); return data;