purplecabbage/phonegap-plugins

Replace deprecated methods in Childbrowser plugin for iOS

Opened this issue · 3 comments

'PhoneGapViewController' is deprecated but used in the ChildBrowserCommand class:

  • (void) showWebPage:(NSMutableArray_)arguments withDict:(NSMutableDictionary_)options // args: url

......

PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];

.....

I replaced "PhoneGapViewController" deprecated method to "PGViewController" but still says "appViewController" is deprecated... What should I replace "apViewController" for?? Any help would be appreciated...can't get ChildBrowser work for my share to facebook button...

'appViewController' is deprecated (declared at /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/Headers/PGPlugin.h:56)

Well, according to the changes found on github.

If you look at the PGPlugin source, you'll see this change made.

+- (UIViewController_) appViewController attribute((deprecated)); /_ just use the .viewController property in the future */
47 46

So, since the appViewController is deprecated as you mentioned, you should be able to use the .viewController.

As in, you would do self.viewController assuming you super classed PGPlugin.

Hope that works

Thanks it works now! I didn't have time to test it til today but it was just that... Now I have problems posting to facebook wall but that's another thing... at least I'm sure ChildBrowser plugin works because I was able to open a single window with www.google.com