Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce package without bitcode #95

Closed
petermauger opened this issue Nov 18, 2022 · 24 comments
Closed

Produce package without bitcode #95

petermauger opened this issue Nov 18, 2022 · 24 comments

Comments

@petermauger
Copy link

If the Plugin.Firebase package is included in a dotnet MAUI project the iOS ipa package created includes Bitcode in the incorporated static framework. Apple rejects any ipa including bitcode when submitting to the App Store. I'm hoping the nuget package can be modified to produce non-bitcode iOS frameworks?

For reference, with dotnet 6.0 build tooling I could strip the bitcode but with dotnet 7.0 tooling the bitcode isn't removed and so I can't submit an app to the App Store that incorporates Firebase (using this plugin)

@petermauger
Copy link
Author

There are some workarounds described in this issue on the MAUI project site dotnet/maui#10989

@angelru
Copy link

angelru commented Nov 25, 2022

The same issue

@CristiSandu
Copy link

CristiSandu commented Nov 25, 2022

I tried the workaround, but after the release, the notifications are not received on IOS. 😭😭😭

@AlleSchonWeg
Copy link

The ios xamarin bindings for firebase (https://github.com/firebase/firebase-ios-sdk) are very old. Current firebase SDK version is 10.2.0. The bindings are still firebase 8.10.
Bitcode was removed from firebase sdk since version 10.1.0: firebase/firebase-ios-sdk#10372.

@TobiasBuchholz
Copy link
Owner

I've created a new version 1.2.3 of the plugin which contains the newest versions of the native firebase nuget packages. I'm not able to test if this fixes your problem, so please let me know or close this issue, thanks! :)

@nebula2
Copy link

nebula2 commented Dec 12, 2022

I've created a new version 1.2.3 of the plugin which contains the newest versions of the native firebase nuget packages. I'm not able to test if this fixes your problem, so please let me know or close this issue, thanks! :)

Sadly the issue still persists.

The executable 'com.testcorp.testapp/Frameworks/AppAuth.framework/AppAuth' contains bitcode.
The executable 'com.testcorp.testapp/Frameworks/FBAEMKit.framework/FBAEMKit' contains bitcode.
The executable 'com.testcorp.testapp/Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit' contains bitcode.
The executable 'com.testcorp.testapp/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics' contains bitcode.
The executable 'com.testcorp.testapp/Frameworks/FBSDKGamingServicesKit.framework/FBSDKGamingServicesKit' contains bitcode.
The executable 'com.testcorp.testapp/Frameworks/FBSDKLoginKit.framework/FBSDKLoginKit' contains bitcode.
The executable 'com.testcorp.testapp/Frameworks/FBSDKShareKit.framework/FBSDKShareKit' contains bitcode.
The executable 'com.testcorp.testapp/Frameworks/FacebookGamingServices.framework/FacebookGamingServices' contains bitcode.
The executable 'com.testcorp.testapp/Frameworks/GTMAppAuth.framework/GTMAppAuth' contains bitcode.

@TobiasBuchholz
Copy link
Owner

Arye you sure? All the frameworks you've listed seem to be related to Facebook and not to Firebase.

@nebula2
Copy link

nebula2 commented Dec 12, 2022

Arye you sure? All the frameworks you've listed seem to be related to Facebook and not to Firebase.

I can only imagine that they somehow come though this package. because prior to installing it, everything wen't through.
image

Only idea left is to play with the linker settings

@TobiasBuchholz
Copy link
Owner

Yes sorry, you are right! I forgot the facebook sdk is included because of the authentication feature Sign in with facebook. Unfortunately the plugin already uses the newest version of the facebook sdk which contains this problem. There is already an issue created in the xamarin facebook repository, but no response so far...I'm afraid you have to wait until that's fixed or you fork the plugin and exclude the facebook sdk.

@nebula2
Copy link

nebula2 commented Dec 12, 2022

Yes sorry, you are right! I forgot the facebook sdk is included because of the authentication feature Sign in with facebook. Unfortunately the plugin already uses the newest version of the facebook sdk which contains this problem. There is already an issue created in the xamarin facebook repository, but no response so far...I'm afraid you have to wait until that's fixed or you fork the plugin and exclude the facebook sdk.

thank you very much! I'll do that

@petermauger
Copy link
Author

I'm REASONABLY certain that I managed to correctly build a release package and deploy it to App Store without utilising the bitcode stripping workaround using package 1.2.3. @nebula2 is it possible you have other references to an older facebook sdk?

@nebula2
Copy link

nebula2 commented Dec 12, 2022

I'm REASONABLY certain that I managed to correctly build a release package and deploy it to App Store without utilising the bitcode stripping workaround using package 1.2.3. @nebula2 is it possible you have other references to an older facebook sdk?

at least not intentionally. do you use facebook auth? do you have linking enabled for your release build?

I am building a version of this package without the facebook stuff and see what happens.

@nebula2
Copy link

nebula2 commented Dec 13, 2022

I removed everything auth-related and it worked.
https://www.nuget.org/packages/Plugin.Firebase.Tmp/1.2.6

@HobDev
Copy link

HobDev commented Jan 17, 2023

@nebula2 I am using auth in the app and need to publish to TestFlight. I only need Auth for now. Is it possible to Link the Facebook SDK away from the ipa.

@nebula2
Copy link

nebula2 commented Jan 17, 2023

@nebula2 I am using auth in the app and need to publish to TestFlight. I only need Auth for now. Is it possible to Link the Facebook SDK away from the ipa.

I just cloned the code and removed everything but push notifications.

@HobDev
Copy link

HobDev commented Jan 18, 2023

It would be much easier for me and if it is possible to link the undesired features. This way I don't have to maintain a separate repo.

@Priyabaghelgithub
Copy link

Failed to create release build in iOS due to bitcode issue of Plugin.Firebase in .net MAUI having dotnet 7.

How to disable bitcode???

I am facing below issue for GoogleAppMeasurement in iOS when making release build :
C:\Users\abc.nuget\packages\xamarin.firebase.ios.core\8.10.0.3\buildTransitive\Xamarin.Firebase.iOS.Core.tar
gets(216,5): error MSB3073: The command ""$(xcrun -find bitcode_strip)" C:/Users/abc/AppData/Local/XamarinBui
ldDownloadCache/GAppM-8.9.1/GoogleAppMeasurement8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/Goog
leAppMeasurement.framework/GoogleAppMeasurement -r -o C:/Users/abc/AppData/Local/XamarinBuildDownloadCache/GA
ppM-8.9.1/GoogleAppMeasurement8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.f
ramework/GoogleAppMeasurement" exited with code 1 [D:\iOSNotification\iOSNotification\iOSNotification.csproj::TargetFr
amework=net7.0-ios]

I have tried the workaround #10989 but still facing below issue for Google Sign In :
D:\MauiFirebaseDemo-master\MauiFirebaseDemo\MauiFirebaseDemo.csproj(148,3): error MSB3073: The command ""$(xcrun -find
bitcode_strip)" C:/Users/abcd/AppData/Local/XamarinBuildDownloadCache/GSgnI-5.0.2/Frameworks/GoogleSignIn.fram
ework/GoogleSignIn -r -o C:/Users/abcd/AppData/Local/XamarinBuildDownloadCache/GSgnI-5.0.2/Frameworks/GoogleSi
gnIn.framework/GoogleSignIn" exited with code 1. [TargetFramework=net7.0-ios]

@TobiasBuchholz
Copy link
Owner

I'll create a new version of the plugin as suggested by vhugogarcia in #115 (comment) as soon as I find the time for it, maybe this will help solving this particular problem. Until then you can follow nebular2s advice: #95 (comment)

@Priyabaghelgithub
Copy link

It this work for dotnet 7 in .net maui?

@RsZoli
Copy link

RsZoli commented Feb 17, 2023

@Priyabaghelgithub yes, it does!
although i have some issues and i don't know if they are related to the package not officially supporting net7!

@arahmancsd
Copy link

I am having a similar issue and I packed a sample repo that ios release is rejected directly. Although I don't receive a rejection reason, the app is directly deleted from the App store TestFlight. with "Invalid Binary" reason. #148

I used the Tmp version, unfortunately, it doesn't have Auth.
Also using TrimMode=full does decrease the size considerably, but doesn't solve the problem.

@kirakosyan
Copy link

hi
I am using 1.3.0 version and just got rejection

image

@AlleSchonWeg
Copy link

AlleSchonWeg commented Mar 17, 2023

There are issues in xamarin.ios binding project about bitcode: https://github.com/xamarin/xamarin-macios/search?q=bitcode&type=issues ; xamarin/xamarin-macios#17152
Perhaps you find some useful infos.
In maui are also bitcode issues with responses from ms: dotnet/maui#10989 (comment)
I think this problem has nothing todo with this plugin.

@lunjio
Copy link

lunjio commented Apr 23, 2023

@TobiasBuchholz
Hi, I am using the latest version of plugin - 2.0.2 and have the same issue. I think as workaround may help linking, I will try and give you a feedback here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests