cocoapod : pod setup failed with fatal error - objective-c

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.

Related

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.

AppCenter doesn't seem to run pod install despite existence of Podfile

I've got a react-native app that builds on AppCenter. I have a Podfile in my /ios directory, and locally, I can run pod install. The AppCenter documentation says that "App Center scans the selected branch and if it finds a Podfile, it will automatically do a pod install step at the beginning of every build. This will ensure that all dependencies are installed.", but as far as I can tell, it's not running pod install for my build and the build fails for that reason.
Tried adding pod install to a pre-build script, in which case the build succeeds.
Make sure the Cocoapods version running on the build agent matches the one on your podfile.lock.
You can add a post clone script like this on your ios/ folder:
appcenter-post-clone.sh This will automatically install the matching cocoapods version.
Push that file to your repo, then make sure you open the build configuration and hit Save and Build.
It appears that in addition to having a Podfile, you must NOT have a ios/Pods folder present. In my case, I also had to explicitly add that folder to my .gitignore

library not found for -lProtobuf in Xcode

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.

Vue-native-script / environment not working

When I run
tns run ios --bundle
Output:
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Preparing project...
Installing pods...
Analyzing dependencies
[!] Unable to find a specification for Socket.IO-Client-Swift (~> 11.0)
You have either:
* out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.
[!] Automatically assigning platform ios with version 9.0 on target fitness because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
Unable to apply changes on device: F5BCC0F3-70B6-40D9-AF43-CBEBE1CEDFB5. Error is: 'pod install' command failed..
Do the pod install manually to check where is the problem:
Remove your current build: tns platform remove ios
Build the app source code only: tns build ios --bundle
Navigate to the project folder platforms/ios, run pod install to see if there is error. If it's still same error, remove Podfile.lock if any, then try pod repo update

cocoa Pod svn issue

I have integrated cocoa pod in my project. The workspace was successfully created and all is fine. After that I committed the same to SVN. Now when someone else takes a checkout, they get the follwing error.
diff: /<path to cocoa pod>/Pods/../Podfile.lock: No such file or directory
diff: /<path to cocoa pod>/Pods/Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your Cocoa Pods installation.
Also the workspace is also not created.
I can suggest you little workaround here.
Before initial commit to SVN, ignore "Pods" folder in project files.
Create new project
terminal : pod init
Add your dependencies to podfile
terminal : pod install
terminal : svn propset svn:ignore Pods .
// ignores Pods folder under project folder.
Do your first commit to SVN
terminal : svn commit -m "FIRST COMMIT"
When others checkout project from SVN, they need to pod install once and ignore "Pods" folder.