1. xocode shows "development cannot be enabled while your device is locked, Please unlock your device and reattach. (0xE80000E2).
If your ios device is already unlocked and connected to mac and still get the error from xcode 8 after upgrading to ios 10, then the mac is not trusted by the device.
To fix it, first disconnect device to mac and then go to ios settings app, and open general->reset->Reset Location & Privacy.
Then connect device to mac and when prompted, set select trust the mac
2. Desymbolize the crash log using external symbol file
It has been much better to use xcode 8 to desymbolize the crash log. Just download the symbol file at any place, for example, the download folder and it seems xcode will do a full disk search to find the right symbol file.
Then from the xocde view device log screen, select the crash log and right click and select "re-symbolicate log", then it will update the symbolized file in the right panel.
3. in swift 2, raw NSData bytes can be converted to UnsafeMutablePoint<> directly as below sample
However, in swift 3, that will cause an build error of "Cannot invoke initializer for type 'UnsafeMutablePointer<UInt8>' with an argument list of type '(UnsafeMutableRawPointer)'.
To fix it, just need to call assumeingMemoryBound method as below
4. avoid result unused warning for swift 3
in swift 2, calling a function without using its return value is normal. But it will generate a result unused warning in swift 3. To avoid the compile warning, just set the return value to _ as shown below
If your ios device is already unlocked and connected to mac and still get the error from xcode 8 after upgrading to ios 10, then the mac is not trusted by the device.
To fix it, first disconnect device to mac and then go to ios settings app, and open general->reset->Reset Location & Privacy.
Then connect device to mac and when prompted, set select trust the mac
2. Desymbolize the crash log using external symbol file
It has been much better to use xcode 8 to desymbolize the crash log. Just download the symbol file at any place, for example, the download folder and it seems xcode will do a full disk search to find the right symbol file.
Then from the xocde view device log screen, select the crash log and right click and select "re-symbolicate log", then it will update the symbolized file in the right panel.
3. in swift 2, raw NSData bytes can be converted to UnsafeMutablePoint<> directly as below sample
let derivedKey = NSMutableData(length: kCCKeySizeAES128);
UnsafeMutablePointer<UInt8>(derivedKey!.mutableBytes
To fix it, just need to call assumeingMemoryBound method as below
let derivedKey = NSMutableData(length: kCCKeySizeAES128);
UnsafeMutablePointer<UInt8>(derivedKey!.mutableBytes.assumingMemoryBound(to:UInt8.self)),
4. avoid result unused warning for swift 3
in swift 2, calling a function without using its return value is normal. But it will generate a result unused warning in swift 3. To avoid the compile warning, just set the return value to _ as shown below
_ = (UIApplication.shared.delegate as! AppDelegate).passwordManager.getPasswordItemList(currentCategory)