Closed jsorge closed 2 years ago
Hi @jsorge - thanks for opening up this issue. So, with the latest version of braintree_ios
(5.4.4), I am able to successfully archive given the above setup. Are you getting a rejection at the app store level? If so, can you share that error message?
I do see the structure you are explaining when inspecting via "Show Package Contents" on the Application
file. Can I ask, are you using any other braintree_ios
dependencies?
Also - please update to 5.4.4, as it provides a few small SPM optimizations.
Yes the error happens at the App Store submission level. When running our binary through the iTMS Transporter tool I get this error. It will build and run on device, but be rejected by the App Store.
@jsorge - Thanks for providing that. Is there a specific Xcode version this became an issue with - were you able to do this successfully in Xcode 12?
@scannillo I've only tried on 13. My suspicion is that this is may be more of an SPM thing than a Braintree thing but it's hard to say. I did attempt to write a script that moves the framework and cleans up in a post-build phase and while that built fine in our debug mode, it fell down in release mode with an SPM error.
I honestly don't know what the way around this is. Perhaps if PPRiskMagnes was made a target that I could link directly I might be able to futz with it after the build completes.
@jsorge My suspicion is that this is may be more of an SPM thing than a Braintree thing but it's hard to say.
I agree this is probably an SPM bug. But worth trying to investigate and get to the bottom of.
I see this StackOverflow issue outlines the same issue using Xcode 12.
A few ideas:
Do Not Embed
the issue goes away. Is this an option for you?Build Phases
tab for my sample App. I used rm -rf ${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/MyFramework.framework/Frameworks
. I was able to remove the nested PPRiskMagnes
binary, and was able to archive successfully.Can you try those options out and let me know?
Hi @jsorge - due to inactivity, I am going to close this issue as this is likely an XCode issue and these workarounds worked for me. Please comment or re-open if this becomes an issue again and we can help in any way.
Integration Details (please complete the following information):
Describe the bug When adding Braintree via SPM and using a product of the SDK such as PayPal or Venmo and linking those to a framework, the resulting archive will not pass App Store validation because it has embedded frameworks. Here's what's happening:
The embedded PPRiskMagnes framework inside of the Framework product which is not supported by the App Store. Attached is a sample project that can be built and observed with this behavior.
To Reproduce Steps to reproduce the behavior:
Frameworks/{Framework Name}.framework/Frameworks/PPRiskMagnes.framework
is populatedExpected behavior The
PPRiskMagnes
framework should be in the app'sFrameworks
directory.