apple-watch

How to pass UIImage from iPhone app to Apple Watch app

十年热恋 提交于 2019-12-01 01:12:50
I have an iPhone app that captures a UIView as UIImage after 5-10 seconds. Is it possible to pass that UIImage to my Apple Watch app and show it in UIImageView there? Dejan Skledar Yes it is. All you need to do is create a NSDictionary like: var dict:[NSString : UIImage] = ["image" : yourImage] And then you just use the following methods to communicate between the Apple Watch and the iOS app: LINK The answers here are only half correct cause you can't send an UIImage directly! You need to send your images as NSData like f.e. so: - (void)application:(UIApplication *)application

Images on apple watch

不羁岁月 提交于 2019-11-30 23:04:37
I ran into a problem yesterday when my application was rejected. Apparently the images are not being displayed on the actual Apple Watch, however they are being displayed in the simulator. I even tried resetting the simulator and can't replicate the problem that occurred for the apple employee. So I am just wondering what the correct way to add/display images on the apple watch is, such so that they will be displayed properly on the actual hard device? Code: .h @property (strong, nonatomic) IBOutlet WKInterfaceImage *imageHeliLeft; @property (strong, nonatomic) IBOutlet WKInterfaceImage

watchOS - Show realtime departure data on complication

拈花ヽ惹草 提交于 2019-11-30 22:37:49
I have an public transport app with realtime departure data for trains. I would like to add a complication that shows the departure time of the next train. Is it possible to show (or refresh) realtime data on a complication? For example, showing "3 min. to station X." The data could change every minute, based on info that comes from the public transport API. How should I accomplish this on watchOS 2 or watchOS 3? I know the ETA app shows travel times in a complication, but I'm not sure how they achieve that. Are realtime updates possible? Complications aren't designed to show realtime data.

Using Core Location in Apple WatchKit

混江龙づ霸主 提交于 2019-11-30 22:13:24
I'm currently developing an apple watch extension. Anybody knows if the current location is provided by iPhone or Watch itself? I can't find any information about this and i need to draw a compass pointing where the watch is pointing. In order to do what you want you don't need CoreLocation you just need a magnetometer. AFAIK the Apple Watch doesn't have one built in. The sensors it has are... Accelerometer Gyroscope Heart rate sensor Barometer No magnetometer though. According to Apple's Dev Documentation: The best solution for performing any long-running tasks is to let your iOS app perform

How to pass UIImage from iPhone app to Apple Watch app

一个人想着一个人 提交于 2019-11-30 20:05:49
问题 I have an iPhone app that captures a UIView as UIImage after 5-10 seconds. Is it possible to pass that UIImage to my Apple Watch app and show it in UIImageView there? 回答1: Yes it is. All you need to do is create a NSDictionary like: var dict:[NSString : UIImage] = ["image" : yourImage] And then you just use the following methods to communicate between the Apple Watch and the iOS app: LINK 回答2: The answers here are only half correct cause you can't send an UIImage directly! You need to send

apple Watch: remove status bar for Interface Controller

房东的猫 提交于 2019-11-30 18:05:54
Is it possible to remove status bar for a particular Interface Controller or customise Interface controller title text in any way ? 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 the app’s storyboard. To access this property, select your storyboard and display the File inspector. Select

Using Core Location in Apple WatchKit

夙愿已清 提交于 2019-11-30 17:28:01
问题 I'm currently developing an apple watch extension. Anybody knows if the current location is provided by iPhone or Watch itself? I can't find any information about this and i need to draw a compass pointing where the watch is pointing. 回答1: In order to do what you want you don't need CoreLocation you just need a magnetometer. AFAIK the Apple Watch doesn't have one built in. The sensors it has are... Accelerometer Gyroscope Heart rate sensor Barometer No magnetometer though. 回答2: According to

How can I change the label “Cancel” from modal segue in Apple Watch

走远了吗. 提交于 2019-11-30 17:20:46
How to change the label appearing at the top left corner that says "Cancel" when I open a modal view... I would like it to be a button with an image. The label Cancel is the default 'title' of a modally presented WKInterfaceController, which appears on the Apple Watch status bar. Replacing the title with an image It is not possible to hide the status bar, nor is it possible to display an image in the status bar, neither as part of this link nor to replace this link. Options to set modal view title You can however set the title to a new string value. For instance, you might well want to replace

How to hide navigation bar back button?

橙三吉。 提交于 2019-11-30 13:11:38
问题 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.

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

百般思念 提交于 2019-11-30 11:36:03
问题 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