-
Notifications
You must be signed in to change notification settings - Fork 60
Description
I am using Plugin.Firebase.Firestore (3.1.3)
and Plugin.Firebase.Auth (3.1.3)
in a MAUI iOS dotnet 9. My target framework is only iOS. Here is the .csproj
.
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.110" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.5" />
<PackageReference Include="Plugin.Firebase.Auth" Version="3.1.1" />
<PackageReference Include="Plugin.Firebase.Firestore" Version="3.1.3" />
<BundleResource Include="Platforms/iOS/GoogleService-Info.plist" />
</ItemGroup>
I have this piece managing the setup
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
CrossFirebase.Initialize();
return base.FinishedLaunching(application, launchOptions);
}
DI Injection in MAUIProgram.cs
builder.Services.AddSingleton(_ => CrossFirebaseFirestore.Current);
builder.Services.AddSingleton(_ => CrossFirebaseAuth.Current);
I am getting this exception
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 1 Library missing
Library not loaded: @rpath/FirebaseInstallations.framework/FirebaseInstallations
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/0DC4CD3E-DBBF-473E-B79E-25E74DE7167A/data/Containers/Bundle/Application/58381B15-A4E2-4F6E-BB1D-398611C90916/wQuran.app/Frameworks/FirebaseSessions.framework/FirebaseSessions
Reason: tried: '/Library/Developer/CoreSimulator/Volumes/iOS_22G86/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.6.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/FirebaseInstallations.framework/FirebaseInstallations' (no such file), '/usr/lib/swift/FirebaseInstallations.framework/FirebaseInstallations' (no such file, not in dyld cache), '/Users/zuhal/Library/Developer/CoreSimulator/Devices/0DC4CD3E-DBBF-473E-B79E-25E74DE7167A/data/Containers/Bundle/Application/58381B15-A4E2-4F6E-BB1D-398611C90916/wQuran.app/Frameworks/FirebaseInstallations.framework/FirebaseInstallations' (no such file), '/Users/zuhal/Library/Developer/CoreSim
(terminated at launch; ignore backtrace)
UPDATE 1
After updating the .csproj to the following, I am getting new error
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.110" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.5" />
<PackageReference Include="Plugin.Firebase.Auth" Version="3.1.1" />
<PackageReference Include="Plugin.Firebase.Core" Version="3.1.1" />
<PackageReference Include="Plugin.Firebase.Firestore" Version="3.1.3" />
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
<PackageReference Include="AdamE.Firebase.iOS.Core" Version="12.3.0" />
<!-- <PackageReference Include="AdamE.Firebase.iOS.Core" Version="12.3.0" /> -->
<PackageReference Include="AdamE.Firebase.iOS.CloudFirestore" Version="12.3.0" />
<!-- <PackageReference Include="AdamE.Firebase.iOS.Installations" Version="12.3.0" /> -->
<!-- <PackageReference Include="AdamE.Google.iOS.GTMSessionFetcher" Version="4.3.0" /> -->
<BundleResource Include="GoogleService-Info.plist" />
</ItemGroup>
UPDATE 1 ERROR
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 4 Symbol missing
Symbol not found: __ZN5swift39swift51override_conformsToSwiftProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEN7__swift9__runtime4llvm9StringRefEPFPKNS_35TargetProtocolConformanceDescriptorIS1_EES4_S8_SC_E
Referenced from: <34FB96EE-3D0C-369D-B760-42649E711D02> /Users/USER/Library/Developer/CoreSimulator/Devices/0DC4CD3E-DBBF-473E-B79E-25E74DE7167A/data/Containers/Bundle/Application/65F5105A-C415-495D-857B-978313F6AE1E/wQuran.app/Frameworks/FirebaseFirestore.framework/FirebaseFirestore
Expected in: <551BE2DD-85C2-3BD8-A605-C36303CF5AE3> /Users/USER/Library/Developer/CoreSimulator/Devices/0DC4CD3E-DBBF-473E-B79E-25E74DE7167A/data/Containers/Bundle/Application/65F5105A-C415-495D-857B-978313F6AE1E/wQuran.app/Frameworks/FirebaseSharedSwift.framework/FirebaseSharedSwift
(terminated at launch; ignore backtrace)
UPDATE 2
I think it was a mismatch of packages. This link helped me #D
So the final .csproj is
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.110" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.5" />
<PackageReference Include="Plugin.Firebase.Auth" Version="3.1.1" />
<PackageReference Include="Plugin.Firebase.Core" Version="3.1.1" />
<PackageReference Include="Plugin.Firebase.Firestore" Version="3.1.1" />
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
<PackageReference Include="AdamE.Firebase.iOS.Core" Version="11.12" />
<PackageReference Include="AdamE.Firebase.iOS.CloudFirestore" Version="11.12" />
<PackageReference Include="AdamE.Firebase.iOS.Installations" Version="11.12" />
<PackageReference Include="AdamE.Google.iOS.GTMSessionFetcher" Version="4.3.0" />
<BundleResource Include="GoogleService-Info.plist" />
</ItemGroup>