Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18854] iOS: Apple Watch support to the open the iOS app in the background via openParentApplication

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2015-08-19T08:29:04.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterRick Blalock
AssigneeEric Merriman
Created2015-04-25T02:33:48.000+0000
Updated2017-03-23T22:29:53.000+0000

Description

In order for the watch to get certain things from the iOS app, the handleWatchKitExtensionRequest method in the app delegate needs to be implemented. I imagine this could be a system wide event in Ti similar to the resume event. https://developer.apple.com/library/ios/documentation/WatchKit/Reference/WKInterfaceController_class/#//apple_ref/occ/clm/WKInterfaceController/openParentApplication:reply: Some other links: https://www.bignerdranch.com/blog/watchKit-extensions-communicating-with-your-parent-application/ http://www.kristinathai.com/send-data-to-parent-ios-app/

Comments

  1. Rick Blalock 2015-04-26

    Ref. this https://gist.github.com/benbahrenburg/7812ae9259b8e06fff10 https://github.com/appcelerator/titanium_mobile/pull/6803
  2. Rick Blalock 2015-05-06

    Ben's gist above works fine but the caveat is you have to have the iOS app open in order for it to work. The reason is according to these docs: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/occ/intfm/UIApplicationDelegate/application:handleWatchKitExtensionRequest:reply "Because this method is likely to be called while your app is in the background, call the beginBackgroundTaskWithName:expirationHandler: method at the start of your implementation and the endBackgroundTask: method after you have processed the reply and executed the reply block. Starting a background task ensures that your app is not suspended before it has a chance to send its reply." This will need to be implemented as well in order to give a Ti app time to boot.
  3. Chee Kiat Ng 2015-07-02

    This will be placed out of sprint at the moment in favour of watch connectivity for watch OS2, and Release 4.3.0.
  4. Chee Kiat Ng 2015-08-19

    As Apple is gearing us towards watchOS2 and watchConnectivity, closing this as it is support for watchkit 1.
  5. Lee Morris 2017-03-23

    Closing ticket as Won't Fix with reference to the above comments.

JSON Source