AppsFlyerSDK / AppsFlyerFramework

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

Xcode 12 + SPM 'IPA Processing Failed' #142

Closed joshuapoq closed 3 years ago

joshuapoq commented 3 years ago

SDK Version

6.1.0

What did you do?

Note: We have a framework wrapping AppsFlyer and our SDK together. So we use AppsFlyerLib as a dependency of a dependency.

  1. Used SPM to add from: "6.0.8" with Xcode 12.
  2. Archived and went to distribute app (validate doesn't show the error).

What did you expect to happen?

Should be fine.

What happened instead?

Failed due to Xcode 12 issue with SPM where it embeds static frameworks when it shouldn't be doing this.

Workaround

This is the same issue as FirebaseAnalytics. Whilst I don't share the same view that this is wholly and Xcode issue, there is a workaround and I would advise watching the previously linked issue.

To fix this:

  1. Go to Edit Scheme...
  2. Expand Build
  3. Go to Post-actions
  4. Press the + in the bottom left corner
  5. Select your app from the dropdown for Provide build settings from
  6. Add the following code (the plugins removal is optional - only needed if you have extensions)
rm -rf "${TARGET_BUILD_DIR}/${TARGET_NAME}.app/Frameworks/AppsFlyerLib.framework"
rm -rf "${TARGET_BUILD_DIR}/${TARGET_NAME}.app/Plugins/AppsFlyerLib.framework"

Note: You can also give this script a nice name (by double tapping the name) but Xcode is a bit rubbish at editing it as the text goes invisible.

andr-ggn commented 3 years ago

https://github.com/AppsFlyerSDK/AppsFlyerFramework/issues/157