Appboy / appboy-ios-sdk

Public repo for the Braze iOS SDK
https://www.braze.com
Other
165 stars 142 forks source link

Unable to integrate Braze on a Mac Catalyst app via SPM #282

Closed isisnaomi closed 3 years ago

isisnaomi commented 3 years ago

Report

Describe your environment.

Info Value
Platform Name e.g. macOS
Platform Version e.g. 11.0.1
SDK Version e.g. 3.34.0
Integration Method e.g. SPM
Xcode Version e.g. Xcode 12.2
Repro rate e.g. all the time (100%)

What did you do?

Integrate Braze through SMP with Mac Catalyst.

What did you expect to happen?

Braze SDK is integrated properly

What happened instead?

Got a code signing error when trying to run the app on Mac. (The SDK is working correctly on iOS)

/Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-maccatalyst/App.app: code object is not signed at all
In subcomponent: /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-maccatalyst/App.app/Contents/Frameworks/libAppboyKitLibrary.a
Command CodeSign failed with a nonzero exit code

Steps to reproduce

hokstuff commented 3 years ago

Hi @isisnaomi,

We have not been able to repro this error on our end. Can you double check a few things:

isisnaomi commented 3 years ago

Hi @hokstuff! We are still experiencing this issue. We have tried deleting derived data, cleaning the project and updating the packages without succeeding. Only our branch with the braze integration is facing the certificates issue. I am attaching a sample project with braze facing the same problem. We were able to make it work temporarily by changing the url of the package to the one mentioned in 3.34 change log and setting Other Code Signing Flags to --deep (which is not recommended by apple). BrazeTest.zip

hokstuff commented 3 years ago

@isisnaomi Thanks for the additional info! We're now able to see the same issue you were experiencing. We will investigate further for a long-term solution or recommendation, but for now the --deep flag should be sufficient to allow you to build. When we have more details, we'll update this thread 👍

smawpaw commented 3 years ago

Thanks @hokstuff

The deep flag does allow us to build, and continue our remaining integration tasks, but we do not want to ship with it in place. Looking forward to a proper fix here 🙏

hokstuff commented 3 years ago

Hi @isisnaomi @smawpaw,

Sorry for the delay on this thread! After investigation, it appears that the updates in Xcode 12.5 beta 3 (release notes here) have fixed the signing errors for Mac Catalyst when importing through SPM. I was able to build and run on my Mac without the --deep flag using the latest version 4.0.1. Can you try the Xcode beta and let me know if it solves the issue on your end?

Thank you!

hokstuff commented 3 years ago

Hi @isisnaomi @smawpaw,

Xcode 12.5 has been released today, and it looks to have fixed the issue when running on Mac Catalyst with our SDK integrated via SPM. Feel free to reopen if you are still experiencing problems - thank you!