Skip to content

Commit

Permalink
Merge pull request #74 from Telerik-Verified-Plugins/feature/ios9
Browse files Browse the repository at this point in the history
fix failing build on ios8
  • Loading branch information
alexanderfilipov committed Feb 24, 2016
2 parents e26a813 + 044817d commit 66d14fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ios/PushPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,14 @@ - (BOOL)createNotificationAction:(NSDictionary *)category
BOOL isAuthRequired = [[action objectForKey:@"authenticationRequired"] isEqual:[NSNumber numberWithBool:YES]];
nsAction.authenticationRequired = isAuthRequired;

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000
// Check if the action is actually a text input and behavior is supported
BOOL isTextInput = [@"textInput" isEqualToString:[action objectForKey:@"behavior"]];
if(isTextInput && [nsAction respondsToSelector:NSSelectorFromString(@"setBehavior:")]){
nsAction.behavior = UIUserNotificationActionBehaviorTextInput;
}

#endif

[nsActions addObject:nsAction];
}
return YES;
Expand Down

0 comments on commit 66d14fd

Please sign in to comment.