Skip to content
Merged
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
34 changes: 32 additions & 2 deletions .github/bash_scripts/podfile_creation.sh
Comment thread
morisgateno-appsflyer marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
echo "# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
echo "platform :ios, '12.0'

target 'segment-appsflyer-ios' do
# Comment the next line if you don't want to use dynamic frameworks
Expand All @@ -19,5 +18,36 @@ target 'SegmentAppsFlyeriOSTests' do
# Pods for SegmentAppsFlyeriOSTests
pod 'OCMock'

end

# Post-install hook to ensure Swift framework compatibility
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end

# Configure main project for Swift framework compatibility
installer.aggregate_targets.each do |aggregate_target|
aggregate_target.user_project.native_targets.each do |target|
target.build_configurations.each do |config|
if target.name == 'segment-appsflyer-ios'
# Make missing Swift compatibility libraries non-fatal
# These are backward compatibility shims removed in Xcode 16+
config.build_settings['OTHER_LDFLAGS'] ||= ['\$(inherited)']
# Use -weak-l prefix to make these libraries optional
config.build_settings['OTHER_LDFLAGS'] << '-Wl,-weak-lswiftCompatibility56'
config.build_settings['OTHER_LDFLAGS'] << '-Wl,-weak-lswiftCompatibilityConcurrency'
config.build_settings['OTHER_LDFLAGS'] << '-Wl,-weak-lswiftCompatibilityPacks'
# Suppress linker warnings
config.build_settings['OTHER_LDFLAGS'] << '-Wl,-w'
end
if target.name == 'SegmentAppsFlyeriOSTests'
config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES'
end
end
end
end
end" > Podfile

21 changes: 19 additions & 2 deletions .github/workflows/unit-tests-workflow.yml
Comment thread
morisgateno-appsflyer marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,27 @@ jobs:
- uses: actions/checkout@v2
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.4'
- name: create Podfile
run: bash .github/bash_scripts/podfile_creation.sh
- name: CocoaPod Install
run: pod install
- name: Detect Available iOS Simulator
id: detect-simulator
run: |
echo "Listing available iOS Simulators..."
xcrun simctl list devices available iOS

# Find the first available and booted/bootable iPhone simulator
SIMULATOR_ID=$(xcrun simctl list devices available iOS | grep -m 1 "iPhone" | grep -oE '\([A-Z0-9-]+\)' | tr -d '()')

if [ -n "$SIMULATOR_ID" ]; then
echo "Using simulator ID: $SIMULATOR_ID"
echo "destination=platform=iOS Simulator,id=$SIMULATOR_ID" >> $GITHUB_OUTPUT
else
# Fallback to generic iOS Simulator (uses default for the Xcode version)
echo "No specific iPhone found, using generic iOS Simulator"
echo "destination=generic/platform=iOS Simulator" >> $GITHUB_OUTPUT
fi
- name: Test
run: xcodebuild test -scheme segment-appsflyer-ios -workspace segment-appsflyer-ios.xcworkspace -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' | xcpretty && exit ${PIPESTATUS[0]}
run: xcodebuild test -scheme segment-appsflyer-ios -workspace segment-appsflyer-ios.xcworkspace -destination '${{ steps.detect-simulator.outputs.destination }}' | xcpretty && exit ${PIPESTATUS[0]}
4 changes: 2 additions & 2 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(name: "Segment", url: "https://github.com/segmentio/analytics-ios.git" , from: "4.0.0"),
.package(name: "AppsFlyerLib" , url: "https://github.com/AppsFlyerSDK/AppsFlyerFramework.git", .exact("6.17.7")),
.package(name: "AppsFlyerLib" , url: "https://github.com/AppsFlyerSDK/AppsFlyerFramework.git", .exact("6.17.8")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# AppsFlyer integration for Segment.

## This is a Segment wrapper for AppsFlyer SDK that is built with iOS SDK v6.17.7.
## This is a Segment wrapper for AppsFlyer SDK that is built with iOS SDK v6.17.8.

[![Version](https://img.shields.io/badge/cocoapods-compatible-brightgreen?logo=cocoapods&logoColor=green&style=flat)](http://cocoapods.org/pods/segment-appsflyer-ios)
[![Carthage compatible](https://img.shields.io/badge/Carthage-not_compatible-C20000.svg?style=flat)](https://github.com/Carthage/Carthage)
Expand Down Expand Up @@ -49,12 +49,12 @@ To install the segment-appsflyer-ios integration:

**Production** version:
```ruby
pod 'segment-appsflyer-ios', '6.17.7'
pod 'segment-appsflyer-ios', '6.17.8'
```

**Strict mode SDK** version:
```ruby
pod 'segment-appsflyer-ios/Strict', '6.17.7'
pod 'segment-appsflyer-ios/Strict', '6.17.8'
```
Use the strict mode SDK to completely remove IDFA collection functionality and AdSupport framework dependencies (for example, when developing apps for kids).

Expand Down
5 changes: 5 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 6.17.8
* Updated AppsFlyer iOS SDK to 6.17.8
* Refactored plugin version to use a single internal constant for improved maintainability
* Improved CI workflow with dynamic iOS simulator detection for enhanced compatibility

### 6.17.7
* Update to Appsflyer SDK 6.17.7.

Expand Down
2 changes: 1 addition & 1 deletion examples/ObjcPodsSample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ target 'ObjcPodsSample' do
use_frameworks!

# Pods for ObjcPodsSample
pod 'segment-appsflyer-ios','6.17.7'
pod 'segment-appsflyer-ios','6.17.8'
end
2 changes: 1 addition & 1 deletion examples/SwiftPodsSample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ target 'SwiftPodsSample' do
use_frameworks!

# Pods for SwiftPodsSample
pod 'segment-appsflyer-ios', '6.17.7'
pod 'segment-appsflyer-ios', '6.17.8'

end
4 changes: 2 additions & 2 deletions segment-appsflyer-ios.podspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version_appsflyerLib = '6.17.7'
version_plugin = '6.17.7'
version_appsflyerLib = '6.17.8'
version_plugin = '6.17.8'

Pod::Spec.new do |s|
s.name = "segment-appsflyer-ios"
Expand Down
7 changes: 4 additions & 3 deletions segment-appsflyer-ios/Classes/SEGAppsFlyerIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
#import "SEGAppsFlyerIntegration.h"
#import "SEGAppsFlyerIntegrationFactory.h"

@implementation SEGAppsFlyerIntegration
static NSString *const kSEGAFPluginVersion = @"6.17.8";

@implementation SEGAppsFlyerIntegration

- (instancetype)initWithSettings:(NSDictionary *)settings withAnalytics:(SEGAnalytics *)analytics {
if (self = [super init]) {
Expand All @@ -35,7 +36,7 @@ - (instancetype)initWithSettings:(NSDictionary *)settings withAnalytics:(SEGAnal

self.appsflyer = [self appsflyerLib];
[self.appsflyer setPluginInfoWith:AFSDKPluginSegment
pluginVersion:@"6.17.7"
pluginVersion:kSEGAFPluginVersion
additionalParams:nil];
[self.appsflyer setAppsFlyerDevKey:afDevKey];
[self.appsflyer setAppleAppID:appleAppId];
Expand Down Expand Up @@ -93,7 +94,7 @@ - (instancetype)initWithSettings:(NSDictionary *)settings withAppsflyer:(AppsFly
self.appsflyer = aAppsflyer;

[self.appsflyer setPluginInfoWith:AFSDKPluginSegment
pluginVersion:@"6.17.7"
pluginVersion:kSEGAFPluginVersion
additionalParams:nil];

NSString *afDevKey = [self.settings objectForKey:@"appsFlyerDevKey"];
Expand Down