Harsh K
Harsh K

Reputation: 77

communicate from Apple watch simulator to iPhone device

I have a requirement where I need to start recording in Iphone device On button tap of Apple watch and stop recording when the same button is tapped again in Apple watch app. But since Apple watch is not available yet how can I test this functionality? Please help

Upvotes: 0

Views: 2899

Answers (4)

Jhon Caylog
Jhon Caylog

Reputation: 503

Pairing ios device with a watch simulator is not possible

Upvotes: 0

Jay
Jay

Reputation: 864

Current version of the Xcode beta is not supporting of concurrent running of device, please go through the release document Xcode 6.2 beta 4 release notes in downloads

In the known issues section of release notes they clearly mentioned this,

Running an iOS app and a WatchKit app concurrently in the Simulator via Xcode is not supported. (18559453)

Upvotes: 2

Duncan Babbage
Duncan Babbage

Reputation: 20177

It is not possible to pair a real iPhone with the Watch Simulator. All testing has to be done using the Watch Simulator alongside the iPhone simulator.

Normally you would be able to test your desired functionality with the simulators, but if by "recording" you are referring to video recording, that would not be possible as the iPhone simulator does not have access to a camera.

This is an excellent use case for the need to pair the Watch Simulator with a real iPhone. Apple have been actively encouraging developers to submit their enhancement requests to http://bugreport.apple.com

Clearly, you will want to also test with the actual hardware as soon as it ships.

Upvotes: 1

oxigen
oxigen

Reputation: 6263

In your watch app you need to use WKInterfaceController's method

+ (BOOL)openParentApplication:(NSDictionary *)userInfo reply:(void(^)(NSDictionary *replyInfo, NSError *error)) reply;

and catch it in your AppDelegate's method

- (void)application:(UIApplication *)application handleWatchKitExtensionRequest:(NSDictionary *)userInfo reply:(void(^)(NSDictionary *replyInfo))reply

It is the only way for communication between watch app and main app

Upvotes: 2

Related Questions