So you have created a native mobile app and have enabled it for use with BlueConic.
This article describes how to test your native mobile app in the BlueConic Simulator, which will allow you to use the advantages of the Simulator, such as setting specific properties, forcing a certain segment, or enabling/disabling specific dialogues or variants.
Set up a Mobile Channel
First, you will have to define a channel for your app.
- Select Settings > Channels & BlueConic Hostnames from the BlueConic navigation bar.
- Click the Add channel button.
- Select the Domain for the new channel, for example Mobile.
- In the Channel Settings page, create a new channel of the type "Mobile App".
- Give the new channel a name.
- Assign the unique ID of your app in the "App ID" field.
Define a new position
- Click the Add position button to define a position in the app:
- iOS: Use the variable name of the class @IBOutlet as defined in your ViewController. For example, if the variable name is webViewPlaceHolder, enter #webViewPlaceHolder as Selector.
- Android: Use the android:id as defined in the XML layout resource. So for example, if your resource file contains
<WebView android:id="@+id/webViewPlaceHolder" />
Enter this as Selector:#webViewPlaceHolder
Android developers can use the getPositionIdentifier call to retrieve positions. See the Android developer documentation to learn about layout resources.
- In the Positions screen, enter the Name and Selector.
- Click Save to store the channel.
Your mobile channel is now ready to be used.
Use the BlueConic Simulator for testing
With the Mobile App channel set up, you can now use the BlueConic Simulator to connect to this mobile channel:
- Enter the App ID (as defined in the channel) in the address bar.
- Scan the QR code that appears in the Simulator with your mobile device. Alternatively, click the button Connect via email to receive an email message that will allow you to open the mobile app.
After scanning the code or opening the link from the email, your mobile app should open with a connection to the Simulator. The Simulator responds to the connection by showing information.
With the connection between BlueConic and your native mobile app established, changes to profile properties in your app will be visible in the Profile widget. Also, profile properties from BlueConic should be available to the app.
Note that the BlueConic mobile API assumes that a native mobile app will pull the most recent information from BlueConic. In other words, BlueConic will not push information to the mobile app. So if you make changes in the Simulator, you will have to refresh the mobile app to retrieve the latest information.