Closed gataflow closed 1 month ago
@gataflow you may be missing to add the package reference: https://www.nuget.org/packages/AdamE.Firebase.iOS.Installations
I made it work on my personal project without issues. Please, take a look at this Analytics project, it may provide some help: https://github.com/vhugogarcia/Plugin.Firebase/blob/feature/packages-ios-upgrade/src/Analytics/Analytics.csproj
Please let us know if adding Installations solves this specific problem.
Hi @AdamEssenmacher ,Just a quick note to express my gratitude for your fantastic work on implementing Firebase support in MAUI.
However, I'm encountering a deployment issue. While simulator deployment works smoothly, deploying to a real device or trying a dot net publish hasn't been successful,after adding :
<PackageReference Include="AdamE.Firebase.iOS.Installations" Version="10.24.0" />
<PackageReference Include="AdamE.Firebase.iOS.Analytics" Version="10.24.0" />
Attached is a video and logs for reference. Any advice on next steps would be greatly appreciated.
Thanks again for your support!
Target _CopyResourcesToBundle:
Skipping target "_CopyResourcesToBundle" because all output files are up-to-date with respect to the input files.
Target _WriteAppManifest:
Skipping target "_WriteAppManifest" because all output files are up-to-date with respect to the input files.
Target _ExpandNativeReferences:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/tools/msbuild/iOS/Xamarin.Shared.targets(146,3): warning : The directory '/Users/victorsanchez/Library/Caches/XamarinBuildDownload/GAppM-10.24.0/GoogleAppMeasurement-10.24.0/Frameworks' does not exist.
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/tools/msbuild/iOS/Xamarin.Shared.targets(146,3): warning : The directory '/Users/victorsanchez/Library/Caches/XamarinBuildDownload/FAnlytcs-10.24.0/FirebaseAnalytics-10.24.0/Frameworks' does not exist.
Done building target "_ExpandNativeReferences" in project "testadame.csproj".
Target _CreateAOTDedupAssembly:
Skipping target "_CreateAOTDedupAssembly" because all output files are up-to-date with respect to the input files.
Target PrepareForILLink:
Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Target _RunILLink:
Skipping target "_RunILLink" because all output files are up-to-date with respect to the input files.
Target _InstallNameTool:
Skipping target "_InstallNameTool" because it has no outputs.
Target _CompileNativeExecutable:
Skipping target "_CompileNativeExecutable" because all output files are up-to-date with respect to the input files.
Target _LinkNativeExecutable:
Tool xcrun execution started with arguments: clang++ -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/FirebaseCore.xcframework/ios-arm64 -framework FirebaseCore -F /Users/victorsanchez/Projects/testadame/testadame -framework Foundation -F /Users/victorsanchez/Projects/testadame/testadame -framework UIKit -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/GTMSessionFetcher.xcframework/ios-arm64 -framework GTMSessionFetcher -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/GoogleDataTransport.xcframework/ios-arm64 -framework GoogleDataTransport -F /Users/victorsanchez/Projects/testadame/testadame -framework SystemConfiguration -F /Users/victorsanchez/Projects/testadame/testadame -framework CoreTelephony -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/FBLPromises.xcframework/ios-arm64 -framework FBLPromises -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/GoogleUtilities.xcframework/ios-arm64 -framework GoogleUtilities -F /Users/victorsanchez/Projects/testadame/testadame -framework Security -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/nanopb.xcframework/ios-arm64 -framework nanopb -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/leveldb.xcframework/ios-arm64 -framework leveldb -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/FirebaseAppCheckInterop.xcframework/ios-arm64 -framework FirebaseAppCheckInterop -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/FirebaseAuthInterop.xcframework/ios-arm64 -framework FirebaseAuthInterop -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/FirebaseCoreExtension.xcframework/ios-arm64 -framework FirebaseCoreExtension -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/FirebaseCoreInternal.xcframework/ios-arm64 -framework FirebaseCoreInternal -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/FirebaseMessagingInterop.xcframework/ios-arm64 -framework FirebaseMessagingInterop -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/FirebaseRemoteConfigInterop.xcframework/ios-arm64 -framework FirebaseRemoteConfigInterop -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/FirebaseSharedSwift.xcframework/ios-arm64 -framework FirebaseSharedSwift -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/Promises.xcframework/ios-arm64 -framework Promises -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.core/10.24.0/lib/net6.0-ios16.1/Firebase.Core.resources/FirebaseSessions.xcframework/ios-arm64 -framework FirebaseSessions -F /Users/victorsanchez/.nuget/packages/adame.firebase.ios.installations/10.24.0/lib/net6.0-ios16.1/Firebase.Installations.resources/FirebaseInstallations.xcframework/ios-arm64 -framework FirebaseInstallations -mios-version-min=11.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk -arch arm64 /Users/victorsanchez/Projects/testadame/testadame/obj/Debug/net8.0-ios/ios-arm64/nativelibraries/aot-output/arm64/System.Private.CoreLib.dll.o /usr/local/share/dotnet/packs/Microsoft.iOS.Runtime.ios-arm64/17.2.8022/runtimes/ios-arm64/native/libxamarin-dotnet-debug.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libSystem.Globalization.Native.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libSystem.IO.Compression.Native.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libSystem.Native.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libSystem.Net.Security.Native.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libSystem.Security.Cryptography.Native.Apple.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libicudata.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libicui18n.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libicuuc.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libmono-component-debugger-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libmono-component-diagnostics_tracing-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libmono-component-hot_reload-stub-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libmono-component-marshal-ilgen-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libmonosgen-2.0.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libmono-component-debugger-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libmono-component-diagnostics_tracing-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libmono-component-marshal-ilgen-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/8.0.2/runtimes/ios-arm64/native/libmono-component-hot_reload-stub-static.a -framework Accelerate -framework Accounts -framework AddressBook -framework AddressBookUI -framework AdSupport -framework ARKit -framework AssetsLibrary -framework AudioToolbox -framework AVFoundation -framework AVKit -framework CallKit -framework CFNetwork -framework CloudKit -framework Contacts -framework ContactsUI -framework CoreAudioKit -framework CoreBluetooth -framework CoreData -framework CoreFoundation -framework CoreGraphics -framework CoreImage -framework CoreLocation -framework CoreMedia -framework CoreMIDI -framework CoreML -framework CoreMotion -framework CoreSpotlight -framework CoreTelephony -framework CoreText -framework CoreVideo -framework DeviceCheck -framework EventKit -framework EventKitUI -framework ExternalAccessory -framework FileProvider -framework FileProviderUI -framework Foundation -framework GameController -framework GameKit -framework GameplayKit -framework GLKit -framework HealthKit -framework HealthKitUI -framework HomeKit -framework IdentityLookup -framework ImageIO -framework Intents -framework IntentsUI -framework IOSurface -framework JavaScriptCore -framework LocalAuthentication -framework MapKit -framework MediaAccessibility -framework MediaPlayer -framework MediaToolbox -framework Messages -framework MessageUI -framework Metal -framework MetalKit -framework MetalPerformanceShaders -framework MobileCoreServices -framework ModelIO -framework MultipeerConnectivity -framework NetworkExtension -framework NotificationCenter -framework OpenGLES -framework PassKit -framework PDFKit -framework Photos -framework PhotosUI -framework PushKit -framework QuartzCore -framework QuickLook -framework ReplayKit -framework SafariServices -framework SceneKit -framework Security -framework Social -framework Speech -framework SpriteKit -framework StoreKit -framework SystemConfiguration -framework Twitter -framework UIKit -framework UserNotifications -framework UserNotificationsUI -framework VideoSubscriberAccount -framework VideoToolbox -framework Vision -framework WatchConnectivity -framework WebKit -weak_framework Accessibility -weak_framework AdServices -weak_framework AppClip -weak_framework AppTrackingTransparency -weak_framework AuthenticationServices -weak_framework AutomaticAssessmentConfiguration -weak_framework AVRouting -weak_framework BackgroundAssets -weak_framework BackgroundTasks -weak_framework BusinessChat -weak_framework CarPlay -weak_framework Cinematic -weak_framework ClassKit -weak_framework CoreHaptics -weak_framework CoreLocationUI -weak_framework CoreNFC -weak_framework IdentityLookupUI -weak_framework LinkPresentation -weak_framework MediaSetup -weak_framework MetalFX -weak_framework MetalPerformanceShadersGraph -weak_framework MetricKit -weak_framework MLCompute -weak_framework NaturalLanguage -weak_framework NearbyInteraction -weak_framework Network -weak_framework OSLog -weak_framework PencilKit -weak_framework PHASE -weak_framework PushToTalk -weak_framework QuickLookThumbnailing -weak_framework ScreenTime -weak_framework SensitiveContentAnalysis -weak_framework SensorKit -weak_framework SharedWithYou -weak_framework SharedWithYouCore -weak_framework ShazamKit -weak_framework SoundAnalysis -weak_framework Symbols -weak_framework ThreadNetwork -weak_framework UniformTypeIdentifiers -weak_framework VisionKit -framework GSS -framework CFNetwork -rpath @executable_path/Frameworks /Users/victorsanchez/Projects/testadame/testadame/obj/Debug/net8.0-ios/ios-arm64/nativelibraries/main.arm64.o /Users/victorsanchez/Projects/testadame/testadame/obj/Debug/net8.0-ios/ios-arm64/nativelibraries/registrar.o -o /Users/victorsanchez/Projects/testadame/testadame/obj/Debug/net8.0-ios/ios-arm64/nativelibraries/testadame -lcompression -dead_strip -lz -liconv -lcompression -lobjc -exported_symbols_list obj/Debug/net8.0-ios/ios-arm64/mtouch-symbols.list -Xlinker -ld_classic
Tool xcrun execution finished (exit code = 1).
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FIRAnalytics", referenced from:
objc-class-ref in registrar.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : clang++ exited with code 1:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : Undefined symbols for architecture arm64:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : "_OBJC_CLASS_$_FIRAnalytics", referenced from:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : objc-class-ref in registrar.o
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : ld: symbol(s) not found for architecture arm64
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation)
Done building target "_LinkNativeExecutable" in project "testadame.csproj" -- FAILED.
Done building project "testadame.csproj" -- FAILED.
Build FAILED.
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/tools/msbuild/iOS/Xamarin.Shared.targets(146,3): warning : The directory '/Users/victorsanchez/Library/Caches/XamarinBuildDownload/GAppM-10.24.0/GoogleAppMeasurement-10.24.0/Frameworks' does not exist.
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/tools/msbuild/iOS/Xamarin.Shared.targets(146,3): warning : The directory '/Users/victorsanchez/Library/Caches/XamarinBuildDownload/FAnlytcs-10.24.0/FirebaseAnalytics-10.24.0/Frameworks' does not exist.
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : clang++ exited with code 1:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : Undefined symbols for architecture arm64:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : "_OBJC_CLASS_$_FIRAnalytics", referenced from:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : objc-class-ref in registrar.o
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : ld: symbol(s) not found for architecture arm64
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8022/targets/Xamarin.Shared.Sdk.targets(1559,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation)
2 Warning(s)
1 Error(s)
Time Elapsed 00:00:02.38
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Build: 1 error, 2 warnings
@gataflow don't remove the Target you said you removed, please put it back. I was able to build, and debug on physical devices without issues. Also, it worked on release mode when sending it to TestFlight for QA. Please the Target back:
<!-- Target needed until LinkWithSwiftSystemLibraries makes it into the SDK: https://github.com/xamarin/xamarin-macios/pull/20463 -->
<Target Name="LinkWithSwift" DependsOnTargets="_ParseBundlerArguments;_DetectSdkLocations" BeforeTargets="_LinkNativeExecutable">
<PropertyGroup>
<_SwiftPlatform Condition="$(RuntimeIdentifier.StartsWith('iossimulator-'))">iphonesimulator</_SwiftPlatform>
<_SwiftPlatform Condition="$(RuntimeIdentifier.StartsWith('ios-'))">iphoneos</_SwiftPlatform>
</PropertyGroup>
<ItemGroup>
<_CustomLinkFlags Include="-L" />
<_CustomLinkFlags Include="/usr/lib/swift" />
<_CustomLinkFlags Include="-L" />
<_CustomLinkFlags Include="$(_SdkDevPath)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(_SwiftPlatform)" />
<_CustomLinkFlags Include="-Wl,-rpath" />
<_CustomLinkFlags Include="-Wl,/usr/lib/swift" />
</ItemGroup>
</Target>
And remove this from your csproj: <LinkWithSwiftSystemLibraries>true</LinkWithSwiftSystemLibraries>
reintroduced the target name linkwithswift and removed this from the csproj: ```
The two lines from the build log that are most concerning:
warning : The directory '/Users/victorsanchez/Library/Caches/XamarinBuildDownload/GAppM-10.24.0/GoogleAppMeasurement-10.24.0/Frameworks' does not exist.
warning : The directory '/Users/victorsanchez/Library/Caches/XamarinBuildDownload/FAnlytcs-10.24.0/FirebaseAnalytics-10.24.0/Frameworks' does not exist.
It won't be able to link to binaries that don't exist.
Try running a nuget restore first.
Thanks a bunch for the guidance on running dotnet restore
. sorted it, I'm all set to deploy to a real iPhone and smoothly build on an Azure pipeline. Really appreciate your help!
Glad it worked @gataflow . Please give us a hand closing this issue if you believe it has been resolved.
Thanks in advance 😃
I'm unable to Build MAUI Project with AdamE.Firebase.iOS.Analytics
Description: I am encountering an error while attempting to build my MAUI project with the
AdamE.Firebase.iOS.Analytics
package. Despite only utilizing this package without any dependencies on others from the Firebase iOS suite, the build fails with the following error:Environment:
Steps to Reproduce:
AdamE.Firebase.iOS.Analytics
package with version 10.24.0.Expected Behavior: The project should build successfully without any errors related to the Firebase iOS Analytics package.
Actual Behavior: The build fails with the mentioned error related to
bitcode_strip
missing arguments.Additional Information:
Project Configuration (relevant parts):
Original Target (Removed):
Replacement:
This line seems to replace the entire previous target with a simpler directive to link with Swift system libraries. https://github.com/xamarin/xamarin-macios/pull/20463
Please advise on any potential solutions or workarounds to resolve this issue. Thank you!