[TIMOB-24948] Hyperloop: iOS - Cannot build iOS 11 API's
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-09-15T14:46:24.000+0000 |
Affected Version/s | Hyperloop 2.1.2 |
Fix Version/s | n/a |
Components | Hyperloop, iOS |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Jan Vennemann |
Created | 2017-07-10T00:51:36.000+0000 |
Updated | 2018-08-06T17:36:59.000+0000 |
Description
I am trying to implement the iOS 11 API
DeviceCheck
with Hyperloop, but it fails with 2.1.2 / 2.1.3 Beta 1 - The wrappers are simply not generated:
var DCDevice = require('DeviceCheck/DCDevice');
exports.generateToken = function(cb) {
if (!DCDevice.current.isSupported) {
Ti.API.info('iOS 11 DeviceCheck API not supported for this device, skipping ...');
return;
}
DCDevice.current.generateTokenWithCompletionHandler(function(token, error) {
if (error != null) {
cb({ success: false, error: error.localizedDescription });
return;
}
cb({ success: true, token: token });
});
}
[~hknoechel], this seems to be an issue with multiple Xcode installs and wrong docs. First make sure to build using the
-I 11.0
flag. After that the wrappers were generated for me. Also the docs for DCDevice seem to be outdated,DCDevice.current
is wrong and it should beDCDevice.currentDevice
. And last but not least it should beDCDevice.currentDevice.isSupported()
becauseisSupported
is the getter method for thesupported
property.Resolving as Invalid with regards to the above comment
Closing as invalid. If incorrect, please reopen.