Сова, нужен совет. Вобщем вылетает такой ексепшн когда пытаюсь считать данные с HealthKit, 2019-02-27 02:21:02.554535+0200 HearthRateTest[3723:556347] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform. 2019-02-27 02:21:06.639823+0200 HearthRateTest[3723:556347] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSHealthShareUsageDescription must be set in the app's Info.plist in order to request read authorization for the following types: HKCharacteristicTypeIdentifierDateOfBirth, HKCharacteristicTypeIdentifierBloodType' *** First throw call stack: ( 0 CoreFoundation 0x0000000107e521bb exceptionPreprocess + 331 1 libobjc.A.dylib 0x0000000105db3735 objc_exception_throw + 48 2 CoreFoundation 0x0000000107e52015 +[NSException raise:format:] + 197 3 HealthKit 0x00000001053ff921 -[HKHealthStore _validateHealthDataPurposeStringsForSharingTypes:readingTypes:] + 785 4 HealthKit 0x00000001053ff42b -[HKHealthStore _validatePurposeStringsForSharingTypes:readingTypes:] + 506 5 HealthKit 0x00000001053fec11 -[HKHealthStore requestAuthorizationToShareTypes:readTypes:shouldPrompt:completion:] + 340 6 HealthKit 0x00000001053fe98b -[HKHealthStore requestAuthorizationToShareTypes:readTypes:completion:] + 77 7 HearthRateTest 0x0000000105079411 $S14HearthRateTest14ViewControllerC22autorizeHealthKitinAppyyF + 1329 8 HearthRateTest 0x000000010507839a $S14HearthRateTest14ViewControllerC19autorizedKitClickedyyypF + 58 9 HearthRateTest 0x00000001050783ec $S14HearthRateTest14ViewControllerC19autorizedKitClickedyyypFTo + 76 10 UIKitCore 0x000000010dcceecb -[UIApplication sendAction:to:from:forEvent:] + 83 11 UIKitCore 0x000000010d70a0bd -[UIControl sendAction:to:forEvent:] + 67 12 UIKitCore 0x000000010d70a3da -[UIControl _sendActionsForEvents:withEvent:] + 450 13 UIKitCore 0x000000010d70931e -[UIControl touchesEnded:withEvent:] + 583 14 UIKitCore 0x000000010dd0a0a4 -[UIWindow _sendTouchesForEvent:] + 2729 15 UIKitCore 0x000000010dd0b7a0 -[UIWindow sendEvent:] + 4080 16 UIKitCore 0x000000010dce9394 -[UIApplication sendEvent:] + 352 17 UIKitCore 0x000000010ddbe5a9 __dispatchPreprocessedEventFromEventQueue + 3054 18 UIKitCore 0x000000010ddc11cb __handleEventQueueInternal + 5948 19 CoreFoundation 0x0000000107db7721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 20 CoreFoundation 0x0000000107db6f93 __CFRunLoopDoSources0 + 243 21 CoreFoundation 0x0000000107db163f __CFRunLoopRun + 1263 22 CoreFoundation 0x0000000107db0e11 CFRunLoopRunSpecific + 625 23 GraphicsServices 0x0000000110d581dd GSEventRunModal + 62 24 UIKitCore 0x000000010dccd81d UIApplicationMain + 140 25 HearthRateTest 0x000000010507b537 main + 71 26 libdyld.dylib 0x0000000108efc575 start + 1 27 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
По-тихоньку =)
Приятно что помнишь =)
Обсуждают сегодня