crisp-im / crisp-sdk-ios

:package: Crisp iOS SDK, add a chat in any iOS app and communicate with your users.
https://docs.crisp.chat/guides/chatbox-sdks/ios-sdk/
Other
44 stars 19 forks source link

MacCatalyst support broke #66

Closed ZComwiz closed 2 years ago

ZComwiz commented 2 years ago

When switching to xcframework style distro, it appears that MacCatalyst no longer works because MacCatalyst requires its own slices.

Here are some options to fix it: https://onesignal.com/blog/mac-catalyst-fat-framework/ and https://developer.apple.com/forums/thread/120542

ZComwiz commented 2 years ago

@nesium have you looked into this?

nesium commented 2 years ago

Hi @ZComwiz. Version 1.3.0 now contains a Mac Catalyst slice.

ZComwiz commented 2 years ago

@nesium not all heroes wear capes (but its chill if you do 🦸)

Thanks Marc!

ZComwiz commented 2 years ago

Hey @nesium, quick followup— have you tried building to Mac Catalyst? I am getting this error now:

Showing All Messages
Stripped /Users/user/Library/Developer/Xcode/DerivedData/MyApp-<someRandomStringPath>/Build/Products/Debug-maccatalyst/MyApp.app/Contents/Frameworks/Crisp.framework/Crisp of architectures: x86_64

Code Signing /Users/user/Library/Developer/Xcode/DerivedData/MyApp-<someRandomStringPath>/Build/Products/Debug-maccatalyst/MyApp.app/Contents/Frameworks/Crisp.framework with Identity Apple Development: My Developer Name (MyDeveloperId)

/usr/bin/codesign --force --sign <SomeHash>  --preserve-metadata=identifier,entitlements '/Users/user/Library/Developer/Xcode/DerivedData/MyApp-<someRandomStringPath>/Build/Products/Debug-maccatalyst/MyApp.app/Contents/Frameworks/Crisp.framework'

/Users/user/Library/Developer/Xcode/DerivedData/MyApp-<someRandomStringPath>/Build/Products/Debug-maccatalyst/MyApp.app/Contents/Frameworks/Crisp.framework: replacing existing signature

/Users/user/Library/Developer/Xcode/DerivedData/MyApp-<someRandomStringPath>/Build/Products/Debug-maccatalyst/MyApp.app/Contents/Frameworks/Crisp.framework: bundle format is ambiguous (could be app or framework)
nesium commented 2 years ago

HI @ZComwiz. I did, with a local build. Apparently when zipping the framework symlinks were resolved which trips up code signing. Furthermore when running on an M1 Mac and integrating the framework via Swift PM I did only see that as a warning. Could you please try again and see if version 1.3.1 fixes the issue?

ZComwiz commented 2 years ago

It is being included via cocoapods. Trying to test it now

ZComwiz commented 2 years ago

It works! Thanks @nesium!

nesium commented 2 years ago

Glad to hear that it works!