Hi,I get an error when I first run the app “DreamWalker”(WatchOS by Tutorials, Chapter 22).
The app on iPhone can run while the app in apple watch always on loading. And Xcode reports an error in DreamWalker → Shared → Walk.swift. The code is here:
extension UIColor {
convenience init(colorArray array: NSArray) {
let r = array[0] as! CGFloat Thread 1: EXC_BAD_INSTRUCTION(code=EXC_I386_INVOP, subcode=0x0)
let g = array[1] as! CGFloat
let b = array[2] as! CGFloat
self.init(red: r/255.0, green: g/255.0, blue: b/255.0, alpha:1.0)
}
}
I have run the app both on simulator and iPhone, apple watch. Also, run the completed app in the folder final. But all get this issue. No idea how to fix this.
Thanks in advance.