Closed DavidShochet closed 2 years ago
But in MAUI projects, Bundle Resource is just not available in the list. And I found out that even if entered manually in the .proj file, it would not work. What is the right way to deal with it for iOS?
Add the references to the GoogleService-Info.plist
and google-services.json
to your .csproj
file like this:
...
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-android'">
<GoogleServicesJson Include="google-services.json" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-ios'">
<BundleResource Include="GoogleService-Info.plist" />
</ItemGroup>
...
Make sure the files are located in the root of your project. You can take a look at the .csproj file of the sample project for further details.
But our iOS and Android versions of the app have different bundle_id and package_name, and they cannot be changed. How should I deal with this?
In this case I believe you should remove the ApplicationId
tag from your .csproj
file and add the bundleId
directly into your iOS project's Info.plist
file and the android package name
into your AndroidManifest.xml
file.
Info.plist:
...
<key>CFBundleIdentifier</key>
<string>your.bundle.id</string>
...
AndroidManifest.xml:
...
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="your.package.name">
...
The 4) of Basic Setup section says:
But in MAUI projects, Bundle Resource is just not available in the list. And I found out that even if entered manually in the .proj file, it would not work. What is the right way to deal with it for iOS?
The ".NET MAUI support" section says,
But our iOS and Android versions of the app have different bundle_id and package_name, and they cannot be changed. How should I deal with this?