Skip to content

๐Ÿš€ Getting Started

Guide and instructions for setting up the Numberly SDK for iOS apps

Before continuing
  • The SDK is compatible with iOS 10.0 and higher
  • Xcode 12+ is required

1. Install the SDK

target 'MyApp' do
    pod 'Numberly'
end

Warning

Please make sure that your CocoaPods version is 1.10 or higher.

  1. Download latest SDK version
  2. After unarchiving the downloaded .zip file, include the Numberly.xcframework in your project by dragging and dropping it into the left panel. Make sure you check the Copy items if needed box.
  3. Be sure Numberly.xcframework is in Link Binary with Libraries section in the Build Phases of your application target.
  4. Be sure that Enable Modules and Link Frameworks Automatically are enabled in the target Build Settings.
  5. Be sure that Embed & Signed is selected for Numberly.framework in General, Frameworks, Librairies and Embedded Content.

Important

Download the numberly-sdk-ios-x.x.x.zip not the source code zip.

2. Create and add the configuration file

Open the project .xcworkspace and create a Numberly.plist file. Make sure that it's included to your applicationโ€™s target.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>app_key</key>
    <string>the app key provided by numberly</string>
    <key>automatic_integration</key>
    <true/>
    <key>automatic_notification_registration</key>
    <true/>
</dict>
</plist>

Options

You can customize the configuration with the following properties:

Key Type Required Default Description
app_key String The app key provided by Numberly.
automatic_integration Boolean true If enabled, Numberly will automatically intercepts incoming notifications.
automatic_notification_registration Boolean true If enabled, Numberly will automatically registers for remote notification on starting.

3. Enable push capabilities

Add the Push Notification capability to your project by following this guide.

4. Start the SDK

Here we are! Now you can simply start Numberly in the AppDelegate's application:didFinishLaunchingWithOptions: method:

import Numberly

func application(_ application: UIApplication,
                 didFinishLaunchingWithOptions
                    launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    Numberly.start()
    ...
}
@import Numberly;

- (BOOL)application:(UIApplication *)application 
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    [Numberly start];
    ...
}

Troubleshooting

If you want to validate your implementation you can active the Numberly logs:

Numberly.logLevel = .debug
Numberly.logLevel = NBLLogLevelDebug;

Tips

It's highly recommended to disable logs on production.