iosfirebaseunity-game-enginecocoapods

Unity+Firebase 11.2.0 upgrade to 12.3.0, iOS build error


Unity + Firebase 12.3.0, iOS build error. Does your SDK use 9.6.0? 11.2.0? No matter which version you use, you will get an error.

Tests were conducted in both cases.

Unity Version: 2021.3.41f Xcode Version: 15.4 pod --version: 1.15.2

Firebase/Analytics and 5 other versions are used, including 9.6.0.

source 'https://cdn.cocoapods.org/'

platform :ios, '13.0'

target 'UnityFramework' do
  pod 'FBAudienceNetwork', '~> 6.12.0'
  pod 'FBSDKCoreKit', '~> 17.0.1'
  pod 'FBSDKCoreKit_Basics', '~> 17.0.1'
  pod 'FBSDKGamingServicesKit', '~> 17.0.1'
  pod 'FBSDKLoginKit', '~> 17.0.1'
  pod 'FBSDKShareKit', '~> 17.0.1'
  pod 'Firebase/Analytics', '~> 9.6.0'
  pod 'Firebase/Auth', '~> 9.6.0'
  pod 'Firebase/Core', '~> 9.6.0'
  pod 'Firebase/Crashlytics', '~> 9.6.0'
  pod 'Firebase/DynamicLinks', '~> 9.6.0'
  pod 'Firebase/Messaging', '~> 9.6.0'
  pod 'GoogleSignIn', '~> 5.0.0'
end
target 'Unity-iPhone' do
end
use_frameworks! :linkage => :static

xcode Error Message

Undefined symbols for architecture arm64:
  "_FIRConsentTypeAdPersonalization", referenced from:
      firebase::analytics::SetConsent(std::__1::map<firebase::analytics::ConsentType, firebase::analytics::ConsentStatus, std::__1::less<firebase::analytics::ConsentType>, std::__1::allocator<std::__1::pair<firebase::analytics::ConsentType const, firebase::analytics::ConsentStatus>>> const&) in libFirebaseCppAnalytics.a[arm64][3](analytics_ios.mm.o)
  "_FIRConsentTypeAdUserData", referenced from:
      firebase::analytics::SetConsent(std::__1::map<firebase::analytics::ConsentType, firebase::analytics::ConsentStatus, std::__1::less<firebase::analytics::ConsentType>, std::__1::allocator<std::__1::pair<firebase::analytics::ConsentType const, firebase::analytics::ConsentStatus>>> const&) in libFirebaseCppAnalytics.a[arm64][3](analytics_ios.mm.o)
ld: symbol(s) not found for architecture arm64 

Firebase/Analytics and 5 other versions are used, including 11.2.0

source 'https://cdn.cocoapods.org/'

platform :ios, '13.0'

target 'UnityFramework' do
  pod 'FBAudienceNetwork', '~> 6.12.0'
  pod 'FBSDKCoreKit', '~> 17.0.1'
  pod 'FBSDKCoreKit_Basics', '~> 17.0.1'
  pod 'FBSDKGamingServicesKit', '~> 17.0.1'
  pod 'FBSDKLoginKit', '~> 17.0.1'
  pod 'FBSDKShareKit', '~> 17.0.1'
  pod 'Firebase/Analytics', '11.2.0'
  pod 'Firebase/Auth', '11.2.0'
  pod 'Firebase/Core', '11.2.0'
  pod 'Firebase/Crashlytics', '11.2.0'
  pod 'Firebase/DynamicLinks', '11.2.0'
  pod 'Firebase/Messaging', '11.2.0'
  pod 'GoogleSignIn', '~> 5.0.0'
end
target 'Unity-iPhone' do
end
use_frameworks! :linkage => :static

Unity Console Error Message

[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
  In Podfile:
    Firebase/Auth (= 11.2.0) was resolved to 11.2.0, which depends on
      FirebaseAuth (~> 11.2.0) was resolved to 11.2.0, which depends on
        GTMSessionFetcher/Core (~> 3.4)

    GoogleSignIn (~> 5.0.0) was resolved to 5.0.2, which depends on
      GTMSessionFetcher/Core (~> 1.1)

Please help me. I have been wandering for 3 days.


Solution

  • pod 'GoogleSignIn', '~> 5.0.0' ------------> change 6.0.2 and sdk upgrade

    https://github.com/googlesamples/google-signin-unity/pull/205#issuecomment-1964963229