Closed sarriaroman closed 6 years ago
When the module is built by node-gyp there are many deprecations that result on errors while connecting.
> node-bluetooth@1.2.1 install /Users/sarriaroman/Dropbox/Desarrollo/Payments/POCs/btdevice/node_modules/node-bluetooth > node-gyp configure build CXX(target) Release/obj.target/BluetoothSerialPort/src/osx/DeviceINQ.o ../src/osx/DeviceINQ.mm:68:16: warning: 'Call' is deprecated [-Wdeprecated-declarations] baton->cb->Call(1, argv); ^ ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local<v8::Value> ^ ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ ../src/osx/DeviceINQ.mm:145:18: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(info.This(), "emit", 3, argv); ^ ../../nan/nan.h:971:3: note: 'MakeCallback' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback( ^ ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ ../src/osx/DeviceINQ.mm:156:10: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(info.This(), "emit", 1, argv); ^ ../../nan/nan.h:971:3: note: 'MakeCallback' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback( ^ ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ 3 warnings generated. CXX(target) Release/obj.target/BluetoothSerialPort/src/osx/BluetoothWorker.o ../src/osx/BluetoothWorker.mm:117:39: warning: null passed to a callee that requires a non-null argument [-Wnonnull] keepAliveTimer = [[NSTimer alloc] initWithFireDate:[NSDate distantFuture] ^ ../src/osx/BluetoothWorker.mm:117:39: warning: null passed to a callee that requires a non-null argument [-Wnonnull] keepAliveTimer = [[NSTimer alloc] initWithFireDate:[NSDate distantFuture] ^ ../src/osx/BluetoothWorker.mm:359:57: warning: 'getAddressString' is deprecated: first deprecated in macOS 10.7 [-Wdeprecated-declarations] [self disconnectFromDevice: [[rfcommChannel getDevice] getAddressString]]; ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/IOBluetooth.framework/Headers/objc/IOBluetoothDevice.h:477:1: note: 'getAddressString' has been explicitly marked deprecated here - (NSString *)getAddressString DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER; ^ ../src/osx/BluetoothWorker.mm:380:35: warning: 'getAddressString' is deprecated: first deprecated in macOS 10.7 [-Wdeprecated-declarations] strcpy(info->address, [[device getAddressString] UTF8String]); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/IOBluetooth.framework/Headers/objc/IOBluetoothDevice.h:477:1: note: 'getAddressString' has been explicitly marked deprecated here - (NSString *)getAddressString DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER; ^ ../src/osx/BluetoothWorker.mm:381:32: warning: 'getNameOrAddress' is deprecated: first deprecated in macOS 10.6 [-Wdeprecated-declarations] strcpy(info->name, [[device getNameOrAddress] UTF8String]); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/IOBluetooth.framework/Headers/objc/IOBluetoothDevice.h:448:1: note: 'getNameOrAddress' has been explicitly marked deprecated here - (NSString *)getNameOrAddress DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER; ^ 5 warnings generated. CC(target) Release/obj.target/BluetoothSerialPort/src/osx/pipe.o CXX(target) Release/obj.target/BluetoothSerialPort/src/osx/BluetoothDeviceResources.o CXX(target) Release/obj.target/BluetoothSerialPort/src/osx/BluetoothSerialPort.o CXX(target) Release/obj.target/BluetoothSerialPort/src/osx/BTSerialPortBinding.o ../src/osx/BTSerialPortBinding.mm:79:20: warning: 'Call' is deprecated [-Wdeprecated-declarations] baton->cb->Call(0, NULL); ^ ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local<v8::Value> ^ ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ ../src/osx/BTSerialPortBinding.mm:84:21: warning: 'Call' is deprecated [-Wdeprecated-declarations] baton->ecb->Call(1, argv); ^ ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local<v8::Value> ^ ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ ../src/osx/BTSerialPortBinding.mm:131:21: warning: 'Call' is deprecated [-Wdeprecated-declarations] data->callback->Call(2, argv); ^ ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local<v8::Value> ^ ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ ../src/osx/BTSerialPortBinding.mm:190:57: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations] Local<Object> resultBuffer = bufferConstructor->NewInstance(1, constructorArgs); ^ /Users/sarriaroman/.node-gyp/8.11.1/include/node/v8.h:3846:3: note: 'NewInstance' has been explicitly marked deprecated here V8_DEPRECATED("Use maybe version", ^ /Users/sarriaroman/.node-gyp/8.11.1/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED' declarator __attribute__((deprecated)) ^ ../src/osx/BTSerialPortBinding.mm:197:16: warning: 'Call' is deprecated [-Wdeprecated-declarations] baton->cb->Call(2, argv); ^ ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local<v8::Value> ^ ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ ../src/osx/BTSerialPortBinding.mm:357:13: warning: 'Call' is deprecated [-Wdeprecated-declarations] nc->Call(2, argv); ^ ../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local<v8::Value> ^ ../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ 6 warnings generated. SOLINK_MODULE(target) Release/BluetoothSerialPort.node
fix in https://github.com/song940/node-bluetooth/commit/e572f9c596ee3cb0a97cce7a3e1a1ebf1c4f62b5
When the module is built by node-gyp there are many deprecations that result on errors while connecting.