FirebaseAuth Problem after Installing RevenueCat CocoaPod - firebase

I recently had put banner and interstitial ads on my application. After which, I decided to incorporate RevenueCat. Once the pod was installed, I had many errors that I could not fix. I decided to remove the CocoaPod. Once that was completed, I had been getting the following problems.
AVFoundation.h – AVFCore/AVFcore.h file not found
RPBroadCastExtension.h. – Could not build module AVFoundation
GameKit.h. – Could not build module ReplayKit
FIRGameCenterAuthProvider.m – Could not build module GameKit
I have been trying for 2-3 days to fix the problem. Here is what I have been doing.
I tried removing all pods and reinstall all the pods.
I try to clean the build. Same error came back.
I tried to add and remove RevenueCat.
I changed build setting to enable module c & Objective C. I added use_modular_headers! to Pod file.
my pod file
target 'FetalGrowthPercentile' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
use_modular_headers!
# Pods for FetalGrowthPercentile
pod 'Firebase/Firestore'
pod 'Google-Mobile-Ads-SDK'
pod 'Firebase/Auth'
end
None of which helps. I am lost. Please advise!!
Louis

Related

Storybook cannot find fetch-mock module

None of my storybooks stories are working anymore, and I am not sure if its an environmental or code issue.
It cannot find modules in fetch-mock/es5/client.js importing js/modules/es6.*.
The only difference that I can think of is that I added a new node module (react-syntax-highlighter). However nothing in the stack trace points to that... it is just pointing to "fetch-mock"
ERROR in ./node_modules/fetch-mock/es5/client.js
Module not found: Error: Cannot find module 'core-js/modules/es6.regexp.match'
# ./node_modules/fetch-mock/es5/client.js 113:0-43
# ./stories/cyberdashImport.stories.js
# ./stories sync \.stories\.js$
# ./.storybook/config.js
# multi ./node_modules/#storybook/core/dist/server/common/polyfills.js ./node_modules/#storybook/core/dist/server/preview/globals.js ./.storybook/config.js ./node_modules/webpack-hot-middleware
/client.js?reload=true
I solved this by switching over to npm instead of yarn.
I deleted my node_modules, and then did a npm install, and everything works fine. Yarn seems to have problems resolving dependencies with storybook.

Swift : Firebase Unresolved identifier FirebaseApp.configure() && FIRApp.configure()

i am using xcode 7.3 and swift 2.2. I have added pod 'Firebase/Auth' to my pod file then it gives me error stating unresolved identifier for both of them but when i reinstall my pod file with out pod 'Firebase/Auth'. It does not shows the issue for FirebaseApp.configure().Only after adding Auth to my pod file it is showing the issue. I tried even updating my pod file but still same issue.
And this is how i installed pod,
Can anybody suggest me how can i solve this issue.? Even restarting and cleaning also does not solves the issue..
You just need to add 'import FirebaseCore'
You just need to add 'import Firebase' and remove the rest import statements of Firebase. And add
FirebaseApp.configure(). FIRApp.configure() does not work anymore.

Cocoapods error after installing "firebase_firestore" Flutter plugin [duplicate]

This question already has answers here:
Conflicts with FlutterFire and native GeoFire plugin on iOS
(2 answers)
Closed 5 years ago.
I've got my app working with the Firebase RTDB but want to experiment with Firestore so I have followed the instructions and installed the 'firebase_firestore' plugin.
When I run my app now I get the following error:
Resolving dependencies of `Podfile`
[!] Unable to satisfy the following requirements:
- `Firebase/Firestore` required by `firebase_firestore (0.0.1)`
Specs satisfying the `Firebase/Firestore` dependency were found, but they required a higher minimum deployment target.
I've tried specifying platform :ios, '9.0' and also 10.0in my Podfile but that didn't make any difference. All other pods install fine.
Here's the entire Cocoapods run log: https://pastebin.com/raw/SBz8Bqgf
My Podfile looks like this (standard Flutter Podfile):
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
if ENV['FLUTTER_FRAMEWORK_DIR'] == nil
abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework')
end
target 'Runner' do
# Pods for Runner
# Flutter Pods
pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
if File.exists? '../.flutter-plugins'
flutter_root = File.expand_path('..')
File.foreach('../.flutter-plugins') { |line|
plugin = line.split(pattern='=')
if plugin.length == 2
name = plugin[0].strip()
path = plugin[1].strip()
resolved_path = File.expand_path("#{path}/ios", flutter_root)
pod name, :path => resolved_path
else
puts "Invalid plugin specification: #{line}"
end
}
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
Here's a link to the Podfile.lock, maybe that's more interesting. I see that it has not been updated with Firestore though, presumably because the run fails: https://pastebin.com/raw/hj2jHE76
In case anyone else stumbles across this issue I just wanted to expand on V. Roussel's answer (which I marked as the correct answer), since Flutter kind of abstracts away this Cocoapods process. Here's what I did to be able to run "pod repo / update":
Run pod repo update
Set the environment variable FLUTTER_FRAMEWORK_DIR to something that looks like /Users/youruser/bin/flutter/bin/cache/artifacts/engine/ios/. You can do a locate Flutter.podspec to find this directory
From YourFlutterProject/ios run pod update
After this you should be able to run your app again.
cloud_firestore has progressed to 0.03 by now, which should allow you to run the PODs.
in pubspec.yaml
cloud_firestore: "^0.0.3"
If that does not work from the start, add Firebase core to your podfile and run pod install.
Note: As far as I have seen, you cannot yet combine Firestore with other modules such as Firebase auth or Firebase analytics.

Pod Update of Firebase throwing errors

I am trying to install the Firebase Performance SDK and following their instructions on the site:
https://firebase.google.com/docs/perf-mon/get-started-ios
When I run the pod install step it gives me the following error:
firebase performance required by podfile
I run the pod update command and everything runs on the pod install but then when I open up my workspace I get errors in swift as such:
FIRDatabaseReference has been renamed to DatabaseReference
FIRDatabase has been renamed to Database
FIRFirebase.database().reference is now Database.database.reference
which then give the error
Database has no member reference
What gives!? Has anyone gotten these error after updating their podfile with Firebase!?
Pod file is as such:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'Pool' do
# Uncommnet this line if you're using Swift
use_frameworks!
#Pods for firebase pool
pod 'Firebase', '>=2.5.1' <--- This has been removed from the podfile as suggested
pod 'Firebase/Core'
pod 'Firebase/Performance'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'Firebase/Crash'
target 'PoolTests' do
# inherit! :search_paths
end
target 'PoolUITests' do
# inherit! :search_paths
end
end
Result of pod install
Error in xcode after pod install/update:
Here's a guide for upgrading Firebase iOS:
https://firebase.google.com/support/guides/firebase-ios
With 4.0 in particular, the Swift interfaces have been cleaned up to make it more "Swifty" which is why you're seeing those rename warning.
After the renaming, accessing the database reference should look like:
let ref:DatabaseReference = Database.database().reference()
For the updated docs of the new swift interface, see here:
https://firebase.google.com/docs/reference/ios/firebasedatabase/api/reference/Classes/FIRDatabase
The release of Firebase 4.0 on May 17 has the changed the naming convention and can be found in this naming migration guide:
https://firebase.google.com/docs/reference/ios/naming-migration-guide

How to upgrade new Firebase app from exist old app?

There are "create new app" or "import from google project" only in new Firebase console.( https://console.firebase.google.com/ )
How to update exit old app to new one?( https://www.firebase.com/account/#/ )
---Edit
This issue looks like already fixed.
I think the cause is 500 request error on new Firebase console.
However it had fixed already.
If you are already signed in to the new Firebase Console with the same Google account as you used on firebase.com, then you should see your firebase.com project listed under "Projects currently at Firebase.com".
Follow the instructions on the new Firebase upgrade page for Web, Android or iOS.
I've had a somewhat similar problem. I see the import button but when I click it, and select the project I want to load, it only displays the spinner. Ive even tried to import JSON from an old firebase project (before the upgrades) and it just spins. Could it be that the old JSON is not what the new firebase is expecting?
EDIT
OK, seems it doesn't like Chrome. Works in IE 11 but not Chrome 50.0.2
This is how you update a Firebase < 3.0 app to Firebase 3.
Step 1
Install Regular Firebase - pod 'Firebase', '>= 2.5.1'
Or
If considering your old app is already Firebase < 3.0 you should be fine.
Step 2
Update - pod update
*At this point it will take a good couple minutes to update. You should see something like this.
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing Firebase 3.2.0 (was 3.2.0)
Using FirebaseAnalytics (3.2.0)
Installing FirebaseAuth (3.0.2)
Using FirebaseDatabase (3.0.1)
Using FirebaseInstanceID (1.0.6)
Using GoogleInterchangeUtilities (1.2.1)
Installing GoogleNetworkingUtilities (1.2.1)
Using GoogleSymbolUtilities (1.1.1)
Using GoogleUtilities (1.3.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 4 dependencies from the Podfile and 10
total pods installed.
Step 3
Now you should have Firebase 3. So you can add frameworks like such in your pod file then pod update
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'xMarket' do
end
target 'xMarketTests' do
end
target 'xMarketUITests' do
end
pod 'Firebase', '>= 2.5.1'
pod ‘Firebase/Core’
pod ‘Firebase/Database’
pod ‘Firebase/Auth’
Good luck!
P.S. You will also have to edit your codebase because Firebase 3 is different than Firebase 2. Check the documentation here Firebase 3 Examples
Above answers look great. I'll just add one link that has a lot of the common differences between Firebase 2 and Firebase 3: https://firebase.google.com/support/guides/firebase-ios#get_a_database_reference_numbered
(I didn't see this at first and wasted a few hours yesterday trying to figure it all out.)

Resources