watchos

Use NavigationLink programmatically in SwiftUI

本小妞迷上赌 提交于 2020-03-13 06:47:59
问题 I'm looking for a way to display a view in my WatchOS application "one level in" from the NavigationView on app startup if certain conditions are met. I want the same effect as if I would have pressed a NavigationLink myself, i.e being able to go back to the NavigationView again, which is not possible if I choose to display the desired view right away. "navigationBarItems" is also not available for WatchOS which makes it impossible to navigate backwards without actually clicking the

iOS13适配Dark Mode

孤者浪人 提交于 2020-03-10 16:34:06
原文博客地址: iOS13适配深色模式(Dark Mode) 好像大概也许是一年前, Mac OS 系统发布了深色模式外观, 看着挺刺激, 时至今日用着也还挺爽的 终于, 随着 iPhone11 等新手机的发售, iOS 13 系统也正式发布了, 伴随着手机版的深色模式也出现在了大众视野 我们这些 iOS 程序猿也有事情做了, 原有项目适配 iOS13 系统, 适配 Dark Mode 深色模式 虽然现在并没有要求强制适配 Dark Mode , 但是 DarK 适配却也迫在眉睫 Apps on iOS 13 are expected to support dark mode Use system colors and materials Create your own dynamic colors and images Leverage flexible infrastructure 获取当前模式 提供两种方式设置手机当前外观模式 设置 --> 显示与亮度 控制中心, 长按亮度调节按钮 获取当前模式 我们需要选获取到当前出于什么模式, 在根据不同的模式进行适配, iOS 13 中新增了获取当前模式的 API Swift // 获取当前模式 let currentMode = UITraitCollection.current.userInterfaceStyle if

Invalid Swift Support - The SwiftSupport folder is empty

故事扮演 提交于 2020-03-03 07:13:35
问题 My build is successfully uploaded but Not shown on testflight due to below issue sent by apple. App detail : I am having iPhone app in React Native and watchOS app in swift langauge. Xcode version : 11.3 Issue reported by apple - ITMS-XXXX: Invalid Swift Support - The SwiftSupport folder is empty. Rebuild your app using the current public (GM) version of Xcode and resubmit it. I searched and tried lot of things but nothing work. Also tried below link The SwiftSupport folder is missing.

How do you fill entire Button area with background View in WatchOS?

泪湿孤枕 提交于 2020-01-24 20:49:08
问题 I am trying to have my background view span the entire area of a Button on an Apple Watch form factor. struct SurveyView: View { var body: some View { Button(action: { print("Test tapped.") }) { HStack { Text("Test") .fontWeight(.semibold) } .frame(minWidth: 0, maxWidth: .infinity) .padding() .foregroundColor(.white) .background(LinearGradient(gradient: Gradient(colors: [.green, .blue]), startPoint: .leading, endPoint: .trailing)) } } } How can I make the background span the entire Button?

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

眉间皱痕 提交于 2020-01-13 19:09:11
问题 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. 回答1: Finally, I got the solution from the apple developer forum. I have

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

爱⌒轻易说出口 提交于 2020-01-13 19:09:03
问题 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. 回答1: Finally, I got the solution from the apple developer forum. I have

watchOS更新后 Apple Watch 4心电图功能已开始支持欧洲用户

為{幸葍}努か 提交于 2020-01-10 13:21:43
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 苹果在发布 Apple Watch 4 系列时也发布了 ECG(心电图)功能,但这项功能仅适用于在美版 Apple Watch。对于其他地区的用户来说,访问该功能的唯一途径是在美国购买该设备。不过当 watchOS 5.2 系统推出以后,这种情况似乎将发生改变。 日前,新发布的 iOS 12.2 文档显示,心电图监管信息功能既可以在 watchOS 5.1.2 版本的 Apple Watch 4 上使用,也可以在“非美国地区的 watchOS 5.2 版本的 Apple Watch 4 与 iPhone 5S 以上设备使用。此外,文档还提到了非美国地区用户使用 watchOS 5.2 的要求,这有力地表明,随着 watchOS 5.2 的推出,ECG 功能将向更多国家开放,它可能会在本周晚些时候推出。 iOS 12.2 的另一个附加功能是心电图功能特有的 CE 认证标记,CE 代表欧洲统一标准,这表明新的适用区域将包括所有欧盟国家,还有冰岛、列支敦士登和挪威。 虽然苹果网站上列表功能的可用性页面还没有更新,但我们预计一旦 watchOS 5.2 向所有用户发布,EGC 功能就会到来。 来源: oschina 链接: https://my.oschina.net/u/3008585/blog/3040792

Apple发布watchOS 5 Beta 9

帅比萌擦擦* 提交于 2020-01-10 13:21:34
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Apple发布了即将推出的watchOS 5操作系统的新测试版,适用于Apple Watch设备的应用程序开发人员,他们有兴趣针对watchOS 5版本测试他们的watchOS应用程序。 watchOS 5 beta 9(build 16R5360a)是在苹果将iOS 12的第十个beta版本移植给注册开发者,以及iOS 12第8个公测版发布之后的一天。新的watchOS 5测试版现在可以通过OTA(Over-the-Air)升级安装,或者从苹果开发者门户网站下载beta版。 虽然macOS Mojave 10.14和tvOS 12仍然没有收到新的测试版,但watchOS应用程序开发人员现在可以在他们的Apple Watch设备测试watchOS 5 beta 9版本,并致力于watchOS应用程序的开发。 当然,您需要在iPhone设备上安装最新的iOS 12 beta 10更新才能在Apple Watch上下载并安装watchOS 5 beta 9版本,在整个过程中需要连接到充电器,安装过程中电量要超过50%。 原文来自: https://www.linuxidc.com/Linux/2018-08/153695.htm 本文地址: https://www.linuxprobe.com/apple

AppleWatch开发入门七——watchOS中通知的应用

南笙酒味 提交于 2020-01-10 13:16:17
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> AppleWatch开发入门七——watchOS中通知的应用 一、引言 在iOS系统中,支持的通知有两种类型:本地通知和远程通知。本地通知多用于计时类通知,远程的又称推送,多用于一些提示动态的提示信息。这里有相关通知的一些知识总结: 本地推送: http://my.oschina.net/u/2340880/blog/405491 。 远程推送: http://my.oschina.net/u/2340880/blog/413584 。 在watch中,通知是和iphone同步的,在iphone上的App收到通知的同时,会默认也推送到watch上,基于watch的穿戴性,对用户来说,它上面的通知信息将比iphone更加及时。 二、WatchOS通知概览 首先,watch上的通知分为两部分:short-look和long-lock。简而言之,short-look,可以理解为一个简单的通知预览,它会将通知发起的APP和主要标题等信息展示给你,让你一目了然,当用户抬起手腕,查看这个通知一定时间,这个短通知就会转换为long-look通知。short-look的通知界面我们不能够自定义,系统为我们设计好了模样,如下: 长通知的界面我们是可以进行一定程度上的自定义的,并且可以添加按钮等逻辑操作。 long

WKImage always return nil

寵の児 提交于 2020-01-06 03:14:29
问题 Access assets image will always return nil, below is my code and assets catalog screen shot. let image = WKImage(imageName: "sample") print(image.image) This will always prints nil. Update: Updated screen shot 回答1: I found that from your screenshot you are setting the Image Set in Assests.xcassets in the swiftWatch WatchOS target and i think you are use that image for the WKDemo target so you get that nil. Set that Image Set in your WKDemo's Assests.xcassets instead of WatchOS's Assests