library not found for -lProtobuf in Xcode - objective-c

I'm using Xcode 10.2.1 and objective-c in my project. after using this commond in terminal:
git checkout "specific commit"
I'm bring back my codes to 4 month ago. after using this command in terminal I must change Bundle Identifier (because I'm no longer have access to that developer account).
after that I'm getting this error in Xcode (before that I'm getting error about account, No account for team "*****".):
library not found for -lProtobuf
I tried to delete pod file and reinstall pods by run this command in terminal:
pod install
but the problem not solve.

Try to open your project from its .xcworkspace file instead of .xcodeproj file.

Related

xcode command line tools not able to locate git

On Big Sur, I had XCode CLT installed, but not xcode itself. Git was working fine.
Then I installed XCode and now when I try to run git I get the following message:
git: error: Failed to determine realpath of '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk' (errno=No such file or directory)
git: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -find git 2> /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)
xcode-select: Failed to locate 'git', requesting installation of command line developer tools.
A popup comes up, asks to install CLT and when I say ok, it downloads and installs for a few minutes. But when it's done, I'm right back where I started.
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk does not exist, but there are directories for 10.15, 11.1 and 11.3. But not 10.14.
Run the command:
sudo xcode-select -switch /Library/Developer/CommandLineTools
I had the same experience. The solution was to launch Xcode and complete that first run. It downloaded some stuff as part of the process and git was fine after that.
I was receiving the same block of error messages you were, but in either the line above or below was a tidbit suggesting to run xcodebuild -runFirstLaunch which I suspect would have had the same effect as manually running Xcode that first time.

Xcode builds successfully a corrupted archive, not showing in organizer, as soon as cocoapods installs react-native-mapbox-gl from Podfile

The problem seems not new, as here, but the solutions proposed didn't work.
I tried also several other approaches to understand what's going on (see here).
To replicate, this is the process:
I have a working iOS App written in Swift.
I follow the description to integrate this app with Native React this procedure
I add to the package.json the following dependencies, and run yarn install:
"#react-native-mapbox-gl/maps":"^8.1.0-rc.9",
"prop-types": "^15.6.2",
I run pod install --repo-update and Archive on Xcode.
OUTPUT: At this point the organizer displays my Archive.
I implement a basic view on mapbox following this procedure
I add to the Podfile requiring use_framework!, as described here or after use_framework!, no difference in the result after I hit pod install --repo-update.
I hit Archive on Xcode.
OUTPUT: the archive is generated successfully, but doesn't show up on the organizer. If I try to open it, the archive is corrupted.
If I remove the pod file of mapbox and I Archive the project after hitting pod install --repo-update, the archive works and shows up in the organizer. Here the same description.
The project runs both as debug and release on a real iPhone 8. Mapbox works well. However, it doesn't work on simulator, nor archive. I can leave with the former, but I can't push on App store because of the latter.
I would not give up as Mapbox is very nice and provides lots of features. What could it be?
SOLUTION :
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.9.3
rm Podfile.lock
rm -rf Pods
pod install
LAST MESSAGES :
Same here. Impossible to find any solution.
Xcode is building a incomplete archive file. (By incomplete, I mean that in the archive package, some files are missing, like info.plist)
If this can help, I'm using MapboxGL too.
Edit :
Found this https://github.com/react-native-mapbox-gl/maps/issues/1097#issuecomment-725689831
Edit 2:
This link was the solution !
I got the exact same problem with :
#react-native-mapbox-gl/maps": "8.1.0"
COCOAPODS: 1.10.1
Xcode 12.4
The archive was corrupted (missing parts like the plist)
The trick for me was to remove the copy dsym build phase of the #react-native-mapbox-gl-mapbox-static pod
This phase was causing build failure with some config and malformed archive with others, I don't really get the crux of the problem but may be it can help some of you...
It looks like mapbox issue. I had the same issue and instead of downgrading the cocoapods I used this solution:
Edit your package.json, set:
"#react-native-mapbox-gl/maps": "^8.2.0-beta1",
2. Run yarn install or npm install.
3. Put the code into your ios/Podfile between pre_install do |installer| and end:
$RNMBGL.pre_install(installer)
And between post_install do |installer| and end:
$RNMBGL.post_install(installer)
Run cd ios && pod install
After these steps I was able to generate to archive.

Using React-native-permissions I get this error when trying to build with xcode ld: library not found for -lPermission-LocationWhenInUse

I have tried manual linking as described here but I still get the error library not found for -lPermission-LocationWhenInUse
Do the below steps
go to ios folder from terminal,
run 'pod install' or 'pod update'.
Open ios/newproject.xcworkspace.
Also do not forget to enter the permission strings for location inside your info.plist file
First run react-natve link , then cd ios and then run this command pod install
cd .. and react-native run-ios
Don't forget to install pods

cocoapod : pod setup failed with fatal error

I successfully installed cocoapod by using "gem install cocoapods". After that trying to set up pod by using "pod setup", but gives fatal error.
sh-3.2# pod setup
Setting up CocoaPods master repo
[!] Pod::Executable clone 'https://github.com/CocoaPods/Specs.git' master
Cloning into 'master'...
error: transfer closed with outstanding read data remaining while accessing https://github.com/CocoaPods/Specs.git/info/refs?service=git-upload-pack
fatal: HTTP request failed
please help me to solve this..
This issue appears to be just a temporary network issue. Try to verify if you can clone the https://github.com/CocoaPods/Specs repo in a folder manually.
1 - first install git (command line tool for mac)
link to download is : http://git-scm.com/download/mac
2 - then open commind line (or terminal) and type
$ sudo gem install cocoapods (you need to wait here , be patient)
3 - now you can shoot the command "pod --version" to check the version of the pod you just installed.
4 - Write again on terminal $ pod search libpusher (just an example of a library, you can type any library name here instead of 'libpusher' ).
5- let it be complete , it may take some time.
6- then most imp step , create the pod file , (name can be 'podfile') in your project directory and add it to your project in Xcode.
7 - Now Here the secret is : you need to provide the path to this pod file too here , so type command:
cd /Rakesh/vidyo_demo/vidyo_phonegap/ios (eg.)
after cd command rest is the path of the pod file directory.
8- and now when you will type 'pod install ' command in terminal.
and all libraries (which are written in podfile) will get installed on your project path. just then open the project which now has a workspace file. like demo.xcworkspace (open it)
9- here is the format of pod file:
platform :ios, '7.0'
pod 'libPusher', '~> 1.4'
This issue has been already reported to cocoapods.
Ok, after a few hours lost, it seems if my project path contains
single quotes or spaces, things fail. Sigh.

Shell Script Invocation Error

I am using open ssl in my project. I was running this project successfully in xcode 4.0.2. Recently I updated to XCode 4.2. But its showing build errors. here is the error log
Make[1]:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2: No
such file or directory
Could someone help please?
Thanks
Zach,
Are you using the openssl-xcode project that we (Zetetic) published for use with SQLCipher? If so, you should be able to solve this problem by updating to the latest versions of openssl-xcode and sqlcipher from Github. If you used git to clone them, this should update them without a problem:
$ cd your_project/openssl-xcode
$ git pull origin master
$ cd your_project/sqlcipher
$ git pull origin master
The build scripts were updated for use with Xcode 4.2 and LLVM, should work without a hitch. We've updated the tutorial for Xcode 4.2 as well.