watchkit

Xcode 7.2: Failed to Locate or generated signing assets, Wild Card App IDs can not be used to create In House Provisioning Profiles

依然范特西╮ 提交于 2019-12-19 10:25:22
问题 I signed an iOS App and WatchKit App & Extension targets with valid provisioning profiles (Separate provisioning profile for each app identifier, and not wild card App ID), Build was archived successfully but when I try to export/save Enterprise build, Xcode auto generate/locate XC: provisioning profile and it also and resets/invalidates previously selected provisioning profiles. I get below error. (even though we are not using Wild Card App IDs) "Failed to Locate or generated signing assets,

Getting server data for the Apple Watch

亡梦爱人 提交于 2019-12-19 07:41:28
问题 I am wondering how to go about designing a watchOS app that depends on getting the latest feed from a server. Would you need to use application context and just have the iPhone push it over in the background using the WatchConnectivity framework or would you use NSURLSession on the Apple Watch itself? Keep in mind this is for watchOS 2. 回答1: You can use NSURLSession to handle your request. So your request would be native on your watchn. But note that your watch is there to show simple Content

Not able to set custom fonts in WatchKit

大憨熊 提交于 2019-12-19 04:14:07
问题 I am trying to set Roboto font and have added as target for watch kit extension, but it is still coming as nil. Can we set custom fonts in watch kit. 回答1: Yes, you can use custom fonts in WatchKit https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/TextandLabels.html 回答2: Its worked for me.. Using following Codes. Add the custom Font to both WatchKit Extension and WatchKit App target Info.plist Now you write the code following way,

Reading NSUserDefaults in watchOS 2 (I know App Groups doesn't work)

。_饼干妹妹 提交于 2019-12-19 03:20:11
问题 Apple documentation says "Also, iOS automatically forwards a read-only copy of your iOS app’s preferences to Apple Watch. Your WatchKit extension can read those preferences using an NSUserDefaults object..." . https://developer.apple.com/library/prerelease/watchos/documentation/General/Conceptual/WatchKitProgrammingGuide/SharingData.html#//apple_ref/doc/uid/TP40014969-CH29-SW1 But I can't read defaults in my WatchKit app that were saved in my iPhone app, am I doing something wrong? In the

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

时光怂恿深爱的人放手 提交于 2019-12-18 18:53:58
问题 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. 回答1: 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

NSInvalidUnarchiveOperationException cannot decode object error in Apple Watch extension

微笑、不失礼 提交于 2019-12-18 15:52:35
问题 I've got a user object that I need to store in NSUserDefaults and share with an iOS 8 extension app (Watchkit). In the main container app, I can encode and decode the object without any problem. However, when I try to retrieve the stored user object in the Extension, I get a "'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class" error. As far as I can see NSCoding has been implemented correctly in the object (and I'm able

Invalid Bundle, The bundle contains disallowed nested bundles, contains disallowed file 'Frameworks'

蹲街弑〆低调 提交于 2019-12-18 12:13:45
问题 I added a shared framework to share code between app and watch extension. Later I removed the shared framework since it cause lots of problems. I can build and run my app on iphone and watch. However when I submit to app store, I see these two errors: ERROR ITMS-90205: "Invalid Bundle. The bundle at 'xxx WatchKit Extension.appex' contains disallowed nested bundles." ERROR ITMS-90206: "Invalid Bundle. The bundle at 'xxx WatchKit Extension.appex' contains disallowed file 'Frameworks'." I have

WatchKit Complication: get Complication data from extension delegate

耗尽温柔 提交于 2019-12-18 12:05:36
问题 I have all the data I need in my WatchKit Extension (passed from the iOS app). I used the data in the WatchKit InterfaceController to fill in a table, which works perfectly. I'm trying to figure out the best way to get that same data in my WatchKit ComplicationController . Currently, in the InterfaceController , the data gets passed in using didReceiveUserInfo : func session(session: WCSession, didReceiveUserInfo userInfo: [String : AnyObject]) { if let beachValue = userInfo["Surf"] as?

Aggregated CMPedometerData (iPhone + Watch total count)

只谈情不闲聊 提交于 2019-12-18 09:47:27
问题 My app collects CMPedometerData both on the iPhone and the Watch . iPhone's steps number (both in real time and historical data) are significantly lower than those recorded by the Watch (witch makes sense, since "on device" steps are actually lower when you always wear the Watch while sometimes leaving the phone on the desk). The fact is, the Watch seems to have the aggregated data, or at least since it's the higher step count the most significant data, so I'd like to have those aggregated /

Aggregated CMPedometerData (iPhone + Watch total count)

对着背影说爱祢 提交于 2019-12-18 09:47:11
问题 My app collects CMPedometerData both on the iPhone and the Watch . iPhone's steps number (both in real time and historical data) are significantly lower than those recorded by the Watch (witch makes sense, since "on device" steps are actually lower when you always wear the Watch while sometimes leaving the phone on the desk). The fact is, the Watch seems to have the aggregated data, or at least since it's the higher step count the most significant data, so I'd like to have those aggregated /