'openParentApplication(_:reply:)' is unavailable

I am a bit confused, it appeared to me in the WWDC videos that XCode 7 would be able to build both an exisitng WatchKit App (Extension on iPhone) (1.1) and a watchOS App (2.0) but I am not so sure anymore as some of the WatchKit functions seem to have disappeared like openParentApplication(_:reply:)


Should I just write a watchOS 2.0 App or can I also keep my WatchKit 1.1 App? If so what is the function that replaces openParentApplication(_:reply:)?


Thanks


Greg

Answered by Trifusion in 15680022

I re-ran the conversion and I see that there is an option (I thought it was just a Swift conversion but it does both). Unfortunately it also disables the Swift conversion. I will merge the two conversions and that should solve the issue.


Greg

You can have both a watchOS 1 and watchOS 2 app within your project at the same time. As for the openParentApplication(_:reply:) method, it is only available in a WatchKit extension for watchOS 1 (thus the extension must be running on the iPhone).


For your watchOS 2 extension, you can use the new WatchConnectivity framework to communicate between your parent app and WatchKit extension.

So when XCode imported my existing App it converted the Extension Build Settings for the base SDK from iOS to watchOS, and the supported platform from iOS to watchOS. I should convert these back? Are there any others? When I change these back I get compile errors.


Thanks


Greg

Accepted Answer

I re-ran the conversion and I see that there is an option (I thought it was just a Swift conversion but it does both). Unfortunately it also disables the Swift conversion. I will merge the two conversions and that should solve the issue.


Greg

Did this work? My WK1.x app was automatically converted and now doesn't work (since it has OpenParentApplication). A brand-new WK2.0 app doesn't work, since it doesn't respond to menu presses (IBActions hook up, show as connected, but when pressed, simply goes to 'applicationWillActivate()' and bypasses the actions for the menus). The converted WK1.x => 2.x also fails in same way. Adding a 1.x target and bringing over the old code fails as well in same way, and has no WK1.x sdk. Anyone else have any successes, or pointers to some practical documentation?

'openParentApplication(_:reply:)' is unavailable
 
 
Q