xamarin / GoogleApisForiOSComponents

MIT License
225 stars 161 forks source link

How to disable bitcode strip for Google Sign In ? #596

Open mattleibow opened 1 year ago

mattleibow commented 1 year ago

Issue moved from dotnet/maui#12631


From @Priyabaghelgithub on Friday, January 13, 2023 10:07:31 AM

Description

I am 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]

Steps to Reproduce

Have disabled the bitcode for Core, GoogleAppMeasurement. It is working but facing bitcode issue for Google Sign In.

Link to public reproduction project repository

https://github.com/dotnet/maui/issues/10989

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS14

Did you find any workaround?

https://github.com/xamarin/GoogleApisForiOSComponents/pull/580/commits/6b54ab26a20970ac7b273a0222521909c46f675e#diff-8477ebd83c197a9396792fa47096265b0436ce0a88a66384adccf71179b80715

Relevant log output

No response

mattleibow commented 1 year ago

Issue moved from dotnet/maui#12631


From @mattleibow on Friday, January 13, 2023 3:13:12 PM

@SotoiGhost Does this look like something you can help with?

mattleibow commented 1 year ago

Issue moved from dotnet/maui#12631


From @mattleibow on Friday, January 13, 2023 3:34:38 PM

This issue was moved to xamarin/XamarinComponents#1420

mdima commented 1 year ago

Hello to all, I am facing the same issue, but maybe I found the solution.

In my case before the error reported above I received another error:

7>"$(xcrun -find bitcode_strip)" C:/Users/Michele DM/AppData/Local/XamarinBuildDownloadCache/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement -r -o C:/Users/Michele DM/AppData/Local/XamarinBuildDownloadCache/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement
7>D:\Nuget\xamarin.firebase.ios.core\8.10.0.3\buildTransitive\Xamarin.Firebase.iOS.Core.targets(216,5): error : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip: more than one input file specified (DM/AppData/Local/XamarinBuildDownloadCache/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement and C:/Users/Michele)

The last part C:/Users/Michele made me think that maybe the issue is related in a space char in my profile folder (C:/Users/Michele DM/), so what i did it:

Open the file D:\Nuget\xamarin.firebase.ios.core\8.10.0.3\buildTransitive\Xamarin.Firebase.iOS.Core.targets and wrapped the paths inside " entities. So the line 216-217 becomes:

    <Exec SessionId="$(BuildSessionId)"
          Command="&quot;%24(xcrun -find bitcode_strip)&quot; &quot;%(_FrameworksToStripBitcode.Identity)&quot; -r -o &quot;%(_FrameworksToStripBitcode.Identity)&quot;" />

In my case this change solved the issue.

SotoiGhost commented 1 year ago

@mdima Thanks for your reply! I was working on this issue this week and was not able to repro it. That's a good catch!

@Priyabaghelgithub can you confirm if your path includes a space somewhere?

mdima commented 1 year ago

@SotoiGhost very happy to contribute, to return a bit of what I get from Maui/Xamarin...

BrandonHilligenn commented 11 months ago

Hello to all, I am facing the same issue, but maybe I found the solution.

In my case before the error reported above I received another error:

7>"$(xcrun -find bitcode_strip)" C:/Users/Michele DM/AppData/Local/XamarinBuildDownloadCache/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement -r -o C:/Users/Michele DM/AppData/Local/XamarinBuildDownloadCache/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement
7>D:\Nuget\xamarin.firebase.ios.core\8.10.0.3\buildTransitive\Xamarin.Firebase.iOS.Core.targets(216,5): error : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip: more than one input file specified (DM/AppData/Local/XamarinBuildDownloadCache/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement and C:/Users/Michele)

The last part C:/Users/Michele made me think that maybe the issue is related in a space char in my profile folder (C:/Users/Michele DM/), so what i did it:

Open the file D:\Nuget\xamarin.firebase.ios.core\8.10.0.3\buildTransitive\Xamarin.Firebase.iOS.Core.targets and wrapped the paths inside " entities. So the line 216-217 becomes:

    <Exec SessionId="$(BuildSessionId)"
          Command="&quot;%24(xcrun -find bitcode_strip)&quot; &quot;%(_FrameworksToStripBitcode.Identity)&quot; -r -o &quot;%(_FrameworksToStripBitcode.Identity)&quot;" />

In my case this change solved the issue.

THANK YOU!! I have been struggling with this for DAYS now and this worked!

mdima commented 11 months ago

Hehe! You're welcome buddy. Actually I am wondering why this issue is still opened... :S

JamestsaiTW commented 9 months ago

Hello to all, I am facing the same issue, but maybe I found the solution.

In my case before the error reported above I received another error:

7>"$(xcrun -find bitcode_strip)" C:/Users/Michele DM/AppData/Local/XamarinBuildDownloadCache/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement -r -o C:/Users/Michele DM/AppData/Local/XamarinBuildDownloadCache/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement
7>D:\Nuget\xamarin.firebase.ios.core\8.10.0.3\buildTransitive\Xamarin.Firebase.iOS.Core.targets(216,5): error : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip: more than one input file specified (DM/AppData/Local/XamarinBuildDownloadCache/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement and C:/Users/Michele)

The last part C:/Users/Michele made me think that maybe the issue is related in a space char in my profile folder (C:/Users/Michele DM/), so what i did it:

Open the file D:\Nuget\xamarin.firebase.ios.core\8.10.0.3\buildTransitive\Xamarin.Firebase.iOS.Core.targets and wrapped the paths inside " entities. So the line 216-217 becomes:

    <Exec SessionId="$(BuildSessionId)"
          Command="&quot;%24(xcrun -find bitcode_strip)&quot; &quot;%(_FrameworksToStripBitcode.Identity)&quot; -r -o &quot;%(_FrameworksToStripBitcode.Identity)&quot;" />

In my case this change solved the issue.

Thanks in advance.