I am using RestKit in my project since a long time, using CocoaPods.
Podfile:pod 'RestKit', '~> 0.26.0'
Today, for unknown reasons, my project doesn't compile anymore. To the best of my knowledge, i have not changed any project settings or anything.
I get the error in RKObjectManager.h:
/projects/iphone/Pods/Headers/Public/RestKit/Network/RKObjectManager.h:892:49:
Unknown type name 'AFNetworkReachabilityStatus'; did you mean 'SCNetworkReachabilityFlags'?
If i go into the h.file and click on the ReachabilityStatusEnum, i can see it, so it seems to be there although it says 'Unknown Type'.
I am at a loss as to how fix this. I followed the RestKit cocoapods instructions when i set it up a long time ago. Could it be because i upgraded xcode recently?
Very thankful for pointers...
This seems to be an issue with RestKit and cocoapods 1.0.1 (maybe also 1.0). What I did was install version 0.39 which I had used before.
sudo gem install cocoapods -v 0.39.0
and then use this Version to install
pod _0.39.0_ install
solved the problem for me at least for the time being.
OK, so in the end, i had to add this to the .pch file. I have never had it there, and my project has built for over a year without it. Would be great to know why i suddenly had to include it...
#if __IPHONE_OS_VERSION_MIN_REQUIRED
#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
#else
#import <SystemConfiguration/SystemConfiguration.h>
#import <CoreServices/CoreServices.h>
#endif
Had the same issue. You should use pre 1.0 versions of CocoaPods. If you have already the newer version installed pod --version do the following steps:
Install 0.39.0 version of CocoaPods sudo gem install cocoapods -v 0.39.0
Setup it with pod _0.39.0_ setup
Check whether it worked well with pod _0.39.0_ --version
You should see 0.39.0.
NOTE: in certain cases you will see that the version of pod _0.39.0_ --version is still the same newer version that you are trying to override. In this case you have to use - sudo gem uninstall cocoapods, then from the menu you will see in Terminal uninstall the newer version and finally get pod _0.39.0_ --version returning you exactly 0.39.0.
Now you can run pod install as usual.
Do not forget to switch back to the actual version later :)
This problem happened to me today.
SOLVED: Just change your Podfile from 0.26.0 to this:
Podfile:pod 'RestKit', '~> 0.27.0'
and then, on terminal, run:
{your_machine}$ pod install
Now working for me :D
Related
I am using an iOS framework called fi.notes. Currently i am using the version 2.1.0. I tried to update to 2.3.1. But i keep getting the error in terminal, when i run pod install
[!] Unable to satisfy the following requirements:
- FinotesCore (= 2.3.1) required by Podfile
None of your spec sources contain a spec satisfying the dependency: FinotesCore (= 2.3.1).
I am following their developer documentation, which can be found here
https://finotes.github.io/2018/02/02/objc-docs
Thank you in advance.
Looks like you missed adding --repo-update in pod install
pod install --repo-update
Please make sure the version in Podfile is the latest one, and re-run the pod install command.
Good luck building better apps with fi.notes. :)
First of all:
inhibit_all_warnings!
do not work for Pods written in Swift, like Alamofire. It works only for other Pods, written in Objective-C. How do I block all the warnings?
UPDATE:
This has been fixed in CocoaPods version 1.0.0.beta.1.
There is no workaround to fix it. It's a CocoaPods known issue and they are working on it, said Alamofire : https://github.com/Alamofire/Alamofire/issues/937
When it will be fixed, you will just have to update CocoaPods by simply install again your gem:
$ [sudo] gem install cocoapods
I want to install specific dependency using cocoapods. if I execute pod install, other dependencies are updating before installing my newly added dependency. I just want to install specific pod without touching other dependencies. And I know deleting, updating any dependency also updates others. Is there any way to solve this problem?
Actually my problem is when I myself modify some dependency and run pod install it reverts back to its original version. But I don't want to lose my changes
Any suggestion will be appreciated.
Make sure that Podfile.lock is in the same folder as Podfile is.
Add a line in the Podfile
pod 'MBProgressHUD','~> 0.9'
cd to your project and use the following line in the Terminal, it'll install just the above pod you specified.
pod install podName
From official website here's the link!
Running pod install will install the current version of RestKit, causing a Podfile.lock to be generated that indicates the exact version installed (e.g. RestKit 0.10.3). Thanks to the Podfile.lock, running pod install on this hypothetical project at a later point in time on a different machine will still install RestKit 0.10.3 even if a newer version is available. CocoaPods will honour the Pod version in Podfile.lock unless the dependency is updated in the Podfile or pod update is called (which will cause a new Podfile.lock to be generated). In this way CocoaPods avoids headaches caused by unexpected changes to dependencies.
Is it possible to somehow specific the version of CocoaPods I'd like to use when upgrading or installing a Podfile? I've encountered several times where Podfiles work correctly with one version of CocoaPods but not with others.
For example, the syntax I'm looking for is like the following:
pod -v 0.34 install
Since CocoaPods is installed through RubyGems you can use their mechanisms for doing this. As outlined here you can do this:
pod _0.34.0_ install
You can verify this is working with:
pod _0.34.0_ --version
Also I would highly advise against doing this at all. I would definitely recommend you keep CocoaPods up to date and change your Podfile as needed to adapt to new versions. At anytime your old version could stop working as expected if we bump the minimum version number.
the ultimate solution:
run a bash script to completely uninstall your current verison (Optinal)
for i in $( gem list --local --no-version | grep cocoapods ); do
sudo gem uninstall $i;
done
sudo gem uninstall xcodeproj
install a specific verison of CocoaPod
gem install cocoapods -v 0.39.0
I found out that the way to resolve an issue, in a library i'm using, is to add use_frameworks! to the podfile. When i run pod install on the terminal, i get the following error:
[!] Invalid Podfile file: undefined method `use_frameworks!' for #.
Updating CocoaPods might fix the issue.
I'm using Cocoapods so i don't understand this issue. This tag is required for projects using swift, i'm using objective-c.
Looks to me like the second part of that error message:
Updating CocoaPods might fix the issue.
Is your issue. use_frameworks! was added in CocoaPods 0.36.0 which was just released recently.
Use pod --version to see what you're currently running. Assuming it's earlier than 0.36.0 you'll need to update it with
[sudo] gem install cocoapods
Which is just the same way you originally installed it.
I had the same issue when trying to run pod install on my mac.
So incase anyone encounters this issue what worked for me was changing the current ruby version with rvm.
On console, Use rvm list to see what versions you have installed:
So the version of ruby that was running on my mac was ruby-2.1.2.
I changed it with:
rvm use ruby-2.2.2
and ran pod install again and it worked.