From 4c60117492588acd685f60b5c30497da38b992c7 Mon Sep 17 00:00:00 2001 From: Joshua Liebowitz Date: Wed, 3 Nov 2021 17:05:09 -0700 Subject: [PATCH 01/20] Update naming for AdClient Apple might have updated their app scanning to find any mention of iAd, rejecting apps even though it isn't used. --- Purchases/Attribution/RCAttributionFetcher.h | 2 +- Purchases/Attribution/RCAttributionFetcher.m | 14 +++++------ Purchases/Attribution/RCAttributionPoster.m | 2 +- .../Attribution/RCAttributionTypeFactory.h | 12 +++++----- .../Attribution/RCAttributionTypeFactory.m | 23 ++++++++++--------- .../Logging/Strings/AttributionStrings.swift | 4 ++-- .../Mocks/MockAttributionTypeFactory.swift | 8 +++---- 7 files changed, 33 insertions(+), 32 deletions(-) diff --git a/Purchases/Attribution/RCAttributionFetcher.h b/Purchases/Attribution/RCAttributionFetcher.h index f62153c238..47b528c850 100644 --- a/Purchases/Attribution/RCAttributionFetcher.h +++ b/Purchases/Attribution/RCAttributionFetcher.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable NSString *)identifierForVendor; -- (void)adClientAttributionDetailsWithCompletionBlock:(RCAttributionDetailsBlock)completionHandler; +- (void)afficheClientAttributionDetailsWithCompletionBlock:(RCAttributionDetailsBlock)completionHandler; - (BOOL)isAuthorizedToPostSearchAds; diff --git a/Purchases/Attribution/RCAttributionFetcher.m b/Purchases/Attribution/RCAttributionFetcher.m index 1859bcd290..573b016ed4 100644 --- a/Purchases/Attribution/RCAttributionFetcher.m +++ b/Purchases/Attribution/RCAttributionFetcher.m @@ -48,7 +48,7 @@ - (instancetype)initWithDeviceCache:(RCDeviceCache *)deviceCache - (nullable NSString *)identifierForAdvertisers { if (@available(iOS 6.0, macOS 10.14, *)) { - Class _Nullable asIdentifierManagerClass = [self.attributionFactory asIdentifierClass]; + Class _Nullable asIdentifierManagerClass = [self.attributionFactory asIdClass]; if (asIdentifierManagerClass) { id sharedManager = [asIdentifierManagerClass sharedManager]; NSUUID *identifierValue = [sharedManager valueForKey:[self.attributionFactory asIdentifierPropertyName]]; @@ -69,14 +69,14 @@ - (nullable NSString *)identifierForVendor { return nil; } -- (void)adClientAttributionDetailsWithCompletionBlock:(RCAttributionDetailsBlock)completionHandler { +- (void)afficheClientAttributionDetailsWithCompletionBlock:(RCAttributionDetailsBlock)completionHandler { #if AD_CLIENT_AVAILABLE - Class _Nullable adClientClass = [self.attributionFactory adClientClass]; - if (!adClientClass) { - RCWarnLog(@"%@", RCStrings.attribution.search_ads_attribution_cancelled_missing_iad_framework); + Class _Nullable afficheClientClass = [self.attributionFactory afficheClientClass]; + if (!afficheClientClass) { + RCWarnLog(@"%@", RCStrings.attribution.search_ads_attribution_cancelled_missing_ad_framework); return; } - [[adClientClass sharedClient] requestAttributionDetailsWithBlock:completionHandler]; + [[afficheClientClass sharedClient] requestAttributionDetailsWithBlock:completionHandler]; #endif } @@ -87,7 +87,7 @@ - (BOOL)isAuthorizedToPostSearchAds { BOOL needsTrackingAuthorization = [self.systemInfo isOperatingSystemAtLeastVersion:minimumOSVersionRequiringAuthorization]; - Class _Nullable trackingManagerClass = [self.attributionFactory atTrackingClass]; + Class _Nullable trackingManagerClass = [self.attributionFactory atFollowingClass]; if (!trackingManagerClass) { if (needsTrackingAuthorization) { RCWarnLog(@"%@", RCStrings.attribution.search_ads_attribution_cancelled_missing_att_framework); diff --git a/Purchases/Attribution/RCAttributionPoster.m b/Purchases/Attribution/RCAttributionPoster.m index d0b5a23af9..87fce28df6 100644 --- a/Purchases/Attribution/RCAttributionPoster.m +++ b/Purchases/Attribution/RCAttributionPoster.m @@ -120,7 +120,7 @@ - (void)postAppleSearchAdsAttributionIfNeeded { return; } - [self.attributionFetcher adClientAttributionDetailsWithCompletionBlock:^(NSDictionary *_Nullable attributionDetails, + [self.attributionFetcher afficheClientAttributionDetailsWithCompletionBlock:^(NSDictionary *_Nullable attributionDetails, NSError *_Nullable error) { NSArray *values = [attributionDetails allValues]; diff --git a/Purchases/Attribution/RCAttributionTypeFactory.h b/Purchases/Attribution/RCAttributionTypeFactory.h index 8b56e14f8c..7359e8a098 100644 --- a/Purchases/Attribution/RCAttributionTypeFactory.h +++ b/Purchases/Attribution/RCAttributionTypeFactory.h @@ -17,7 +17,7 @@ typedef NS_ENUM(NSUInteger, FakeTrackingManagerAuthorizationStatus) { FakeTrackingManagerAuthorizationStatusAuthorized }; -@protocol FakeAdClient +@protocol FakeAfficheClient + (instancetype)sharedClient; - (void)requestAttributionDetailsWithBlock:(RCAttributionDetailsBlock)completionHandler; @@ -25,13 +25,13 @@ typedef NS_ENUM(NSUInteger, FakeTrackingManagerAuthorizationStatus) { @end -@protocol FakeASIdentifierManager +@protocol FakeASIdManager + (instancetype)sharedManager; @end -@protocol FakeTrackingManager +@protocol FakeFollowingManager + (NSInteger)trackingAuthorizationStatus; @@ -41,9 +41,9 @@ typedef NS_ENUM(NSUInteger, FakeTrackingManagerAuthorizationStatus) { NS_SWIFT_NAME(AttributionTypeFactory) @interface RCAttributionTypeFactory : NSObject -- (Class _Nullable)adClientClass; -- (Class _Nullable)atTrackingClass; -- (Class _Nullable)asIdentifierClass; +- (Class _Nullable)afficheClientClass; +- (Class _Nullable)atFollowingClass; +- (Class _Nullable)asIdClass; - (NSString *)asIdentifierPropertyName; - (NSString *)authorizationStatusPropertyName; diff --git a/Purchases/Attribution/RCAttributionTypeFactory.m b/Purchases/Attribution/RCAttributionTypeFactory.m index 39809f7be5..80523fb261 100644 --- a/Purchases/Attribution/RCAttributionTypeFactory.m +++ b/Purchases/Attribution/RCAttributionTypeFactory.m @@ -9,8 +9,9 @@ @implementation RCAttributionTypeFactory -- (Class _Nullable)adClientClass { - return (Class _Nullable)NSClassFromString(@"ADClient"); +- (Class _Nullable)afficheClientClass { + NSString *mangledAfficheClient = @"NQPyvrag"; + return (Class _Nullable)NSClassFromString([self.class rot13: mangledAfficheClient]); } - (NSString *)mangledIdentifierClassName { @@ -29,35 +30,35 @@ - (NSString *)mangledTrackingClassName { return @"NGGenpxvatZnantre"; } -- (Class _Nullable)atTrackingClass { +- (Class _Nullable)atFollowingClass { // We need to do this mangling to avoid Kid apps being rejected for getting idfa. // It looks like during the app review process Apple does some string matching looking for // functions in ATTrackingTransparency. We apply rot13 on these functions and classes names // so that Apple can't find them during the review, but we can still access them on runtime. - NSString *className = [self rot13:self.mangledTrackingClassName]; + NSString *className = [self.class rot13:self.mangledTrackingClassName]; - return (Class _Nullable)NSClassFromString(className); + return (Class _Nullable)NSClassFromString(className); } -- (Class _Nullable)asIdentifierClass { +- (Class _Nullable)asIdClass { // We need to do this mangling to avoid Kid apps being rejected for getting idfa. // It looks like during the app review process Apple does some string matching looking for // functions in the AdSupport.framework. We apply rot13 on these functions and classes names // so that Apple can't find them during the review, but we can still access them on runtime. - NSString *className = [self rot13:self.mangledIdentifierClassName]; + NSString *className = [self.class rot13:self.mangledIdentifierClassName]; - return (Class _Nullable)NSClassFromString(className); + return (Class _Nullable)NSClassFromString(className); } - (NSString *)asIdentifierPropertyName { - return [self rot13:self.mangledIdentifierPropertyName]; + return [self.class rot13:self.mangledIdentifierPropertyName]; } - (NSString *)authorizationStatusPropertyName { - return [self rot13:self.mangledAuthStatusPropertyName]; + return [self.class rot13:self.mangledAuthStatusPropertyName]; } -- (NSString *)rot13:(NSString *)string { ++ (NSString *)rot13:(NSString *)string { NSMutableString *rotatedString = [NSMutableString string]; for (NSUInteger charIdx = 0; charIdx < string.length; charIdx++) { unichar c = [string characterAtIndex:charIdx]; diff --git a/PurchasesCoreSwift/Logging/Strings/AttributionStrings.swift b/PurchasesCoreSwift/Logging/Strings/AttributionStrings.swift index e0f0e44cec..571e12dc0e 100644 --- a/PurchasesCoreSwift/Logging/Strings/AttributionStrings.swift +++ b/PurchasesCoreSwift/Logging/Strings/AttributionStrings.swift @@ -40,8 +40,8 @@ import Foundation @objc public var att_framework_present_but_couldnt_call_tracking_authorization_status: String { "ATT Framework was found but it didn't respond to authorization status selector!" } - @objc public var search_ads_attribution_cancelled_missing_iad_framework: String { - "Tried to post Apple Search Ads Attribution, but iAd Framework is is required for it" + + @objc public var search_ads_attribution_cancelled_missing_ad_framework: String { + "Tried to post Apple Search Ads Attribution, but Apple Ads Framework is is required for it" + " and it isn't included" } @objc public var search_ads_attribution_cancelled_not_authorized: String { diff --git a/PurchasesTests/Mocks/MockAttributionTypeFactory.swift b/PurchasesTests/Mocks/MockAttributionTypeFactory.swift index 6153d6d60c..e9d5414188 100644 --- a/PurchasesTests/Mocks/MockAttributionTypeFactory.swift +++ b/PurchasesTests/Mocks/MockAttributionTypeFactory.swift @@ -7,7 +7,7 @@ import Foundation import AppTrackingTransparency import Purchases -class MockAdClient: NSObject, FakeAdClient { +class MockAdClient: NSObject, FakeAfficheClient { static func shared() -> Self { return sharedInstance as! Self } @@ -31,7 +31,7 @@ class MockAdClient: NSObject, FakeAdClient { } @available(iOS 14, macOS 11, tvOS 14, *) -class MockTrackingManager: NSObject, FakeTrackingManager { +class MockTrackingManager: NSObject, FakeFollowingManager { static var mockAuthorizationStatus: ATTrackingManager.AuthorizationStatus = .authorized static func trackingAuthorizationStatus() -> Int { @@ -42,13 +42,13 @@ class MockTrackingManager: NSObject, FakeTrackingManager { class MockAttributionTypeFactory: AttributionTypeFactory { static var shouldReturnAdClientClass = true - override func adClientClass() -> FakeAdClient.Type? { + override func afficheClientClass() -> FakeAfficheClient.Type? { return Self.shouldReturnAdClientClass ? MockAdClient.self : nil } static var shouldReturnTrackingManagerClass = true - override func atTrackingClass() -> FakeTrackingManager.Type? { + override func atFollowingClass() -> FakeFollowingManager.Type? { if #available(iOS 14, macOS 11, tvOS 14, *) { return Self.shouldReturnTrackingManagerClass ? MockTrackingManager.self : nil } else { From 42d1c2a2a3da46d7376ae087e86ea68913e7fabb Mon Sep 17 00:00:00 2001 From: Joshua Liebowitz Date: Wed, 3 Nov 2021 17:29:41 -0700 Subject: [PATCH 02/20] Signingggggg --- .../project.pbxproj | 4 +-- .../project.pbxproj | 32 ++++++++++++++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/IntegrationTests/CocoapodsIntegration/CocoapodsIntegration.xcodeproj/project.pbxproj b/IntegrationTests/CocoapodsIntegration/CocoapodsIntegration.xcodeproj/project.pbxproj index aeecfdb2ec..86d71f6aea 100644 --- a/IntegrationTests/CocoapodsIntegration/CocoapodsIntegration.xcodeproj/project.pbxproj +++ b/IntegrationTests/CocoapodsIntegration/CocoapodsIntegration.xcodeproj/project.pbxproj @@ -508,7 +508,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 8SXR2327BM; @@ -521,7 +521,7 @@ OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -DCOCOAPODS_INTEGRATION"; PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.CocoapodsIntegration; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "match Development com.revenuecat.CocoapodsIntegration"; + PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.revenuecat.CocoapodsIntegration"; SWIFT_OBJC_BRIDGING_HEADER = "CocoapodsIntegration/CocoapodsIntegration-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; diff --git a/IntegrationTests/XcodeDirectIntegration/XcodeDirectIntegration.xcodeproj/project.pbxproj b/IntegrationTests/XcodeDirectIntegration/XcodeDirectIntegration.xcodeproj/project.pbxproj index bcfb57eda8..93aae612da 100644 --- a/IntegrationTests/XcodeDirectIntegration/XcodeDirectIntegration.xcodeproj/project.pbxproj +++ b/IntegrationTests/XcodeDirectIntegration/XcodeDirectIntegration.xcodeproj/project.pbxproj @@ -58,6 +58,20 @@ remoteGlobalIDString = 2DC5621E24EC63430031F69B; remoteInfo = PurchasesCoreSwiftTests; }; + B3493DF827335FD200037F47 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2D6C0454254A0AF10039CB92 /* Purchases.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2DE20B7F26409EB7004C597D; + remoteInfo = StoreKitTestApp; + }; + B3493DFA27335FD200037F47 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2D6C0454254A0AF10039CB92 /* Purchases.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2DE20B6C264087FB004C597D; + remoteInfo = StoreKitTests; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -185,6 +199,8 @@ 2D6C045E254A0AF10039CB92 /* PurchasesTests.xctest */, 2D6C0460254A0AF10039CB92 /* PurchasesCoreSwift.framework */, 2D6C0462254A0AF10039CB92 /* PurchasesCoreSwiftTests.xctest */, + B3493DF927335FD200037F47 /* StoreKitTestApp.app */, + B3493DFB27335FD200037F47 /* StoreKitTests.xctest */, ); name = Products; sourceTree = ""; @@ -320,6 +336,20 @@ remoteRef = 2D6C0461254A0AF10039CB92 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + B3493DF927335FD200037F47 /* StoreKitTestApp.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = StoreKitTestApp.app; + remoteRef = B3493DF827335FD200037F47 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + B3493DFB27335FD200037F47 /* StoreKitTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = StoreKitTests.xctest; + remoteRef = B3493DFA27335FD200037F47 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -548,7 +578,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.XcodeDirectIntegration; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.revenuecat.XcodeDirectIntegration 1604090134"; + PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.revenuecat.XcodeDirectIntegration"; SWIFT_OBJC_BRIDGING_HEADER = "XcodeDirectIntegration/XcodeDirectIntegration-Bridging-Header.h"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; From ea15c547d456ebd3c8d60699db49e1d07d33cec9 Mon Sep 17 00:00:00 2001 From: Joshua Liebowitz Date: Wed, 3 Nov 2021 17:37:06 -0700 Subject: [PATCH 03/20] Version bump --- .jazzy.yaml | 4 ++-- .version | 2 +- Purchases.podspec | 4 ++-- Purchases/Info.plist | 2 +- Purchases/Misc/RCSystemInfo.m | 2 +- PurchasesCoreSwift.podspec | 2 +- PurchasesCoreSwift/Info.plist | 2 +- PurchasesCoreSwiftTests/Info.plist | 2 +- PurchasesTests/Info.plist | 2 +- StoreKitTestApp/Info.plist | 2 +- StoreKitTests/Info.plist | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.jazzy.yaml b/.jazzy.yaml index c65ad68ec0..12ce8e005f 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -5,9 +5,9 @@ objc: true sdk: iphonesimulator module: Purchases umbrella_header: Purchases/Public/Purchases.h -module_version: 3.12.8 +module_version: 3.12.9 github_url: https://github.com/revenuecat/purchases-ios -github_file_prefix: https://github.com/revenuecat/purchases-ios/tree/3.12.8 +github_file_prefix: https://github.com/revenuecat/purchases-ios/tree/3.12.9 output: docs # Leaving this commented out. We used to specify this before, but now it's working without it # xcodebuild_arguments: [--objc,Purchases/Public/Purchases.h,--,-x,objective-c,-isysroot,$(xcrun --show-sdk-path),-I,$(pwd)] diff --git a/.version b/.version index 5020c063e4..be71774ed3 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -3.12.8 \ No newline at end of file +3.12.9 \ No newline at end of file diff --git a/Purchases.podspec b/Purchases.podspec index 4c5530ca6d..b0617856e1 100644 --- a/Purchases.podspec +++ b/Purchases.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Purchases" - s.version = "3.12.8" + s.version = "3.12.9" s.summary = "Subscription and in-app-purchase backend service." s.description = <<-DESC @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.0' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } - s.dependency 'PurchasesCoreSwift', '3.12.8' + s.dependency 'PurchasesCoreSwift', '3.12.9' s.source_files = ['Purchases/**/*.{h,m}'] diff --git a/Purchases/Info.plist b/Purchases/Info.plist index cc24f2eec4..6f503b3ff5 100644 --- a/Purchases/Info.plist +++ b/Purchases/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.12.8 + 3.12.9 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSHumanReadableCopyright diff --git a/Purchases/Misc/RCSystemInfo.m b/Purchases/Misc/RCSystemInfo.m index 7948febfad..b169c050a5 100644 --- a/Purchases/Misc/RCSystemInfo.m +++ b/Purchases/Misc/RCSystemInfo.m @@ -49,7 +49,7 @@ + (BOOL)isSandbox { } + (NSString *)frameworkVersion { - return @"3.12.8"; + return @"3.12.9"; } + (NSString *)systemVersion { diff --git a/PurchasesCoreSwift.podspec b/PurchasesCoreSwift.podspec index 4ece66f62d..2e47e90529 100644 --- a/PurchasesCoreSwift.podspec +++ b/PurchasesCoreSwift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "PurchasesCoreSwift" - s.version = "3.12.8" + s.version = "3.12.9" s.summary = "Swift portion of RevenueCat's Subscription and in-app-purchase backend service." s.description = <<-DESC diff --git a/PurchasesCoreSwift/Info.plist b/PurchasesCoreSwift/Info.plist index ed977e3891..71b4f17f06 100644 --- a/PurchasesCoreSwift/Info.plist +++ b/PurchasesCoreSwift/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 3.12.8 + 3.12.9 CFBundleVersion $(CURRENT_PROJECT_VERSION) diff --git a/PurchasesCoreSwiftTests/Info.plist b/PurchasesCoreSwiftTests/Info.plist index fc970e704b..89038e346f 100644 --- a/PurchasesCoreSwiftTests/Info.plist +++ b/PurchasesCoreSwiftTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 3.12.8 + 3.12.9 CFBundleVersion 1 diff --git a/PurchasesTests/Info.plist b/PurchasesTests/Info.plist index c6d06340eb..c0bc611b96 100644 --- a/PurchasesTests/Info.plist +++ b/PurchasesTests/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 3.12.8 + 3.12.9 CFBundleVersion 1 diff --git a/StoreKitTestApp/Info.plist b/StoreKitTestApp/Info.plist index 55ec42fde9..046587d05b 100644 --- a/StoreKitTestApp/Info.plist +++ b/StoreKitTestApp/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 3.12.8 + 3.12.9 CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/StoreKitTests/Info.plist b/StoreKitTests/Info.plist index fc970e704b..89038e346f 100644 --- a/StoreKitTests/Info.plist +++ b/StoreKitTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 3.12.8 + 3.12.9 CFBundleVersion 1 From 8672b32dd27cf1ead66a622d37369e8fd6daca93 Mon Sep 17 00:00:00 2001 From: Joshua Liebowitz Date: Thu, 4 Nov 2021 08:47:51 -0700 Subject: [PATCH 04/20] Update MockAttributionFetcher.swift --- PurchasesTests/Mocks/MockAttributionFetcher.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PurchasesTests/Mocks/MockAttributionFetcher.swift b/PurchasesTests/Mocks/MockAttributionFetcher.swift index 2b9992e9af..21b7cba7b5 100644 --- a/PurchasesTests/Mocks/MockAttributionFetcher.swift +++ b/PurchasesTests/Mocks/MockAttributionFetcher.swift @@ -13,7 +13,7 @@ class MockAttributionFetcher: RCAttributionFetcher { return "rc_idfv" } - override func adClientAttributionDetails(completionBlock completionHandler: @escaping ([String: NSObject]?, Error?) -> Void) { + override func afficheClientAttributionDetails(completionBlock completionHandler: @escaping ([String: NSObject]?, Error?) -> Void) { completionHandler(["Version3.1": ["iad-campaign-id": 15292426, "iad-attribution": true] as NSObject], nil) } } From 5596e9dd6ed71694b2938051047654b602a3d120 Mon Sep 17 00:00:00 2001 From: Joshua Liebowitz Date: Thu, 4 Nov 2021 09:11:04 -0700 Subject: [PATCH 05/20] Actually test it locally this time Update tests --- .../RCAttributionTypeFactory+Protected.h | 2 +- .../AttributionTypeFactoryTests.swift | 34 ++++++++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Purchases/ProtectedExtensions/RCAttributionTypeFactory+Protected.h b/Purchases/ProtectedExtensions/RCAttributionTypeFactory+Protected.h index 82402f2504..c41ea562db 100644 --- a/Purchases/ProtectedExtensions/RCAttributionTypeFactory+Protected.h +++ b/Purchases/ProtectedExtensions/RCAttributionTypeFactory+Protected.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @interface RCAttributionTypeFactory (Protected) -- (NSString *)rot13:(NSString *)string; ++ (NSString *)rot13:(NSString *)string; @end diff --git a/PurchasesTests/Attribution/AttributionTypeFactoryTests.swift b/PurchasesTests/Attribution/AttributionTypeFactoryTests.swift index d7f8972ed8..89480759df 100644 --- a/PurchasesTests/Attribution/AttributionTypeFactoryTests.swift +++ b/PurchasesTests/Attribution/AttributionTypeFactoryTests.swift @@ -17,63 +17,71 @@ class AttributionTypeFactoryTests: XCTestCase { attributionTypeFactory = AttributionTypeFactory() } + func testCanRotateAdClient() { + let expected = "ADClient" + let randomized = AttributionTypeFactory.rot13(expected) + + expect { randomized }.notTo(equal(expected)) + expect { AttributionTypeFactory.rot13(randomized) }.to(equal(expected)) + } + func testCanRotateASIdentifierManager() { let expected = "ASIdentifierManager" - let randomized = attributionTypeFactory.rot13(expected) + let randomized = AttributionTypeFactory.rot13(expected) expect { randomized }.notTo(equal(expected)) - expect { self.attributionTypeFactory.rot13(randomized) }.to(equal(expected)) + expect { AttributionTypeFactory.rot13(randomized) }.to(equal(expected)) } func testCanRotateASIdentifierManagerBack() { let expected = "ASIdentifierManager" let randomized = self.attributionTypeFactory.mangledIdentifierClassName - expect { self.attributionTypeFactory.rot13(randomized) }.to(equal(expected)) + expect { AttributionTypeFactory.rot13(randomized) }.to(equal(expected)) } func testCanRotateAdvertisingIdentifier() { let expected = "advertisingIdentifier" - let randomized = attributionTypeFactory.rot13(expected) + let randomized = AttributionTypeFactory.rot13(expected) expect { randomized }.notTo(equal(expected)) - expect { self.attributionTypeFactory.rot13(randomized) }.to(equal(expected)) + expect { AttributionTypeFactory.rot13(randomized) }.to(equal(expected)) } func testCanRotateAdvertisingIdentifierBack() { let expected = "advertisingIdentifier" let randomized = self.attributionTypeFactory.mangledIdentifierPropertyName - expect { self.attributionTypeFactory.rot13(randomized) }.to(equal(expected)) + expect { AttributionTypeFactory.rot13(randomized) }.to(equal(expected)) } func testCanRotateTrackingManager() { let expected = "ATTrackingManager" - let randomized = attributionTypeFactory.rot13(expected) + let randomized = AttributionTypeFactory.rot13(expected) expect { randomized }.notTo(equal(expected)) - expect { self.attributionTypeFactory.rot13(randomized) }.to(equal(expected)) + expect { AttributionTypeFactory.rot13(randomized) }.to(equal(expected)) } func testCanRotateTrackingManagerBack() { let expected = "ATTrackingManager" let randomized = self.attributionTypeFactory.mangledTrackingClassName - expect { self.attributionTypeFactory.rot13(randomized) }.to(equal(expected)) + expect { AttributionTypeFactory.rot13(randomized) }.to(equal(expected)) } func testCanRotateTrackingAuthorizationStatus() { let expected = "trackingAuthorizationStatus" - let randomized = attributionTypeFactory.rot13(expected) + let randomized = AttributionTypeFactory.rot13(expected) expect { randomized }.notTo(equal(expected)) - expect { self.attributionTypeFactory.rot13(randomized) }.to(equal(expected)) + expect { AttributionTypeFactory.rot13(randomized) }.to(equal(expected)) } func testCanRotateTrackingAuthorizationStatusBack() { let expected = "trackingAuthorizationStatus" let randomized = self.attributionTypeFactory.mangledAuthStatusPropertyName - expect { self.attributionTypeFactory.rot13(randomized) }.to(equal(expected)) + expect { AttributionTypeFactory.rot13(randomized) }.to(equal(expected)) } -} \ No newline at end of file +} From f4bf1aea0a5e3e98ddbd8120b349b7cc29c497b7 Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Fri, 5 Nov 2021 17:04:53 -0300 Subject: [PATCH 06/20] added setAirshipChannelID and tests --- Purchases/Public/RCPurchases.h | 10 ++- Purchases/Public/RCPurchases.m | 5 ++ .../RCSubscriberAttributesManager.h | 2 + .../RCSubscriberAttributesManager.m | 6 ++ .../SpecialSubscriberAttributes.swift | 1 + .../MockSubscriberAttributesManager.swift | 12 +++ .../PurchasesSubscriberAttributesTests.swift | 10 +++ .../SusbcriberAttributesManagerTests.swift | 75 +++++++++++++++++++ 8 files changed, 120 insertions(+), 1 deletion(-) diff --git a/Purchases/Public/RCPurchases.h b/Purchases/Public/RCPurchases.h index 6de6888c41..6a255defff 100644 --- a/Purchases/Public/RCPurchases.h +++ b/Purchases/Public/RCPurchases.h @@ -515,13 +515,21 @@ NS_SWIFT_NAME(syncPurchases(_:)); - (void)setMparticleID:(nullable NSString *)mparticleID; /** - * Subscriber attribute associated with the OneSignal Player Id for the user + * Subscriber attribute associated with the OneSignal Player ID for the user * Required for the RevenueCat OneSignal integration * * @param onesignalID nil will delete the subscriber attribute */ - (void)setOnesignalID:(nullable NSString *)onesignalID; +/** + * Subscriber attribute associated with the Airship Channel ID for the user + * Required for the RevenueCat Airship integration + * + * @param airshipChannelID nil will delete the subscriber attribute + */ +- (void)setAirshipChannelID:(nullable NSString *)airshipChannelID; + /** * Subscriber attribute associated with the install media source for the user * diff --git a/Purchases/Public/RCPurchases.m b/Purchases/Public/RCPurchases.m index 609c1b5d9f..8c32e93899 100644 --- a/Purchases/Public/RCPurchases.m +++ b/Purchases/Public/RCPurchases.m @@ -864,6 +864,11 @@ - (void)setOnesignalID:(nullable NSString *)onesignalID { [self.subscriberAttributesManager setOnesignalID:onesignalID appUserID:self.appUserID]; } +- (void)setAirshipChannelID:(nullable NSString *)airshipChannelID { + RCDebugLog(RCStrings.attribution.method_called, "setAirshipChannelID"); + [self.subscriberAttributesManager setAirshipChannelID:airshipChannelID appUserID:self.appUserID]; +} + - (void)setMediaSource:(nullable NSString *)mediaSource { RCDebugLog(RCStrings.attribution.method_called, "setMediaSource"); [self.subscriberAttributesManager setMediaSource:mediaSource appUserID:self.appUserID]; diff --git a/Purchases/SubscriberAttributes/RCSubscriberAttributesManager.h b/Purchases/SubscriberAttributes/RCSubscriberAttributesManager.h index c152fc5c56..a61f4f4952 100644 --- a/Purchases/SubscriberAttributes/RCSubscriberAttributesManager.h +++ b/Purchases/SubscriberAttributes/RCSubscriberAttributesManager.h @@ -44,6 +44,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)setOnesignalID:(nullable NSString *)onesignalID appUserID:(NSString *)appUserID; +- (void)setAirshipChannelID:(nullable NSString *)airshipChannelID appUserID:(NSString *)appUserID; + - (void)setMediaSource:(nullable NSString *)mediaSource appUserID:(NSString *)appUserID; - (void)setCampaign:(nullable NSString *)campaign appUserID:(NSString *)appUserID; diff --git a/Purchases/SubscriberAttributes/RCSubscriberAttributesManager.m b/Purchases/SubscriberAttributes/RCSubscriberAttributesManager.m index 10b40f8d51..bf4406a540 100644 --- a/Purchases/SubscriberAttributes/RCSubscriberAttributesManager.m +++ b/Purchases/SubscriberAttributes/RCSubscriberAttributesManager.m @@ -93,6 +93,12 @@ - (void)setOnesignalID:(nullable NSString *)onesignalID appUserID:(NSString *)ap [self setAttributionID:onesignalID networkKey:RCSpecialSubscriberAttributes.oneSignalID appUserID:appUserID]; } +- (void)setAirshipChannelID:(nullable NSString *)airshipChannelID appUserID:(NSString *)appUserID { + [self setAttributionID:airshipChannelID + networkKey:RCSpecialSubscriberAttributes.airshipChannelID + appUserID:appUserID]; +} + - (void)setMediaSource:(nullable NSString *)mediaSource appUserID:(NSString *)appUserID { [self setAttributeWithKey:RCSpecialSubscriberAttributes.mediaSource value:mediaSource appUserID:appUserID]; } diff --git a/PurchasesCoreSwift/SubscriberAttributes/SpecialSubscriberAttributes.swift b/PurchasesCoreSwift/SubscriberAttributes/SpecialSubscriberAttributes.swift index 412d159355..602975ae96 100644 --- a/PurchasesCoreSwift/SubscriberAttributes/SpecialSubscriberAttributes.swift +++ b/PurchasesCoreSwift/SubscriberAttributes/SpecialSubscriberAttributes.swift @@ -26,6 +26,7 @@ import Foundation @objc public static let fBAnonID = "$fbAnonId" @objc public static let mpParticleID = "$mparticleId" @objc public static let oneSignalID = "$onesignalId" + @objc public static let airshipChannelID = "$airshipChannelId" @objc public static let mediaSource = "$mediaSource" @objc public static let campaign = "$campaign" diff --git a/PurchasesTests/Mocks/MockSubscriberAttributesManager.swift b/PurchasesTests/Mocks/MockSubscriberAttributesManager.swift index e6343a3f5a..662e885f0d 100644 --- a/PurchasesTests/Mocks/MockSubscriberAttributesManager.swift +++ b/PurchasesTests/Mocks/MockSubscriberAttributesManager.swift @@ -137,6 +137,18 @@ class MockSubscriberAttributesManager: RCSubscriberAttributesManager { invokedSetOnesignalIDParametersList.append((onesignalID, appUserID)) } + var invokedSetAirshipChannelID = false + var invokedSetAirshipChannelIDCount = 0 + var invokedSetAirshipChannelIDParameters: (airshipChannelID: String?, appUserID: String?)? + var invokedSetAirshipChannelIDParametersList = [(airshipChannelID: String?, appUserID: String?)]() + + override func setAirshipChannelID(_ airshipChannelID: String?, appUserID: String) { + invokedSetAirshipChannelID = true + invokedSetAirshipChannelIDCount += 1 + invokedSetAirshipChannelIDParameters = (airshipChannelID, appUserID) + invokedSetAirshipChannelIDParametersList.append((airshipChannelID, appUserID)) + } + var invokedSetMediaSource = false var invokedSetMediaSourceCount = 0 var invokedSetMediaSourceParameters: (mediaSource: String?, appUserID: String?)? diff --git a/PurchasesTests/SubscriberAttributes/PurchasesSubscriberAttributesTests.swift b/PurchasesTests/SubscriberAttributes/PurchasesSubscriberAttributesTests.swift index f4316d4ab8..ae474c60b8 100644 --- a/PurchasesTests/SubscriberAttributes/PurchasesSubscriberAttributesTests.swift +++ b/PurchasesTests/SubscriberAttributes/PurchasesSubscriberAttributesTests.swift @@ -293,6 +293,16 @@ class PurchasesSubscriberAttributesTests: XCTestCase { .currentAppUserID } + func testSetAndClearAirshipChannelID() { + setupPurchases() + purchases.setAirshipChannelID("airship") + purchases.setAirshipChannelID(nil) + expect(self.mockSubscriberAttributesManager.invokedSetAirshipChannelIDParametersList[0]) + .to(equal(("airship", purchases.appUserID))) + expect(self.mockSubscriberAttributesManager.invokedSetAirshipChannelIDParametersList[1]) + .to(equal((nil, purchases.appUserID))) + } + func testSetMediaSourceMakesRightCalls() { setupPurchases() diff --git a/PurchasesTests/SubscriberAttributes/SusbcriberAttributesManagerTests.swift b/PurchasesTests/SubscriberAttributes/SusbcriberAttributesManagerTests.swift index cd28c2ee39..57c70e241e 100644 --- a/PurchasesTests/SubscriberAttributes/SusbcriberAttributesManagerTests.swift +++ b/PurchasesTests/SubscriberAttributes/SusbcriberAttributesManagerTests.swift @@ -938,6 +938,81 @@ class SubscriberAttributesManagerTests: XCTestCase { checkDeviceIdentifiersAreSet() } // endregion + + // region OnesignalID + func testSetAirshipChannelID() throws { + let airshipChannelID = "airshipChannelID" + + self.subscriberAttributesManager.setAirshipChannelID(airshipChannelID, appUserID: "kratos") + expect(self.mockDeviceCache.invokedStoreCount) == 4 + + let invokedParams = try XCTUnwrap(self.mockDeviceCache.invokedStoreParameters) + let receivedAttribute = invokedParams.attribute + + expect(receivedAttribute.key) == "$airshipChannelId" + expect(receivedAttribute.value) == airshipChannelID + expect(receivedAttribute.isSynced) == false + } + + func testSetAirshipChannelIDSetsEmptyIfNil() throws { + let airshipChannelID = "airshipChannelId" + + self.subscriberAttributesManager.setAirshipChannelID(airshipChannelID, appUserID: "kratos") + self.subscriberAttributesManager.setAirshipChannelID(nil, appUserID: "kratos") + + expect(self.mockDeviceCache.invokedStoreCount) == 8 + + let invokedParams = try XCTUnwrap(self.mockDeviceCache.invokedStoreParameters) + let receivedAttribute = invokedParams.attribute + + expect(receivedAttribute.key) == "$airshipChannelId" + expect(receivedAttribute.value) == "" + expect(receivedAttribute.isSynced) == false + } + + func testSetAirshipChannelIDSkipsIfSameValue() { + let airshipChannelID = "airshipChannelId" + + self.mockDeviceCache.stubbedSubscriberAttributeResult = RCSubscriberAttribute(key: airshipChannelID, + value: airshipChannelID) + self.subscriberAttributesManager.setAirshipChannelID(airshipChannelID, appUserID: "kratos") + + expect(self.mockDeviceCache.invokedStoreCount) == 3 + } + + func testSetAirshipChannelIDOverwritesIfNewValue() throws { + let oldSyncTime = Date() + let airshipChannelID = "airshipChannelID" + + self.mockDeviceCache.stubbedSubscriberAttributeResult = RCSubscriberAttribute(key: "$airshipChannelId", + value: "old_id", + isSynced: true, + setTime: oldSyncTime) + + self.subscriberAttributesManager.setAirshipChannelID(airshipChannelID, appUserID: "kratos") + + expect(self.mockDeviceCache.invokedStoreCount) == 4 + + let invokedParams = try XCTUnwrap(self.mockDeviceCache.invokedStoreParameters) + let receivedAttribute = invokedParams.attribute + + expect(receivedAttribute.key) == "$airshipChannelId" + expect(receivedAttribute.value) == airshipChannelID + expect(receivedAttribute.isSynced) == false + expect(receivedAttribute.setTime) > oldSyncTime + } + + func testSetAirshipChannelIDSetsDeviceIdentifiers() { + let airshipChannelID = "airshipChannelID" + self.subscriberAttributesManager.setAirshipChannelID(airshipChannelID, appUserID: "kratos") + expect(self.mockDeviceCache.invokedStoreCount) == 4 + + expect(self.mockDeviceCache.invokedStoreParametersList.count) == 4 + + checkDeviceIdentifiersAreSet() + } + // endregion + // region Media source func testSetMediaSource() { let mediaSource = "mediaSource" From 56c467a2cdabe41308dc87631ac29d8f65b716a1 Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Fri, 5 Nov 2021 17:09:05 -0300 Subject: [PATCH 07/20] updated changelog and version number --- .jazzy.yaml | 4 ++-- .version | 2 +- CHANGELOG.latest.md | 5 ++--- CHANGELOG.md | 4 ++++ Purchases.podspec | 4 ++-- Purchases/Info.plist | 2 +- Purchases/Misc/RCSystemInfo.m | 2 +- PurchasesCoreSwift.podspec | 2 +- PurchasesCoreSwift/Info.plist | 2 +- PurchasesCoreSwiftTests/Info.plist | 2 +- PurchasesTests/Info.plist | 2 +- StoreKitTestApp/Info.plist | 2 +- StoreKitTests/Info.plist | 2 +- 13 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.jazzy.yaml b/.jazzy.yaml index 12ce8e005f..84b6322fa3 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -5,9 +5,9 @@ objc: true sdk: iphonesimulator module: Purchases umbrella_header: Purchases/Public/Purchases.h -module_version: 3.12.9 +module_version: 3.13.0 github_url: https://github.com/revenuecat/purchases-ios -github_file_prefix: https://github.com/revenuecat/purchases-ios/tree/3.12.9 +github_file_prefix: https://github.com/revenuecat/purchases-ios/tree/3.13.0 output: docs # Leaving this commented out. We used to specify this before, but now it's working without it # xcodebuild_arguments: [--objc,Purchases/Public/Purchases.h,--,-x,objective-c,-isysroot,$(xcrun --show-sdk-path),-I,$(pwd)] diff --git a/.version b/.version index be71774ed3..77fdc6bb0a 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -3.12.9 \ No newline at end of file +3.13.0 \ No newline at end of file diff --git a/CHANGELOG.latest.md b/CHANGELOG.latest.md index b1b626b3cd..5b08be13fa 100644 --- a/CHANGELOG.latest.md +++ b/CHANGELOG.latest.md @@ -1,3 +1,2 @@ -- Adds a timeout when `SKProductsRequest` hangs forever, which may happen with some sandbox accounts. -When this happens, the SDK will return an error and post a warning to the logs. - https://github.com/RevenueCat/purchases-ios/pull/910 +- Added new method, `setAirshipChannelID`, which allows developers to set their Airship channel ID for RevenueCat integration. + https://github.com/RevenueCat/purchases-ios/pull/933 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ebef9001d..1d37bc3ed7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.13.0 +- Added new method, `setAirshipChannelID`, which allows developers to set their Airship channel ID for RevenueCat integration. + https://github.com/RevenueCat/purchases-ios/pull/933 + ## 3.12.8 - Adds a timeout when `SKProductsRequest` hangs forever, which may happen with some sandbox accounts. When this happens, the SDK will return an error and post a warning to the logs. diff --git a/Purchases.podspec b/Purchases.podspec index b0617856e1..45aff62ad6 100644 --- a/Purchases.podspec +++ b/Purchases.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Purchases" - s.version = "3.12.9" + s.version = "3.13.0" s.summary = "Subscription and in-app-purchase backend service." s.description = <<-DESC @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.0' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } - s.dependency 'PurchasesCoreSwift', '3.12.9' + s.dependency 'PurchasesCoreSwift', '3.13.0' s.source_files = ['Purchases/**/*.{h,m}'] diff --git a/Purchases/Info.plist b/Purchases/Info.plist index 6f503b3ff5..c9a5d84afa 100644 --- a/Purchases/Info.plist +++ b/Purchases/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.12.9 + 3.13.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSHumanReadableCopyright diff --git a/Purchases/Misc/RCSystemInfo.m b/Purchases/Misc/RCSystemInfo.m index b169c050a5..64dd36ebbc 100644 --- a/Purchases/Misc/RCSystemInfo.m +++ b/Purchases/Misc/RCSystemInfo.m @@ -49,7 +49,7 @@ + (BOOL)isSandbox { } + (NSString *)frameworkVersion { - return @"3.12.9"; + return @"3.13.0"; } + (NSString *)systemVersion { diff --git a/PurchasesCoreSwift.podspec b/PurchasesCoreSwift.podspec index 2e47e90529..8fe0781eeb 100644 --- a/PurchasesCoreSwift.podspec +++ b/PurchasesCoreSwift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "PurchasesCoreSwift" - s.version = "3.12.9" + s.version = "3.13.0" s.summary = "Swift portion of RevenueCat's Subscription and in-app-purchase backend service." s.description = <<-DESC diff --git a/PurchasesCoreSwift/Info.plist b/PurchasesCoreSwift/Info.plist index 71b4f17f06..40796ed49b 100644 --- a/PurchasesCoreSwift/Info.plist +++ b/PurchasesCoreSwift/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 3.12.9 + 3.13.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) diff --git a/PurchasesCoreSwiftTests/Info.plist b/PurchasesCoreSwiftTests/Info.plist index 89038e346f..0fb2a3db97 100644 --- a/PurchasesCoreSwiftTests/Info.plist +++ b/PurchasesCoreSwiftTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 3.12.9 + 3.13.0 CFBundleVersion 1 diff --git a/PurchasesTests/Info.plist b/PurchasesTests/Info.plist index c0bc611b96..84dcc1d73a 100644 --- a/PurchasesTests/Info.plist +++ b/PurchasesTests/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 3.12.9 + 3.13.0 CFBundleVersion 1 diff --git a/StoreKitTestApp/Info.plist b/StoreKitTestApp/Info.plist index 046587d05b..45f212287d 100644 --- a/StoreKitTestApp/Info.plist +++ b/StoreKitTestApp/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 3.12.9 + 3.13.0 CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/StoreKitTests/Info.plist b/StoreKitTests/Info.plist index 89038e346f..0fb2a3db97 100644 --- a/StoreKitTests/Info.plist +++ b/StoreKitTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 3.12.9 + 3.13.0 CFBundleVersion 1 From bf2bcd931bacf6b5656cf7ae797989d5d549a4f9 Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Fri, 5 Nov 2021 17:09:11 -0300 Subject: [PATCH 08/20] bump fastlane --- Gemfile.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 57aec2fca5..58b5f8acbc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,17 +16,17 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.516.0) - aws-sdk-core (3.121.1) + aws-partitions (1.525.0) + aws-sdk-core (3.122.0) aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) + aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.49.0) - aws-sdk-core (~> 3, >= 3.120.0) + aws-sdk-kms (1.51.0) + aws-sdk-core (~> 3, >= 3.122.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.103.0) - aws-sdk-core (~> 3, >= 3.120.0) + aws-sdk-s3 (1.105.1) + aws-sdk-core (~> 3, >= 3.122.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) aws-sigv4 (1.4.0) @@ -85,7 +85,7 @@ GEM escape (0.0.4) ethon (0.12.0) ffi (>= 1.3.0) - excon (0.87.0) + excon (0.88.0) faraday (1.8.0) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -111,7 +111,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.5) - fastlane (2.196.0) + fastlane (2.197.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -155,7 +155,7 @@ GEM fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.12.0) + google-apis-androidpublisher_v3 (0.13.0) google-apis-core (>= 0.4, < 2.a) google-apis-core (0.4.1) addressable (~> 2.5, >= 2.5.1) @@ -166,11 +166,11 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-iamcredentials_v1 (0.7.0) + google-apis-iamcredentials_v1 (0.8.0) google-apis-core (>= 0.4, < 2.a) - google-apis-playcustomapp_v1 (0.5.0) + google-apis-playcustomapp_v1 (0.6.0) google-apis-core (>= 0.4, < 2.a) - google-apis-storage_v1 (0.8.0) + google-apis-storage_v1 (0.9.0) google-apis-core (>= 0.4, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) @@ -186,7 +186,7 @@ GEM google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.0.0) + googleauth (1.1.0) faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) memoist (~> 0.16) @@ -209,7 +209,7 @@ GEM sqlite3 (~> 1.3) xcinvoke (~> 0.3.0) jmespath (1.4.0) - json (2.6.0) + json (2.6.1) jwt (2.3.0) liferaft (0.0.6) memoist (0.16.2) From 9c2c8cac972cb283027f4ff85a52bf11e744ee23 Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Fri, 5 Nov 2021 18:08:15 -0300 Subject: [PATCH 09/20] improved changelog --- CHANGELOG.latest.md | 2 +- CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.latest.md b/CHANGELOG.latest.md index 5b08be13fa..43382f59a4 100644 --- a/CHANGELOG.latest.md +++ b/CHANGELOG.latest.md @@ -1,2 +1,2 @@ -- Added new method, `setAirshipChannelID`, which allows developers to set their Airship channel ID for RevenueCat integration. +- Added support for Airship integration via `setAirshipChannelID` https://github.com/RevenueCat/purchases-ios/pull/933 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d37bc3ed7..b119af50b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## 3.13.0 -- Added new method, `setAirshipChannelID`, which allows developers to set their Airship channel ID for RevenueCat integration. +- Added support for Airship integration via `setAirshipChannelID` https://github.com/RevenueCat/purchases-ios/pull/933 ## 3.12.8 From c324f3fb42711a19803ec46e0174eabf5ac5c6c6 Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Fri, 5 Nov 2021 18:26:10 -0300 Subject: [PATCH 10/20] updated docstring to indicate that empty strings will delete the subscriber attribute --- Purchases/Public/RCPurchases.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Purchases/Public/RCPurchases.h b/Purchases/Public/RCPurchases.h index 6a255defff..b4714036fb 100644 --- a/Purchases/Public/RCPurchases.h +++ b/Purchases/Public/RCPurchases.h @@ -478,7 +478,7 @@ NS_SWIFT_NAME(syncPurchases(_:)); /** * Subscriber attribute associated with the push token for the user * - * @param pushToken nil will delete the subscriber attribute. + * @param pushToken Empty String or nil will delete the subscriber attribute. */ - (void)setPushToken:(nullable NSData *)pushToken; @@ -533,42 +533,42 @@ NS_SWIFT_NAME(syncPurchases(_:)); /** * Subscriber attribute associated with the install media source for the user * - * @param mediaSource nil will delete the subscriber attribute. + * @param mediaSource Empty String or nil will delete the subscriber attribute. */ - (void)setMediaSource:(nullable NSString *)mediaSource; /** * Subscriber attribute associated with the install campaign for the user * - * @param campaign nil will delete the subscriber attribute. + * @param campaign Empty String or nil will delete the subscriber attribute. */ - (void)setCampaign:(nullable NSString *)campaign; /** * Subscriber attribute associated with the install ad group for the user * - * @param adGroup nil will delete the subscriber attribute. + * @param adGroup Empty String or nil will delete the subscriber attribute. */ - (void)setAdGroup:(nullable NSString *)adGroup; /** * Subscriber attribute associated with the install ad for the user * - * @param ad nil will delete the subscriber attribute. + * @param ad Empty String or nil will delete the subscriber attribute. */ - (void)setAd:(nullable NSString *)ad; /** * Subscriber attribute associated with the install keyword for the user * - * @param keyword nil will delete the subscriber attribute. + * @param keyword Empty String or nil will delete the subscriber attribute. */ - (void)setKeyword:(nullable NSString *)keyword; /** * Subscriber attribute associated with the install ad creative for the user * - * @param creative nil will delete the subscriber attribute. + * @param creative Empty String or nil will delete the subscriber attribute. */ - (void)setCreative:(nullable NSString *)creative; From 01337ed70f231c6c337d52fb57353c6e7da6374d Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Fri, 5 Nov 2021 18:35:54 -0300 Subject: [PATCH 11/20] fixed copy/pasta issues + missing docstring updates --- Purchases/Public/RCPurchases.h | 12 ++++++------ .../SusbcriberAttributesManagerTests.swift | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Purchases/Public/RCPurchases.h b/Purchases/Public/RCPurchases.h index b4714036fb..54c1ffb166 100644 --- a/Purchases/Public/RCPurchases.h +++ b/Purchases/Public/RCPurchases.h @@ -486,7 +486,7 @@ NS_SWIFT_NAME(syncPurchases(_:)); * Subscriber attribute associated with the Adjust Id for the user * Required for the RevenueCat Adjust integration * - * @param adjustID nil will delete the subscriber attribute + * @param adjustID Empty String or nil will delete the subscriber attribute. */ - (void)setAdjustID:(nullable NSString *)adjustID; @@ -494,7 +494,7 @@ NS_SWIFT_NAME(syncPurchases(_:)); * Subscriber attribute associated with the Appsflyer Id for the user * Required for the RevenueCat Appsflyer integration * - * @param appsflyerID nil will delete the subscriber attribute + * @param appsflyerID Empty String or nil will delete the subscriber attribute. */ - (void)setAppsflyerID:(nullable NSString *)appsflyerID; @@ -502,7 +502,7 @@ NS_SWIFT_NAME(syncPurchases(_:)); * Subscriber attribute associated with the Facebook SDK Anonymous Id for the user * Recommended for the RevenueCat Facebook integration * - * @param fbAnonymousID nil will delete the subscriber attribute + * @param fbAnonymousID Empty String or nil will delete the subscriber attribute. */ - (void)setFBAnonymousID:(nullable NSString *)fbAnonymousID; @@ -510,7 +510,7 @@ NS_SWIFT_NAME(syncPurchases(_:)); * Subscriber attribute associated with the mParticle Id for the user * Recommended for the RevenueCat mParticle integration * - * @param mparticleID nil will delete the subscriber attribute + * @param mparticleID Empty String or nil will delete the subscriber attribute. */ - (void)setMparticleID:(nullable NSString *)mparticleID; @@ -518,7 +518,7 @@ NS_SWIFT_NAME(syncPurchases(_:)); * Subscriber attribute associated with the OneSignal Player ID for the user * Required for the RevenueCat OneSignal integration * - * @param onesignalID nil will delete the subscriber attribute + * @param onesignalID Empty String or nil will delete the subscriber attribute. */ - (void)setOnesignalID:(nullable NSString *)onesignalID; @@ -526,7 +526,7 @@ NS_SWIFT_NAME(syncPurchases(_:)); * Subscriber attribute associated with the Airship Channel ID for the user * Required for the RevenueCat Airship integration * - * @param airshipChannelID nil will delete the subscriber attribute + * @param airshipChannelID Empty String or nil will delete the subscriber attribute. */ - (void)setAirshipChannelID:(nullable NSString *)airshipChannelID; diff --git a/PurchasesTests/SubscriberAttributes/SusbcriberAttributesManagerTests.swift b/PurchasesTests/SubscriberAttributes/SusbcriberAttributesManagerTests.swift index 57c70e241e..310866699f 100644 --- a/PurchasesTests/SubscriberAttributes/SusbcriberAttributesManagerTests.swift +++ b/PurchasesTests/SubscriberAttributes/SusbcriberAttributesManagerTests.swift @@ -939,7 +939,7 @@ class SubscriberAttributesManagerTests: XCTestCase { } // endregion - // region OnesignalID + // region AirshipChannelID func testSetAirshipChannelID() throws { let airshipChannelID = "airshipChannelID" From 8d94d26f24d306dacb67cdefce9c30e24bdb581d Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Fri, 5 Nov 2021 18:55:23 -0300 Subject: [PATCH 12/20] test updating xcode version for cocoapods integration --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 86e45316f9..951493e349 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -234,7 +234,7 @@ jobs: integration-tests-cocoapods: macos: - xcode: "12.5.1" + xcode: "13.0.0" working_directory: ~/purchases-ios/ shell: /bin/bash --login -o pipefail steps: From 3e9a6498407a2b2dce779354399aeb0574bf732c Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Mon, 8 Nov 2021 10:49:22 -0300 Subject: [PATCH 13/20] test adding step to update cert manually --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 951493e349..bb086a54e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,6 +63,8 @@ commands: - store_artifacts: path: fastlane/test_output/report.html destination: test_report.html + - run: curl https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer -o AppleWWDRCAG3.cer + - run: sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain AppleWWDRCAG3.cer - run: name: Archive working_directory: << parameters.directory >> From b146f9b44dd1237487f461c8e7cc033b3ef72063 Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Mon, 8 Nov 2021 10:59:59 -0300 Subject: [PATCH 14/20] removed carthage cache step, since it wasn't working --- .circleci/config.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bb086a54e5..8dcae80d10 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -276,10 +276,6 @@ jobs: - checkout - trust-github-key - update-carthage-integration-commit - # Carthage - - restore_cache: - keys: - - carthage-cache-{{ checksum "Cartfile.resolved" }} - run: name: Carthage Update working_directory: IntegrationTests/CarthageIntegration/ @@ -289,11 +285,7 @@ jobs: ./carthage.sh update --no-build rm -rf Carthage/Checkouts/purchases-root/IntegrationTests/ ./carthage.sh build - - save_cache: - key: carthage-cache-{{ checksum "Cartfile.resolved" }} - paths: - - Carthage - + - install-dependencies-scan-and-archive: directory: IntegrationTests/CarthageIntegration/ From d0fecfc45b1fa9a0ebdda0be938fde8d0dbb4ebb Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Mon, 8 Nov 2021 11:01:00 -0300 Subject: [PATCH 15/20] Revert "test adding step to update cert manually" This reverts commit 41c890ef062985aae77793c55fd8bfd38a3b67b4. --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8dcae80d10..74ef68d4e0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,8 +63,6 @@ commands: - store_artifacts: path: fastlane/test_output/report.html destination: test_report.html - - run: curl https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer -o AppleWWDRCAG3.cer - - run: sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain AppleWWDRCAG3.cer - run: name: Archive working_directory: << parameters.directory >> From 8dbe6ca66e62513a642a621c526cf75c6e44f2b1 Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Mon, 8 Nov 2021 11:43:13 -0300 Subject: [PATCH 16/20] reverted to xcode 12.5.1, unified config of cocoapods integration tests with the others --- .circleci/config.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 74ef68d4e0..686d1e3433 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -234,23 +234,20 @@ jobs: integration-tests-cocoapods: macos: - xcode: "13.0.0" + xcode: "12.5.1" working_directory: ~/purchases-ios/ shell: /bin/bash --login -o pipefail steps: - checkout - install-dependencies - - install-dependencies: - directory: IntegrationTests/CocoapodsIntegration - - run: name: Install Pods working_directory: IntegrationTests/CocoapodsIntegration/ command: | pod install - - scan-and-archive: + - install-dependencies-scan-and-archive: directory: IntegrationTests/CocoapodsIntegration integration-tests-swift-package-manager: From f3e74af5436efb67dae8edc95cb51346a005afa6 Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Mon, 8 Nov 2021 11:52:35 -0300 Subject: [PATCH 17/20] updated fastlane in cocoapods integration --- .../CocoapodsIntegration/Gemfile.lock | 162 +++++++++++------- 1 file changed, 98 insertions(+), 64 deletions(-) diff --git a/IntegrationTests/CocoapodsIntegration/Gemfile.lock b/IntegrationTests/CocoapodsIntegration/Gemfile.lock index 7b21c162c9..aa7e736944 100644 --- a/IntegrationTests/CocoapodsIntegration/Gemfile.lock +++ b/IntegrationTests/CocoapodsIntegration/Gemfile.lock @@ -1,58 +1,76 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.2) + CFPropertyList (3.0.4) + rexml addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) + artifactory (3.0.15) atomos (0.1.3) - aws-eventstream (1.1.0) - aws-partitions (1.387.0) - aws-sdk-core (3.109.1) + aws-eventstream (1.2.0) + aws-partitions (1.525.0) + aws-sdk-core (3.122.0) aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) + aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.39.0) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-kms (1.51.0) + aws-sdk-core (~> 3, >= 3.122.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.83.1) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-s3 (1.105.1) + aws-sdk-core (~> 3, >= 3.122.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.2) + aws-sigv4 (~> 1.4) + aws-sigv4 (1.4.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.0.3) colored (1.2) colored2 (3.1.2) - commander-fastlane (4.4.6) - highline (~> 1.7.2) + commander (4.6.0) + highline (~> 2.0.0) declarative (0.0.20) - declarative-option (0.1.0) - digest-crc (0.6.1) - rake (~> 13.0) + digest-crc (0.6.4) + rake (>= 12.0.0, < 14.0.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) - emoji_regex (3.0.0) - excon (0.78.0) - faraday (1.1.0) + emoji_regex (3.2.3) + excon (0.88.0) + faraday (1.8.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) multipart-post (>= 1.2, < 3) - ruby2_keywords + ruby2_keywords (>= 0.0.4) faraday-cookie_jar (0.0.7) faraday (>= 0.8.0) http-cookie (~> 1.0.0) - faraday_middleware (1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday_middleware (1.2.0) faraday (~> 1.0) - fastimage (2.2.0) - fastlane (2.165.0) + fastimage (2.2.5) + fastlane (2.197.0) CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.3, < 3.0.0) + addressable (>= 2.8, < 3.0.0) + artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) colored - commander-fastlane (>= 4.4.6, < 5.0.0) + commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) excon (>= 0.71.0, < 1.0.0) @@ -61,18 +79,20 @@ GEM faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) - google-api-client (>= 0.37.0, < 0.39.0) - google-cloud-storage (>= 1.15.0, < 2.0.0) - highline (>= 1.7.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-storage (~> 1.31) + highline (~> 2.0) json (< 3.0.0) jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) multipart-post (~> 2.0.0) + naturally (~> 2.2) + optparse (~> 0.1.1) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.3) simctl (~> 1.6.3) - slack-notifier (>= 2.0.0, < 3.0.0) terminal-notifier (>= 2.0.0, < 3.0.0) terminal-table (>= 1.4.5, < 2.0.0) tty-screen (>= 0.6.3, < 1.0.0) @@ -82,73 +102,85 @@ GEM xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) gh_inspector (1.1.3) - google-api-client (0.38.0) + google-apis-androidpublisher_v3 (0.13.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-core (0.4.1) addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.9) - httpclient (>= 2.8.1, < 3.0) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) mini_mime (~> 1.0) representable (~> 3.0) - retriable (>= 2.0, < 4.0) - signet (~> 0.12) - google-cloud-core (1.5.0) + retriable (>= 2.0, < 4.a) + rexml + webrick + google-apis-iamcredentials_v1 (0.8.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-playcustomapp_v1 (0.6.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-storage_v1 (0.9.0) + google-apis-core (>= 0.4, < 2.a) + google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) - google-cloud-env (1.4.0) + google-cloud-env (1.5.0) faraday (>= 0.17.3, < 2.0) - google-cloud-errors (1.0.1) - google-cloud-storage (1.29.1) + google-cloud-errors (1.2.0) + google-cloud-storage (1.34.1) addressable (~> 2.5) digest-crc (~> 0.4) - google-api-client (~> 0.33) - google-cloud-core (~> 1.2) - googleauth (~> 0.9) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.1) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (0.14.0) + googleauth (1.1.0) faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) - signet (~> 0.14) - highline (1.7.10) - http-cookie (1.0.3) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.4) domain_name (~> 0.5) httpclient (2.8.3) jmespath (1.4.0) - json (2.3.1) - jwt (2.2.2) + json (2.6.1) + jwt (2.3.0) memoist (0.16.2) - mini_magick (4.10.1) - mini_mime (1.0.2) + mini_magick (4.11.0) + mini_mime (1.1.2) multi_json (1.15.0) multipart-post (2.0.0) nanaimo (0.3.0) - naturally (2.2.0) - os (1.1.1) - plist (3.5.0) + naturally (2.2.1) + optparse (0.1.1) + os (1.1.4) + plist (3.6.0) public_suffix (4.0.6) - rake (13.0.1) - representable (3.0.4) + rake (13.0.6) + representable (3.1.1) declarative (< 0.1.0) - declarative-option (< 0.2.0) + trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) + rexml (3.2.5) rouge (2.0.7) - ruby2_keywords (0.0.2) - rubyzip (2.3.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) security (0.1.3) - signet (0.14.0) - addressable (~> 2.3) + signet (0.16.0) + addressable (~> 2.8) faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) simctl (1.6.8) CFPropertyList naturally - slack-notifier (2.3.2) terminal-notifier (2.0.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) + trailblazer-option (0.1.2) tty-cursor (0.7.1) tty-screen (0.8.1) tty-spinner (0.9.3) @@ -156,18 +188,20 @@ GEM uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.7.7) - unicode-display_width (1.7.0) + unf_ext (0.0.8) + unicode-display_width (1.8.0) + webrick (1.7.0) word_wrap (1.0.0) - xcodeproj (1.19.0) + xcodeproj (1.21.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) + rexml (~> 3.2.4) xcpretty (0.3.0) rouge (~> 2.0.7) - xcpretty-travis-formatter (1.0.0) + xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) PLATFORMS From a655761ac87095880c5f0f7dc17b279777986c08 Mon Sep 17 00:00:00 2001 From: Andy Boedo Date: Mon, 8 Nov 2021 11:53:48 -0300 Subject: [PATCH 18/20] added update_fastlane to before_all step --- fastlane/Fastfile | 1 + 1 file changed, 1 insertion(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 52b52d63b1..ae838c4fcc 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,6 +18,7 @@ default_platform(:ios) platform :ios do before_all do setup_circle_ci + update_fastlane end desc "Setup development environment" From b264c6b3cd4a28240751a3aa0d72d0a815574917 Mon Sep 17 00:00:00 2001 From: Joshua Liebowitz Date: Mon, 8 Nov 2021 11:13:41 -0800 Subject: [PATCH 19/20] Back out the iPhone Development vs Distribution change --- .../CocoapodsIntegration.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IntegrationTests/CocoapodsIntegration/CocoapodsIntegration.xcodeproj/project.pbxproj b/IntegrationTests/CocoapodsIntegration/CocoapodsIntegration.xcodeproj/project.pbxproj index 86d71f6aea..aeecfdb2ec 100644 --- a/IntegrationTests/CocoapodsIntegration/CocoapodsIntegration.xcodeproj/project.pbxproj +++ b/IntegrationTests/CocoapodsIntegration/CocoapodsIntegration.xcodeproj/project.pbxproj @@ -508,7 +508,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "iPhone Distribution"; + CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 8SXR2327BM; @@ -521,7 +521,7 @@ OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -DCOCOAPODS_INTEGRATION"; PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.CocoapodsIntegration; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.revenuecat.CocoapodsIntegration"; + PROVISIONING_PROFILE_SPECIFIER = "match Development com.revenuecat.CocoapodsIntegration"; SWIFT_OBJC_BRIDGING_HEADER = "CocoapodsIntegration/CocoapodsIntegration-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; From 0974f41f18c0166137065f3c492ba3a8ae6477ee Mon Sep 17 00:00:00 2001 From: Joshua Liebowitz Date: Mon, 8 Nov 2021 11:24:42 -0800 Subject: [PATCH 20/20] Update RCAttributionTypeFactory.h Add comments with links to the classes we are potentially calling. --- Purchases/Attribution/RCAttributionTypeFactory.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Purchases/Attribution/RCAttributionTypeFactory.h b/Purchases/Attribution/RCAttributionTypeFactory.h index 7359e8a098..551e714abf 100644 --- a/Purchases/Attribution/RCAttributionTypeFactory.h +++ b/Purchases/Attribution/RCAttributionTypeFactory.h @@ -17,6 +17,7 @@ typedef NS_ENUM(NSUInteger, FakeTrackingManagerAuthorizationStatus) { FakeTrackingManagerAuthorizationStatusAuthorized }; +// You can see the class here: https://rev.cat/fake-affiche-client @protocol FakeAfficheClient + (instancetype)sharedClient; @@ -24,13 +25,14 @@ typedef NS_ENUM(NSUInteger, FakeTrackingManagerAuthorizationStatus) { @end - +// You can see the class here: https://rev.cat/FakeASIdManager @protocol FakeASIdManager + (instancetype)sharedManager; @end +// You can see the class here: https://rev.cat/FakeFollowingManager @protocol FakeFollowingManager + (NSInteger)trackingAuthorizationStatus;