Cannot Install ResearchKit through CocoaPods (ResearchKit Already Present) - ios

I'm trying to install ResearchKit to support an iOS application project that I am working on, but I'm having trouble installing it using CocoaPods. Despite my best attempt(s) at installing, my project fails on the import ResearchKit line in one of the files with an error indicating that ResearchKit cannot be found.
Basic System Information:
MacOS 10.14.6
Xcode 11.3.1 (11C504)
CocoaPods 1.9.3
To install CocoaPods, I'm running the $ pod install command at the command line. ResearchKit is referenced in my Podfile as follows:
pod 'ResearchKit', '2.0.0'
And running $ pod install yields the following:
Installing ResearchKit (2.0.0)
[!] Error installing ResearchKit
[!] /usr/bin/git clone https://github.com/ResearchKit/ResearchKit.git /var/folders/zg/v1h_8jdj5p77k3b208xfl_540000gn/T/d20201019-18654-1lebm6x --template= --single-branch --depth 1 --branch 2.0.0
Cloning into '/var/folders/zg/v1h_8jdj5p77k3b208xfl_540000gn/T/d20201019-18654-1lebm6x'...
Note: checking out 'b46a5f4d8350549918c8aae7d16b67dcb73fbff9'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
git-lfs filter-process: git-lfs: command not found
fatal: the remote end hung up unexpectedly
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
[!] Automatically assigning platform `iOS` with version `13.1` on target `Master-Sample` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
I am, however, convinced that ResearchKit exists on my system, because running $ pod search ResearchKit yields:
-> ResearchKit (2.0.0)
ResearchKit is an open source software framework that makes it easy to create
apps for medical research or for other research projects.
pod 'ResearchKit', '~> 2.0.0'
- Homepage: https://www.github.com/ResearchKit/ResearchKit
- Source: https://github.com/ResearchKit/ResearchKit.git
- Versions: 2.0.0, 1.5.2, 1.5.0, 1.4.1, 1.3.1, 1.3.0, 1.2.1, 1.2, 1.1.2,
1.0.0 [trunk repo]
Any advice on why the ResearchKit install my be failing during execution of the $ pod install command, and/or why, if it is installed on my system, my project is unable to find it?
Thank you in advance! 😊

Resolved - I needed to install git-lfs. (https://github.com/ResearchKit/ResearchKit/issues/1219).

Related

SwiftSoup cocoapods install only and only version 1.4, not 1.5

I tried to install swiftSoup to parse HTML to my xCode project but unfortunately version of swiftSoup installed by command expressed in official site
is 1.4 which is unacceptable to work with swift 4.0. I found out that version of swiftSoup compatible with xCode 9 and swift 4.0 is swiftSoup ver.1.5.2 but I does not installs by command i tried from official site( even more i tried to mention version in a pod file and threw me an error.
How can I install the latest version if swiftSoup by cocoapods?
platform :ios, ’11.0’
This line indicate that what is your pod deployment target so it will install compatible pod with above platform sometime it's happened that after upgrade your project developer forgot to change this target that why sometime old pod install every time. So always change here if you changed the deployment target of your project.
put pod 'SwiftSoup', '~> 1.4' in your pod file and run pod install command and maybe it will help you to get 1.4 version of SwiftSoup
Finally I succeeded to install swiftSoup ver.1.5.8 after a lot of struggling. In general I needed to install classic ancient version of swiftSoup as described in official site (pod 'SwiftSoup') and with big help of Chirag Shah I got to know that I need to mention my target which is iOS 11 (remove hash sign and does this match with current deployment target) and I need to update my old-world pod by pod update command. Thats it. But there was a problem when I inserted command pod update I got and error:
Updating spec repo `master`[!]
Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down
So first I needed to resolve this problem with the big help of this link. I found out that I needed update openssl, then ruby, then cocoapod.
Here is copy of steps I took:
1.8.5-p52
1.8.5-p113
1.8.5-p114
1.8.5-p115
1.8.5-p231
1.8.6
:
2.5.0-rc1
2.5.0
2.6.0-dev
:
$ rbenv install 2.5.0
$ rbenv versions
* system (set by /Users/username/.rbenv/version)
2.5.0
$ ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
$ rbenv global 2.5.0
$ rbenv versions
system
* 2.5.0 (set by /Users/username/.rbenv/version)
$ ruby --version
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
$ gem install cocoapods -n /usr/local/bin
$ which pod
/usr/local/bin/pod
$ pod --version
1.4.0
And then I can return to my project where I uninstalled my old pod and mention target ios 11:
platform :ios, ’11.0’
and eventually insert pod update command then cocopods will update my pod without any error =))

Google Cocoapods Not Installing

Whenever I try to install any of Google's cocoapods I get one of two errors.
Either:
$ pod install
Analyzing dependencies
[!] The version of CocoaPods used to generate the lockfile (0.38.0.beta.2) is higher than the version of the current executable (0.37.2). Incompatibility issues may arise.
CocoaPods 0.38.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Installing Google (1.0.7)
[!] Error installing Google
...
inflating: /var/folders/<myDirectory>/Samples/signin/SignInExampleSwift/ViewController.swift
warning [/var/folders/<myDirectory>/file.zip]: 375 extra bytes at beginning or within zipfile
(attempting to process anyway)
Or:
$ pod install
[in /Users/<user>/Desktop/FakeProject]
Analyzing dependencies
CocoaPods 0.38.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Installing AppInvites (1.0.1)
[!] Error installing AppInvites
[!] /usr/bin/tar xfz /var/folders/<myDirectory>/file.tgz -C /var/folders/<myDirectory>
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
I've been trying this with both new and existing objective-c projects and have tried uninstalling and re-installing cocoapods. Not really sure what the issue seems to be and Google doesn't have any troubleshooting for their cocoapods.
Try updating your gem
sudo gem update -n /usr/local/bin cocoapods
pod install
Deleting podfile.lock and pod install fixed it for me.
I had the same issue and I did gem install cocoapods first then pod install worked fine.
After 6 hours i found this
go to http://cocoapods.org/ and download tar file

Can't run pod install - permission error

I have been trying to run someone's project but can't do pod install.
pod install
Analyzing dependencies
Pre-downloading: `KNMultiItemSelector` from `https://github.com/kentnguyen/KNMultiItemSelector.git`
Downloading dependencies
Installing AFNetworking (2.5.1)
Installing Amplitude-iOS (2.2.4)
Installing Analytics (1.11.2)
Installing AppsFlyer-SDK (2.5.3.10)
Installing Bugsnag (4.0.3)
[!] Error installing Bugsnag
[!] /usr/bin/git submodule update --init
Submodule 'KSCrashModule' (git#github.com:bugsnag/KSCrash.git) registered for path 'KSCrashModule'
Cloning into 'KSCrashModule'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Clone of 'git#github.com:bugsnag/KSCrash.git' into submodule path 'KSCrashModule' failed
I tried a bunch of different suggestions on Stack Overflow etc. and still running into this. Anyone have some other ideas?
I have same problem. I follow
Checking for existing SSH keys(https://help.github.com/articles/checking-for-existing-ssh-keys/)
Adding your SSH key to the ssh-agent(https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#adding-your-ssh-key-to-the-ssh-agent)
and then enter Correct SSH keys password.
"pod install" again, It's work.
I ended up removing the "Bugsnatcher" podfile and reinstalling it. I had another error with a different podfile afterwards, but also reinstalled that one. Project built after that.

How to add cocoa pods to this project?

I got an error after installing this pod.
I successfully got that original app to work after bringing it to my desktop and installing pods.
The problem is that after trying it with the real app I want to merge it with, after running pod install and opening the .xcodeworkspace project; I get 1 warning saying the file is already open or something like that.
My question: Should one run pod install in the same place where my original .xcodeproj is located or somewhere else? How do I install this pod to my own application without an error? When I open workspace I see the title of my app and under it 4 pods with a question mark and one compiler warning.
WTL2:~ Apple$ cd desktop
WTL2:desktop Apple$ cd myapp
WTL2:myapp Apple$ touch podfile
WTL2:myapp Apple$ open -a TextEdit Podfile
WTL2:myapp Apple$ pod install
Analyzing dependencies
CocoaPods 0.36.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Installing FXBlurView (1.6.3)
Installing HexColors (2.2.1)
Installing MessageBanner (1.0.3)
Generating Pods project
Integrating client project
[!] From now on use `myapp.xcworkspace`.
WTL2:faunna Apple$
The specific Xcode warning is:
couldn't load myapp because it is already open from another project or workspace

The `master` repo requires CocoaPods 0.18.1 -

I am getting:
[!] The `master` repo requires CocoaPods 0.18.1 -
Update Cocoapods, or checkout the appropriate tag in the repo.
How to checkout cocoapods?
To update CocoaPods you can run:
$ [sudo] gem update cocoapods
If you would like to try a pre-release version of CocoaPods you can run:
$ [sudo] gem update cocoapods --pre
from here
I had a similar problem and upgrading to cocoapods 0.18.1 is not an option for me (at the moment).
In my case I wanted to stick with cocoapods 0.16.4. So, I double checked to make sure I was not using version 0.18.1.
$ pod --version
0.16.4
If you need to: uninstall any new version of cocoapods (when prompted select which version of cocoapods you want to uninstall):
$ sudo gem uninstall cocoapods
I then switch my local repository from the 'master' to the '0.16' tag. I will be downgrading to repo '0.16' because that is more inline with my version of cocoapods (0.16.4).
$ cd ~/.cocoapods/master/
$ git checkout 0.16
You should now be using repo '0.16' instead of the 'master'.
$ cd ~/.cocoapods/master && git branch
* 0.16
master
Finally, I had to clean up my XCode project workspace by completely re-installing my Pods.
$ cd to/your/project
$ rm -rf Pods/
$ rm Podfile.lock
$ pod install
Now, my cocoapod version matches my repo version. Note: You switched your local repository from the 'master'. You can always switch back to the 'master' repo using git checkout master.
All the other answers didn't help here. I'm no ruby expert, but I think my problem was, that I had 2 Ruby versions installed:
the one that comes with OS X
and one I had installed with rvm (Ruby Version Manager).
When I updated the gems, the wrong gems got updated. The symptom was, that the after the update the command line told me cocoapods was version 0.20.2, but when I did pod --version I got 0.16.0 back.
I guess this could have been corrected with a symlink cleanup at the wright place, but I decided to get rid of the second Ruby installation instead. I found a way to do it here - the answer of Erick.
After that I updated the cocoapod gem with sudo gem update --system, the the cocoapods with sudo gem install cocoapods. Now the pod install worked :-)
I hope the above makes sense. Please edit, if I'm wrong.
Try gem install cocoapods:1.1.1 --user-install
where replace 1.1.1 to your desired virsion

Resources