1

Issue:

Uncaught exception: NSInvalidArgumentException: +[FIRApp registerLibrary:withVersion:]: unrecognized selector sent to class 0x101b94b98

XCode error screenshot

I have tried a lot of solutions but nothing worked. Let me give you details about it

  • Made iOS build from Unity 2017.3.0f3 by setting minimum target version 9.0
  • Created Podfile:

    $ cd your-project directory

    $ pod init

  • My Podfile is something like this

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Unity-iPhone' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for Unity-iPhone
  pod 'GoogleInterchangeUtilities'
  pod 'GoogleSymbolUtilities'
  pod 'GoogleToolboxForMac'
  pod 'Firebase'
  pod 'Firebase/Core'
  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'Firebase/Storage'
  pod 'Firebase/Database'

  target 'Unity-iPhone Tests' do
    inherit! :search_paths
    # Pods for testing
  end

end
  • Added ObjC linker flag in Other Linker Settings in target's build settings
  • In the Arguments Passed On Launch section, added -FIRAnalyticsDebugEnabled
  • Added AdSupport.framework in Linked Frameworks and Libraries section
  • Then making a build by .xcworkspace, not .xcodeproj

So, tell me what I'm doing wrong?

  • Isn't Firebase Unity plugins should work without any hassle of any settings like I did and in case of Android it does, everything by itself, just import plugin and you are good to go?
eagle
  • 567
  • 1
  • 6
  • 24
  • Show your firebase initialisation code for App Delegate – Niall Kiddle Apr 13 '18 at 10:57
  • What you mean? do I have write something in App Delegate? I'm using Firebase Unity plugin, don't it will write everything by itself? By the way, i didn't write anything in App Delegate, if i have to write, then tell me what – eagle Apr 16 '18 at 02:24
  • This video might help you with your setup https://www.youtube.com/watch?v=uj6rs3HFg5o Make sure you are following this documentation. It seems you may have not read it properly https://firebase.google.com/docs/unity/setup – Niall Kiddle Apr 16 '18 at 09:48

1 Answers1

0

The major issue was solved by updating pod following the steps provided in this link (Stack Overflow)

After that just do the following steps to make XCode project working, as pod init and pod install is done by Unity:

  • Make XCode build from Unity by selecting Xcode Workspace - Add Cocoapods to the Xcode workspace from iOS Resolver Settings
  • Open .xcworkspace, not .xcodeproj
  • Add -ObjC Other Linker Flags in target's build settings
  • In case you are using Firebase Analytics then you also have to add AdSupport.framework in Linked Frameworks and Libraries section

At the end just have a look at the Firebase Launch Checklist

eagle
  • 567
  • 1
  • 6
  • 24