From 9463c20c24b946f40f8c93039083da3aeadabcb8 Mon Sep 17 00:00:00 2001 From: Pallab Maiti Date: Mon, 11 Dec 2023 12:57:41 +0530 Subject: [PATCH] feat: suppprt for SPM --- Example/Podfile.lock | 20 +++---- .../project.pbxproj | 8 ++- Package.resolved | 52 +++++++++++++++++++ Package.swift | 35 +++++++++++++ Rudder-Appsflyer.podspec | 2 +- .../Classes/RudderAppsflyerFactory.h | 6 ++- .../Classes/RudderAppsflyerIntegration.h | 4 ++ 7 files changed, 113 insertions(+), 14 deletions(-) create mode 100644 Package.resolved create mode 100644 Package.swift diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 4f3d100..49b8cbb 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,10 +1,10 @@ PODS: - - AppsFlyerFramework (6.10.1): - - AppsFlyerFramework/Main (= 6.10.1) - - AppsFlyerFramework/Main (6.10.1) - - Rudder (1.13.0) - - Rudder-Appsflyer (2.2.0): - - AppsFlyerFramework (~> 6.10) + - AppsFlyerFramework (6.12.2): + - AppsFlyerFramework/Main (= 6.12.2) + - AppsFlyerFramework/Main (6.12.2) + - Rudder (1.17.0) + - Rudder-Appsflyer (2.3.0): + - AppsFlyerFramework (~> 6.12) - Rudder (~> 1.12) DEPENDENCIES: @@ -20,10 +20,10 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - AppsFlyerFramework: 88a6eed37ad52bcee4ad74232efa8e22809d06c9 - Rudder: 840bf4dfd9816ce6a82cb8870f1a2d4a44ed2652 - Rudder-Appsflyer: 94b945c1dff963d5e655719980453ccbb9c083eb + AppsFlyerFramework: 6eb4d89d2eb9a6632317f1055b359d9fd85fd5ff + Rudder: 3f4ab09638452282a22b96a388b54132dcd3fca8 + Rudder-Appsflyer: 6ade0a9c16233d79625b203abea32977fcc73d5c PODFILE CHECKSUM: 49c77f0049a9ff4b4e9202c3918c8ff06a57b815 -COCOAPODS: 1.12.0 +COCOAPODS: 1.14.2 diff --git a/Example/Rudder-Appsflyer.xcodeproj/project.pbxproj b/Example/Rudder-Appsflyer.xcodeproj/project.pbxproj index 507aa0f..dff7300 100644 --- a/Example/Rudder-Appsflyer.xcodeproj/project.pbxproj +++ b/Example/Rudder-Appsflyer.xcodeproj/project.pbxproj @@ -40,7 +40,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 4F6BF5867985B17F530A4FAB /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + 4F6BF5867985B17F530A4FAB /* LICENSE.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = LICENSE.md; path = ../LICENSE.md; sourceTree = ""; }; 5776857352FC3BAAA13BAE09 /* Pods-Rudder-Appsflyer_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-Appsflyer_Example.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-Appsflyer_Example/Pods-Rudder-Appsflyer_Example.debug.xcconfig"; sourceTree = ""; }; 5DEFB86FC76D20A863F9AD7A /* Rudder-Appsflyer.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "Rudder-Appsflyer.podspec"; path = "../Rudder-Appsflyer.podspec"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 6003F58A195388D20070C39A /* Rudder-Appsflyer_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Rudder-Appsflyer_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -195,7 +195,7 @@ children = ( 5DEFB86FC76D20A863F9AD7A /* Rudder-Appsflyer.podspec */, 723A1422FB77ECE447F73246 /* README.md */, - 4F6BF5867985B17F530A4FAB /* LICENSE */, + 4F6BF5867985B17F530A4FAB /* LICENSE.md */, ); name = "Podspec Metadata"; sourceTree = ""; @@ -496,6 +496,7 @@ baseConfigurationReference = 5776857352FC3BAAA13BAE09 /* Pods-Rudder-Appsflyer_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; @@ -506,6 +507,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 14.3; MODULE_NAME = ExampleApp; ONLY_ACTIVE_ARCH = YES; + OTHER_SWIFT_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = "com.rudderstack.ios.appsflyer.device-mode"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -521,6 +523,7 @@ baseConfigurationReference = 7D3FAC1D808B0A77C9789F94 /* Pods-Rudder-Appsflyer_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; @@ -531,6 +534,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 14.3; MODULE_NAME = ExampleApp; ONLY_ACTIVE_ARCH = NO; + OTHER_SWIFT_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = "com.rudderstack.ios.appsflyer.device-mode"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..8d91a16 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,52 @@ +{ + "object": { + "pins": [ + { + "package": "AppsFlyerLib", + "repositoryURL": "https://github.com/AppsFlyerSDK/AppsFlyerFramework", + "state": { + "branch": null, + "revision": "0d8359239a349db4ac2aba8efe2ad8835fc799b5", + "version": "6.12.2" + } + }, + { + "package": "RSCrashReporter", + "repositoryURL": "https://github.com/rudderlabs/crash-reporter-ios", + "state": { + "branch": null, + "revision": "f8fc2f043332033aa49aed21180f3742bf05b61d", + "version": "1.1.0" + } + }, + { + "package": "MetricsReporter", + "repositoryURL": "https://github.com/rudderlabs/metrics-reporter-ios", + "state": { + "branch": null, + "revision": "fae035db90a966f863f34442051d2be3f3605c5a", + "version": "1.2.0" + } + }, + { + "package": "RudderKit", + "repositoryURL": "https://github.com/rudderlabs/rudder-ios-kit", + "state": { + "branch": null, + "revision": "8a557a80cc1b0e0bc948c2b17fe0fd3809bcfd61", + "version": "1.4.0" + } + }, + { + "package": "Rudder", + "repositoryURL": "https://github.com/rudderlabs/rudder-sdk-ios", + "state": { + "branch": null, + "revision": "383a515d144c36a5e173147b26be721a5c9d39f3", + "version": "1.23.1" + } + } + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..c457a09 --- /dev/null +++ b/Package.swift @@ -0,0 +1,35 @@ +// swift-tools-version:5.3 + +import PackageDescription + +let package = Package( + name: "Rudder-Appsflyer", + platforms: [ + .iOS("13.0"), .tvOS("11.0") + ], + products: [ + .library( + name: "Rudder-Appsflyer", + targets: ["Rudder-Appsflyer"] + ) + ], + dependencies: [ + .package(name: "AppsFlyerLib", url: "https://github.com/AppsFlyerSDK/AppsFlyerFramework", "6.12.2"..<"6.12.3"), + .package(name: "Rudder",url: "https://github.com/rudderlabs/rudder-sdk-ios", from: "1.0.0"), + ], + targets: [ + .target( + name: "Rudder-Appsflyer", + dependencies: [ + .product(name: "AppsFlyerLib", package: "AppsFlyerLib"), + .product(name: "Rudder", package: "Rudder"), + ], + path: "Rudder-Appsflyer", + sources: ["Classes/"], + publicHeadersPath: "Classes/", + cSettings: [ + .headerSearchPath("Classes/") + ] + ) + ] +) diff --git a/Rudder-Appsflyer.podspec b/Rudder-Appsflyer.podspec index cba775f..b923edd 100644 --- a/Rudder-Appsflyer.podspec +++ b/Rudder-Appsflyer.podspec @@ -2,7 +2,7 @@ require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) -appsflyer_sdk_version = '~> 6.10' +appsflyer_sdk_version = '~> 6.12' rudder_sdk_version = '~> 1.12' Pod::Spec.new do |s| diff --git a/Rudder-Appsflyer/Classes/RudderAppsflyerFactory.h b/Rudder-Appsflyer/Classes/RudderAppsflyerFactory.h index 3cc3244..ac111a9 100644 --- a/Rudder-Appsflyer/Classes/RudderAppsflyerFactory.h +++ b/Rudder-Appsflyer/Classes/RudderAppsflyerFactory.h @@ -6,7 +6,11 @@ // #import -#import +#if defined(__has_include) && __has_include() +#import +#else +#import "Rudder.h" +#endif NS_ASSUME_NONNULL_BEGIN diff --git a/Rudder-Appsflyer/Classes/RudderAppsflyerIntegration.h b/Rudder-Appsflyer/Classes/RudderAppsflyerIntegration.h index de359e7..8dc0d1a 100644 --- a/Rudder-Appsflyer/Classes/RudderAppsflyerIntegration.h +++ b/Rudder-Appsflyer/Classes/RudderAppsflyerIntegration.h @@ -6,7 +6,11 @@ // #import +#if defined(__has_include) && __has_include() #import +#else +#import "Rudder.h" +#endif NS_ASSUME_NONNULL_BEGIN