Library not found for -lFolly - xcode

After updating react-native from version 0.63.2 to 0.66.1, i get the following error in Xcode when i try to build my app.
library not found for -lFolly
I've tried running pod install and cleaning the build folder.
My Library Search Paths look like this for both release and debug.

Delete libFolly.a file from Xcode>Targets>General and clean DerivedData, run again. Maybe you can face with other problems but if you don't use folly file in your pods it will work. I hope it works for you too.

I have been struggling with this issue. Finally this solution resolved the issue.
I had the two copies of files in the codebase. Deleting one copy helped code to build successfully
Source: https://stackoverflow.com/a/53417764/8364900
<project name>/ios/<project name>.xcworkspace/contents.xcworkspacedata
The above location may have reference to multiple copies of your project. If so delete one copy then run the project.

Related

How can I fix error when building React-Native 0.68.0?

The issue seems to be known on the React-Native github repo, but I'm not able to find a solution.
Building a new project on version 0.68.0 always fails with :
I tried many solutions found here and there.
Here are the most obvious troubleshooting steps I took :
Restarted computer
Deleted Podfile.lock
Updated pods
Removed everything related to Xcode and re-installed Xcode
My colleague and I both use a MBP. Everything works fine for him since he's able to build >= 0.68.0 projects.
Here's my configuration :
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NOT BUILDING
Here's his configuration :
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BUILDING
Any hint ?
EDIT : Created a 0.69.0-rc.6 project and it builds properly.
try deleting files in the following:
~/Library/Developer/Xcode/DerivedData
then clean build folder and rebuild

The application bundle does not contain a valid identifier

I try to run my project but i get the following error "The application bundle does not contain a valid identifier."
here my info.plist
I followed other answer on the question. I don't have any "Ressources" folder inside my project.
Thanks for your help
I solve this problem after I delete all build files by Xcode.
Your build file path at Xcode > Preferences > Locations > Derived Data
If you didn't change the default path, Your path is like
I just deleted all files under DerivedData
In my case, this problem occurred when I manually removed a pod from my file browser in XCode.
In order to fix it, I deleted the associated entry in my podfile, and ran 'pod install' from the terminal.
Additionally, I had to delete the relevant search paths and other references to that pod. And of course I had to clean the project.
In my case, my app's bundle contained a dash like com.some-thing.app so I just changed it to com.something.app and the problem was fixed.
In my case, the value for "Bundle Identifier" key was missing in Info.plist
In my case the info.plist had the wrong encoding format, I still don't know why it changed. So I had to create a new one from Xcode and copy paste all the keys.
Cleaning the project solves my issue. Product -> Clean
I was building the wrong target on a device in my case. I was building the Test target rather than the normal app target.
In my case, I've added a framework into Embed Binaries phase, but it was already in my Link Frameworks and Binaries phase, which created a duplicate entry. Once I deleted one of them, this error starting appearing.
To fix it, I've removed the framework from both build phases and added it one more time
For my case, it's caused by a wrong Info.plist in a framework(lack of Bundle identifier and Executable file)
Use ideviceinstaller -i xx.app can see the detailed error log.
I ran into this issue trying to run flutter build ios, where the errors were related to trying to access WatchOS and TvOS simulators. For now, not sure how to disable that.
What worked was to run flutter run
In my case, the framework info.plist lack of Bundle identifier.
use cmake create dynamic framwork misss Bundle identifier of the info.plist

Crashlytics file not found

Recently opened a project that I had compiled and submitted to Apple.
I haven't touched it for a couple of months but I'm getting this odd compile error at:
#import <Crashlytics/Crashlytics.h>
The error reads:
'Crashlytics/Crashlytics.h' file not found
Clearly the framework can't be found but I'm puzzled as to why, when the project was working a few months ago, it's suddenly stopped.
Any suggestions why?
Xcode: 4.6.3
Mac OS X: 10.8.4
Just add $(SRCROOT) to the Framework Search Paths in Project Build Settings (Search Paths).
Crashlytics installation process drops its Crashlytics.framework to your project folder (or creates the symlink).
If you moved Crashlytics.framework somewhere deeper in the project folder hierarchy - set 'recursive' to the right or just point directly to its parent folder in Header Search Paths:
$(SRCROOT)/Path/to/the/folder/containing/Crashlytics.framework
Delete frameworks from you project and disk. Check that you have the newest version of Fabric plugin.
Copy frameworks from plugin folder to desktop with this commands:
ditto -xk ~/Library/Caches/com.crashlytics.mac/5b91b14e832a7b1c29441ec5ba109810/sdks/ios/com.twitter.crashlytics.ios-default.zip ~/Desktop/
ditto -xk ~/Library/Caches/com.crashlytics.mac/5b91b14e832a7b1c29441ec5ba109810/sdks/ios/io.fabric.sdk.ios-default.zip ~/Desktop/
Add frameworks from desktop to your project.
Info from: https://twittercommunity.com/t/error-upgrading-from-crashlytics-on-ios/36196/2
I'd recommend just using CocoaPods to add the Crashlytics framework. No need to care about paths anymore.
Podfile:
pod 'Crashlytics', '~> 3.4.1'
Script Build Phase for dSYM Upload:
./Pods/Crashlytics/iOS/Crashlytics.framework/run <your_crashlytics_id>
Import:
#import <Crashlytics/Crashlytics.h>
For me, this worked:
Remove the fabric and crashlytics frameworks from your project, and delete the files from the disk for our project.
Comment the lines in your appdelegate.m file, if you added them for the following:
import Fabric/Fabric.h
import Crashlytics/Crashlytics.h
and
[Fabric with:#[CrashlyticsKit]];
In the fabric app, choose "New app", and select your Xcode project file
Recopy the build script and build as instructed. The build step is why you needed to comment the lines above-- it won't work if you leave those lines in.
After the build script runs, it will prompt you to drag the frameworks from the app window into your project navigator. This will copy the latest versions of he frameworks (which include the .h files) into your project
I have tried manually downloading, and copying from other projects, but this is the only way I could recover after losing the frameworks files for an app.
In my case, the Framework was in the project folder, but not in the Project Navigator. I dragged it to the project and everything worked fine.
I've had this issue working with distributed teams (through github) after checking in then checking out Crashlytics. The Crashlytics.framework will only have one folder inside it -- "Versions". You need to save a version of the contents inside Crashlytics.framework to another location, then copy-paste them into Crashlytics.framework later.
Remove Crashlytics.framework from the project and disk. Copy and add it again. It helped me.
In my case, I was migrating from an old Crashlytics install through the Mac app to Cocoapods. A lot of the answers to this question recommend completely removing everything and starting over. I started doing this and noticed a discrepancy between code found in Fabric's documentation and the code shown in the Fabric app during the step where it tells you what to copy into your Run Script Build Phase.
Fabric's documentation has double quotes surrounding the entire string: "${PODS_ROOT}/Fabric/Fabric.framework/run <Your_API_Key> <Your_Build_Secret>"
The Fabric App only had double quotes around the path to the run executable: "${PODS_ROOT}/Fabric/Fabric.framework/run" <Your_API_Key> <Your_Build_Secret>
So before you delete everything and start over, try updating your Run Script Build Phase to this:
"${PODS_ROOT}/Fabric/Fabric.framework/run" <Your_API_Key> <Your_Build_Secret>
I have changed the name of the working folder and Craslytics fails. Check this in Build Settings (Search Paths).
Good luck!
I have tried to play with the frameworks search path and relocating & reconnecting the framework file; checked the build settings (Link binary with libraries section) but the error persisted.
Finally, I have reinstalled the framework, which only takes 2-3 minutes. The problem might be caused by that you have relocated the Crashlytics.framework to another subfolder from the root directory, but I am not sure about the exact reason.
Delete everything regarding to the Crashlytics
Start crashlytics app, login and select your project
Add run script
Drag & drop the .framework file (I have kept it in the root folder)
Add the import and startWithAPIKey statements back
Completely Remove the Crashlytics Frameworks on your proj include the shell script in App Build Phases Run Script.
Reinstall the Fabric follow the guide,everything will be OK.
I had previously upgraded to Fabric and had no issues. A couple of days later, I reopened the same project and had the missing crashlytics.h file problem.
I couldn't simply reinstall from the plugin due to a non compiling project (I had so many CLS_LOG messages and references to the missing crashlytics.h file in my project, it would have taken a long time to remove them just to allow the build to work - refactor wouldn't work on CLS_LOG).
So instead, I deleted the crashlytics.framework from my project and did the following to reinstate it from the plug in directly:
Download the Fabric plugin again and double click the zip file to unpack the Fabric application.
Right click the Fabric icon and "Show Package Contents"
Copy the Crashlytics.framework folder to your Desktop and then re-add it to your project via File -> Add Files to ....
If step 3 doesn't work for you, you can also add crashlytics.framework to your project folder on your computer directly, and then also add it into your project list via Xcode same as in step 3 but uncheck "Copy Items if Needed" as you already put the files there yourself.
My project then compiled and worked fine again.
In terms of a guess as to why the file went missing? Part of the upgrade process got me to delete the old frameworks and then run the scripts etc. from the plugin. I think what happened is later when I emptied my trash, that some references were lost. I also had the problem where I'd put Crashlytics into my .gitignore file so it disappeared out of ALL my projects every committed which wasn't great.
Hope this helps someone!
I have same error.
Please try pod update
and fix it.
If FirebaseCrashlytics 9.0.0 installed , problem will be fixed.
stalling FirebaseCoreDiagnostics 9.0.0 (was 8.9.0)
Installing FirebaseCoreExtension (9.0.0)
Installing FirebaseCoreInternal (9.0.0)
//hrer
Installing FirebaseCrashlytics 9.0.0 (was 8.9.0)
Installing FirebaseFirestore 9.0.0 (was 8.9.1)
Installing FirebaseInstallations 9.0.0 (was 8.9.0)

Fixing file 'project.pch' has been modified since the precompiled header was built error in Xcode

I was recently working on my application messing around in the info.plist section, and since that my application will not run on my test device:
file 'project.pch' has been modified since the precompiled header was built
Something to note is that the app runs fine in the simulator.
Edit: Now I am getting this error instead of the other one:
No such file or directory (/Users/Me/Library/Developer/Xcode/DerivedData/MyProject-abcdefghijklmnopqrstuvwxyz/Build/Products/Debug-iphoneos/MyApp./MyApp)
How to regenerate the info.plist file?
You could try a deep clean (not the same as Product > Clean) - Option+Command+Shift+K
Note: this means the clean the build folder (by pressing Option + Product -> clean folder)
Close your project or workspace.
In Finder: ⇧shift+⌘cmd+G
Paste: ~/Library/Developer/Xcode/DerivedData/
Delete the ModuleCache folder and empty trash.
Open up your project.
Clean: ⇧shift+⌘cmd+K
Build: ⌘cmd+B
In my case the error message had a small hint:
note: after modifying system headers, please delete the module cache
at
'~/Library/Developer/Xcode/DerivedData/ModuleCache/5CYAJ91AZCB7'
I tried and it worked.
Simply touching the project's pch file solved this issue it for me :
touch Test.pch
Product -> Clean
Product + Option -> Clean Build Folder
Close Project or Workspace
Clean 'ModuleCache' path in Finder.
Worked for me in Xcode6 GM and iOS 8.0.
When the .h file of a Library Provided with Xcode is changed (even a space), this error could occur.
The following maybe tried in order to fix this issue
In, Project -> Build Settings, change Precompile Prefix Header to NO
OR
Run rm -rf ~/Library/Developer/Xcode/DerivedData and Clean Build
I constantly had this since upgrading from Xcode 4.6 to Xcode 5 with iOS projects when using command line build (xcodebuild).
What worked for me is to use this as command line build command:
xcodebuild -project path/to/my.xcodeproj -configuration Debug clean build
Before this, I've tried:
Clean the project in Xcode GUI.
Delete the offending pch file.
Delete the offending pch file's parent folder.
Delete the DerivedData project folder.
None of the above worked for me under Xcode 5.0.2, Mavericks, iOS7.
Note that the problem didn't happen to me when using Xcode GUI.
I just go to directory "/$HOME/Library/Developer/Xcode/DerivedData/", delete everything there
Just Click Product from the menu and select Clean
Product>Clean
Worked fine for me.
I got the same problem. My error said like I need to delete the cache in the below locaition,
Users/myusername/Library/Developer/Xcode/DerivedData/ModuleCache/3FGETKFCU0N0W
3FGETKFCU0N0W was a folder, when I deleted it and then clean build the project. Then the error disappears.
rm -rf ~/Library/Developer/Xcode/DerivedData/
If you use AppCode you can try remove content form:
/Users/[Username]/Library/Caches/appCode30/DerivedData/
Worked for me :)
Also, just open terminal, and delete the .pcm file that has been generated (Xcode 6 onwards)
rm <path-to-pcm-file>
If you get this when switching between git branches, try adding this post-checkout hook which will clean your project every time you change branch.
!/bin/sh
xcodebuild clean -configuration Debug
Save as .git/hooks/post-checkout relative to your project root and don't forget chmod +x .git/hooks/post-checkout
For me, this problem is only occurring in Xcode 6 beta version, So I switch back to Xcode 5, and now problem is solved.
I tried all the steps suggested by all users here, but no one worked for me.
So, if you have both versions of Xcode and have issue only in Xcode 6 beta, then switch to Xcode 5 and clean the project, problem will be solved.
I tried these one by one but failed to build and run my project. So I changed Precompile Prefix Header to NO as mentioned by #Abhilash Gopal, then I reset the simulator,deleted the derived data, removed the corresponding .pcm file(In my case it was the UIImage.h from UIKit framework, so removed the UIKit.pcm).Then I cleaned the project and only then I was able to build it successfully. In earlier versions of Xcode these files were locked basically and were not allowed to edit. But its not the case now. Hope this helps someone who face the same situation.
The only solution there worked for me was running the following command:
sudo rm -R /var/folders/
But that gave me a lot of troubles in OS X.
I thought because /var/folders/ is for temporary files it should be okay to just empty anything in it.
But I was wrong see the following post: link
And the problem you described occurred every-time I tried to build my Xcode project - I'm building it from the CLI though Jenkins.
Which means I couldn't run the rm command every-time. So I found some inspirations and wrote the following ruby script which solved my problem:
#!/usr/bin/env ruby
require 'fileutils'
cache = Dir.glob("/var/folders/**/com.apple.DeveloperTools*")
FileUtils.rm_rf(cache)
I hope it would be helpful to someone.
Deleting project.xcworkspace did a trick for me.
project.xcworkspace is a directory which describes schema of current Xcode workspace state. Each time Xcode is launched it will regenerate project.xcworkspace if not exist already.
In order to delete project.xcworkspace:
Right click on your project file yourProject.xcodeproj
From drop-down menu choose Show Package Content
Purge xcworkspace file
If you are building on command line using xcodebuild remove '-parallelizeTargets' option passed to the command. That fixed the issue for me
After going through a lot of answers and helpful suggestions, I found out the solution to be: Uninstall Xcode 6 and reinstall it through the available dmg file and then install all the components for Xcode.
Product + Option -> Clean Build Folder, Clean Build Project, Deleting Module Cache files and Derived data files, using touch .pch, deleting pcm file, using command line to remove var/folders (Surprisingly, all of this did not help in my case)
Was stuck at it for more than 3 hours before finding the solution. Hope this helps someone.
Thanks.
Just open terminal and fire below command:
rm /Users/pratik/Library/Developer/Xcode/DerivedData/ModuleCache/LKL48GNAN6S7/UIKit-2X95M2Q1NPNPL.pcm
give your file path which return .pcm error. and then Clean Project and Run...Enjoy!!!

How fix building workspace error in Zend Studio?

How to fix building workspace problem in Zend Studio?
I'm trying to rename project and rename folder of project, however nothing:
Errors occurred during the build.
Errors running builder 'JavaScript
Validator' on project 'PROJECT'.
java.lang.NullPointerException
you must go to Project->Properties->Builders then disable ‘Javascript Validator’.
The bug has been fixed, you can either wait for the new release or apply the patch :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318004
I had similar problem and mine is that the saving workspace process try to write in one of the file and it can't even it is available under .metadata directory.
This is how I did:
Open the .metadata directory and look for that particular file, yours can be different, so
change it to read and write for this file then restart eclipse.
It fixed the problem!.
My OS: Ubuntu 10.04 , Eclipse SDK 3.5.2
Hope this help...

Resources