Integrate Logon Handler in Your App

After implementing your logon handler, use a property to hold a reference to it in your AppDelegate singleton.


#import <UIKit/UIKit.h>
#import "MyLogonHandler.h"
#import "MAFUIStyleParser.h"

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) MyLogonHandler *logonHandler;



For example, you can implement the AppDelegate.m file using code similar to:
#import "AppDelegate.h"
#import "MAFUIStyleParser.h"

@implementation AppDelegate

- (void)dealloc
    [_window release];
    [_logonHandler release];
    [super dealloc];

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    // Load the styles for the cutomizable controls, should be called before any MAF* control and MAFLogonUI created
    [MAFUIStyleParser loadSAPDefaultStyle];
    self.logonHandler = [[MyLogonHandler alloc] init];
    return YES;

- (void)applicationDidBecomeActive:(UIApplication *)application
    // Execute logon operation, which will automatically present logon screen if needed.
    [self.logonHandler.logonManager logon];