iOS SDK Installation

Pre-requisites

  1. Xcode version 15.1 or newer
  2. Obtain client settings from Publift:
    • TENANT_CODE
    • TAG_ID
    • GADApplicationIdentifier

Installation (Swift Package Manager)

  1. Add the Fuse swift package registry by running the following commands in Terminal:
swift package-registry set --global --scope publift https://swift.cloudsmith.io/publift/fuseapp/
swift package-registry login https://swift.cloudsmith.io/publift/fuseapp/ --token BrnMk9bbufLlX4Vd
  1. Open your Xcode project
  2. In Xcode, select the menu item “File > Add Package Dependencies…"
  3. If you are prompted for keycain access to swift.cloudsmith.io, click “Always Allow”
  4. On the “Add Packages” popup, type in the search box “FuseAppSDK”
  5. In the search results, select publift.FuseAppSDK and click the “Add Package” button
  6. On the “Choose Package Products” popup, tap the “Add Package” button
  7. In the main Xcode window left panel, FuseAppSDK will now be listed under “Package Dependencies”

Installation (CocoaPods)

  1. Install CocoaPods in your Xcode project
  2. Add the following lines to your Podfile:
# Put these lines at the top of your Podfile.
source 'https://dl.cloudsmith.io/BrnMk9bbufLlX4Vd/publift/fuseapp/cocoapods/index.git'
source 'https://cdn.cocoapods.org/'


# Add the 'FuseAppSDK' package to your app.
target 'MyApp' do
  pod 'FuseAppSDK'
end

# Put these lines at the bottom of your Podfile.
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
    end
  end
end
  1. Run pod install (or pod install --repo-update if it fails)

Initialization

If you app launches using an App class, add the following code:

import FuseAppSDK

@main
struct MyApp: App {
    init() {
        ...
        
        FuseSDK.shared.initializeSDK()
    }
}

Alternatively, if your app launches using an UIApplicationDelegate class, add the following code:

import FuseAppSDK

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {`
    ...
    
    FuseSDK.shared.initializeSDK()
    
    return true
}

Build Settings

In your Xcode project “Build Settings”, set the following configuration:

Key Value
User Script Sandboxing No

App Info Settings

Add the following key/value pairs in the Info.plist file of your Xcode project:

Key Value
com.publift.mobile.TENANT_CODE (Provided by Publift)
com.publift.mobile.TAG_ID (Provided by Publift)
GADApplicationIdentifier (Provided by Publift)
SKAdNetworkItems Copy & add the contents from here.
GoogleUtilitiesAppDelegateProxyEnabled NO
App Uses Non-Exempt Encryption NO