Skip to content

Integrate the SDK

This guide explains how to integrate Foxit PDF SDK into an iOS project and complete license initialization.

Step 1: Create an iOS project

  1. Open Xcode and choose File → New → Project….
  2. Select the App template and click Next.
  3. Fill in app details and create the project (for example PDFReader). Choose Objective-C or Swift.

Step 2: Integrate Foxit PDF SDK

Foxit PDF SDK for iOS supports manual framework import or CocoaPods.

Option 1: Manual framework import (quick validation)

2.1 Copy frameworks into the project

Copy these files from the SDK libs/ folder into your project:

  • Required (core)

    • FoxitRDK.framework (or FoxitRDK.xcframework)
  • Optional (built-in UI / as needed)

    • UI Extensions: uiextensionsDynamic.framework (or .xcframework)
    • Scanning: FoxitPDFScanUI.framework

INFO

For Mac Catalyst (run iPad apps on macOS), use the .xcframework variants.

2.2 Add frameworks in Xcode

  1. Select the target → GeneralFrameworks, Libraries, and Embedded Content.
  2. Click +, choose Add Other → Add Files…, and add the frameworks above.
  3. Set Embed to Embed & Sign.

2.3 Configure Build Settings

In Target → Build Settings:

  • Framework Search Paths — add the framework directory (for example $(PROJECT_DIR)/libs).
  • Other Linker Flags — add -ObjC.

Option 2: CocoaPods

The SDK includes FoxitPDF.podspec for local CocoaPods integration.

2.4 Create a Podfile

Create Podfile at the project root:

ruby
platform :ios, '11.0'

target 'PDFReader' do
  use_frameworks!

  # Replace with the actual path to SDK libs/
  pod 'FoxitPDF/FoxitRDK', :podspec => 'path/to/libs/FoxitPDF.podspec'
  pod 'FoxitPDF/uiextensionsDynamic', :podspec => 'path/to/libs/FoxitPDF.podspec'
end

2.5 Install dependencies

From the project root:

bash
pod install

Open the project with the .xcworkspace file.

2.6 (Optional) Enable UI Extensions

For a full-featured PDF reader (UI Extensions), add uiextensionsDynamic.framework. For deep UI customization, import the UI Extensions source project (libs/uiextensions); see Customize UI from source.

2.7 (Optional) Enable scanning

For scanning, also add FoxitPDFScanUI.framework and configure camera permission in Info.plist:

xml
<key>NSCameraUsageDescription</key>
<string>Camera access is required for document scanning</string>

Step 3: License and initialize the SDK

Initialize licensing before calling any Foxit API. See Trial and licensing.