apple-watch

WatchKit App won't compile: “error: WatchKit Extension doesn't contain any WatchKit apps”

无人久伴 提交于 2019-11-30 07:07:06
There are several posts on this issue but none of the proposed solutions work in my case. I am trying to integrate the WatchKit into a simple, sample app (I've tried a couple now) by following the instructions provided by Apple. When I compile I get the following error message: "error: WatchKit Extension doesn't contain any WatchKit apps. Verify that the value of WKWatchKitApp in your WatchKit App's Info.plist is set to YES." I have successfully compiled and run the Apple Watch "Catalog" example so I know things are working from an iPhone to Watch perspective. It seems like something is not

How to hide navigation bar back button?

谁说我不能喝 提交于 2019-11-30 06:22:52
I'm trying to to hide navigation bar back button on an Apple Watch. There are a lot of questions for similar to mine but they are for iPhone and if you are know a little about Apple Watch there are InterfaceController instead of ViewController. So when I push a new InterfaceController using the code below: [self pushControllerWithName:@"about" context:nil]; It shows a back button on the navigation bar above and it takes it back to the previous InterfaceController from which it is generated. Anyone have any idea how to hide or remove navigation bar or this back button from Apple Watch? AMAN77 I

apple Watch: remove status bar for Interface Controller

帅比萌擦擦* 提交于 2019-11-30 02:39:15
问题 Is it possible to remove status bar for a particular Interface Controller or customise Interface controller title text in any way ? 回答1: As of Apple Watch Programming Guide you can customize interface controller title text color by setting your App’s Key Color. Every WatchKit app has an associated key color, which is applied to the >following UI elements: -The title string in the status bar -The app name in short look notifications An app’s key color is stored in the Global Tint property of

Xcode won't add “Embedded binary” after deleting “DerivedData”

纵然是瞬间 提交于 2019-11-30 00:35:12
Alternative titles to aid search: Adding Embedded Binaries fails in Xcode Xcode won't link framework from separate project App crashes on device because of missing framework, works in simulator Overview After deleting the "DerivedData" folder (or performing a "Product > Clean") in xcode6 , I cannot add CocoaTouch frameworks from another project to the "Embedded Binary" section (under General tab). Or, Xcode hits a linker error because it cannot find a framework that if previously could. Other symptoms Clicking on the + under "Embedded Binaries" shows the Framework selector but selecting a

WatchKit error - unable to find interface controller class '' to instantiate

故事扮演 提交于 2019-11-29 16:41:10
问题 Whenever I make any connections in my subclass of WKIInterfaceController I get error WatchKit error - unable to find interface controller class 'myClass' to instantiate and a activity indicator showing in simulator and the view does not load. Disconnect all conections and the view displays correctly but still get the error Tried Unable to find interface controller class 'InterfaceController' to instantiate WatchKit: unable to find interface controller class WatchKit

NSUserDefault change notification handling in watchppExtension

て烟熏妆下的殇ゞ 提交于 2019-11-29 14:08:16
问题 i'm creating a iwatch app just to display a value on watch when clicking on a tableview in iphone app. i would like to get a notification on a shared userdefault value changes . it is shared between watchkitapp and iphone app, so when the user makes any changes in phone i have to get the notification. i have done the following When user do Some action in applicaton on phone NSUserDefaults *shared = [[NSUserDefaults alloc] initWithSuiteName:@"group.app"];</br> id object = [self.plantsArray

Playing sound in Apple Watchkit

ぐ巨炮叔叔 提交于 2019-11-29 13:47:13
I'm trying to play a sound through the watchkit extension using WKAudioFilePlayer however no sound gets played. I'm using the haptic feedback code as a sort of debug to be sure it executes it (which it does). As a side note, mute is not on and the filename is correct. NSURL *falcon = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"falcon" ofType:@"mp3"]]; WKAudioFileAsset *asset = [WKAudioFileAsset assetWithURL:falcon]; WKAudioFilePlayerItem *sound = [WKAudioFilePlayerItem playerItemWithAsset:asset]; audioPlayer = [WKAudioFilePlayer playerWithPlayerItem:sound]; [audioPlayer

How to programmatically open Apple Watch companion app from iOS app

一世执手 提交于 2019-11-29 12:07:45
I would like to give a hint to the user, that my iOS app supports the Apple Watch. So I would like to link/open the Apple Watch companion app from within my iOS app, very much similar to opening the Settings App using ( [[UIApplication sharedApplication] openURL: [NSURL URLWithString:UIApplicationOpenSettingsURLString]]; ) This shall enable the user to directly navigate to the Watch companion app to setup my app for the watch. I could not find any URL which would open the companion app in general or specific to a section of the companion app. If direct linking is not supported, I am also

Gesture recognition in Apple Watch (WatchKit)

扶醉桌前 提交于 2019-11-29 11:00:35
I'm looking for how to detect gestures in an Apple Watch app, via the WatchKit SDK. In iOS we can use some code like this: - (void)viewDidLoad { ... UISwipeGestureRecognizer *swipeRightBlack = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(slideToRightWithGestureRecognizer:)]; swipeRightBlack.direction = UISwipeGestureRecognizerDirectionRight; [self.viewBlack addGestureRecognizer:swipeRightBlack]; } ...but this doesn't work in the Apple Watch simulator. Is there a way to override the default gesture actions using WatchKit, or just recognize them when the OS receives

Apple Watch: dynamic Long Look not shown, when push opened from Notification Center

懵懂的女人 提交于 2019-11-29 10:26:17
I implemented a custom dynamic Long Look for push notifications on the Apple Watch. This dynamic long look is shown correctly, when I immediately raise my arm after receiving a push notification. However, if I respond later, and tap on the push notification from within Notification Center on the Watch, only the static long look is shown. Is this normal behavior or am I doing something wrong? How are your dynamic long looks behaving? For clarity here are the steps to reproduce . This will bring up the dynamic long look: I receive a push notification on the Watch I immediately raise my arm to