| tags:sati update categories:iapp

Sati v1.9.4

1.9.3をアップデートし、間髪を入れずにiOS10にて音が ”Tri-Tone” に変わってしまうバグのホットフィックスアップデートです。 ついでに、瞑想開始時にでるアラートを2秒後に自動で消えるようにしました。余計な1タップが減ります。

アプリは一時配信を中断。ダウンロードしてしまったユーザーの方々申し訳有りません。

UNNotification (iOS10)

まず、サウンドファイルをSoundと言う名前のフォルダーに入れていたのがよくなかった。
そして、今更ながら、iOS10からは通知の仕様が変更されていたのを知らなかった。

func registerAlarm(_ atDate: Date, soundName: String, identifier: String) {
    //print("fire: " + atDate.description + " with sound:" + soundName + " with identifier:" + identifier)
    if #available(iOS 10.0, *) {
        let content = UNMutableNotificationContent()
        // Configure Notification Content
        content.sound = UNNotificationSound(named: soundName)
        // Add Trigger
        let calendar = Calendar(identifier: .gregorian)
        let components = calendar.dateComponents(in: .current, from: atDate)
        let date = DateComponents(calendar: calendar, timeZone: .current,
                                  month: components.month, day: components.day,
                                  hour: components.hour, minute: components.minute, second: components.second)
        let trigger = UNCalendarNotificationTrigger(dateMatching: date, repeats: false)

        // Create Notification Request
        let request = UNNotificationRequest(identifier: identifier,
                                            content: content,
                                            trigger: trigger)
        // Add Request to User Notification Center
        UNUserNotificationCenter.current().add(request) {
            (error) in
            if let error = error {
                print("Unable to Add Notification Request (\(error), \(error.localizedDescription))")
            }
        }
    } else {
        // Fallback on earlier versions
        let app:UIApplication = UIApplication.shared
        if let noticeAlarm: UILocalNotification = UILocalNotification() {
            noticeAlarm.fireDate = atDate
            noticeAlarm.timeZone = TimeZone.current
            noticeAlarm.soundName = soundName
            app.scheduleLocalNotification(noticeAlerm)
        }
    }
}

検証用端末iPhone5Sを10.0.1から10.3.2にアップデートし、実機にてテストを1日行いアプストアに申請しました。

数日後?にはアップされると思います。ダウンロードしてしまったiOS10ユーザーの方々もうすこし我慢のほどよろしくお願いします。

追記: 20日に申請が通りました。おさわがせしました。

Donation
🌷 sat ⚡️ goozenlab@getalby.com
🌻 btc : bc1qct0avd4pqvahv564kc82ark94hg5qutlswp4gw
If you do send a tip, Please email me so that I can say thank you.