We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Im getting an error like this if I'm trying to read a value that doesn't exists in the Health app:
console.error: {"code":"E(null)0","message":"Unknown error from a native module","domain":"RCTErrorDomain","userInfo":null,"nativeStackIOS":["0 MyApp 0x0000000104943427 RCTJSErrorFromCodeMessageAndNSError + 135","1 MyApp 0x0000000104943353 RCTJSErrorFromNSError + 275","2 MyApp 0x00000001047a6312 __65-[RCTAppleHealthKit(Methods_Body) body_getLatestWeight:callback:]_block_invoke + 226","3 MyApp 0x00000001047ba577 __87-[RCTAppleHealthKit(Queries) fetchMostRecentQuantitySampleOfType:predicate:completion:]_block_invoke + 375","4 libdispatch.dylib 0x0000000108433dd4 _dispatch_call_block_and_release + 12","5 libdispatch.dylib 0x0000000108434d48 _dispatch_client_callout + 8","6 libdispatch.dylib 0x000000010843b5ef _dispatch_lane_serial_drain + 788","7 libdispatch.dylib 0x000000010843c1b5 _dispatch_lane_invoke + 476","8 libdispatch.dylib 0x0000000108447a4e _dispatch_workloop_worker_thread + 719","9 libsystem_pthread.dylib 0x00007fff524636fc _pthread_wqthread + 290","10 libsystem_pthread.dylib 0x00007fff52462827 start_wqthread + 15"]}
_construct construct.js:30:26 Wrapper wrapNativeSuper.js:26:23 SyntheticError index.bundle?platform=ios&dev=true&minify=false:28788:111 reactConsoleErrorHandler ExceptionsManager.js:135:52 Profile Profile.tsx:158:6 invokeCallbackAndReturnFlushedQueue [native code]:0
My code:
const weightOptions = { unit: 'gram' as HealthUnit, } AppleHealthKit.getLatestWeight(weightOptions, (error, results) => { if (error) { console.error('healthkit weight:', error) } ... })
I think that returning an empty result object would be better in this case.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Im getting an error like this if I'm trying to read a value that doesn't exists in the Health app:
My code:
I think that returning an empty result object would be better in this case.
The text was updated successfully, but these errors were encountered: