Set up Setapp Framework

📘

Note

Skip this step if you integrate Setapp Framework via CocoaPods.

Link the Setapp Framework to your app

❗️

Important

You must strictly follow the provided instructions to make your app function correctly within the Setapp environment.

Link libSetapp.a to the app target. Go to the Build Settings tab of your project and add the following value string to Other Linker Flags (OTHER_LDFLAGS):

-force_load 
"$(BUILT_PRODUCTS_DIR)/libSetapp.a"
👍

Tip

If you used Setapp Library before and now you want to upgrade to Setapp Framework, you must replace this row
-force_load "$(PROJECT_DIR)/libSetapp.a" -framework Security -framework IOKit -framework QuartzCore -framework Cocoa

with the ones you see on the picture above.

Add the public key

Do this step also when you integrate Setapp Framework via CocoaPods.

Setapp Framework uses the Setapp public key of your app to check the subscription data that it gets from Setapp. Each app and each platform has its own key.

  1. Download setappPublicKey.pem in your developer account: Apps > + Add new version > Download public key. See Integration requirements.

  2. Add the file to the main app target in Xcode. In the dialog, select Copy items if needed and the main app target. The app must have the file at Contents/Resources/setappPublicKey.pem. Do not rename the file, and do not add it only to an app extension.

  3. Build the app, and make sure that it has the file:

    ls -l MyApp.app/Contents/Resources/setappPublicKey.pem

Setapp checks the key in each build that you upload. A build without this file, or with the key of another app, is blocked. See framework.public_key_missing and framework.public_key_mismatch.



Did this page help you?