1. Install CocoaPods

If you haven't installed CocoaPods, open a terminal and type the following commands to install and set it up:

gem install cocoapods
pod setup

2. Configure your project

Download this Podfile and put it in your project folder, next to your Xcode project. It contains the following two lines (which you can also append to your existing, if you already have one in your project):

pod 'Lookback'

This will tell CocoaPods to download the Lookback framework, which you can then use from your code.

Less Live
Note that the above method includes the Live feature, which can make your app grow by several megabytes. If you want a leaner app and only want to do self-testing (i e, no Live), use this Podfile instead:

pod 'Lookback/SelfTest'

HD vs Safe
P.S. We previously had both a "HD" and "Safe" version of the SDK. HD is no longer available, and only the appstore-safe version of Lookback is available. It is called just "Lookback", and "LookbackSafe" is no more.

3. Install the Lookback pod

With a terminal and in your project folder, install Lookback into your project like so:

pod install

An Xcode Workspace file will be generated. Open the workspace file – it’s named after your project, ending with .xcworkspace.

4. Import from Bridging Header

If you're using Swift, you need to import Lookback from your bridging header before you can start using the Lookback APIs.

If you don't already have a bridging header in your Xcode project, just create an Objective-C file in your project, and Xcode will ask you if it should create one for you.

Once the bridging header is created, you can just delete the new Objective-C class.

To your new "MyApp-Bridging-Header.h", add this line, and you're done:

#import <Lookback/Lookback.h>

4. Disable Bitcode

Lookback uses Google WebRTC, which doesn't support Apple's Bitcode. Your app will work with no penalty without it, so you can disable it in your build settings:

5. Configure Lookback Participate

Awesome work so far πŸ‘. Next, it's time to configure Lookback Participate!

Did this answer your question?