Skip to main content
Skip table of contents

Adding New App Details (iOS: Swift)

Upon installing SDK, you must add your app via the Dropthought mobile app.

Follow the below steps to add a new app:

  1. Navigate to your Profile on the Dropthought mobile app.

  2. Click on Manage Native SDK.

     

     

  3. Click on Manage Applications. The section will be empty if you do not have any apps added.

    If you have already added any apps earlier, they will be displayed on this screen.

     

  4. Click on Browse and upload an app icon.

     

  5. Enter the App Name and Version Name (optional).

     

  6. Click on Add new visibility.
    In the following screen, you will be prompted to enter the page name and element name that should redirect the user to the linked program.
    This information will help you to easily identify which element (widget, for instance) on your app is connected to a visibility ID. You can edit the page name and element name anytime.

  7. Once you add a page and element name for later reference, click on Add Visibility.
    This will give you a unique ID you must insert in the code snippet to be added to your app. This unique ID cannot be edited as it will be used to uniquely identify the element of your app where Dropthought will collect feedback.

 

Open Program

Use the following snippet to open the Dropthought survey based on an action performed by a user on your app.
Copy the visibility ID and paste it into the code snippet below, replacing YOUR_VISIBILITY_ID. 

CODE
// self represent a UIViewController where you what to present a survey

Dropthought.instance().present(self, visibilityId: "YOUR_VISIBILITY_ID")

Set Program Metadata

Use the below code snippet to fetch metadata from the responses received:

CODE
Dropthought.instance().setSurveyMetadata(metadata)

The metadata will be captured as displayed below (sample response):

CODE
Dropthought.instance().setSurveyMetadata(["name": "Barney", "age": "36"])

Learn more: Associate a Program to an iOS app (Swift)


feedback-img.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.