How to integrate RestKit Framework (restkit.org) with xCode 4?

I followed the instructions on the github page, but something is wrong (of course I am: P), but do you know about any good tutorial for integrating / using in Xcode4 RestKit?

Thanks!

+6
source share
6 answers

Download the latest version of this link http://restkit.org/

and extract the zip folder and you will find the ReadMe.md file explaining the installation steps for Xcode 4.x, as shown below.

Xcode 4.x (Git Submodule)

  • Add submodule: git submodule add git://github.com/RestKit/RestKit.git RestKit
  • Open the project that you want to add RestKit to Xcode.
  • Focus your project and choose View> Navigators> Project to display a list of project files.
  • Drag the RestKit.xcodeproj file from the Finder and drop it onto ".xcodeproj.
  • Click on the project name in the left sidebar to open the project settings view in the right pane of the window.
  • In the middle pane, you will see the PROJECT and TARGETS headers for your project. Click on the name of your project, then select Build Settings at the top to open the build settings editor for the entire project.
  • Find the Header Search Contours settings. Double-click and add a new entry. Add the search path to the directory "$(SOURCE_ROOT)/RestKit/Build" that you added to your project. DO NOT check the Recursive box.
  • Find your Library Search settings. Double-click and add a new entry. Add the search path to the directory "$(SOURCE_ROOT)/RestKit/Build/$(BUILD_STYLE)-$(PLATFORM_NAME)" that you added to your project.
    NOTE : This is only necessary if you are NOT using DerivedData.
  • Find Other linker flags and double-click on it. Use the + button to add a new entry and enter -ObjC -all_load . Release the editor using the Finish button.
  • Find the target you want to add RestKit to the TARGETS list in the middle of the editor area. Select it to open the destination settings editor in the right pane of the window.
  • Click the Phase Build tab at the top of the window to open the Build Phases editor.
  • Click the disclosure triangles next to Target Dependencies and Link with Libraries .
  • In the Target Dependencies section, click the + button to open the target selection sheet. Click on the collective RestKit target (it will have a bull’s eye) and click the Add button to create the dependency.
  • In the Link Binary with Libraries section, click the + button to open the library selection sheet. Here we need to instruct the target link to all the necessary RestKit libraries and several system libraries. Select each of the following items (one at a time or holding down the Command key to select everything at once), and then click the Add button:
    • libRestKitCoreData.a - Optional. Only necessary if you are using Core Data.
    • libRestKitJSONParserJSONKit.a
    • libRestKitNetwork.a
    • libRestKitObjectMapping.a
    • libRestKitSupport.a
    • CFNetwork.framework
    • CoreData.framework - optional. Only if you are using Core Data li>
    • MobileCoreServices.framework
    • SystemConfiguration.framework
    • libxml2.dylib - optional. Only needed if you are using a mapping from XML payload and the libRestKitXMLParserLibxml.a link into your application.
  • Before proceeding, make sure all libraries are displayed in the Link Binary with Libraries section.

Congratulations, you have now added RestKit to your Xcode 4-based project!

Now you only need to add the additions for the RestKit libraries to the appropriate places in your application. These include:

 #import <RestKit/RestKit.h> // And if you are using Core Data... #import <RestKit/CoreData/CoreData.h> 
+18
source

I found this tutorial very useful to make it work on xCode 4.0.

http://liebke.github.com/restkit-github-client-example/

+3
source

I made my assembly following these cool https://github.com/RestKit/RestKit/wiki/Installing-RestKit-in-Xcode-4.x and guoleii is right. But I needed to change the owner directory.

+2
source

Have you seen these topics from the RestKit Google group?

link 1 link 2

Try to find there. But at the moment, there seem to be a lot of problems with RestKit and Xcode 4, there is even a video showing problems (no one shows how -to).

+1
source

Did you create RestKit according to the wiki page "Installing RestKit in Xcode 4.x" at github.com/RestKit? I think there is a little mistake. here is my solution: 1. in "Build Phases" β†’ "Link Binary With Libraries", remove RestKit.framework and add Security.frameWork 2. create again

then it works.

0
source

I just tried installing RestKit on the newly created Xcode 5 iOS 7.0 project. I tried to download the project and followed the steps above, but in the RestKit / Vendor folder I lost most of the content. After a little research, I did the submodule tactics and got all the information from these folders.

From the command line, change the directory to the project folder, for me it was

 $ cd Documents/Projects/NewlyCreatedApp 

From there you should run this command if you do not have a git repository Note: you must download git to install this if you have not already

 $ git init 

after that you should run these commands to load restkit into the project folder

 $ git submodule add git://github.com/RestKit/RestKit.git $ git submodule update --init --recursive 

After that, you should go to the Nakkeeran answer above and start from step 2 to set up the process. In step 7, you will be asked to add "$ (SOURCE_ROOT) / RestKit / Build" in the header search path, but upon closer inspection, the RestKit structure no longer has a build folder, so you should change it to "$ (SOURCE_ROOT) / RestKit / Code" to match the current version of Rest Kit

I hope this helps, and here is a link to the submodule information I posted. RestKit installation submodule method

0
source

Source: https://habr.com/ru/post/886846/


All Articles