Useful commands

Welcome to the useful commands section

Here, we suggest you some methods in order to quickly and efficiently perform certain actions within the SDK.

Stopping the SDK

The following instruction allows you to stop all the SDK services currently running :

Objective-C:

[Accengage suspendAllServices:YES]

Swift:

Accengage.suspendAllServices(true)

Get the device ID

You may need the device ID. You can get it by using the following instruction from anywhere in your code :

Objective-C:

[Accengage shared].accengageId

Swift:

Accengage.shared()?.accengageId

Disable all network calls

Objective-C:

[Accengage setNetworkCallsDisabled:YES]

Swift:

Accengage.setNetworkCallsDisabled(true)

Check notification provider

To check if the given notification was provided by Accengage servers use the isAccengageNotification: method:

Objective-C:

[[Accengage push] isAccengageNotification:notication]

Swift:

Accengage.push().isAccengageNotification(notication)

Get the SDK version

In some case you may need to get programmatically the current Accengage’s SDK version. You can get it by using the following instruction from anywhere in your code:

Objective-C:

[Accengage version]

Swift:

Accengage.version()

Rating and review prompt

This feature allows the users to rate and review applications without ever having to leave the app.

Img

In order to display the prompt, you'll need to add the parameter "accrating" to your URL Scheme template. Parameters string must begin with a "?" and parameters should be separated by a "&".

Example of valid URL Scheme : yourapp://yourpage?accrating

You can ask the Accengage SDK to display the prompt in the following cases:

  • The URL associated with the Push action
  • The URLs associated with the interactive Push button actions
  • The URLs and redirections loaded in web In-App content
  • The URLs associated with In-App actions
  • The URLs associated with Inbox message actions Incoming URLs handled by the application:openURL:sourceApplication:annotation: or application:openURL:options: method of your AppDelegate.