mirror of
https://github.com/home-assistant/iOS.git
synced 2026-04-12 15:26:45 -05:00
Fixes #415. ## Summary When the device name is already taken by a different unique ID than the current device (in other words, when registering would produce a duplicate device name; login->logout is not affected), prompt for a replacement device name to use instead. This will hopefully eliminate cases where the notify service is confused, and prevent sensor naming conflicts.
12 lines
374 B
Swift
12 lines
374 B
Swift
import UIKit
|
|
|
|
extension UIAlertAction {
|
|
typealias Handler = @convention(block) (UIAlertAction) -> Void
|
|
|
|
var ha_handler: Handler {
|
|
// https://stackoverflow.com/questions/36173740/trigger-uialertaction-on-uialertcontroller-programmatically
|
|
let block = value(forKey: "handler")
|
|
return unsafeBitCast(block as AnyObject, to: Handler.self)
|
|
}
|
|
}
|