AppsFlyerSDK / AppsFlyerFramework

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

[Xcode 12][SwiftPM] App fails to build when linking to AppsFlyer 6.1.0 or fails to Export for AppsFlyer 6.1.2 #143

Closed Panajev closed 3 years ago

Panajev commented 3 years ago

Report

SDK Version

6.1.0 - 6.1.2 (former fails to codesign, latter fails to export)

What did you do?

Replaced the AppsFlyer CocoaPod pod with the SPM version

What did you expect to happen?

Application to compile successfully

What happened instead?

App fails to build when linking to AppsFlyer 6.1.0 code signing is invoked for it and fails

Please provide any other relevant information.

Hello, we understand the SPM version suggested for AppsFlyer is 6.0.8, but does it mean that it is SPM supported from that version onwards or just 6.0.8 and not 6.1.0? Can documentation be improved to reflect this?

alxrguz commented 3 years ago

Hello, it's been 2 months since the problem was discovered, is there any progress? Apps with AppsFlyer installed via SPM still cannot be uploaded to the AppStore

SergeyPetrachkov commented 3 years ago

Hello, it's been 2 months since the problem was discovered, is there any progress? Apps with AppsFlyer installed via SPM still cannot be uploaded to the AppStore

Hi! I managed to release my app yesterday with Appsflyer added as spm. See my comment above, try doing the same steps?

valerio-bettini commented 3 years ago

Hello, it's been 2 months since the problem was discovered, is there any progress? Apps with AppsFlyer installed via SPM still cannot be uploaded to the AppStore

Hi! I managed to release my app yesterday with Appsflyer added as spm. See my comment above, try doing the same steps?

Understand there might be a workaround, but we would really love a package who works out of the box, without fiddling with scripts or else; I guess it's fair?

SergeyPetrachkov commented 3 years ago

Hello, it's been 2 months since the problem was discovered, is there any progress? Apps with AppsFlyer installed via SPM still cannot be uploaded to the AppStore

Hi! I managed to release my app yesterday with Appsflyer added as spm. See my comment above, try doing the same steps?

Understand there might be a workaround, but we would really love a package who works out of the box, without fiddling with scripts or else; I guess it's fair?

Sure! I myself would be very glad to get rid of those scripts. But for now it seems to be the only way to proceed with the SPM approach.

alxrguz commented 3 years ago

Hello, it's been 2 months since the problem was discovered, is there any progress? Apps with AppsFlyer installed via SPM still cannot be uploaded to the AppStore

Hi! I managed to release my app yesterday with Appsflyer added as spm. See my comment above, try doing the same steps?

Thanks for the recommendation, I'll try tomorrow)

Kondamon commented 3 years ago

Export only works for me when I add this as a post-action build phase. (see above)

rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Frameworks/AppsFlyerLib.framework"
rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/PlugIns/AppsFlyerLib.framework"
EmDee commented 3 years ago

According to https://github.com/firebase/firebase-ios-sdk/issues/6472#issuecomment-772589092 the static framework issue has been fixed with Xcode 12.5.

gustavogervasio commented 3 years ago

I have been receiving the error: Screen Shot 2021-02-16 at 14 58 01

This just happen on Release and on iOS Simulator.

kravtsovguy commented 3 years ago

Solving the problem (before Xcode 12.5):

echo "Removing static frameworks from ${TARGET_NAME}.app"
find "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}.app/" -name '*.framework' -print0 | while IFS= read -r -d '' fm; do
    name=$(basename "${fm}" .framework)
    target="${fm}/${name}"
    echo "Checking: ${fm}"
    if file "${target}" | grep -q "current ar archive"; then
        rm -rf "${fm}"
        echo "Removed static framework: ${fm}"
    fi
done

P.S. This script remove all static libs for output app frameworks