After updating react-native-firebase to 5.0.0 I then had to update to react-native 0.57.1
After updating react native when I go to do react-native run-ios I get a version mismatch error. saying that the javascript version 0.57.1 is different from the native version 0.56.0 I have screenshotted the error below.
When I try to build the ios project in Xcode I 34 errors related to rnfirebase.
I'm sorry if my question is a bit ambiguous but I'm really not sure where to start or where to go, so if someone could point me in the right direction I will be able to better adjust my questions and provide any necessary details.
UPDATE: ADDED PODFILE
I get this error after running react-native run-ios
Thank you for any help
According to the Release notes (https://rnfirebase.io/docs/v5.x.x/release-notes): change your podfile to this.
pod 'Firebase/Auth', '~> 5.9.0'
pod 'Firebase/Core', '~> 5.9.0'
pod 'Firebase/Firestore', '~> 5.9.0'
pod 'Firebase/DynamicLinks', '~> 5.9.0'
pod 'Firebase/Storage', '~> 5.9.0'
After updating package.json depencencies, make sure you run a npm install from your project root, and a pod update from your ios directory.
Also, make sure that no Metro bundler is running while doing that, and no IDE is opened - it could keep an old cached version of your node modules. (hence the watchman watch-del-all command suggested by RN in your screenshot)
Thank you for all the answers and comments, unfortunately, none of them worked for me.
Ultimately what lead me in the right direction was a comment from #Vinzzz:
if ios build fails, then the ios app you can run in your simulator is outdated, so the red screen error is irrelevant, fix the build first
I went back to Xcode, tried to decipher the 34 errors,
I found that they all seem to be coming from rnfirebase, I tried to search SO for answers how to fix them, but couldn't fix them.
I ended up just completely removing rnfirebase from the ios project and mostly from the reactnativejavascript project but kept it in the Android project as I had no problem there.
I think first I found on SO, to remove the pods in the pod file then do:
pod install
which removed the rmfirebase pods
I then deleted any reference to rnfirebase that was left in project, using search project.
After that I removed rnfirebase from package.json, npm install to remove it from modules,
and it worked ! all errors gone, build succeded! after commenting out some references to rnfirebase in my logic, I ran run-ios and it worked too! no react-native mismatch error.
I have since updated everything and re-installed rnfirebase and its working again! and now everything is on the latest versions where it wasnt before.
Thank you to everyone and especially to #Vinzz for pointing in the right direction, took me 8 days to get over this! I tried to fix the problems instead of just uninstalling & re-installing thats why it took me so long. cheers
Related
I recently started my first Xcode project (I am really new to app development) and I accidentally deleted a pod folder and moved it to the trash when I meant to simply delete the reference. I removed the Pod files from the left side bar out of the "Pods" folder and I was left with a pretty nasty set of errors.
The project no longer builds, I am no longer able to run "pod install" using terminal without getting errors, and I am worried that my project is completely trashed now after an immense amount of work I have put into the application and the pod created workspace. If you have any ideas on what to do, please offer all the help you can as I am terrified that I have corrupted the whole project.
Wanted to send an update for all of those who have a similar issue: I have resolved the issue and everything seems to be working again.
What I did to resolve the errors
I reinstalled Cocoapods using Terminal with the command $ sudo gem install cocoapods
Once it reinstalled, I ran the command pod cache clean --all (This removed all pod cache files)
Next, I ran the command pod deintegrate to remove all pod files
Once all pod files were removed, I ran the command pod install
After completing these steps, all the issues were resolved
I hope this helps someone else who may have similar issues due to improperly removing pod framework and module files or those who's
This article will help detail all the steps for installing Cocoapods for those who may be confused by my explanation to fixing these specific errors:
https://guides.cocoapods.org/using/getting-started.html
I updated Xcode to version 10 recently and started to receive a strange error when trying to build my project. I'm currently on Swift 4.0 and I did try to upgrade to swift Version 4.2. But when I did I received this same error in many of my frameworks.
Command Compile Swift failed with a nonzero exit code
So far I've deleted the derived folder. Updated all pods, also deleted all pods and reinstalled them using the terminal commands below.
sudo gem install cocoapods-deintegrate cocoapods-clean
pod deintegrate
pod clean
pod install
This didn't work to fix my issue. However, I found something that could work which was adding arm64 architecture in Build Setting -> valid architectures and enabling automatic code But, when I checked it was already there and code signing was enabled already.
Additionally, I do have a few other build errors that have to do with frameworks.
SwiftMessages
Value of type 'SwiftMessages.Config' has no member 'presentationContext'
WhatsNewKit
Missing argument for parameter 'backgroundColor' in call`
I opened issues with the developers of each of these frameworks to seek help with these issues.
Issue On SwiftMessage GitHub
Issue On WhatsNewKit GitHub
When I click presentationContext it brings me to the struct within the SwiftMessages Framework. Usually, when I've had the "has no member" warning I cannot click to see the original place where it exists.
I assume this has something to do with cocoa pods, but haven't been able to find a solution yet. What can I do to correct this issue? If anyone could help would be deeply appreciated been stuck on this for a day now.
Update:
The two frameworks latest builds were for swift 4.2. When I changed the version of each framework to one that was built in swift 4.0 I got the project to build.
Make sure that, your project Swift Language Version is in the proper version. SwiftMessages 6.0.0 works with Swift 4.2.
I solved this way:
Comment all pods in your .pod file
From your terminal, run the command pod install --no-repo-update
Open Xcode perform a clean and rebuild the project
Now open your .pod file and uncomment the first library
From your terminal, run the command pod install
Repeat steps 2 - 3 - 4 -5 for each uncomment library in your .pod file
I hope it can be of your help.
Make sure that, Your project build settings Optimization Level is in No Optimization[-Onone].
for pod SwiftMessages if your app is not swift 4.2 you need to user the version 5.01
pod 'SwiftMessages', '~> 5.0.1'
and it will work like a charm
Set Swift version to 4.2 then pod deintegrate, pod install, fix this problem for me. Thanks #alejandro-iván
Good Morning!
Do a clean. using"commond + shift + k
Close Xcode.
Navigate to project directory where the Podfile exist.
Do pod update/pod install
Open x.xcworkspace
This error happened to me when I used same class name in two different groups. Then I renamed one of the classes and the problem was solved
All of the answers were helpful to me. In my case, I only install frameworks manually but this kind of problem also happens. I tried all of the answers and was still getting this issue during the build. Curiously, while coding, I could cmd-click and resolve all of the "missing" components. I also cleaned and deleted derived data, restarted Xcode, etc.
I eventually got it working by inducing these additional steps:
On each of the framework project/targets (including my own):
Verify consistent Swift version (4.2 in my case)
Set Build for Active Architecture Only to No
Set Valid Architecture to arm64, armv7 (to match with base project)
Set Optimization Level to None (for Debug)
Set Compilation Mode to Whole
I had several frameworks (homegrown) plus my app. Somehow they ended up being out of sync as far as the Swift version. Make sure that all frameworks are the same version. In my case, they all needed to be set to Swift 4.2. If you haven't done the migration to 4.2 then remember that Xcode helps with this: Edit -> Convert -> To Current Swift Syntax.
only for re-install pod using that command pod install
see below attachment
In my case I connect an actual iphone not simulator and run the app once on it, It solved the problem. But connect iphone firstly, then choose it from this menu, then press run button.
The problem will solve too.
I stumbled upon this problem when upgrading to Xcode 10.2 and Swift 5. After trying everything I found this in the release notes:
The Swift compiler may crash during a build when the Thread Sanitizer
is enabled. (48719789)
And sure enough, efter turning off Thread Sanitizer my project could be compiled without errors again.
So if you get this error and have Thread Sanitizer enabled - turn it off!
Same issue happened to me in Xcode 10.2, it was a Xcode bug..!
So, I opened in older Xcode version(9.4), and it worked fine. Then I updated to the Xcode 10.2.1 after it's release -> Clean and build your project, now my problem solved.
I'm having the same problem, my Xcode version is 10.2.1 (10E1001),
Cocoapods version is 1.7.0.beta.2.
I returned to Cocoapods 1.6.1 and the problem was solved.
The specific steps are:
pod deintegrate to cancel the integration.
Uninstall all Cocoapods.
for i in $( gem list --local --no-version | grep cocoapods );
do
gem uninstall $i;
done
Install the stable version of Cocoapods. For now it's 1.6.1.
gem install cocoapods
Clean Project and empty DerivedData
pod install
Recompile the project
In my case it was a code error:
self.myDto.map{ (dto)} in
var stringValue = (dto.value(forKey: "name") as! String)
stringValue.append("c")
return stringValue
}
Just removed that stringValue variable fixed the problem.
I just had the same error message and none of the answers here and in the duplicates of this question were applicable to my project or helpful.
I kept on reading through the error messages and came to a realisation that I had stupidly named two seperate swift files in different folders with the same name intending to change one, but before I got to change one, I tried to run my project and have been annoyed for the last hour.
Bottom line, don't accidentally name your files the same name and read your error codes thoroughly!
target 'XYZ' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for xyz
pod 'SwiftyJSON'
pod 'Localize-Swift'
pod 'Alamofire'
pod 'Kingfisher'
pod 'Tabman'
pod 'RSSelectionMenu'
pod 'Pushbots'
pod 'ACProgressHUD-Swift', '~> 1.4'
pod 'SKPhotoBrowser'
pod 'ZoomableImageSlider'
pod 'RSSelectionMenu'
pod 'DropDown'
pod 'ImagePicker'
end
I updated platform :ios, '10.0' to 11.0 and the error disappeared. Change your platform or OS version and check. Hope that could help.
Specify your pod's version for example pod 'RealmSwift', '~> 5.3.5'
or uncomment # platform :ios, '9.0' in your Podfile
I faced this issue on Xcode 14. Add this on podfile bottom.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# some older pods don't support some architectures, anything over iOS 11 resolves that
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
I am new in IOS development and git. I am having a problem after merging my local repo to the dev repo. After merging when I build the project I get an error in the Xcode that says, "The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation."
Build Error
I searched about this and tried the usual solution reinstalling the pods. But executing
pod install
I get another error in terminal that says
Terminal Error
At this point I tried deleting the files associated with the "FTPopOverMenu" pod and reinstalling with pod install. The error doesn't go away. Also, I tried solving it in this way - Error:“The sandbox is not in sync with the Podfile.lock…” after installing RestKit with cocoapods
But both error in the Xcode and in the terminal still remains. I'm new to IOS and Git. I really don't understand what is really happening here.
As per my guess you are working on an old project means which is already developed in Xcode 8 series and now you are working with latest Xcode and you have updated the code accordingly.
So just do the below steps:
"pod deintegrate"
"pod install"
"pod update" (if it is necessary so do it else if you have all latest pod so don't use it.)
It will remove all old cocoapods traces.
OR Alternate way to do it (Temp Work Around)
Remove that cocoa pod temporary, after all your work finish add to your project and give a try cause in my case it is the only work around i have that worked.
In my case pod repos were outdated, solved with pod repo update
if #Ravi Panchal's answer can't solve your problem, it may be your pod repo is out dated
Solution:
pod install --repo-update
First, check your Podfile.lock and make sure no conflict with the spec constraints.
I encounter this issue with strange pod dependency, and solve it by
1. remove Podfile.lock
2. pod install again
It just work like magic. I think it is a bug that cocoapods cannot solve this kind of constraints in Podfile.lock. Remove the old Podfile.lock can make it apply the new rule easily.
please check your podfile and update the platform to the appropriate version number
platform :ios, '11.0'
In my case it worked after I changed iOS version from 8.0 to 9.0 in Target (not Project) settings >> General >> Deployment Info
In .podfile
changed the iOS version
platform :ios, '13.0' // Warning change by your desired
It worked
I had the same issue with FIRMessaging from cocoapods. I solved the issue by doing like following steps
Remove FTPopOverMenu from your podfile which can find in your project folder.
Open terminal and run pod install. You can see in terminal that FTPopOverMenu will be removing from your pods.
Now, again open your podfile and write this pod 'FTPopOverMenu'. Run pod install in terminal.
The error will go away from terminal.
if you are facing this error in Flutter CocoaPods could not find compatible versions for pod
increase your minimum deployments
cd ios and then rm -rf Pods/ Podfile.lock ; pod install
flutter build ios
I fixed by a change to dynamic pod version.
And delete file Podfile.lock
Please check the line below in your Podfile. Please make sure it is commented. it works for me.
platform :ios, '9.0'
I have an answer regarding this in the thread already. But this time my scenario was different. My co-worker accidentally updated the cocoa version from the stable to a beta version, while I was using the lower stable version. I wasn't interested using the beta version, so I didn't update.
As deleting podfile.lock is dangerous which leads to removing the Cocoapods traces, I just opened podfile.lock in editors like Sublime Text, and downgraded the pod which is causing the problem.
Look at the iOS Deployment Target, make it 11.0 and then do
pod install
and it will be fixed
As you may be aware of it, Google now switch to Firebase instead of Google Analytics. So I tried to integrate it to my current working project. Admob is also integrated to my project with Pods.
I have followed Google's document and created a new pod and re-install with firebase. After it , now my project does not build.
Here is error
Use of unresolved identifiers "GADBannerView"
Try switching your imports to just:
#import GoogleMobileAds;
Everything should work as it was before, but using the module map is a great a way to pull in the headers rather than directly importing.
I have resolved it with:
-delete all pod related files from my project folder
-pod init
-re-add my required pods
-pod install
So I get this error as well with GADRequest errors even on Google's sample Banner project.
I fixed it with #Ian Barber's suggestion with #batgun's answer, of updating cocoapod version to 1.0.0 by running
$ [sudo] gem install cocoapods
https://guides.cocoapods.org/using/getting-started.html
then deleting all cocoapod items then install them again.
When I was in cocoapod version lower than 1.0.0, when I run pod install again, I still had errors, like "Use of unresolved identifier 'GADRequest'"
I retyped the whole thing and worked perfectly. When I was still not in cocoapod 1.0.0 version (i think it was 0.39 version), I can only find GADRequestError and not GADRequest.
When I retry extracting the original project now, do pod install and run the app, It doesn't throw any errors now.
I believe this has something to do with cocoapod version but it is not in google admob instruction to update it on.
I was trying to figure this out since the day of the release and losing hope for firebase because it was the sample basic banner project and it doesn't work!
VERIFIED!
I can verify it has something to do with cocoapod version.
I was trying to do the Google's Codelab 'FriendlyChatSwift' practice project since the release and throws a bunch of errors after running pod, not finding bunch of classes.
Steps:
$ [sudo] gem install cocoapods
I deleted the existing downloaded pods and related (ProjectName.xcworkspace, PodFile.lock, /Pods)
Run pod install
Build and Run of the project
It worked perfectly. I also tried running the project before doing this steps and It had bunch of errors.
I had this same issue and this helped me get setup the way I needed it but I don't think anyone touched on my exact issue. Thought I'd provide that just in case someone was looking.
After I cleared everything out and ran pod init I noticed that the generated pod file has use_frameworks! set in it. Once I added that everything was solved. Stupid mistake on my part since you need use_frameworks! for swift projects but leaving that out lead to a lot of random not found errors showing up and going away at random. Hope this helps someone.
please help me on this. I've updated my xcode to xcode6 and now I'm not able to run my application on it due to cocoapods errors. I searched around the web also follow the below steps :
Open Xcode 6
Open Preferences (Menú Xcode-Preferences)
Click the Locations tab
Change the Command Line Tools version to Xcode 6.0
Uninstall from a terminal window cocoapods (all installed versions prompted)
$ sudo gem uninstall cocoapods
Uninstall xcodeproj (all installed versions prompted)
$ sudo gem uninstall xcodeproj
Install xcodeproj
$ sudo gem install xcodeproj
Install cocoapods (retry a second time if fails with a error)
$ sudo gem install cocoapods
Run pod –version to verify that it worked
But Still I'm getting error on pods. My application is running well in xcode 5.1.1 but not in xcode 6. I'm getting error on "SDWebImageDownloaderOperation.m" file and the error is semantic issue.
One more thing when I'm doing pod update in my project folder where the podfile installed, Removing SSToolkit shown and SSToolkit folder removed from project folder. But in xcode 5.1.1 SSToolkit is there.
please someone help me to rid of this issue....
thanx
Your problem is with SDWebImage, not with cocoapods. because of the presence of the getter attribute on the executing and finished properties, the newer version of XCode is not auto-synthesizing the variables.
There should be a compatible version RSN, but to work around it for the time being, you should change your podfile for the package to add the version:
pod 'SDWebImage', :head
Once it gets released you can remove the reference to :head
Note this is a real 'short time window' question - This package will probably start working again in a few days without intervention from anyone barring a pod update.
This is the problem with the SDWebImage.
Just replace _executing with self.executing.
And clean your code and build it again.
Thanks
Sarabjit Singh