===== 04.watchOS ===== [[00.swift:index.html|Swiftトップページ]] ===== AppleWatchアプリ超入門 ===== https://i-doctor.sakura.ne.jp/font/?p=47344 WindowsユーザーがMacBookAirを購入してみた(2)XcodeインストールとiOSとwatchOSのアップデートに合計10時間かけてAppleWatch実機で”HelloWorld” 2021年9月28日 https://i-doctor.sakura.ne.jp/font/?p=47629 AppleWatchアプリを作ってみる(1)ボタンをタップするとテキストが変化 2021年10月4日 ===== iOS15 and watchOS8 ===== 2021年9月 https://k-tai.watch.impress.co.jp/docs/review/iphonetips/1352789.html ===== documentation ===== https://developer.apple.com/documentation/watchkit Framework WatchKit https://developer.apple.com/documentation/watchkit/building_a_watchos_app Building a watchOS App Set up your app’s life cycle and create its user interface using SwiftUI. https://developer.apple.com/design/human-interface-guidelines/watchos/interaction/navigation/ Navigationナビゲーションは2種類 -Hierarchical navigation -Page-based navigation https://developer.apple.com/design/human-interface-guidelines/watchos/elements/buttons/ Buttons ===== Xcode ===== エンジョイSwiftUIプログラミングその30(SwiftUI Get Started2:Hello WorldをGitHubへ) https://bfaaap.com/2020/05/16/%e3%82%a8%e3%83%b3%e3%82%b8%e3%83%a7%e3%82%a4swiftui%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0%e3%81%9d%e3%81%ae%ef%bc%93%ef%bc%90swiftui-get-started%ef%bc%92%ef%bc%9ahello-world/ https://tech.playground.style/swift/xcode-indent-tab-change/ 【Xcode触りたての方必見!】ショートカットでインデントを一括で整える方法+Xcodeで設定されているインデントの変え方 2020-03-20 https://chusotsu-program.com/xcode-indent-setting/ xcode11のインデントをスペース2つに設定する 2021年3月10日 ===== Hello World ===== https://i-doctor.sakura.ne.jp/font/?p=47344 WindowsユーザーがMacBookAirを購入してみた(2)XcodeインストールとiOSとwatchOSのアップデートに合計10時間かけてAppleWatch実機で”HelloWorld” 2021年9月28日 https://i-doctor.sakura.ne.jp/font/?p=47629 AppleWatchアプリを作ってみる(1)ボタンをタップするとテキストが変化 2021年10月6日 ===== ナビゲーション ===== PageTabViewStyle https://developer.apple.com/documentation/swiftui/pagetabviewstyle https://app-o-mat.com/article/watchkit/develop-page-based-navigation-apple-watch-app How to develop page based navigation UI on Apple Watch For watchOS 7 and watchOS 6 https://www.yururiwork.net/archives/1101 2020.09.15 【SwiftUI】PageTabViewStyle(UIPageViewController)の使い方【Xcode12&iOS14】 //original code from https://app-o-mat.com/article/watchkit/develop-page-based-navigation-apple-watch-app import SwiftUI struct ContentView: View { var body: some Scene { WindowGroup { // These Views will end up in pages. TabView { Text("Page One") Text("Page Two") Text("Page Three") } .tabViewStyle(PageTabViewStyle()) } } } https://www.hackingwithswift.com/quick-start/swiftui/how-to-push-a-new-view-onto-a-navigationview How to push a new view onto a NavigationView September 3rd 2021 // original code from https://www.hackingwithswift.com/quick-start/swiftui/how-to-push-a-new-view-onto-a-navigationview struct SecondView: View { var body: some View { Text("This is the detail view") } } struct ContentView: View { var body: some View { NavigationView { VStack { NavigationLink(destination: SecondView()) { Text("Show Detail View") } .navigationTitle("Navigation") } } } } ===== map ===== https://ez-net.jp/article/8C/ylktGR5J/5ZZKjSNrNQac/ 簡単な Apple Watch アプリを初めて作ってみる Apple Watch アプリプログラミング Apple Watch Swift 1.1 Xcode 6.2 https://swiftwithmajid.com/2020/07/29/using-mapkit-with-swiftui/ Using MapKit with SwiftUI 29 Jul 2020 https://www.yururiwork.net/archives/1234 2020.12.01 SwiftUI で Map を表示する手順 ===== Your maximum App ID limit has been reached. You may create up to 10 App IDs every 7 days. ===== Communication with Apple failed. Your maximum App ID limit has been reached. You may create up to 10 App IDs every 7 days. https://izanagiblog.com/archives/511 Xcode「Your maximum App ID limit 〜」とは? AppID Bundle ID https://qiita.com/miyamotok0105/items/f24a4e10a2877ae70bc4 @miyamotok0105 2017年08月27日に更新 バンドルID(Bundle identifier)とは https://apptopi.jp/2019/12/29/appleid-multiple/ AppleIDは複数作成できる?複数アカウントのメリット&作成方法 → AppleIDは複数作成できるが、異なるメールアドレスが必要。 ===== WatchOS ===== https://gaprot.jp/2020/07/06/swiftui-apple-watch/amp/ そろそろSwiftUIで「手軽に」Apple Watch単体のアプリを作ろうじゃないか 20200706 画像引用元:https://gaprot.jp/2020/07/06/swiftui-apple-watch/amp/ {{:00.swift:pasted:20210921-210918.png}} (引用ここから) # original code from https://gaprot.jp/2020/07/06/swiftui-apple-watch/amp/ import SwiftUI struct ContentView: View { @State var sendText: String = UserDefaults.standard.project(forKey: "message") as? String ?? // 読み込み @Stage var isPresented = false // アラーと表示条件。閉じるときfalseになる var body: some View { ScrollView { // 入力 TextField("メッセージ", text: $sendText) // ボタン Button(action: { self.saveText() }) { Text("Save") .font(.headline) }.alert(isPresented: $isPresented, content: { complete() }).disabled(self.sendText.isEmpty) // 入力がないと押せない .background(Color.blue) // ボタン背景色 .cornerRadius(CGFloat(10.0)) // 核丸 } } private func saveText() { UserDefaults.standard.set(self.sendText, forKey: "message") // 保存 self.isPresented.toggle() // アラートを出す } private func complete() -> Alert { return Alert( title: Text("成功"), message: Text("保存しました"), dismissButton: Alert.Button.default(Text("OK")) ) } } (引用ここまで) → このコード、このままでは動かなかった。 https://note.com/dngri/m/m75f753d62142/hashtag/6863 SwiftUIでいこう! donguri 2020年1月30日 0 https://developer.apple.com/tutorials/swiftui/creating-a-watchos-app Framework Integration Creating a watchOS App https://cafe-mickey.com/swiftui/watch-stopwatch/ SwiftUIでApple Watchアプリ開発】ストップウォッチアプリの作り方 2021年5月24日 https://www.tdi.co.jp/miso/apple-watch Apple Watchで心拍計を表示するアプリを開発してみた 2020年2月18日 Izumi Hayato →こういうのがやりたい! https://zenn.dev/st43/articles/799f9a230de244 watchOS x SwiftUIで表計算アプリをつくった 2021.04.09 https://zenn.dev/milanista224/articles/kintai-chan-app-release SwiftUIで実装したApple Watch専用アプリをリリースしました 2021.08.02 https://software.small-desk.com/development/2020/11/18/swiftui-apple-watch-step1/ [SwiftUI][watchOS] Timer アプリを AppleWatch 向けに作る(その1) 2021-04-13 https://qiita.com/miltood/items/3a68452657a748b2cd07 @miltood が2020年04月26日に作成 Apple Watchのセットアップとアプリ開発(Swift 5.1) https://ascii.jp/elem/000/001/028/1028217/amp/ Apple WatchアプリをSwiftで開発 文●森 巧尚 2015年07月31日 https://ichi.pro/swiftui-to-watchkit-apuriderige-to-o-shiyoshite-applewatch-de-doteki-tsuchi-o-sakuseisuru-164612850408308 SwiftUIとWatchKitアプリデリゲートを使用してAppleWatchで動的通知を作成する https://qiita.com/MilanistaDev/items/319e80033a185f31111e @MilanistaDev が2020年12月11日に更新 【SwiftUI】Watch Connectivity 使って Apple Watch から iPhone にメッセージ送信してみる!! https://qiita.com/chi_soft_dev/items/d4bd2e74f1e2092d9673 @chi_soft_dev が2021年06月30日に作成 AppleWatch の Digital Crown を使ってみた https://app-o-mat.com/article/watchkit/develop-page-based-navigation-apple-watch-app How to develop page based navigation UI on Apple Watch For watchOS 7 and watchOS 6 ===== Apple Watch実機 ===== https://developer.apple.com/documentation/xcode/running-your-app-in-the-simulator-or-on-a-device Running Your App in the Simulator or on a Device https://zenn.dev/milanista224/articles/kintai-chan-app-release SwiftUIで実装したApple Watch専用アプリをリリースしました 2021.08.02 https://init0.hatenablog.com/entry/2019/09/01/232043 2019-09-01 AppleWatch WatchKitでHelloWorld https://developer.apple.com/forums/thread/123858 Install independent watchOS app 2020 ===== WatchKit ===== https://qiita.com/am10/items/e58dfe28f024b3dc39ad @am10 が2021年03月08日に更新 WatchKitのObjectsまとめ ===== HealthKit ===== https://note.com/shu223/n/n0575cd816221 [HealthKit] watchOSで心電図(ECG)を取得する shu223 2021年2月9日 https://kita-note.com/swift-healthkit-show-electrocardiogram 【Swift】HealthKitの心電図データを取得して表示する 2021/7/19 https://kita-note.com/swift-healthkit-show-heartrate Swift】HealthKitの心拍数(Heart Rate)を取得して表示する 2021/9/7 https://developer.apple.com/documentation/healthkit HealthKit https://wot.hatenablog.jp/entry/View_heart_rate_in_real_time 【リアルタイム】Apple Watchとiphoneを使って配信画面に心拍数を表示する方法【臨場感バツグン!】 20210103 ===== ResearchKitとCareKit ===== https://www.apple.com/jp/researchkit/ ResearchKitとCareKit https://www.c2inc.co.jp/researchkit.php 医学調査と医療ケアに革新をもたらす 2つのフレームワーク ResearchKit & CareKit https://iphone-mania.jp/news-113248/ 2016年4月29日 Apple、患者向けアプリ開発プラットホーム「CareKit」を提供開始! https://iphone-mania.jp/tag/researchkit/ ResearchKit ResearchKit(リサーチキット)とは、アップルが提供する、医療研究アプリ向けのフレームワークのこと。このキットを使ったアプリでは、iPhoneに内蔵されている加速度センサーやジャイロスコープ、GPSといったセンサー類の情報を取得できる。 https://ascii.jp/elem/000/001/145/1145403/ Appleがオープンソース化したResearchKitって何? 文● 吉田ヒロ 2016年04月05日 ===== watchアプリ ===== https://yukblog.net/iphone-watch-communication-method/ 2020年7月14日 iPhoneとApple Watch間で通信するための2つの方法【Swift】 https://software.small-desk.com/development/2020/11/18/swiftui-apple-watch-step1/ [SwiftUI][watchOS] Timer アプリを AppleWatch 向けに作る(その1) 20210413 ===== 見出し ===== https://monetizehack.com/businessmodel/medical-wearabie-chance/ 2019/03/26 ウェアラブルの需要拡大! アップルが狙う医療市場 https://iphone-mania.jp/news-331576/ 2020年11月30日 23時20分 読了まで 約3分54秒 Apple Watchで血圧測定可能にする新たな特許申請〜睡眠中もセンサーで自動計測 https://dev.classmethod.jp/articles/intro-watchos-2/ [watchOS 2] watchOS 2 の変更点について少し調べてみた 平屋真吾 2015.07.07 https://atmarkit.itmedia.co.jp/ait/articles/1505/28/news017.html 実機を触って分かった、“使われる”Apple Watchアプリのキモ 20150528 https://digiday.jp/brands/3-brands-that-have-gotten-the-apple-watch-right/ Apple Watchのアプリ開発で参考にしたい3つの成功事例 2016/1/15 http://swift-salaryman.com/howtostart.php Swiftを使って中年サラリーマンがアプリ開発や広告ができたまとめ ===== 見出し ===== [[00.swift:index.html|Swiftトップページ]]