watch-os

watchOS 2 working with CocoaPods

天大地大妈咪最大 提交于 2019-12-10 09:46:29
问题 Has anyone gotten CocoaPods working with watchOS 2? I tried using ‘use_framework!’ with ‘platform :watchos, ‘2.0’ but it says "[!] Invalid Podfile file: Unsupported platform watchos2 . Platform must be :ios or :osx .. Updating CocoaPods might fix the issue.” I am on the latest version of CocoaPods. 回答1: CocoaPods currently doesn't support watchos. There is a work in progress issue here for adding support for it. 回答2: CocoaPods released new version which is 0.38.0 and now supports watchOS 2.

Error ITMS-90168: “The binary you uploaded was invalid.”

只谈情不闲聊 提交于 2019-12-10 03:41:37
问题 I am trying to upload an application to the App Store. It contains a watchOS 2 app, watchOS "1" extension, and a few iOS extensions. I cannot figure out why this is happening. When I use the "Upload to App Store…" feature of Xcode 7 (or use Application Loader), I get the message "Archive submission failed with errors:" with the error being "ERROR ITMS-90168: 'The binary you uploaded was invalid.'" Has anyone else run into this issue? Any suggestions? 回答1: Because you've already uploaded

Using environmentObject in watchOS

独自空忆成欢 提交于 2019-12-09 08:28:28
问题 I am trying to use environmentObject in a watchOS6 app to bind my data model to my view. I have created a simple, stand-alone Watch app in Xcode 11. I created a new DataModel class import Combine import Foundation import SwiftUI final class DataModel: BindableObject { let didChange = PassthroughSubject<DataModel,Never>() var aString: String = "" { didSet { didChange.send(self) } } } In my ContentView struct I bind this class using @EnvironmentObject - struct ContentView : View {

How to hide or remove the time from the Apple Watch status bar?

坚强是说给别人听的谎言 提交于 2019-12-08 17:28:31
问题 How do I hide or remove the small clock from Apple Watch statusbar screen on my app? I searched the web for this but found nothing! I just discovered that Apple will reject your app if you remove that clock, but my app is a watch face itself and doesn't need to display that time. 回答1: As you pointed out, trying to hide or remove the time from the status bar will get your app rejected. There's no way to accomplish what you want to do yet, since Apple doesn't permit developers to create custom

Core Data fetch request with WatchConnectivity

一笑奈何 提交于 2019-12-08 13:08:55
问题 I'm currently trying to get CoreData data from my iOS app to the watchOS extension. I'm using the WatchConnectivity Framework to get a dictionary via the sendMessage(_ message: [String : Any], replyHandler: (([String : Any]) -> Void)?, errorHandler: ((Error) -> Void)? = nil) function. The basic connection is working fine. The iOS app is reachable and if I try to reply a sample dictionary everything is working. So far so good, but as I start doing a fetch request on the iOS app in background,

Programmatically notification on apple watch. (WatchOS 3)

冷暖自知 提交于 2019-12-08 12:07:19
问题 How I can programmatically make the notification appear only on the apple watch and only when the event occurs. I searched for a long time on the Internet and in the documentation but did not find the answer 回答1: There is no way for you to decide whether the notification appears on the Watch or on the Phone, the system handles this automatically and you cannot change this behaviour. The notification only appears on the Watch if all of the below requirements are met: The connected iPhone's

Xcode does not install watchOS app for debugging on device

£可爱£侵袭症+ 提交于 2019-12-08 05:46:15
问题 This is on watchOS 4.3 beta (15T5165e) and Xcode 9.3 beta (9Q98q), but I don't think it's because of them being in beta because another WatchKit project ran on device just fine. I have tried unpairing/repairing, restarting the iPhone/Watch/macOS/Xcode (while making sure to to tap "trust this computer" on the watch) but Xcode still says "Running" in the WatchKit scheme without actually installing and running the watchOS app, eventually saying "Watch app launch timed out." 来源: https:/

Localize watchkit companion app display name

陌路散爱 提交于 2019-12-06 06:47:08
问题 I am having some issues localizing app display name on apple watch companion app. Following the guide lines i have localize the CFBundleName as follow: CFBundleDisplayName = "My app"; CFBundleName = "Myapp"; I did it for every different language supported by my app, but in apple watch companion app it is always shown the english CFBundleDisplayName. Any idea on how properly localize apple watch companion app name? thank you very much for helping 回答1: I believe that is a bug of the iOS9. The

How to design watch app screen like Friends app in watch os?

眉间皱痕 提交于 2019-12-06 06:11:15
I want to create an application with circular menu in dynamic way as like given here . I have tried with lots of efferts but not got success because there are two basic concept for design any watch app like horizonal and vertical what I know as per my learning experience.I want to develope menu which have dynamic menu items. I am not sure it would be possible or not. It would be great if anyone have any idea. Thank you. Finally, I got the solution from the apple developer forum. I have implemented above mentioned functionality with the help of this WWDC video . At the moment, I have developed

handleWatchKitExtensionRequest not responding to openParentApplication in Watchkit Extension (Swift)

亡梦爱人 提交于 2019-12-06 02:06:39
问题 I am trying to send information from my WatchKit App over to my main parent application and from what I understand I should just be able to use openParentApplication in my watchkit Extension which will be received by handleWatchKitExtensionRequest in AppDelegate.swift, but I cant seem to get handleWatchKitExtensionRequest to be triggered. I've been having some issues, so at this point I'm just trying to establish any connection at all before worrying about what information is actually passed.