Can I use LayerKit without CocoaPods?

If you do not want to use CocoaPods, you can also clone the LayerKit repository from Github and install the framework directly.

1. Setup

If you wish to install LayerKit directly into your application via the binary framework, then you have a choice between two distributions:

  • LayerKit.framework - This build artifact is a dynamic framework that is compatible with Objective-C and Swift projects that target iOS 8 and higher.
  • LayerKit.embeddedframework - This build artifact is a pseudo-framework that contains a static library asset and a set of public header files. It is compatible with Objective-C projects that target iOS 7 and higher.
  1. Open up the releases folder and locate the appropriate framework you need.

  2. Drag the framework into your XCode project 

  3. Make sure "Copy items if needed" and "Create groups" options are checked 

2. Link Dependencies

LayerKit needs a few other frameworks to be included in your project in order to function properly.

  1. In XCode, navigate to your Target Settings 

Select the "Build Phases" section and expand the "Link Binary With Libraries". Add the following frameworks to your project:
  • SystemConfiguration.framework
  • CFNetwork.framework
  • MobileCoreServices.framework
  • Security.framework  
  • libsqlite3.tbd

    Navigate to your "Build Settings" tab and add the -ObjC and -lz flag to the "Other Linker Flags" setting. 

NOTE: If you are using LayerKit.embedded framework you can skip Steps #3 and #4.

3. Add Copy File Phase to Build Phases

1. Go to "Build Phase" section of your target settings.
2. Click on the + button in the top left and select "New Copy Files Phase".
3. Under the Copy File Phase, select the "Destination" dropdown and select "Frameworks".
4. Drag and drop the LayerKit framework from the project navigator into the "Name" section.



4. Add Run Script Phase to Build Phases

1. Go to "Build Phase" section of your target settings.
2. Click on the + button in the top left and select "New Run Script Phase".
3. In the script text input box paste the following snippet:


5. App Transport Security

Starting with iOS 9 and Mac OS X El Capitan applications are subject to the new App Transport Security policies around SSL connections. LayerKit requires certain ATS exceptions that must be configured in your Info.plist file. Please follow these instructions to configure ATS.

Have more questions? Submit a request