1. Download Lookback SDK
Download the Lookback SDK and unpack it into your project's folder, so that the folder
lookback resides in the same folder as your Xcode project.
2. Add Lookback-Resources to your project
Lookback.framework into your project (for example, into the Frameworks folder):
In the dialog box:
- Don't copy items into destination group's folder
- Do choose to create groups for any added folders
- Make sure that your main app target is selected
3. Add Linker Flags
You need to add
-ObjC -l"c++" to your linker flags. Select your project in the sidebar, then your main target, then Build Settings. Search for Other Linker Flags, and append
4. Add frameworks
Lookback uses a number of system frameworks that you have to link your app to. In the same view, click Build Phases, then Link Binary With Libraries, and then the + button to add the following frameworks:
5. (Optional) Add LookbackLive
The above steps will prepare your app for self-testing-recording, but not live streaming. To add support for Live, you need two additional steps:
5a. Link with LookbackLive
In addition to Lookback-Resources and Lookback.framework, also drag LookbackLive.framework into your project, choosing to not copy, to create groups, and to add to your main target.
5b. Link with LookbackWebRTC
LookbackLive depends on a fork of the project WebRTC, which is distributed through CocoaPods.
To find the latest version, see the CocoaPod of LookbackWebRTC, click "See Podspec", and follow the link to WebRTC.zip under source.http.
The zip file will contain a WebRTC.framework — copy it into your project's folder.
Drag the framework from your project folder into your project, and again, choose to link with your main target, without copying items.
5c. Link with SocketRocket
Lookback Live depends on the third party library SocketRocket, 0.5.1 or newer. Please follow their installation guide to get SocketRocket into your app.
6. 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:
7. 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:
8. Configure Lookback Participate
Awesome work so far 👍. Next, it's time to configure Lookback Participate!