Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Versions

## Unreleased

- iOS: Add Swift Package Manager (SPM) support for the Core integration alongside CocoaPods. Resolves the "plugin does not support Swift Package Manager" warning under Flutter 3.44+. The optional PurchaseConnector subspec remains CocoaPods-only for now (blocked by flutter/flutter#161182). Relates to #364 / #370.

## 6.18.0

- Updated Android SDK from 6.17.6 to 6.18.0
Expand Down
2 changes: 2 additions & 0 deletions ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ Icon?

/Flutter/Generated.xcconfig

# Swift Package Manager
.build/
.swiftpm/
Package.resolved
2 changes: 1 addition & 1 deletion ios/appsflyer_sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Pod::Spec.new do |s|

s.subspec 'Core' do |ss|
ss.source_files = 'appsflyer_sdk/Sources/appsflyer_sdk/**/*.{h,m}'
ss.public_header_files = 'appsflyer_sdk/Sources/appsflyer_sdk/include/appsflyer_sdk/*.h'
ss.public_header_files = 'appsflyer_sdk/Sources/appsflyer_sdk/include/**/*.h'
ss.dependency 'Flutter'
ss.ios.dependency 'AppsFlyerFramework','6.18.1'
end
Expand Down
27 changes: 22 additions & 5 deletions ios/appsflyer_sdk/Package.swift
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
// swift-tools-version:5.9
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

// This manifest provides Swift Package Manager support for the AppsFlyer "Core"
// integration (the default subspec). The optional PurchaseConnector subspec is
// intentionally NOT included here — it remains CocoaPods-only for now because of
// the open Flutter limitation tracked in flutter/flutter#161182. Apps that use
// PurchaseConnector continue to opt in via the $AppsFlyerPurchaseConnector Podfile
// flag and CocoaPods; everyone else gets SPM support and loses the warning.

let package = Package(
name: "appsflyer_sdk",
platforms: [.iOS("12.0")],
platforms: [
.iOS(.v12)
],
products: [
.library(name: "appsflyer-sdk", targets: ["appsflyer_sdk"])
.library(name: "appsflyer_sdk", targets: ["appsflyer_sdk"])
],
dependencies: [
.package(url: "https://github.com/AppsFlyerSDK/AppsFlyerFramework.git", .exact("6.18.0"))
// Static variant matches the podspec's `static_framework = true`.
// Product "AppsFlyerLib-Static" wraps the binary target "AppsFlyerLib",
// so the existing `#import <AppsFlyerLib/AppsFlyerLib.h>` keeps resolving.
.package(url: "https://github.com/AppsFlyerSDK/AppsFlyerFramework-Static.git", exact: "6.18.0")
],
targets: [
.target(
name: "appsflyer_sdk",
dependencies: [
.product(name: "AppsFlyerLib", package: "AppsFlyerFramework")
.product(name: "AppsFlyerLib-Static", package: "AppsFlyerFramework-Static")
],
// Implementation (.m) files in Sources/appsflyer_sdk/, public headers (.h)
// in Sources/appsflyer_sdk/include/appsflyer_sdk/. The header search path
// lets the .m/.h files resolve their siblings by bare name.
cSettings: [
.headerSearchPath("include/appsflyer_sdk")
]
Expand Down