I'm trying to use Restkit via CocoaPods for my first time, on a brand new project, but I encounter some issues building the project once Restkit is introduced:
I have followed these exact steps:
Created a brand new Xcode project, default options.
Created a podfile with the following contents :
platform :ios, '6.1'
pod 'RestKit/Testing', '~> 0.20.0pre'
pod 'RestKit/Search', '~> 0.20.0pre'
Run pod install then opened the workspace
Updated the prefix file as instructed here.
I'm running these versions, all valid according to the Restkit documentation:
Git git version 1.8.1.2
CocoaPods 0.16.2
Xcode 4.6
Can anyone suggest what I may have done wrong, or what I can do to solve this? Thanks
You have to include the base of Restkit as well. Add
pod 'RestKit', '~> 0.20.0pre'
To your Podfile.
Found a solution described here.
It involves searching the project for #import and replacing it with #import . The project compiles!
//#import <RestKit/RestKit.h>
#import <RestKit/CoreData.h>
In this case the offending file was RKOperationStateMachine
Related
My project in Xcode consist of static frameworks and one custom dynamic framework. This dynamic framework includes some other static frameworks.
When I try to compile the custom dynamic framework itself, everything is fine. I was able to force to install latest version of frameworks (Alamofire, Realm, etc..) by forcing the pod definition file
platform :ios, '9.0'
But when I compile my project even when I use the above line, I am getting the old frameworks.
When I try to force the pods for a explicit version,
pod 'Alamofire', '~> 4.4.0'
getting the version 3.5.1.
Is there any other explicit setting to force CocoaPods to be more accurate in versions?
Originally the project for the dynamic framework was made for the Swift version 2.3, which is actually requiring the version of Alamofire 3.5.1.
Any help will be appreciated.
Maybe try the following in your podfile:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '4.4.0'
That will bypass your local spec repo and get straight from git.
Which version of CocoaPods you have currently installed on your machine? Which version was used to originally establish Pods in project? I've spotted an issue when I updated CocoaPods, that pod update hasn't been working properly, and removing just Podfile.lock and Pods/ directory wasn't sufficient to make things right.
That said I would do the following:
update CocoaPods to newest version
pod repo update for newest Pod specs
pod deintegrate to completely remove Pods from project
pod install to re-create Pods in the project
The solution is kinda tricky. I haven't realise in the beginning that the pods under a dynamic framework cannot actually be executed directly from top project and there is a configuration JSON file, which actually is managing the pods under the dynamic framework.
So the pod versions were actually hardcoded there.
seem a bit old question but I have try some solution but did not work. I doubt that is because old Facebook frame work is not working anymore. I have a Objective-C project that use FacebookSDK. I have copied FacebookSDK.framework into project folder and add using target-build phrase - link binary with binaries. I tried to clean and build the project but still got error #import <FacebookSDK/FacebookSDK.h> file not found. Is there any solution for this issue? many thanks? By the way how to check version facebookSDK and see whether I need to migrate to new updated version?
If you are using Cocoapods i would suggest to update your FacebookSDK
to the latest with adding those 3 dependencies :
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
then a Pod Install from terminal to download the frameworks and finally do some changes since the new sdk is different .
I am using pod 'AFNetworking', '2.6.0'.
But every time I am getting this error:
Recently I updated my mac gems. After updating gems I am getting this error.
Can you please any one help?
Try
#import "AFNetworking.h"
instead of
#import <AFNetworking/AFNetworking.h>
And, of course, do not forget to check the header paths inside your project properties and check if cocoapods correctly installed 'AFNetworking' project. Try to find AFNetworking.h file inside 'pods' directory.
EDIT
Type, what is writen inside 'header search path'
1.
2. What is placed inside /path/to/app/Pods/Headers/Public/ ?
If you have updated your gems, check version of cocoapods if is version 1.0.0, probably you need to change your Podfile.
ex:
platform :ios, 'IOS_VERSION_HERE'
target 'YOUR_TARGET_HERE' do
pod 'AFNetworking', '2.6.0'
pod ...
pod ..
end
After that in terminal go to you project folder where is the Podfile located and write command:
pod update
After that if you see some warnings try to fix them. The warnings will guide you what to do if is necessary.
Then try to clean your project and Build it again.
IMPORTANT!!!
When you use Pod's you must open YOUR_PROJECT_NAME.xcworkspace instead of YOUR_PROJECT_NAME.xcodeproj
Hope this help.
After updating pod's to (pod 'AFNetworking', '3.0') I was facing same issue.
Replacing
#import "AFNetworking.h"
With
#import AFNetworking;
solved my problem!
Next steps always help me to fix the issue:
Select Pods file in your project.
Open the Build settings for Pods project
Set Build Active Architecture Only to false. Build and Run the project again.
The issue was that I couldn't build and got the error message 'AFCompatibilityMacros.h' file not found
Simply running pod deintegrate and then pod install fixed it. I found the solution in this discussion.
I want to update some of my project pods and after run pod update "some_framework" and try to build project appear this error:
import "RKObjectMapping.h" file not found
Current CocoaPod version is 0.39.0 I have tried to downgrade to 0.38.2 and lower but without any success, XCode version is 6.4 I have tried to change configuration of search path in Build Setting from non-recursive to recursive but again without success.
So I don't know what to do next, because I need to do some updates in project and RestKit is main framework for working with server side.
Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.1'
pod 'RestKit', '~> 0.24.1'
pod 'EZForm', '~> 1.1.0'
pod 'OCMock', '~> 3.0'
pod 'ImoDynamicTableView', '~> 1.1.273'
pod "ImoDynamicPopUp"
pod 'Masonry', '~> 0.6'
This is how error looks like, in Xcode: Error image
A little late to the party,I had same issue with cooca pod 0.39.0 and restkit 0.24.1 updated restkit to 0.26.0 and issue was fixed
Imports in public header files should be #import <RestKit/Subdirectory/RKHeader.h> instead of #import "RKHeader.h"
This is required for RestKit to be compatible with future CocoaPods version because of CocoaPods/CocoaPods#4057 (The HEADER_SEARCH_PATHS will no longer be constructed recursively) introduced in 0.39.0.beta.1.
I know this is old, but the easiest way to fix this is to add ${PODS_ROOT} (and set it to recursive) in Header Seach Paths under Build Settings in your target settings.
Had same issue few days ago. It seems that I had two CocoaPods version 0.39.0 and 0.38.2. When I removed 0.39.0 and updated pods it worked.
Use gem list in terminal to see installed gems.
I had the same issue, I did use 0.26.0 version of Restkit but 0.38.2 of cocoa pods. The only thing I'd to change after was selecting "Project Pods", and in "Build Settings -> Build Active Architecture Only" change to NO
[UPDATE]!!!!
You can now follow the answer from #sajjon in this post from github to use cocopods versions: 0.39.0, 1.0.0 and 1.0.1
if anyone is having problems with RestKit 0.26.0 and Cocoapods 1.0.1,
hopefully this will help!
This solution worked at least on 2016-06-03, but since it uses
specific git branches maybe these will be merged, so if this does not
work for you please check if this git branches have been
merged/moved/deleted.
Clean up before everything
Quit Xcode
rm -rf Pods
rm -rf MyApp.xcworkspace
rm -rf ~/Library/Caches/CocoaPods
rm -rf ~/Library/Developer/Xcode/DerivedData
Use mcfedr's RestKit fork
Must be used together with "reachablility" branch of AFNetworking
pod 'AFNetworking', :git => 'https://github.com/mcfedr/AFNetworking.git', :branch =>
'reachability'
pod 'RestKit', :git => 'https://github.com/mcfedr/RestKit.git', :branch => 'pods1' Use module
import syntax in Bridging Header
#import RestKit;
Updated to Cocoapods 1.1.1 and RestKit 0.26.0 and it works fine.
I tried everything I could imagine to fix this issue... Please help!
After updating to Xcode 6.4 and Parse SDK 1.7.5 I'm getting build error:
"Parse/Parse.h file not found"
Here's my Podfile:
target 'TV Admin' do
pod 'RETableViewManager', '~> 1.6'
pod 'SDNetworkActivityIndicator'
pod 'Motif'
pod 'Parse', '~> 1.7'
end
All Cocoapods dependencies except Parse are working great.
Here's .xcworkspace view:
I'm using Cocoapods 0.38.0.beta.2
Thanks.
I ran into this issue after updating XCode to 6.4 today.
Taking a look at the Search Frameworks showed that they were empty after the XCode update.
So change the Framework Search Paths in Project -> Build Settings -> Framework Search Paths and Add $(SRCROOT) (recursive)
That fixed it for me.
So the problem was in podspec file. Parse team updated it to 1.7.5.3 for Parse, ParseFacebookUtils, ParseCrashReporting and now everything works great.
Now simply running pod update should fix the issue.
Here's the original post on official developers group.