LoginSignup
2
1

More than 1 year has passed since last update.

SwiftUI Tutorial の応用2

Last updated at Posted at 2022-04-19

内容

  • SwiftUI Tutorial の応用2

開発環境

ハードウエア

項目
PC MacBook Air(M1,2020) メモリ:16GB ストレージ:1TB
実機 iPhoneSE(2nd Generation 128GB iOS 15.3.1)
PCと実機を接続する USB-C Digital AV Multiportアダプタ

ソフトウエア

項目
言語 Swift 5.5.2
IDE Xcode Ver 13.2.1
その他 Visual Studio Code Ver 1.64.2

バージョン管理

GitHub - 実際にコードを確認できます

画面

  • おでかけスポット
  • 駅一覧

工夫した点

ウィジェット機能を追加

UI テスト

import XCTest

class HankyuUITests: XCTestCase {

    override func setUpWithError() throws {
        continueAfterFailure = false
    }

    override func tearDownWithError() throws {
    }

    func testExample() throws {
        let app = XCUIApplication()
        app.launch()
        let navBar = XCUIApplication().staticTexts.matching(identifier: "おでかけスポット").firstMatch
        XCTAssertEqual(navBar.label, "おでかけスポット")
    }

    func testLaunchPerformance() throws {
        if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {

            measure(metrics: [XCTApplicationLaunchMetric()]) {
                XCUIApplication().launch()
            }
        }
    }
}

GitHub Action を利用

下記内容を引き金に GitHub Action を実行するようにした

  • develop ブランチにプッシュした
  • main ブランチにプルリクエストを行った

GitHub Action が成功したら、Slack に通知を行うようにした

今回開発したアプリを App Store へ公開を試みる

結果: 却下
理由(ざっくり): アプリの機能が少なすぎて、Apple のユーザに良い体験を提供できない

Guideline 4.2 - Design - Minimum Functionality

We found that the usefulness of your app is limited by the minimal amount of content or features it includes.

Next Steps
We encourage you to review your app concept and incorporate different content and features that are in compliance with the App Store Review Guidelines.

We understand that there are no hard and fast rules to define useful or entertaining, but Apple and Apple customers expect apps to provide a really great user experience. Apps should provide valuable utility or entertainment, draw people in by offering compelling capabilities or content, or enable people to do something they couldn't do before or in a way they couldn't do it before.

感想

  • SwiftUI は覚えたらラク
  • 開発したアプリを App Store Connect に UP して審査を依頼する一連の流れを復習できた
    (以前業務で iOS アプリを App Store Connect への UP を経験していた)
  • 2022年1月に申請した Xcode Cloud を早く使わせて欲しい

今後

  • 目標:2022年中に iOS アプリを App Store で配信する ※今回開発したアプリを配信する予定なし
  • この動画 を参考に、Firebase を利用したアプリを実装する
  • この本に記載のある GitHub API を利用した API クライアントアプリを開発する
  • HelthKit を利用して、歩数をウィジェットで表示するアプリを開発したい
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1