iPlayground
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Área de transferência
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • HTML puro
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Ajuda
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Área de transferência
Export to
Dropbox Google Drive Gist
Download
Markdown HTML HTML puro
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Área de transferência
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    初代 SwiftUI 就用來寫 Watch App 吧! - [13 一三](https://twitter.com/ethanhuang13) === {%hackmd FGRWt1UuTFKk0wSbGgg-SA %} > 請從這裡開始 ## YouTube {%youtube 1cROaQ88adE %} ## Slide {%speakerdeck ethanhuang13/chu-dai-swiftui-jiu-yong-lai-xie-watch-app-ba %} ## 講者資訊 - 13 一三 - Twitter: [@ethanhuang13](https://twitter.com/ethanhuang13) - GitHub: [ethanhuang13](https://github.com/ethanhuang13) - 任職於 [CATCHPLAY](https://www.catchplay.com) - 獨立開發者,作品:NoteBox、Blahker、Ladybug、Knil... - weak self podcast https://weakself.dev - «13的開發者週報» https://ethanhuang13.substack.com --- * [投影片](https://speakerdeck.com/ethanhuang13/chu-dai-swiftui-jiu-yong-lai-xie-watch-app-ba) ### 需要先備知識 * 要有Apple Watch使用經驗 * 官方的[SwiftUI tutorial](https://developer.apple.com/tutorials/swiftui/tutorials) WatchOS 末梢開發 tvOS 邊緣開發 watchOS 6 可以獨立開發 獨立上架 獨立的target ### 基本架構 - iOS App Target : Disposable (WatchConnectivity -> X) ### 獨立Watch App - 有個地方要打勾(run without iOS Application) - 有Testflight (on iOS App) - 沒有 IAP 😅 ### Watch App UX - 以秒為記的使用時間體驗 - 能點兩下就不要點三下(甚至不用點) - 按鈕跟資訊不能多 - 獨有控制方式 - Force touch - 觸覺回饋 Haptic feedback - 數位錶冠 Digital Crown - 不用支援dark mode🌚 - 不能用iOS app的做法搬到watch OS - 能不捲就不要捲動 - 可以用Digital Crown來作精準調整 - 用PageNavigation ## 13 WatchApps ### 1. Drinkbobo 紀錄喝了幾杯飲料 *等珍珠奶茶emoji + 待開源中..* ### 2. Defog (世界迷霧的概念) 未完成因為懶得寫iOS App 😅 ### 3. Pineapple Timer 🍍 Insipred by 番茄🍅鐘工作法 Pomodoro - 模擬發條的聲音 - 送審中 - [Testflight](https://testflight.apple.com/join/KUkDxOOg) > 最邪惡的iOS 技巧 (13教的)靜默推播 > Silent Push Push Notification > 啟動AVSpeechSynthesizer(只能講30秒) > 讓User手機隨時可以啟動講話 (X) ### 4. 😈狂鬧鐘 watchOS 6 **Extended Runtime** 規定是要call震動API ## 坑 ### 1. 名字預設 ooo WatchKit App 要記得不是WatchKit Extension了 ### 2. 不能同時兩個模擬器 ### 3. 安裝實機器跑不起來? ### 4. 怎樣同時Preview多個裝置 ### 5. PreviewProvider @Binding .constant(xxxx) ### 6. WKHostingViewController<View> 加environmentObject - type 不一樣 - solution: environment包成View ### 7. Navigation Page 拉法 請參考投影片~ ### 8 不能寫switch case 要寫 if else 無法做單元測試 ###### tags:`iPlayground2019`

    Importar da área de transferência

    Cole seu markdown ou página web aqui...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    Esta nota está bloqueada

    Desculpe, somente o dono pode editar esta nota.

    Alcançou o limite

    Desculpe, você alcançou o tamanho máximo que esta nota pode ter.
    Por favor reduza o conteúdo ou divida em mais de uma nota, obrigado!

    Importar de um Gist

    Importar de Snippet

    ou

    Exportar para Snippet

    Tem certeza?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    Esta página precisa ser recarregada

    Você tem uma versão incompatível do cliente.
    Recarregar para atualizar.
    Nova versão disponível!
    Veja notas de lançamento aqui
    Atualize para usar as novas funções.
    O estado do seu usuário mudou.
    Atualize para carregar o novo estado do usuário.

    Sign in

    Forgot password

    ou

    By clicking below, you agree to our terms of service.

    Entrar via Facebook Entrar via Twitter Entrar via GitHub Entrar via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Ajuda

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documentos

    Help & Tutorial

    How to use Book mode

    Exemplo de Apresentação

    API Docs

    Edit in VSCode

    Install browser extension

    Contatos

    Feedback

    Discord

    Envie-nos um email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Dicas

    Syntax Exemplo Reference
    # Cabeçalho Cabeçalho 基本排版
    - Lista não ordenada
    • Lista não ordenada
    1. Lista ordenada
    1. Lista ordenada
    - [ ] Lista de tarefas
    • Lista de tarefas
    > Citação
    Citação
    **Fonte negrito** Fonte negrito
    *Fonte itálico* Fonte itálico
    ~~Tachado~~ Tachado
    19^th^ 19th
    H~2~O H2O
    ++Texto inserido++ Texto inserido
    ==Texto marcado== Texto marcado
    [link text](https:// "title") Ligação
    ![image alt](https:// "title") Imagem
    `Código` Código 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externos
    $L^aT_eX$ LaTeX
    :::info
    Esta é uma área de alerta.
    :::

    Esta é uma área de alerta.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully