AppsFlyerSDK / AppsFlyerFramework

AppsFlyer Apple SDK
https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS
Other
163 stars 90 forks source link

SPM integration of version 6.11.1 fails #240

Open JoeSzymanskiFAN opened 1 year ago

JoeSzymanskiFAN commented 1 year ago

Report

SDK Version

4.11.1

What did you do?

Integration via Swift Package Manager and attempting to open the project.

What did you expect to happen?

The AppsFlyer package should correctly be downloaded and integrated via SPM.

What happened instead?

The SPM integration fails with the error

Downloaded archive of binary target 'AppsFlyerLib-Strict' does not contain expected binary artifact named 'AppsFlyerLib-Strict'downloaded archive of binary target 'AppsFlyerLib-Dynamic' does not contain expected binary artifact named 'AppsFlyerLib-Dynamic'2023-05-24 21:51:06.885 xcodebuild[57279:131783] Writing error result bundle to /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/ResultBundle_2023-24-05_21-51-0006.xcresult
fatalErrorxcodebuild: error: Could not resolve package dependencies:
  downloaded archive of binary target 'AppsFlyerLib-Strict' does not contain expected binary artifact named 'AppsFlyerLib-Strict'
  downloaded archive of binary target 'AppsFlyerLib-Dynamic' does not contain expected binary artifact named 'AppsFlyerLib-Dynamic'
  fatalError
[21:51:08]: Exit status: 74

Please provide any other relevant information.

Version 6.11.0 works as expected.

andr-ggn commented 1 year ago

Update Xcode to the latest version and clean SPM cache

JoeSzymanskiFAN commented 1 year ago

We currently cannot make use of Xcode 14.3 because of other build issues. Is Xcode 14.3 a requirement for version 6.11.1?

andr-ggn commented 1 year ago

We see some integration issues on older Xcode versions due to SPM bug there. Did you try to clean SPM cache?

JoeSzymanskiFAN commented 1 year ago

I just tested. With Xcode 14.2, I always get failures, even after clearing the SPM cache. With Xcode 14.3, it works as expected.

It looks like there is an implicit requirement for using Xcode 14.3 with the changes that were made in v6.11.1.

andr-ggn commented 1 year ago

https://github.com/AppsFlyerSDK/AppsFlyerFramework/blob/master/Package.swift I think Xcode 14.2 can't handle multiple targets inside Package.swift

JoeSzymanskiFAN commented 1 year ago

That is likely the issue. Perhaps there should be some documentation about the Xcode version requirements, since a hot fix release wasn't expected to include a breaking change like this.

joshuapoq commented 1 year ago

I'm running Xcode 14.3 and I can't get this to work. It seems like 6.11.1 has just broken everything? Can this be reverted or fixed in a subsequent hotfix?

There is no XCFramework found at '/Users/.../Library/Developer/Xcode/DerivedData/.../SourcePackages/checkouts/AppsFlyerFramework/AppsFlyerLib.xcframework'.
andr-ggn commented 1 year ago

@joshuapoq Try to reset SPM caches and clear DerivedData

julestburt commented 1 year ago

@joshuapoq Try to reset SPM caches and clear DerivedData

Nope nothing worked...derived data, clean, reset package etc...restart Xcode, Mac...nope. But going back to 6.10.0 worked!

joshuapoq commented 1 year ago

Glad that wasn't just me. Something must be wrong with our machines as CI and another developer can run the code fine so I just put this on pause for another day.

prokhorovxo commented 1 year ago

Same here. I'm using Xcode 12.4 and trying to install AppsFlyer 6.12.0.

bddq commented 12 months ago

Same here. I'm using Xcode 14.2 and trying to install AppsFlyer 6.12.0.

sshabelnik commented 12 months ago

Same here. I'm using Xcode 14.2 and trying to install AppsFlyer 6.12.0.

af-obodovskyi commented 12 months ago

@bddq @julestburt @joshuapoq @prokhorovxo @JoeSzymanskiFAN We have managed to fix the following issue and keep distributing AppsFlyerLib Static, Dynamic and Strict via SPM. In addition, from now on, the integration will take much less time and SPM will checkout in seconds. Please, use following URLs for SPM according to the AppsFlyerLib binary version, that you need:

The main repository package was updated as well and it will distribute Static framework v6.12.0 from the latest master branch version.