Snapchat / snap-kit-spm

https://kit.snapchat.com/
MIT License
9 stars 10 forks source link

bitcode_strip error when installling with SPM #10

Open jjjeeerrr222 opened 1 year ago

jjjeeerrr222 commented 1 year ago

/Users/J/Library/Developer/Xcode/DerivedData/Wy-cijstrmptjpvsefuifunplfthmwd/SourcePackages/checkouts/snap-kit-spm/SCSDKCoreKit.xcframework/ios-arm64/SCSDKCoreKit.framework bitcode_strip /Users/JSH/Library/Developer/Xcode/DerivedData/Wy-cijstrmptjpvsefuifunplfthmwd/SourcePackages/checkouts/snap-kit-spm/SCSDKCoreKit.xcframework/ios-arm64/SCSDKCoreKit.framework/SCSDKCoreKit: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip exited with 1

Making sdk unusable

SebMenozzi commented 1 year ago

Set the flag STRIP_BITCODE_FROM_COPIED_FILES and ENABLE_BITCODE to NO in your build settings and it will resolve the issue

nexig commented 1 year ago

Hi @SebMenozzi After adding this two flags I am getting:

MyApp.app/Frameworks/SCSDKCoreKit.framework: bundle format unrecognized, invalid, or unsuitable

It looks like sdk is unusable. Xcode 14.3

nexig commented 1 year ago

@driefler @mwestergaardsc Are you able to help ?

SebMenozzi commented 1 year ago

@nexig I personally never had your issue but maybe https://stackoverflow.com/a/38751921 will help?

wangchaodong commented 1 year ago

same issue here

wangchaodong commented 1 year ago

@nexig I personally never had your issue but maybe https://stackoverflow.com/a/38751921 will help?

that's not work for me

dennisgec commented 1 year ago

I ended up using 2.3.0 instead of 2.4.0 🤷‍♂️

MrRealBlack commented 11 months ago

I ended up using 2.3.0 instead of 2.4.0 🤷‍♂️

Thanks for helping. It was a huge one

dams229 commented 11 months ago

2.3.0 doesn't work on the simulator (crash at runtime). So we end up with a 2.3.0 not working on simulator or 2.4.0 not working on device...

kingmeers commented 11 months ago

2.3.0 doesn't work on the simulator (crash at runtime). So we end up with a 2.3.0 not working on simulator or 2.4.0 not working on device...

I tried doing this, but every time i run the app and install it on my real device, it starts to open, but then crashes with

libc++abi: terminating with uncaught exception of type NSException

Wondering if you have any more info on how you got this working? Just trying to post an image with text+link to snap stories.

kingmeers commented 11 months ago

I got this working by installing with Carthage, however 2.4.0 wouldn't work at all, there's an issue with sharing a photo to Snapchat, so I had to downgrade to 2.3.0. I don't think there's a way to easily do that on Carthage (that is, to specify a version) so I forked the repo and added only one version for SCSDKLoginKit & SCSDKCreativeKit; 2.3.0

You can see it here, or make your own fork.

This is my Cartfile that works fine.

binary "https://raw.githubusercontent.com/hero-page/snap-kit-carthage-max2.3.0/repo/SCSDKLoginKit.json"
binary "https://raw.githubusercontent.com/hero-page/snap-kit-carthage-max2.3.0/repo/SCSDKCreativeKit.json"

BTW, I'm also currently trying to resolve an issue whereby the attachmentUrl is not properly porting to snap from SCSDKSnapAPI, would love any help from a snap employee or someone with an answer, whichever comes first!