iOS Troubleshooting

Troubleshooting the Apptentive iOS SDK

​ Here are a few of the more common issues that customers have run into when integrating the Apptentive iOS SDK in their app. ​

Help! My Ratings Prompt isn't Showing!

​ This is probably the most common issue customers encounter. There are a few reasons why this could be happening:

  • Not enough time has passed--or the app hasn't been launched enough times--since the current version of the app was installed: By default, the ratings prompt will not show in the first 5 days after installing a new app version, or before the app has been launched 5 times, as configured in the Apptentive dashboard. Try turning off the Wait for setting, or set your device's clock forward the same number of days as you have specified. You can trigger a launch event in the simulator by selecting Home from the Hardware menu, and then clicking your app's icon to relaunch it. In any case, if you make a change on the dashboard, you will have to restart your app (and wait for "Received remote Interactions from Apptentive" to appear in the console) for the updated settings to take effect.
  • Who or Where conditions are not being met: If you have stringent Who conditions for your ratings prompt, you may not be satisfying all of them when your Where event is engaged. Try reducing or removing all Who conditions until you see the ratings prompt, and then add the conditions back one at a time. Note that you will have to delete and reinstall the app for each configuration or the "only show once per version" logic will prevent you from seeing the Ratings Prompt a second time.
  • The view controller passed in to the -engage:fromViewController: method isn't able to present UI: In version 3.2.0 and later of the SDK, you will see an error in the console when this happens ("Attempting to present interaction on a view controller whose view is not visible in a window."). This can happen for several reasons:
    • The viewController parameter is nil
    • The view controller has not been added to a window yet, for example if the -engage:fromViewController: method is called in -viewDidLoad (use -viewDidAppear: instead)
    • The view controller's view is no longer visible, for example if the -engage:fromViewController: method receives a view controller that is in the process of being dismissed or obscured. If you want to engage an event after dismissing a view controller, call -engage:fromViewController: in the completion block of -dismissViewControllerAnimated:completion: and pass in your view controller's presentingViewController property. Likewise, use the completion block of -presentViewController:animated:completion: to engage an event after presenting a view controller, passing in the newly-presented view controller.

Message Center isn't Loading

​ In order to allow Message Center to be configured from the Apptentive dashboard, the SDK has to download the configuration from our API at least once before Message Center can be presented. This normally happens within 15 to 30 seconds of launching the app for the first time. By default, the SDK will log a message to the console indicating when the configuration has loaded ("Received remote Interactions from Apptentive.").

​Before the configuration is loaded, users who launch Message Center will see a message explaining that it is not yet available ("We’re attempting to connect. Thanks for your patience!"). In real-world use it is unlikely that a user would encounter this, as they would have to seek out the Message Center feature within a few seconds of launching your app for the first time. However it is quite likely that you will encounter this when testing your app, so please wait for the configuration to load before launching Message Center.

Occasionally when our API is experiencing a period of unusually heavy load, it may take longer than the typical 15 to 30 seconds for the configuration to download. If you are seeing HTTP errors (specifically error number 502) in the console, or it is taking longer than a minute for the "Received remote Interactions from Apptentive" message to appear, please check our Apptentive Status twitter account for updates. In this case the Apptentive SDK will retry sending event, message, and survey data until it is successfully transmitted.

No Attach Button in Message Center

The image attachment button may be hidden for one of two reasons:

  • Your app is not configured to support portrait mode on iPhone. This is required by the system image picker.
  • Your app does not have an entry for the NSPhotoLibraryUsageDescription key ("Privacy - Photo Library Usage Description") in its Info.plist file. iOS 10 and later requires a usage description for apps that wish to access the user's photo library.

My Navigation Bars are Blank

By default, the barTintColor property of the navigation bars in the Apptentive UI is set to white. If your status bar text and icons, your navigation bar title text color, or your bar button items' tint color is set to white as well, they will appear invisible. In that case you should make sure to set a contrasting bar tint color as described in the customization guide. ​

Odd Behavior When Updating the SDK version

When updating the SDK from a prior version, occasionally the resource bundle can get out of sync with the SDK or vice versa. It may be helpful to remove files from Xcode's Derived Data directory, as the Clean and Clean Build Folder options don't always completely clear the appropriate caches:

rm -fr ~/Library/Developer/Xcode/DerivedData/*

Contact Us

Have any questions, comments, or feedback?
We're here & happy to help.
Reach out to us anytime.

Thank you!
We will get back to you as soon as possible.