AppDelegate.m revision 8a277e1ec925827053298560ff0bb6f389b36a66
342440ec94087b8c751c580ab9ed6c693d31d418Prasad Singamsetty//
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// FreeOTP
18c2aff776a775d34a4c9893a4c72e0434d68e36artem//
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// Authors: Nathaniel McCallum <npmccallum@redhat.com>
422ee27718423fbe84117ddd114a5c5e8699a6daartem//
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// Copyright (C) 2013 Nathaniel McCallum, Red Hat
18c2aff776a775d34a4c9893a4c72e0434d68e36artem//
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// Licensed under the Apache License, Version 2.0 (the "License");
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// you may not use this file except in compliance with the License.
342440ec94087b8c751c580ab9ed6c693d31d418Prasad Singamsetty// You may obtain a copy of the License at
18c2aff776a775d34a4c9893a4c72e0434d68e36artem//
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// http://www.apache.org/licenses/LICENSE-2.0
422ee27718423fbe84117ddd114a5c5e8699a6daartem//
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// Unless required by applicable law or agreed to in writing, software
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// distributed under the License is distributed on an "AS IS" BASIS,
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// See the License for the specific language governing permissions and
18c2aff776a775d34a4c9893a4c72e0434d68e36artem// limitations under the License.
422ee27718423fbe84117ddd114a5c5e8699a6daartem//
18c2aff776a775d34a4c9893a4c72e0434d68e36artem
18c2aff776a775d34a4c9893a4c72e0434d68e36artem#import "AppDelegate.h"
422ee27718423fbe84117ddd114a5c5e8699a6daartem#import "TokenStore.h"
422ee27718423fbe84117ddd114a5c5e8699a6daartem
342440ec94087b8c751c580ab9ed6c693d31d418Prasad Singamsetty@implementation AppDelegate
18c2aff776a775d34a4c9893a4c72e0434d68e36artem- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
18c2aff776a775d34a4c9893a4c72e0434d68e36artem return YES;
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
return YES;
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
// Make token
Token* token = [[Token alloc] initWithURL:url];
if (token == nil)
return NO;
// Save the token
[[[TokenStore alloc] init] add:token];
// Reload the view
[self.window.rootViewController loadView];
return YES;
}
@end