watchkit

WatchOS2 WCSession How many delegates can the WCSession have in WatchKitExtension?

倾然丶 夕夏残阳落幕 提交于 2019-12-01 17:35:42
My iOS app sends timely information via the WatchConnectivity framework. The receiving side implements the delegate of WCSession. I have 2 interfaceControllers that need the information sent from the WCSession. One is the glanceInterfaceController and the other is my mainInterfaceController. Can both of them be assigned the delegate and both receive the userInfo or applicationContext sent from my iOS app at the same time? or can there only be one WCSession delegate assigned and my controllers need to get the data from the object that is assigned? Thanks! WCSession only supports a single

WatchOS2 WCSession How many delegates can the WCSession have in WatchKitExtension?

人走茶凉 提交于 2019-12-01 17:04:00
问题 My iOS app sends timely information via the WatchConnectivity framework. The receiving side implements the delegate of WCSession. I have 2 interfaceControllers that need the information sent from the WCSession. One is the glanceInterfaceController and the other is my mainInterfaceController. Can both of them be assigned the delegate and both receive the userInfo or applicationContext sent from my iOS app at the same time? or can there only be one WCSession delegate assigned and my controllers

error: WatchKit apps must have a deployment target equal to iOS 8.2 (was 8.3)

落爺英雄遲暮 提交于 2019-12-01 16:53:24
I just updated my project from 8.2. to 8.3 (using the latest xCode Version 6.3 6D570). Now i get this error error: WatchKit apps must have a deployment target equal to iOS 8.2 (was 8.3). The project and all targets are set to Latest SDK 8.3 What did I miss? I resolved this by: Right-clicking my PROJECTNAME.xcodeproj file and choosing "Show Package Contents". Opening project.pbxproj in a text editor. Changing all instances of "IPHONEOS_DEPLOYMENT_TARGET = 8.3;" to "IPHONEOS_DEPLOYMENT_TARGET = 8.2;" After this change my project compiled and ran fine. Build successful. I just changed the iOS

error: WatchKit apps must have a deployment target equal to iOS 8.2 (was 8.3)

跟風遠走 提交于 2019-12-01 15:59:15
问题 I just updated my project from 8.2. to 8.3 (using the latest xCode Version 6.3 6D570). Now i get this error error: WatchKit apps must have a deployment target equal to iOS 8.2 (was 8.3). The project and all targets are set to Latest SDK 8.3 What did I miss? 回答1: I resolved this by: Right-clicking my PROJECTNAME.xcodeproj file and choosing "Show Package Contents". Opening project.pbxproj in a text editor. Changing all instances of "IPHONEOS_DEPLOYMENT_TARGET = 8.3;" to "IPHONEOS_DEPLOYMENT

WatchKit Simulator Won't Load App

拈花ヽ惹草 提交于 2019-12-01 15:24:49
Originally, I thought this was an issue of the code I was writing, but I've just downloaded four or five WatchKit projects even one from Apple. All of them, fail to load. I've uninstalled Xcode, reinstalled it and still nothing. Any one else experiencing the same issue? Workarounds? Solutions? You can see in the screenshot above what the loading screen looks like. Sam B I am already bloody sick of official Xcode 6.2 & WatchKit Simulator. It is so super flaky. Here's another fun fact, if there is some constraint in your storyboard that the watchKit doesn't like then it will also keep looping in

WatchOS3 之初体验

此生再无相见时 提交于 2019-12-01 11:46:33
Apple Watch的架构 WatchKit布局 动画 Apple Watch与iPhone数据交互--Watch Connectivity Apple Watch的架构 WatchKit带给我的惊讶之一是它的架构。目前Watch App的运行是由两部分相互结合进行工作的: · 你的Apple Watch主要包含用户界面元素文件(Storyboard文件和静态的图片文件)和处理用户的输入行为。并不会真正在Apple Watch中运行代码。换句话说,Apple Watch仅是一个“视图”容器。 · 你的iPhone包含所有的逻辑代码用于响应用户在Apple Watch上产生的诸如应用启动、点击按钮、滑动滑杆等行为。换言之,iPhone包含了控制器和模型。 有趣的是Apple Watch和iPhone的这种交互是在幕后自动完成的。你要做的工作只是在Storyboard中设置好UI的Outlet,然后其他的事都由WatchKit SDK在幕后通过蓝牙技术自动进行交互。即使iPhone和Apple Watch是两个独立的设备,你也只需要关注你本地的代码以及Outlet的连接情况,这真是一件很酷的事情。 WatchKit布局 一个令我惊讶的是Watch App的UI布局方式,我们不能再用AutoLayout进行布局了。取而代之的是一种新的布局方式Group,你需要将界面元素比如按钮

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-01 11:26:09
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, Wild Card App IDs can not be used to create In House Provisioning Profiles". It seems like it is bug

WatchKit NSUserDefaults and NSKeyedUnarchiver issue

孤街浪徒 提交于 2019-12-01 11:21:50
问题 In my project I have a custom object called Country, which implements NSCoding The code is shared across iphone and watch app by reference. Both app are in the same app group. In my iPhone app I'm using NSUserDefaults to story a Country object, from watch app I'm reading the same object with following code: var defaults = NSUserDefaults(suiteName: "group.my.group") if let data = defaults?.objectForKey("country") as? NSData { if let country = NSKeyedUnarchiver.unarchiveObjectWithData(data) as?

WatchKit Upload

久未见 提交于 2019-12-01 10:51:38
I am trying to submit my WatchKit app t iTunesConnect. I click "Archive" and then validate and I am shown the message below. I have created an App Id for the app, extension and WatchKit App as well as distribution profiles. Where am I going wrong? Thanks To properly sign a watch app, you need three different App IDs and each App ID needs a provision profile. Go to Developer Member Center Add/Edit the three App IDs: One for your main App bundle, you may need to add the entitlements you need, like App Groups , Keychain Access Group . One for your watchkit extension bundle, you may need to add

WatchKit Upload

僤鯓⒐⒋嵵緔 提交于 2019-12-01 07:34:24
问题 I am trying to submit my WatchKit app t iTunesConnect. I click "Archive" and then validate and I am shown the message below. I have created an App Id for the app, extension and WatchKit App as well as distribution profiles. Where am I going wrong? Thanks 回答1: To properly sign a watch app, you need three different App IDs and each App ID needs a provision profile. Go to Developer Member Center Add/Edit the three App IDs: One for your main App bundle, you may need to add the entitlements you