Skip to content

Commit

Permalink
Merge pull request #8748 from hansemannn/TIMOB-24300
Browse files Browse the repository at this point in the history
[TIMOB-24300] iOS: Add the ability to disallow custom keyboards
  • Loading branch information
ewieberappc committed Jan 26, 2017
2 parents fe612fc + 082135c commit 3cd0c67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions iphone/Classes/TiApp.m
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,17 @@ - (void)generateNotification:(NSDictionary*)dict
}
}

- (BOOL)application:(UIApplication *)application shouldAllowExtensionPointIdentifier:(UIApplicationExtensionPointIdentifier)extensionPointIdentifier
{
BOOL allowsCustomKeyboard = [TiUtils boolValue:[[TiApp tiAppProperties] objectForKey:@"allow-custom-keyboards"] def:YES];

if ([extensionPointIdentifier isEqualToString:UIApplicationKeyboardExtensionPointIdentifier] && !allowsCustomKeyboard) {
return NO;
}

return YES;
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions_
{
started = [NSDate timeIntervalSinceReferenceDate];
Expand Down
1 change: 1 addition & 0 deletions iphone/Resources/_app_props_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"ti.ui.defaultunit":"dp", "run-on-main-thread":true, "ti.deploytype":"development", "allow-custom-keyboards": true}

0 comments on commit 3cd0c67

Please sign in to comment.