watchkit

Watch Kit: is it possible to vibrate watch programmatically?

这一生的挚爱 提交于 2019-12-03 05:38:17
Is it possible to vibrate watch while Watch Extension is running? We can do it on iOS in this way (force iPhone to vibrate): AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); I hope there is something similar on WatchKit. Update: I have added issue to Apple radar and recieved the answer: Engineering has determined that your bug report (20019274) is a duplicate of another issue (19025053) and will be closed. 19025053 is still open. Update 2: AudioServicesPlayAlertSound() not working on watch simulator with any sound ID. Seems like function is not supported. You can now ask the Watch to

Render a line graph on Apple Watch using watchOS 2

前提是你 提交于 2019-12-03 05:19:38
问题 I am trying to render a line/step graph on Apple Watch using watchOS 2. Unlike iOS 9, watchOS 2 doesn't support Quartz. It only supports Core Graphics. I tried writing some code to draw a line graph but I am getting an error "CGContextRestoreGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this

hide and show WKInterfaceGroup programmatically

女生的网名这么多〃 提交于 2019-12-03 05:11:05
I'm using xCode 6.2 beta 2 and tried to hide and show group programmatically but there is no method shown where i can write group.hidden=YES or group.hidden=NO Is there any another method for doing same? Yes, there is no property for hide group in WKInterfaceGroup. But there is same property available in WkInterfaceObject which is super class of WKInterfaceGroup. so you can do same like [group setHidden:YES] or [group setHidden=NO] If you're using a swift you can use this code: mygroup.setHidden(true)// set true --> false if you want to show the group Yes, do it this way: [group setHidden:YES]

Are iPhone's apps notifications going to be triggered on the Apple Watch by default, without even creating an actual Watch app?

烈酒焚心 提交于 2019-12-03 03:29:28
I would like to support my iPhone's app Local Notifications in the Apple Watch from the very first moment the Watch is released, but I don't plan on building a Watch App yet. From what I researched, it seems like iPhone's notifications will be automatically supported on the Watch, without needing any additional development or WatchKit implementation. Apps are not required to do anything to support notifications. The system provides a default notification interface that displays the alert message from the notification. However, apps can customize the notification interface and include custom

How to create sections in WKInterfaceTable

浪尽此生 提交于 2019-12-03 03:16:10
How can we create sections in table as there is no delegate for it. And is there any other way for creating sections or do we have to use two tables. WKInterfaceTable is not so flexible like UITableView, but you can create rows manually, using different row types. And fill content for each cell according to its type. See documentation: Apple Watch Programming Guide: Tables WatchKit Framework Reference: WKInterfaceTable For example, let's create table with two row types: headerRowType detailRowType #define type1 @"HeaderRowType" #define type2 @"DetailRowType" // You also must create two classes

How can I guarantee unique entries in a Core Data store in a shared app container used by both the host app and an extension?

风流意气都作罢 提交于 2019-12-03 02:07:53
问题 To ask my question effectively, let's first consider the exact scenario I'm facing: General Setup A host iOS 8 app. One or more iOS 8 extensions (WatchKit, Share, etc.) bundled with the host app. The host app and all extensions share the same Core Data SQLite store in the shared app group container. Each app/extension has its own NSPersistentStoreCoordinator and NSManagedObjectContext. Each persistent store coordinator uses a persistent store that shares the same SQLite resources in the group

Check if iPhone is paired with apple watch?

断了今生、忘了曾经 提交于 2019-12-03 02:01:01
In my app, I need to find if my phone is paired with a apple watch and get some information about the paired watch like its name. I tried reading the documentation but I couldn't seem to find any thing specific to my use case. Any help is appreciated. So since WatchOS 2 that is possible ! You have to do on iPhone side : First : import WatchConnectivity Then : if WCSession.isSupported() { // check if the device support to handle an Apple Watch let session = WCSession.default() session.delegate = self session.activate() // activate the session if session.isPaired { // Check if the iPhone is

ERROR ITMS-90512: Invalid sdk value… 8.2 is higher than maximum allowed value of 10.3?

戏子无情 提交于 2019-12-03 00:40:26
问题 Trying to upload a binary, which includes a watch app. The error I'm getting (which I wasn't getting a couple days ago) is the value provided for LC_VERSION_MIN_IPHONEOS for the watchkit extension is 8.2 which is greater than the maximum allowed value of 10.3... apparently 8.2 > 10.3? I'm updated to the latest XCode, 8.3, that didn't fix the problem. Tried changing the iOS deployment target for the watch app and extension, no apparent effect on the message. 回答1: Update: it's fixed! I have

HKWorkoutSession isn't keeping app at front of Apple Watch

ⅰ亾dé卋堺 提交于 2019-12-03 00:32:18
It has been stated that an app running a HKWorkoutSession will have special privileges over other watchOS 2 apps, so when a user looks at their Apple Watch, it will go to the view showing running a workout rather than the watch face. Currently, on both my device and simulator, this is not the case. If I start a HKWorkoutSession and then leave for 5 minutes and then interact with either the Apple Watch, or the Watch Simulator, it presents the watch face. If I then open my app, it appears to have been frozen, rather than terminated (which is what I imagine happens to other apps). As the UI will

Embedded Binary Validation Utility Error

浪尽此生 提交于 2019-12-02 23:02:56
Since yesterday Xcode is doing stupid things while trying to run my WatchKit app on my iPhone. It gives me the error: Embedded Binary Validation utility Error Error: warning: Is a directory It's not very helpful and it seems like it's complaining about provisioning profiles for my Watchkit Extension target. I think I set it up correctly by following this answer . This is how I have set up my profiles. Three App IDs and six profiles (three for development and three for distribution). Main app: WatchKit Extension: WatchKit Watch App: I had my custom framework linked and embedded in both the