Why can’t I build my Unity app for iOS using Xcode?


I have been trying to build my app for iOS (after already done for Android), which is also my first time dealing with anything related to iOS so I’m kind of newbie.
Unfortunately, I’m stuck in an endless loop of error solving, not able to build it after creating an Xcode project through Unity.

Unity version 2022.3.11f1

Xcode 15.1 (15C65)

Here’s my Podfile

source 'https://cdn.cocoapods.org/'
source 'https://github.com/CocoaPods/Specs'

platform :ios, '12.0'

target 'UnityFramework' do
  pod 'FBSDKCoreKit', '~> 16.0.1'
  pod 'FBSDKCoreKit_Basics', '~> 16.0.1'
  pod 'FBSDKGamingServicesKit', '~> 16.0.1'
  pod 'FBSDKLoginKit', '~> 16.0.1'
  pod 'FBSDKShareKit', '~> 16.0.1'
  pod 'Firebase/Auth', '10.15.0'
  pod 'Firebase/Core', '10.15.0'
  pod 'Firebase/Firestore', '10.15.0'
  pod 'Firebase/Messaging', '10.15.0'
  pod 'Google-Mobile-Ads-SDK', '~> 10.9'
  pod 'GoogleSignIn', '>= 4.0.2'
end
target 'Unity-iPhone' do
end
use_frameworks! :linkage => :static

The main error I get right as I open the Xcode project after building through Unity, is related to GoogleSignIn:
enter image description here

After researching for solution online, the main suggestion that has helped me move forward was using version 9.6.0 of all of the firebase packages, and 1.7 for GTMSessionFetcher/Core.
Although the previous error was gone, I did get another one related to FIRFirestoreSettings:
Error: An attribute list cannot appear here
On this line:

ABSL_CONST_INIT extern "C" const int64_t kFIRFirestoreCacheSizeUnlimited =
    Settings::CacheSizeUnlimited;

Even when I tried to solve this using some online suggestions (Replace it with some other line) which I did not fully understand, I ended up with another error for “Undefined symbols: linker command failed”.
Please, I have been trying to deal with this for weeks now, with no success.
Would someone help me understand the problem, and suggest a working solution?

Thank you!

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img