admin管理员组

文章数量:1122796

We have been successfully using Plugin.Firebase for a long time but now when upgrading to v3.1.1 we get this compilation error:

/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error : clang++ exited with code 1: [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error : Undefined symbols for architecture arm64: [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error :   "__swift_FORCE_LOAD_$_swiftCompatibility50", referenced from: [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error :       __swift_FORCE_LOAD_$_swiftCompatibility50_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o) [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error :   "__swift_FORCE_LOAD_$_swiftCompatibility51", referenced from: [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error :       __swift_FORCE_LOAD_$_swiftCompatibility51_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o) [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error :   "__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency", referenced from: [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error :       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o) [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error :   "__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements", referenced from: [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error :       __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_FirebaseAnalytics in FirebaseAnalytics[17](Analytics+StoreKit.o) [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error : ld: symbol(s) not found for architecture arm64 [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk8.0_18.0/18.0.8314/targets/Xamarin.Shared.Sdk.targets(1648,3): error : clang++: error: linker command failed with exit code 1 (use -v to see invocation) [/Users/runner/work/1/s/MyApp/A/MyApp.App/MyApp.App.csproj::TargetFramework=net8.0-ios]

According to this post another user seems to have had the same problem and there is a link to a solution but I just cannot understand how to solve this issue. Been trying seemingly all the different relevant things in that guide. We are compiling this with XCode 16.1 on Azure Pipelines macOS 14 agent so the path length issue should not be relevant.

We reference it like

    <ItemGroup Condition="'$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-android'">
        <PackageReference Include="Plugin.Firebase" Version="3.1.1" />
    </ItemGroup>

<PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Release'">
    <RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
    <UseInterpreter>True</UseInterpreter>
</PropertyGroup>

Any tips on how to solve this? Same code worked fine with version 2.0.14.

本文标签: cPluginFirebase 311 iOS Compilation errorStack Overflow