The iOS SDK is compatible with the Swift programming language. Any version of the SDK before v3.6.10 does not work with Swift Application Delegates. You can use a workaround by using an Objective-C delegate class. Usage of the SDK from Swift is demonstrated in the Swift sample project starting with V3.6.10.
- The automatic integration method requires a main.swift file to be created in the project. It should contain the following:
import Foundation import UIKit UIApplicationMain(CommandLine.argc, nil, nil, "MCEAppDelegate")
- In order for Swift to use the classes in the SDK, you must have a bridging header in your application and include the following line in it:
For more information, see http://apple.co/1NeqEPF.
- When used with a Swift Application Delegate, the MceConfig.json file requires the package name prefixed to the class name for the appDelegateClass value:
Go Back to the Mobile App Messaging home page.