Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ Icon?
.tags*

/Flutter/Generated.xcconfig

# Swift Package Manager
.build/
.swiftpm/
Package.resolved
4 changes: 2 additions & 2 deletions ios/appsflyer_sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Pod::Spec.new do |s|
end

s.subspec 'Core' do |ss|
ss.source_files = 'Classes/**/*'
ss.public_header_files = 'Classes/**/*.h'
ss.source_files = 'appsflyer_sdk/Sources/appsflyer_sdk/**/*.{h,m}'
ss.public_header_files = 'appsflyer_sdk/Sources/appsflyer_sdk/include/**/*.h'
ss.dependency 'Flutter'
ss.ios.dependency 'AppsFlyerFramework','6.18.0'
end
Expand Down
41 changes: 41 additions & 0 deletions ios/appsflyer_sdk/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// 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")
],
products: [
.library(name: "appsflyer-sdk", targets: ["appsflyer_sdk"])
],
Comment thread
nurlangarash marked this conversation as resolved.
dependencies: [
// 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-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")
]
)
]
)