⚠️ アーカイブ: このリポジトリはSwift 2/3時代(2016年)のコードで、現在はメンテナンスされていません。歴史的アーカイブとして公開しています。
iOS向け瞑想サポートアプリ。シンプルなカウントダウンタイマーと和風の通知音で瞑想をサポートします。
公式HP(アーカイブ)
シンプルなカウントダウンタイマーと和風の通知音で瞑想をサポートするアプリ。
終了時に鐘や琴などの音で優しく瞑想の終わりを知らせる。
| 機能 |
説明 |
| カウントダウンタイマー |
分単位で設定可能。Stepperで時間調整 |
| 終了通知音 |
鐘1/2、琴、二胡、シンギングボウル、サイレント |
| バイブレーション |
タイマー終了時にバイブレーション(ON/OFF切替) |
| リマインダー |
毎日決まった時間に瞑想を促すローカル通知 |
MainViewController - タイマー画面(メイン)
├── SettingsViewController - 設定画面
│ └── SoundListViewController - 通知音選択画面
| カテゴリ |
技術 |
| 言語 |
Swift 2.x → Swift 3対応途中 |
| UI |
UIKit + Storyboard |
| リアクティブ |
Bond 7.5.0 |
| 日付処理 |
SwiftDate 6.0.3 |
| 音声再生 |
AVFoundation |
| ローカル通知 |
UILocalNotification(iOS 9以前のAPI) |
| 永続化 |
UserDefaults(SwiftyUserDefaultsラッパー) |
| 広告 |
nend SDK 3.1.2 |
| 分析 |
Firebase Analytics 3.3.0 |
| クラッシュレポート |
Fabric/Crashlytics |
| CI |
Bitrise |
zenApp/
├── Sources/
│ ├── AppDelegate.swift # アプリケーションデリゲート
│ ├── config.swift # 設定値(APIキー等)※要設定
│ ├── Bridging-Header.h # Objective-Cブリッジ
│ │
│ ├── ViewControllers/
│ │ ├── MainViewController.swift # タイマー画面(346行)
│ │ ├── SettingsViewController.swift # 設定画面(397行)
│ │ └── SoundListViewController.swift # 通知音選択(207行)
│ │
│ ├── Manager/
│ │ ├── AudioManager.swift # 音声再生管理
│ │ ├── NotificationManager.swift # ローカル通知管理
│ │ └── userDefaultsManager.swift # 設定値の永続化
│ │
│ ├── Extensions/ # UIKit拡張(9ファイル)
│ │ ├── UIView+Extension.swift
│ │ ├── UIColor+Extension.swift
│ │ ├── NSDate+Extension.swift
│ │ └── ...
│ │
│ └── Library/
│ └── SwiftyUserDefaults.swift # UserDefaultsラッパー
│
├── Resources/
│ ├── Assets.xcassets/ # 画像リソース
│ │ ├── AppIcon.appiconset/ # アプリアイコン
│ │ ├── mainBackground.imageset/
│ │ ├── startButton.imageset/
│ │ └── cancelButton.imageset/
│ │
│ └── Sound/ # 通知音ファイル(和風サウンド)
│ ├── bell01.mp3 # シンギングボウル
│ ├── kane01.mp3 # 鐘1
│ ├── kane02.mp3 # 鐘2
│ ├── koto01.mp3 # 琴
│ └── niko01.mp3 # 二胡
│
├── StoryBoards/
│ ├── Main.storyboard
│ ├── Settings.storyboard
│ └── SoundList.storyboard
│
├── SupportingFiles/
│ ├── Info.plist # アプリ設定
│ └── Settings.bundle/ # 設定アプリ連携
│
├── GoogleService-Info.plist # Firebase設定 ※要設定
│
└── development/ # 開発用リソース
└── design/
├── screenShot/ # App Store用スクリーンショット
└── icon/ # アイコン原本
enum NotifySound: String {
case Silent // サイレント
case Kane1 // 鐘 1
case Kane2 // 鐘 2
case Koto1 // 琴
case Niko1 // 二胡
case Bell1 // シンギングボウル
}
| キー |
型 |
説明 |
lastMinutes |
Int? |
最後に設定したタイマー分数 |
NotifySound |
String? |
選択中の通知音 |
Vibration |
Bool? |
バイブレーション設定 |
Remainder |
Bool? |
リマインダー有効/無効 |
RemainderTime |
Date? |
リマインダー時刻 |
| ライブラリ |
バージョン |
用途 |
| Firebase/Core |
3.3.0 |
Firebase基盤(Analytics等) |
| NendSDK_iOS |
3.1.2 |
nend広告SDK(サービス終了) |
| フレームワーク |
用途 |
| AVFoundation |
音声再生(通知音・BGM) |
| UserNotifications |
ローカル通知(リマインダー) |
| UIKit |
UI構築 |
- macOS 10.12以降(Swift 3対応のXcodeが動作する環境)
- Xcode 8.x(Swift 3)
- CocoaPods 0.39.0
- Carthage
# 依存関係インストール
pod install
carthage bootstrap --platform iOS
# ワークスペースを開く
open zenApp.xcworkspace
このプロジェクトを動作させるには、以下のファイルに適切な値を設定する必要があります:
| ファイル |
設定内容 |
zenApp/GoogleService-Info.plist |
Firebase設定(Firebaseコンソールから取得) |
zenApp/Sources/config.swift |
nend広告SDK設定 |
zenApp/SupportingFiles/Info.plist |
Fabric/Crashlytics APIキー |
fastlane/Fastfile |
CI/CD用の各種トークン |
fastlane/certificate/ |
iOS配布証明書 |
| 時期 |
内容 |
| 2016年6月 |
開発開始 |
| 2016年7月 |
App Store リリース |
| 2017年頃 |
Swift 3移行を試みるも断念 |
| 現在 |
アーカイブとして保存 |
このリポジトリは歴史的アーカイブとして保存しています。
- SwiftUI + Swift 5.x での新規リビルドを検討中
- 瞑想記録・統計機能の追加
- HealthKitマインドフルネス連携
- Live Activity対応
2016年当時、以下の技術的挑戦を行いました:
- リアクティブプログラミング: Bondを使用したUIバインディング
- 関数型アプローチ: Swiftの関数型プログラミング機能の活用
- CI/CD構築: Bitrise + fastlaneによる自動デプロイ
- バックグラウンド処理: タイマーのバックグラウンド動作対応
MIT License
eddy (@stlwolf)