cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lisa Seacat DeLuca <ldel...@us.ibm.com>
Subject Manual iOS steps for a Cordova plugin... really?
Date Tue, 15 Jul 2014 14:50:19 GMT
So I'm not an iOS developer but wanted to get some insight into this.  IBM 
has a set of cordova plugins for our Bluemix (Cloud Foundry) offering. 

The plugins are available in the plugins repo: 
http://plugins.cordova.io/#/package/com.ibm.mobile.cordova.ibmpush

I was seeing a bunch of errors on the ios side, and when I reached out to 
the team working on bluemix ios cordova plugin they said it's not a bug, I 
need to follow a bunch of manual steps to get the ios plugin to work:

https://mbaas-gettingstarted.stage1.ng.bluemix.net/hybrid#set-up-push-in-cordova-for-ios

Is this really a requirement?  Is there really no way to avoid having to 
have manual steps to add pieces of code into the AppDelegate.h and 
AppDelegate.m files?  I find this hard to believe.

"To use the IBMPush Cordova plug-in for iOS, configure the AppDelegate of 
the Cordova application.
1.      Add the following property to the AppDelegate.h file:
@property (nonatomic, strong) NSData* token;
2.      Add the following code snippets to the AppDelegate.m file.
Import the IBM Push cordova header file.
// Import the header file.
#import "CDVIBMPush.h"
Add the following code to the didFinishLaunchingWithOptions method to 
register your application to receive Push notifications.
-(BOOL)application:(UIApplication*)application 
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
// Register to receive remote notification
[application registerForRemoteNotificationTypes:
UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeAlert |
UIRemoteNotificationTypeSound];
}
......."


Lisa


Lisa Seacat DeLuca
Mobile Engineer | t: +415.787.4589 | ldeluca@apache.org | | 
ldeluca@us.ibm.com | lisaseacat.com | | 
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message