We are trying to integrate FireBase SDK in Unity Project for iOS platform. For testing, we imported FireBaseAnalytic.unitypackage in an empty project, and put GoogleService-Info.plist on Assets folder.
Once we export XCode project from Unity and build in XCode we are getting few errors about missing few classes from:
we also tried to install Cocoapods file and place Podfile in XCode Project. Cocoapod file contains information as below:
# 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
target 'Unity-iPhone Tests' do
inherit! :search_paths
# Pods for testing
pod 'Firebase/AdMob'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Crash'
pod 'Firebase/Database'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Invites'
pod 'Firebase/Messaging'
pod 'Firebase/Performance'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
end
end
even these all changes do not help to build test project even just with Firebase Analytic.
Related
In updating to the latest Cocoapods, I updated googleapis pod and encountering the following error on Archiving the build in Xcode 11.1:
Multiple commands produce '...iphoneos/gRPCCertificates.bundle'
1) Target 'gRPC-gRPCCertificates
2) Target 'gRPC-C++-gRPCCertificates
How do I remove the Build target gRPC-C++ certificates? Looking in Build Settings and can't seem to find anything here.
Here is my Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '13.0'
target 'Kintsugi Mindful Wellness' do
use_frameworks!
# Pods for Kintsugi Mindful Wellness
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Database'
pod 'Firebase/Crash'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
pod 'Firebase/Performance'
pod 'Firebase/Functions'
pod 'Firebase/Messaging'
pod 'googleapis', :path=> "."
pod 'GoogleSignIn'
...
target 'Kintsugi Mindful WellnessTests' do
inherit! :search_paths
end
target 'Kintsugi Mindful WellnessUITests' do
inherit! :search_paths
end
end
Older thread mentions updating to the latest pod (https://github.com/firebase/firebase-ios-sdk/issues/2102) but I've already done so and keep encountering this issue (happens every OS update but keep forgetting where to change this config).
When I use the Legacy Build System, I get more granular errors as follows:
Lexical or Preprocessor Issue
Include of non-modular header inside framework module 'GRPCClient': '.../Build/Intermediates.noindex/ArchiveIntermediates/.../gRPC-umbrella.h
While building module 'ProtoRPC' imported from /...google/cloud/speech/v1/CloudSpeech.pbrpc.h:6
While building module 'GRPCClient' imported from /.../Intermediates.noindex/ArchiveIntermediates/.../BuildProducts...
In file included from <module-includes>:1:
Parse issue
Could not build module 'GRPCClient'
ProtoRPC.h
While building module 'ProtoRPC' imported from /.../CloudSpeech.pbrpc.h:6:
In file included from <module-includes>:1:
In file included from /.../gRPC-ProtoRPC/gRPC-ProtoRPC-umbrella.h:14:
Could not build module 'ProtoRPC'
CloudSpeech.pbrpc.h
In file included from /.../v1/CloudSpeech.pbrpc.m:2
The duplicate gRPC certificate bundle can be found in Products.
To remove the duplicate bundle, select Pods and from the Target, just remove one of the certificates (e.g. gRPC-C++-gRPCCertificates):
I am adding cocoa pods to my ios project (swift).
I have initalized the pods in the project directory using 'pod init myproject.xcodeproj'. I then added pod 'Firebase' to the Podfile as such:
project 'HOTS IOS.xcodeproj/'
platform : ios, '9.0'
target 'HOTS IOS' do
use_frameworks!
pod 'Firebase'
target 'HOTS IOSTests' do
inherit! :search_paths
pod 'Firebase'
end
target 'HOTS IOSUITests' do
inherit! :search_paths
pod 'Firebase'
end
end
Now when I run pod install i get the error: Unable to find a specification for 'Firebase'.
Depending on what Firebase service you want to use you have to add different Firebase services in your podfile. "'Firebase'" is not a valid pod.
pod 'Firebase/Core' is the most basic and will give you the prerequisite libraries needed to get Firebase running. If you want to use other services you can choose between these pods:
pod 'Firebase/Core' --> Prerequisite libraries and Analytics
pod 'Firebase/AdMob' --> AdMob
pod 'Firebase/Messaging' --> Cloud Messaging / Notifications
pod 'Firebase/Database' --> Realtime Database
pod 'Firebase/Invites' --> Invites
pod 'Firebase/DynamicLinks' --> Dynamic Links
pod 'Firebase/Crash' --> Crash Reporting
pod 'Firebase/RemoteConfig' --> Remote Config
pod 'Firebase/Auth' --> Authentication
pod 'Firebase/Storage' --> Storage
(Note: without --> text. Only add for example pod 'Firebase/Database')
Here is the documentation for setting up iOS:
https://firebase.google.com/docs/ios/setup
I am trying to add FirebaseUI/Storage pod to iOS App which is throwing the following linker error:
framework not found SDWebImage for architecture x86_64
I have tried adding SDWebImage independently and it works but as soon as I add FirebaseUI/Storage pod, it throws the above error.
Any ideas what could be causing this?
This is what my Podfile looks like:
target 'myApp' do
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'FirebaseUI/Storage'
pod 'SDWebImage'
pod 'MMDrawerController'
end
I had this exact same problem. I seem to have fixed it by changing my pod file to...
target 'MyApp' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'SDWebImage', '~>3.8'
# pod 'Firebase/Core'
pod 'FirebaseUI', '~> 1.0'
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
end
target 'MyAppUITests' do
inherit! :search_paths
# Pods for testing
end
end
A few things to note:
I turned on use_frameworks even though I am using Objective C
I turned off my Firebase pod calls - they are pulled in automatically by FirebaseUI
Seems like there is no clear documentation regarding which pods to include to enable just the FirebaseUI/Storage functionality if also including other individual Firebase/... pods.
I needed to remove all pods and install them back without FirebaseUI/Storage since it duped several classes which were not removed once I removed the [FirebaseUI/Storage] pod.
I wonder if anyone of you have tried the database quickstart sample provided by Firebase.
https://github.com/firebase/quickstart-ios/tree/master/database
I am able to run the Objective-C part but when I tried to target the Swift part, there is this error message: Firebase module is not available.
I am not too sure what I did wrong and if you have successfully targeted and ran the Swift part, may be you could give me some hints.
The pod file was included in the sample which is as shown below:
# DatabaseExample
use_frameworks!
platform :ios, '7.0'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'FirebaseUI'
target 'DatabaseExample' do
end
target 'DatabaseExampleSwift' do
end
target 'DatabaseExampleTests' do
end
The pod declarations should be inside your target like so:
platform :ios, '7.0'
target 'DatabaseExample' do
use_frameworks!
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'FirebaseUI'
end
target 'DatabaseExampleSwift' do
end
target 'DatabaseExampleTests' do
end
I'm working on a larger project(Swift) with some Pods and everything was fine so far...
Bu now I wanted to add a tvos target and now my project is messed up :(
And there is an easy way to reproduce:
1.) create a new SingleView Application and name it "pod-test" in Xcode
2.) open it an run it
3.) run pod init to create the Podfile
4.) Edit the Podfile with this:
use_frameworks!
platform :ios, '8.0'
pod 'Alamofire'
pod 'ObjectMapper'
pod 'AlamofireObjectMapper'
pod 'Fabric'
pod 'Crashlytics'
pod 'Nuke'
pod 'MGSwipeTableCell'
pod 'GradientCircularProgress', :git => 'https://github.com/keygx/GradientCircularProgress'
pod 'Reveal-iOS-SDK', :configurations => ['Debug']
5.) run pod install
6.) open workspace project file an run the application
7.) now add the twos target and name it "pod-test-tvos"
8.) run iOS and tvos app. Everything still fine
9.) edit the Podfile with this:
source 'https://github.com/CocoaPods/Specs.git'
target 'pod-test' do
use_frameworks!
platform :ios, '8.0'
pod 'Alamofire'
pod 'ObjectMapper'
pod 'AlamofireObjectMapper'
pod 'Fabric'
pod 'Crashlytics'
pod 'Nuke'
pod 'MGSwipeTableCell'
pod 'GradientCircularProgress', :git => 'https://github.com/keygx/GradientCircularProgress'
pod 'Reveal-iOS-SDK', :configurations => ['Debug']
end
target 'pod-test-tvos' do
use_frameworks!
platform :tvos, '9.0'
pod 'Fabric'
pod 'Crashlytics'
end
10.) Edit configuration for pod-test and pod-test-tvos to none
10.) close XCode
11.) run pod install again
12.) Open Xcode again
13.) run iOS and TVOS apps again... Still everything is fine
14.) edit "AppDelegate" for both targets and add just this import:
import Fabric
15.) run iOS and TVOS apps again... and boom... iOS runs fine TVOS says Fabric is not found :(
This all just happens, because I "changed" the Podfile after adding the TVOS target...
With just this steps everything is fine:
1.) create a new SingleView Application and name it "pod-test" in Xcode
2.) now add the twos target and name it "pod-test-tkos"
3.) run pod init to create the Podfile
4.) edit the Podfile with this:
source 'https://github.com/CocoaPods/Specs.git'
target 'pod-test' do
use_frameworks!
platform :ios, '8.0'
pod 'Alamofire'
pod 'ObjectMapper'
pod 'AlamofireObjectMapper'
pod 'Fabric'
pod 'Crashlytics'
pod 'Nuke'
pod 'MGSwipeTableCell'
pod 'GradientCircularProgress', :git => 'https://github.com/keygx/GradientCircularProgress'
pod 'Reveal-iOS-SDK', :configurations => ['Debug']
end
target 'pod-test-tvos' do
use_frameworks!
platform :tvos, '9.0'
pod 'Fabric'
pod 'Crashlytics'
end
5.) run pod install
6.) open workspace project file an run the application
7.) edit "AppDelegate" for both targets and add just this import:
import Fabric
8.) run iOS and TVOS apps again... Still everything is fine
So, there seems to be a problem with changing the Podfile in an "older" Project...
I hope somebody can help me out with this :)
This can be resolved by using the deintegrate command in Cocoapods 1.0.
Close Xcode
Open Terminal and navigate to the directory that contains your Podfile.
pod deintegrate
pod install
Open your workspace in Xcode and build.
I had exactly the same problem. I don't know why. Inspired by your experimentation, I downloaded the Cocoapods app, and used it to remove Cocoapods from my project. I then reinstalled cocoapods and now it works just fine.