I think this is a good example of why plugin hooks support could be very useful. https://github.com/MSOpenTech/cordova-lib/blob/795d40c9c98d1ecef0a63fc81a95d2b070f5bce2/cordova-lib/templates/hooks-README.md https://github.com/apache/cordova-lib/pull/55
PS. Not sure how pushwoosh manages this, I ended up with just documenting this as a manual step in similar situation. Thx! Sergey -----Original Message----- From: julio cesar sanchez [mailto:jcesarmob...@gmail.com] Sent: Tuesday, July 15, 2014 8:35 PM To: dev@cordova.apache.org Subject: Re: Manual iOS steps for a Cordova plugin... really? I think there are other ways of doing this, take a look into other push plugins, like the oficial pushplugin or the pushwoosh plugin. I think i've even answered something like this on stackoverflow, I'll look into this and let you know El martes, 15 de julio de 2014, Michal Mocny <mmo...@chromium.org> escribió: > You can solve this problem as a plugin author using swizzling. > > Here's an example where we do it with our chrome.identity plugin: > > https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/chr > ome-cordova/plugins/chrome.identity/src/ios/ChromeIdentity.m#L50 > > Max here was the author so he'd know most about this approach. > > One quick comment, we're not sure (aka seems unlikely) that its > possible to add properties like this, so you'll have to change to > plugin to store its data elsewhere. > > > On Tue, Jul 15, 2014 at 10:50 AM, Lisa Seacat DeLuca > <ldel...@us.ibm.com <javascript:;>> > wrote: > > > 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 | *ldel...@apache.org > > <javascript:;>* <ldel...@apache.org <javascript:;>> | | > > *ldel...@us.ibm.com > <javascript:;>* <ldel...@us.ibm.com <javascript:;>> | > > *lisaseacat.com* <http://www.lisaseacat.com/> | [image: follow > > @LisaSeacat on twitter] <http://www.twitter.com/LisaSeacat>| [image: > > follow Lisa Seacat DeLuca on linkedin] > > <http://www.linkedin.com/in/lisaseacat> >