Mobile: Identify Screens in your App (technical)

If you haven't already installed and initialized Appcues Mobile in your app, make sure to go here first. 

In order for the Appcues API to know what screen a user is on and to find all the flows that qualify for that screen, a screen needs to be identified. Screens are treated almost identically to how the web treats URL and once a screen is identified, Appcues mobile flow creators can target these screens.

To identify a screen to your app: 

  1. Add import Appcues to your ViewController 
  2. Add Appcues.screen(viewcontroller: UIViewController, name: String) to a place in your code where you want to check for flows. For instance in the viewDidAppear()
  3. Make sure to add the screen(viewcontroller: UIViewController, name: String) to your code before sending screens to the Mobile Editor


// Add the Appcues module to your ViewController
import Appcues  

class ViewController: UIViewController {      

    override func viewDidAppear(_ animated: Bool) {

	// Send the screen name to Appcues
        Appcues.screen(viewcontroller: self, name: "MainScreen")


Objective C

// Add the Appcues module to your ViewController
@import Appcues;

@implementation ViewController

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];

     // Send the screen name to Appcues
    [Appcues screenWithViewcontroller:self name:@"MainScreen"];

Next Step

Once Appcues Mobile is installed in your app, initialized and screens identified, you need to Identify Users in your app

Still need help? Contact Us Contact Us