apple-watch

Failed to install app error: Invalid Bundle - No Apple Watch Binary

假装没事ソ 提交于 2019-11-27 16:17:34
问题 I'm trying to develop an extension of my app for the Apple Watch. Instead of install the app on the watch, I have this error: AppName Failed to install AppName, error: Invalid Bundle - No Apple Watch Binary In my info.plist files... For the extension, I have: <key>CFBundleIdentifier</key> <string>com.mycompany.AppName.watchkitextension</string> <key>WKAppBundleIdentifier</key> <string>com.mycompany.AppName.watchkitapp</string> For the WatchKit app, I have: <key>CFBundleIdentifier</key <string

How to send data from Iphone to Apple Watch in OS2 in Objective-C

这一生的挚爱 提交于 2019-11-27 15:18:21
I've seen a similar question posted on how to send data back and forth in Swift. I'm asking the same question but in Objective-C. I've also viewed Apple's transition docs . I work best with clear examples, rather than lecture material. So if someone has implemented this and wouldn't mind sharing, that would be much appreciated. Philip Here´s a link to a Q/A about WatchConnectivity: Send messages between iOS and WatchOS with WatchConnectivity in watchOS2 I will give you an example go ApplicationContext, there are 2 other messaging techniques with WatchConnectivity. Please watch WWDC2015 session

watchOS 2: haptic feedback in background

不羁的心 提交于 2019-11-27 14:47:34
问题 I think I know the answer to this question already, but I wanted to ask just to be thorough. Consider the Apple Watch built-in Maps app. When you're using turn-by-turn directions, when it's time to turn left or right, the watch plays a custom haptic pattern - even though the screen is off and the app is backgrounded. Another example is while you're doing a workout - if you've set a goal, you'll get a light tap on your wrist when you get 50% there and 100% there, even if you're not looking at

Passing data back from a modal view in WatchKit

我的梦境 提交于 2019-11-27 14:17:39
When modally presenting, or pushing, an interface controller we can specify the context parameter to pass some data to the new controller as follows. // Push [self pushControllerWithName:@"MyController" context:[NSDictionary dictionaryWithObjectsAndKeys:someObject, @"someKey", ..., nil]]; // Modal [self presentControllerWithName:@"MyController" context:[NSDictionary dictionaryWithObjectsAndKeys:someObject, @"someKey", ..., nil]]; My question is, how can we do the reverse? Say we present a controller modally for the user to pick an item from a list and we return to the main controller, how can

Invalid Device State - Xcode/iOS Simulator error

假如想象 提交于 2019-11-27 14:15:41
Problem: I cannot simulate an Apple watch interface. Whenever I try and test my Apple watch app on the iPhone 6 simulator, Xcode successfully finishes and builds the app, attempts at opening simulator and fails with an error message which reads 'Invalid Device State'. I believe simulator has a watch simulator that opens along with the compatible iPhone simulator models that can communicate with Apple watch (example: iPhone 6) Although I have yet to see it work. I have built a universal interface for iPad and iPhone and another for the watch, so it's not a matter of the app being for the wrong

Xcode attach to process doesn't display NSLog

廉价感情. 提交于 2019-11-27 13:33:22
I'm just getting started with Apple Watch. I found instructions from " Five Minute Watchkit ", on getting the iOS app and the watch kit app both running in the simulator and both processes attached to the LLDB debugger. What I do is launch and quit the iOS app to install a current version in the sim. Then I switch to the watchKit scheme and launch that, which displays my watch app UI on the watch simulator. I then launch the corresponding iOS app in the simulator, then user "attach to process" in the Xcode menu to attach the debugger to the running iOS app. This works. I can set breakpoints in

In Xcode I see (no paired Apple Watch) even though the watch is paired and the watch's UDID is registered

被刻印的时光 ゝ 提交于 2019-11-27 13:22:33
问题 My phone is listed as an ineligible target in Xcode and out to the side it says ( no paired Apple Watch ). My Apple Watch is registered under iOS Devices. I can see the UDID. The watch has watchOS 2.0 installed and my iPhone 6 has iOS 9 installed. The iPhone pairs just fine with the watch and I can install apps. I've tried rebooting both the watch and the phone. I've tried rebooting Xcode. I tried creating a new scheme in Xcode but it still shows (no paired Apple Watch). I can choose Product

Creating progress circle as WKInterfaceImage in Watch App

谁说胖子不能爱 提交于 2019-11-27 13:10:45
问题 I am trying to create a progress circle for the Apple Watch version of my app. I know that we aren't able to use UIViews (which would make things so much easier!) so I am looking for alternatives. Basically, I would like to create one of these prototypes: The way I was hoping to do things was to add the background layers as a normal WKInterfaceImage and then the progress arrow/line on top as a WKInterfaceImage that rotates around the circle based on the percentage calculated. I have the

Play sound from Apple Watch speaker

拈花ヽ惹草 提交于 2019-11-27 13:10:36
问题 Is there a way to play sound out of the Apple Watch's speaker? I have been unable to find any documentation online. 回答1: This is now possible as of watchOS 2 using WKAudioFilePlayer or WKInterfaceMovie . NSURL *assetURL = [[NSBundle mainBundle] URLForResource:@"file" withExtension:@"wav"]; WKAudioFilePlayer example: WKAudioFileAsset *asset = [WKAudioFileAsset assetWithURL:assetURL]; WKAudioFilePlayerItem *playerItem = [WKAudioFilePlayerItem playerItemWithAsset:asset]; WKAudioFilePlayer

How to launch iOS App from Apple Watch?

旧时模样 提交于 2019-11-27 12:26:48
问题 Is there any way to launch the iOS App from Apple Watch? Edit :- Tried using both api below but doesn't work:- Apple Watch Code Calling Inside interfaceController.m + (BOOL)openParentApplication:(NSDictionary *)userInfo reply:(void(^)(NSDictionary *replyInfo, NSError *error)) reply; // launches containing iOS application on the phone. userInfo must be non-nil iOS Code Calling Inside Appdelegate.m - (void) application:(UIApplication *) application handleWatchKitExtensionRequest:(NSDictionary *