watch-os

The label “Cancel” from modal segue in Apple Watch showing wrong text - “abbrechen”

China☆狼群 提交于 2019-12-06 00:07:36
问题 When my WKInterfaceController poped up by pressing a menuItem (which was settup by " self.addMenuItem in mainScreen"), the title on the poped WKInterfaceController shows " abbrechen " instead of " Cancel ". Anyone know how to fix it to make it showing " Cancel "? Or like where did I probably make a mistake? //MainScreen.swift func setContextItems(directToEnabled: Bool) { self.clearAllMenuItems() self.addMenuItem(with: WKMenuItemIcon.decline, title: "direct", action: #selector(MainScreen

watchOS 2 working with CocoaPods

╄→尐↘猪︶ㄣ 提交于 2019-12-05 18:30:19
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. CocoaPods currently doesn't support watchos. There is a work in progress issue here for adding support for it. CocoaPods released new version which is 0.38.0 and now supports watchOS 2. http://blog.cocoapods.org/CocoaPods-0.38/ According to the blog above, deployment target can be set to watchOS 2

Localize watchkit companion app display name

早过忘川 提交于 2019-12-04 12:10:44
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 I believe that is a bug of the iOS9. The reason is clear, There is no apps on AppStore that provides localized companion App Title. 来源: https:/

Running SpriteKit Game in watchOS on Apple Watch Simulator (xCode 8, Swift 3, iOS 10) - libswiftSwiftOnoneSupport Error

…衆ロ難τιáo~ 提交于 2019-12-04 10:54:37
I downloaded xCode 8.0 beta and opened a recent project written in swift 2 which I then converted to swift 3 using xCode. I then added a watchOS target to my project with the setting "game" File > New > Target: I checked the GameScene.swift in the WatchExtension and sure enough all the code is there and sets up a scene: import SpriteKit class GameScene: SKScene { private var spinnyNode : SKShapeNode? override func sceneDidLoad() { if let label = self.childNode(withName: "//helloLabel") as? SKLabelNode { label.alpha = 0.0 label.run(SKAction.fadeIn(withDuration: 2.0)) } let w = (self.size.width

handleWatchKitExtensionRequest not responding to openParentApplication in Watchkit Extension (Swift)

不打扰是莪最后的温柔 提交于 2019-12-04 05:31:56
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. so currently in my Watchkit ViewController I have the following: let testDict = [ "value1" : "Test 1",

The label “Cancel” from modal segue in Apple Watch showing wrong text - “abbrechen”

南笙酒味 提交于 2019-12-04 04:19:30
When my WKInterfaceController poped up by pressing a menuItem (which was settup by " self.addMenuItem in mainScreen"), the title on the poped WKInterfaceController shows " abbrechen " instead of " Cancel ". Anyone know how to fix it to make it showing " Cancel "? Or like where did I probably make a mistake? //MainScreen.swift func setContextItems(directToEnabled: Bool) { self.clearAllMenuItems() self.addMenuItem(with: WKMenuItemIcon.decline, title: "direct", action: #selector(MainScreen.freePressed)) } Clues: It happens only on my Apple Watch device (WatchOS 3.1). When it runs on the simulator

Using environmentObject in watchOS

微笑、不失礼 提交于 2019-12-04 00:28:46
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 { @EnvironmentObject private var dataModel: DataModel var body: some View { Text($dataModel.aString.value) } } Finally

watchOS - Show realtime departure data on complication

醉酒当歌 提交于 2019-12-03 21:23:46
问题 I have an public transport app with realtime departure data for trains. I would like to add a complication that shows the departure time of the next train. Is it possible to show (or refresh) realtime data on a complication? For example, showing "3 min. to station X." The data could change every minute, based on info that comes from the public transport API. How should I accomplish this on watchOS 2 or watchOS 3? I know the ETA app shows travel times in a complication, but I'm not sure how

Handling push notifications while watchOS app is in the foreground?

天涯浪子 提交于 2019-12-03 20:47:27
I am building iOS + watchOS apps that need to notify users with updated information across all of the possible combinations of iOS and watch app states: when both the iOS and watchOS are running in the foreground, when they're both running in the background, and when one or the other is in the background. I am successfully handling push notifications for three of these four situations. Where I'm stuck is when the watch app is open in the foreground but the iOS app is in the background- I can't find any method for the watch Notification Controller, its ExtensionDelegate, or for the iOS

iOS - watchOS App publishing issue CFBundleIdentifier collision

Deadly 提交于 2019-12-03 12:16:13
After the app uploading I receive the following email We identified one or more issues with a recent delivery for your app, XXX. Please correct the following issues, then upload again. ITMS-90806: CFBundleIdentifier collision - Each bundle must have a unique bundle identifier. The bundle identifier 'org.cocoapods.CocoaLumberjack' is used in the bundles '[CocoaLumberjack.framework, CocoaLumberjack.framework]' CocoaLumberjack is a third party library that I've already used in the past a lot of times without any problem, I am pretty confused. It is not related to the framework's .plist keyword