From 128df18e7bef111ad42707692ada4f12dddf7def Mon Sep 17 00:00:00 2001 From: Mohammed Mustafa Date: Mon, 29 Sep 2025 16:03:44 -0700 Subject: [PATCH 1/2] feat: Add no location target to Iterable kit --- Package.swift | 42 ++++++++++++++++++++++++++--------- mParticle-Iterable.podspec | 27 ++++++++++++++++++++-- mParticle-iterable-NoLocation | 1 + 3 files changed, 58 insertions(+), 12 deletions(-) create mode 120000 mParticle-iterable-NoLocation diff --git a/Package.swift b/Package.swift index cf78ae4..3686084 100644 --- a/Package.swift +++ b/Package.swift @@ -3,34 +3,56 @@ import PackageDescription +let noLocation = "-NoLocation" +let mpIterable = "mParticle-Iterable" +let mpIterableNoLocation = mpIterable + noLocation + +// MARK: - External Packages +let mpSDK = "mParticle-Apple-SDK" +let mpSDKNoLocation = mpSDK + noLocation +let iterableSDK = "IterableSDK" + let package = Package( - name: "mParticle-Iterable", + name: mpIterable, platforms: [ .iOS(.v11) ], products: [ .library( - name: "mParticle-Iterable", - targets: ["mParticle-Iterable"]), + name: mpIterable, + targets: [mpIterable]), ], dependencies: [ - .package(name: "mParticle-Apple-SDK", + .package(name: mpSDK, url: "https://github.com/mParticle/mparticle-apple-sdk", .upToNextMajor(from: "8.19.0")), - .package(name: "IterableSDK", + .package(name: iterableSDK, url: "https://github.com/Iterable/swift-sdk", .upToNextMajor(from: "6.5.2")), ], targets: [ .target( - name: "mParticle-Iterable", + name: mpIterable, dependencies: [ - .product(name: "mParticle-Apple-SDK", package: "mParticle-Apple-SDK"), - .product(name: "IterableSDK", package: "IterableSDK"), - .product(name: "IterableAppExtensions", package: "IterableSDK") + .product(name: mpSDK, package: mpSDK), + .product(name: iterableSDK, package: iterableSDK), + .product(name: "IterableAppExtensions", package: iterableSDK) ], - path: "mParticle-Iterable", + path: "mParticle-iterable", exclude: ["Info.plist"], resources: [.process("PrivacyInfo.xcprivacy")], publicHeadersPath: "." ), + .target( + name: mpIterableNoLocation, + dependencies: [ + .product(name: mpSDKNoLocation, package: mpSDK), + .product(name: iterableSDK, package: iterableSDK), + .product(name: "IterableAppExtensions", package: iterableSDK) + ], + path: "mParticle-iterable-NoLocation", + exclude: ["Info.plist"], + resources: [.process("PrivacyInfo.xcprivacy")], + publicHeadersPath: ".", + cSettings: [.define("MP_NO_LOCATION")] + ), ] ) diff --git a/mParticle-Iterable.podspec b/mParticle-Iterable.podspec index ed870d9..7bc28b6 100644 --- a/mParticle-Iterable.podspec +++ b/mParticle-Iterable.podspec @@ -12,8 +12,31 @@ Pod::Spec.new do |s| s.social_media_url = "https://twitter.com/mparticle" s.ios.deployment_target = "11.0" - s.ios.source_files = 'mParticle-Iterable/*.{h,m,mm}' s.ios.resource_bundles = { 'mParticle-Iterable-Privacy' => ['mParticle-Iterable/PrivacyInfo.xcprivacy'] } - s.ios.dependency 'mParticle-Apple-SDK/mParticle', '~> 8.19' s.ios.dependency 'Iterable-iOS-SDK', '~> 6.5' + + s.default_subspecs = "mParticleIterable" + + # ---- mParticleIterable ---- + s.subspec 'mParticleIterable' do |ss| + ss.source_files = [ + 'mParticle-iterable/**/*.{h,m,mm,swift}' + ] + + ss.dependency 'mParticle-Apple-SDK/mParticle', '~> 8.37' + end + + # ---- NoLocation ---- + s.subspec 'mParticleIterableNoLocation' do |ss| + ss.pod_target_xcconfig = { + 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) MP_NO_LOCATION=1', + 'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => '$(inherited) MP_NO_LOCATION' + } + + ss.source_files = [ + 'mParticle-iterable/**/*.{h,m,mm,swift}' + ] + + ss.dependency 'mParticle-Apple-SDK/mParticleNoLocation', '~> 8.37' + end end diff --git a/mParticle-iterable-NoLocation b/mParticle-iterable-NoLocation new file mode 120000 index 0000000..10eeded --- /dev/null +++ b/mParticle-iterable-NoLocation @@ -0,0 +1 @@ +mParticle-iterable \ No newline at end of file From 8857478fe6352c434aa4f9376b84f82dec54adf6 Mon Sep 17 00:00:00 2001 From: Mohammed Mustafa Date: Tue, 30 Sep 2025 10:59:58 -0700 Subject: [PATCH 2/2] add mPIterableNoLocation product --- Package.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 3686084..db31d0a 100644 --- a/Package.swift +++ b/Package.swift @@ -16,9 +16,8 @@ let package = Package( name: mpIterable, platforms: [ .iOS(.v11) ], products: [ - .library( - name: mpIterable, - targets: [mpIterable]), + .library(name: mpIterable, targets: [mpIterable]), + .library(name: mpIterableNoLocation, targets: [mpIterableNoLocation]) ], dependencies: [ .package(name: mpSDK,