Dual-mode sample app

A sample app that shows proper dual-mode app behavior is included with the AppConnect for iOS SDK zip file in Samples > DualMode.xcodeproj.

Location of Dual mode sample app

The app illustrates how and when to use the AppConnect for iOS APIs related to dual-mode behavior. It also illustrates using AppConnect capabilities and secure data only when behaving as an AppConnect app.

The app is a simple note-taking app that allows the user to create a set of notes. The app uses the model-view-controller design pattern. The model classes are Notes and Policies. The view controllers are NotesViewController, NoteDetailViewController, SettingsViewController and AuthMessageViewController. The class DualModeAppDelegate is the main app controller.

The following table summarizes the files:

Table 8.   Dual-mode sample app files




UIApplicationDelegate for the app


Handles application logic for adding and retrieving notes.

Uses secure file I/O when required.


Implements AppConnectDelegate

Handles the dual-mode state transitions.

Keeps track of whether to use secure file
I/O and handle DLP policies.



Provides user interface for showing the list of notes.



Provides user interface for showing the contents of an individual note.


Provides user interface for changing between AppConnect app behavior and regular app behavior.


Provides user interface for displaying authorization status messages.

Displaying the authorization status is only applicable when behaving as an AppConnect app.