EXC_BAD_INSTRUCTION only in iPhone 5 simulator
问题 Running my code on the iPhone 5 simulator throws the exception shown in the image. Running the code on any of the other simulators is just fine. I can't spot where I made a mistake in this unspectacular line of code. Does anyone else have this problem? 回答1: NSInteger (which is a type alias for Int in Swift) is a 32-bit integer on 32-bit platforms like the iPhone 5. The result of NSInteger(NSDate().timeIntervalSince1970) * 1000 is 1480106653342 (at this moment) and does not fit into the range