xamarin / GoogleApisForiOSComponents

MIT License
225 stars 156 forks source link

Xamarin.Firebase.iOS.Crashlytics 8.10.0.1 contains bitcode which is not supported anymore since Xcode 14 #578

Open janwiebe-jump opened 1 year ago

janwiebe-jump commented 1 year ago

I created a new .NET MAUI app, and added the Xamarin.Firebase.iOS.Crashlytics 8.10.0.1 It looks like the bitcode isn't stripped from the included frameworks.

When building the app, and trying to submit it to the Apple App Store, I got the following error e-mail:

App Store Connect

Dear Developer,

We identified one or more issues with a recent delivery for your app, "myApp" 0.7.0 (11). Please correct the following issues, then upload again.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/FBLPromises.framework/FBLPromises' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/FirebaseCore.framework/FirebaseCore' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/FirebaseCrashlytics.framework/FirebaseCrashlytics' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/FirebaseInstallations.framework/FirebaseInstallations' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/GoogleAPIClientForREST.framework/GoogleAPIClientForREST' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/GoogleUtilities.framework/GoogleUtilities' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/Protobuf.framework/Protobuf' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/leveldb.framework/leveldb' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/nanopb.framework/nanopb' contains bitcode.

I have tried to build with several options to strip the bitcode, however they don't work. Like:

<Target Name="BeforeCodesign">
        <Exec Command="$(_SdkDevPath)\Toolchains\XcodeDefault.xctoolchain\usr\bin\bitcode_strip %(_Frameworks.FullPath) -r -o %(_Frameworks.FullPath)" />
    </Target>

and

<MtouchEnableBitcode>false</MtouchEnableBitcode>

Both don't seem to work.

tom-b-iodigital commented 1 year ago

Same problem, any workaround?

MWierzchowiecki commented 1 year ago

I guess the first step is to wait for Google to release Firebase 10.1.0

https://github.com/firebase/firebase-ios-sdk/milestone/107?closed=1. Here you have a mention about bitcode removal

shun9292 commented 1 year ago

I also struggled for a week and solved it a few days ago, but now the only way is to downgrade. VS 2022 17.3.5 Xcode 13.3

I'm currently testing it on Testflight and I'm about to review it.

MWierzchowiecki commented 1 year ago

Temporary workaround is to rebuild the nuget packages according to readme (I bumped the version in components.cake and bumped net6 -> net7 but it might not apply to your needs), added them to local nuget and used the higher version number, now it works with Xcode 14 and passed TestFlight checks

vplife1 commented 8 months ago

I have tried above code lines but show the following error

The command "/Users/apple/Downloads/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip /Users/apple/.nuget/packages/harfbuzzsharp.nativeassets.ios/2.8.2.3/runtimes/ios/native/libHarfBuzzSharp.framework/libHarfBuzzSharp -r -o /Users/apple/.nuget/packages/harfbuzzsharp.nativeassets.ios/2.8.2.3/runtimes/ios/native/libHarfBuzzSharp.framework/libHarfBuzzSharp" exited with code 127. (MSB3073)

Please provide me a appropriate solution

vplife1 commented 8 months ago

@janwiebe-jump Have you found any solution to this issue? I am also facing same with .net maui 7.0 . @MWierzchowiecki @janwiebe-jump @shun9292 @tom-b-iodigital

MWierzchowiecki commented 8 months ago

@vplife1 what version of google apis are you using, also make sure you have bitcode disabled on build

vplife1 commented 8 months ago

@MWierzchowiecki I am using Visual Studio 22 to develop a .net Maui v(0.7) app. There is no setting to disable the bit-code do you have any idea what I need to do for this?

alexshikov commented 5 months ago

@vplife1 have you found the way to disable bitcode mentioned by @MWierzchowiecki ?