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: Failed to run in Simulator using xcframework (missing info.plist) #137

Closed canius closed 3 years ago

canius commented 3 years ago

Report

SDK Version

5.3.0

What did you do?

use Mac Catalyst/AppsFlyerLib.xcframework in XCode 12 project

What did you expect to happen?

can be run in simulator

What happened instead?

cannot be running in simulator

Please provide any other relevant information.

same issue for reference: here image

cutmail commented 3 years ago

me too.

rromanchuk commented 3 years ago

lets gooo guys, standard spm install also getting this

andr-ggn commented 3 years ago

@rromanchuk Hello, can you try to reproduce an issue on empty project? Also which deployment target do you use? iOS 12?

conversun commented 3 years ago

me too, I revert to cocoapods

joshuapoq commented 3 years ago

Any update on this issue @af-fess? Firebase suffered the same thing but were able to promptly resolve with a hotfix. We have recently moved our platform to SPM and this is blocking our integration.

joshuapoq commented 3 years ago

Actually have a fix for this already; as it says just add a standard Info.plist into the frameworks within the xcframework - I just made up a bundle identifier for them but I can create a PR if you need (as we need it)?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleExecutable</key>
    <string>AppsFlyerLib</string>
    <key>CFBundleIdentifier</key>
    <string>com.appsflyer.appsflyerlib</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>AppsFlyerLib</string>
    <key>CFBundlePackageType</key>
    <string>FMWK</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>DTSDKName</key>
    <string>iphonesimulator11.2</string>
</dict>
</plist>

For SPM users who might be waiting for a fix you can create an Info.plist from the above and add it to your repo.

Edit your Scheme -> go to Build -> Post-actions and add a New run script action (the plus is easy to miss at the bottom of the screen).

Then add the following to that script box and make sure to select your target in the dropdown for Provide build settings to.

cp -n "${PROJECT_DIR}/{pathtoyourplist}/Info.plist" "${TARGET_BUILD_DIR}/${TARGET_NAME}.app/Frameworks/AppsFlyerLib.framework"
joshuapoq commented 3 years ago

Thanks for the quick update guys! 🤗 This looks to be resolved in 6.1.0!

af-fess commented 3 years ago

We added a plist: https://github.com/AppsFlyerSDK/AppsFlyerFramework/blob/master/MacCatalyst/AppsFlyerLib.xcframework/Info.plist