ios
ios copied to clipboard
Readout of deviceId crashes runtime
Hello together, I have the following code snipped which I used to read out the deviceId. The last line now crashes the runtime. If someone know of a workaround, would be great to have it mentioned here. Thanks!
"@nativescript/ios": "version": "8.1.0-rc.1",
const systemInfo = new interop.Reference
Ok, this here works as a workaround:
const _SYS_NAMELEN = 256; const buffer = interop.alloc(5 * _SYS_NAMELEN); uname(buffer); deviceId = NSString.stringWithUTF8String(buffer.add(_SYS_NAMELEN * 4)).toString();