watchos

Xcode 7 supporting watch OS1 and OS2

為{幸葍}努か 提交于 2019-12-17 09:39:48
问题 I have been fiddling with Xcode 7 for sometime now, I get to know that it supports only Swift 2 and there is no way to support Swift 1.0 or 1.2 in Xcode 7. This is fine. Now coming to WatchOS, can I have two targets one for WatchOS1 and one for WatchOS2 separately in Xcode 7 so that I can support for both?? I was looking into the deployment target setting in the build settings of both the watch target and the iOS app target but I could see only WatchOS2 in the list so Can I support two

Phone call from Apple Watch with openSystem API?

∥☆過路亽.° 提交于 2019-12-11 09:07:53
问题 As I watched the WWDC 2015 session video "Introducing WatchKit for watchOS 2" (at 13:29), I saw that it is possible to make phone calls directly on Apple Watch with the openSystem API. How can I use this API in Swift? 回答1: You can use the openSystemURL method, which is available on the shared WKExtension object. Pass a tel: URL to this method to initiate a phone call. if let telURL=NSURL(string:"tel:5553478") { let wkExtension=WKExtension.sharedExtension() wkExtension.openSystemURL(telURL) }

iTunes Connect asking for Apple Watch screens when the app is iOS only

a 夏天 提交于 2019-12-11 05:57:15
问题 I recently noticed itunes connect is asking me to include apple watch screens. But I never included any watchos capabilities on xcode as a deployment target or target dependencies. Is there anytithing I am missing in terms of deployment configuration on xcode or itunes connect? Or this is just another bug? 回答1: To make sure that your Project has not any relation to Watchkit and WatchOS: 1) Find eventual import WK... lines and remove them 2) Go to Project file -> iOS app target -> Build Phases

Using multiple hosting controllers in SwiftUI on WatchOS

回眸只為那壹抹淺笑 提交于 2019-12-11 05:25:33
问题 I'm trying to use multiple WKHostingController in a SwiftUI WatchOS project. I want to be able to go from one Controller to 3 controllers. The user will press a button in the first ContentView(1) (That is paired with HostingController(1) ) that will then navigate them to the middle controller in the 3-grouped set HC3 (or HostingController3 , with Identifier HC3 ) The Code is as follows: struct ContentView: View { var body: some View { VStack{ NavigationLink(destinationName: "HC3"){ Text("Go

NSExtensionPointIdentifier error only on real device

荒凉一梦 提交于 2019-12-11 03:28:41
问题 I am getting the following error when I try to run my Apple Watch app on my device: error: WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier in your WatchKit Extension's Info.plist is set to com.apple.watchkit. The value of NSExtensionPointIdentifier is set correctly. Has anyone else experienced this error? 回答1: I fixed the issue by changing the deployment target to 9.0 in the Extension's Build Settings. 回答2: Every time I met same

How to use WebKit on watchOS 5?

孤者浪人 提交于 2019-12-10 21:57:17
问题 At yesterday's WWDC, Apple have announced WebKit support in watchOS 5. I have downloaded Xcode 10 but can't find any reference to that in the Interface Builder or in the Frameworks and Libraries tab. Although Apple's WebKit website has been unable for access yesterday, they haven't added documentation about watchOS yet. How can I make use of WebKit and WatchKit? 回答1: Quite a useful video from this years WWDC about this here: https://developer.apple.com/videos/play/wwdc2018/239 Basically, it