Integrate Restkit into a Swift Cocoa Touch Framework

117 views
Skip to first unread message

Stéphane Bitterlin

unread,
Oct 26, 2015, 11:44:08 AM10/26/15
to RestKit
I'm developing an app with a Today Extension. To share code between these two projets, I would like to use my own Cocoa Touch Framework. I have the following project structure in Xcode :
  • Project for the app
  • Project for the today extension
  • Project for shared code (Cocoa touch framework)
To test my structure, I created a swift class in the framework and I accessed it from the app and from the extension. Everything works fine.

But now, I would like to integrate Restkit into my framework. My goal is to have a framework which have a Core Data Model and which can retrieve data from a JSON API. I already used Restkit in another Objective-C project, but here I'm not able to correctly integrate Restkit in my framework. I didn't find any good example on the internet for now. 

I tried to add Restkit to my project using CocoaPods with the following pod file :

platform :ios, '8.0'
use_frameworks!
pod 'RestKit', '~> 0.25.0'

# Testing and Search are optional components
pod 'RestKit/Testing', '~> 0.25.0'
pod 'RestKit/Search',  '~> 0.25.0'

My project can now be built but I've got a lot of warnings and I'm not sure that I integrate Restkit correctly in my projet?

Could you help me to do it right ? 

For information, I'm using Xcode 7.1 with Swift

Thanks for your help.
Reply all
Reply to author
Forward
0 new messages