Your underlying goal, I think, is that you want to ensure that the Containing App is aware when its Apple WatchKit App Extension has crashed.
You can achieve this by getting the Watchkit Extension to periodically send out a Darwin Notification which the containing app subscribes to. Then when the containing app does not get a message from the extension within some timeout limit, it knows the WatchKit extension crashed. This is the most lightweight way I know to achieve this.
Another way is to make the WatchKit app extension periodically call:
+ (BOOL)openParentApplication:(NSDictionary *)userInfo
reply:(void (^)(NSDictionary *replyInfo,
NSError *error))reply
It is not as lightweight, but has the advantage of allowing you to supply some dictionary data, such as a timestamp value or sequence number.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…