Post

Replies

Boosts

Views

Activity

Reply to Healthstore read only in objective-C ?
My Init code is simple : if I Set like This I have a crash. - (void) init_healthkit { ALERTE_HEALTH = @"" ; self.healthStore = [[HKHealthStore alloc] init]; if ([HKHealthStore isHealthDataAvailable]) { NSLog(@"Healthkit available "); NSSet *writeDataTypes = [self dataTypesToWrite]; NSSet *readDataTypes = [self dataTypesToRead]; [self.healthStore requestAuthorizationToShareTypes:nil readTypes:readDataTypes completion:^(BOOL success, NSError *error) { if (!success) { NSLog(@"You didn't allow HealthKit to access these read data types. In your app, try to handle this error gracefully when a user decides not to provide access. The error was: %@. If you're using a simulator, try it on a device.", error); HEALTHKIT =@"N" ; return; } NSLog(@"Healthkit OK read/write "); dispatch_async(dispatch_get_main_queue(), ^{ // Update the user interface based on the current user's health information. NSLog(@"Healthkit OK"); HEALTHKIT = @"Y" ; }); }]; } }
Mar ’25
Reply to Healthstore read only in objective-C ?
they are initialized : (NSSet *)dataTypesToRead { HKCharacteristicType *distanceWalkingRunning = [HKObjectType characteristicTypeForIdentifier:HKQuantityTypeIdentifierDistanceWalkingRunning] ; HKCharacteristicType *StepCount = [HKSampleType characteristicTypeForIdentifier:HKQuantityTypeIdentifierStepCount]; HKCharacteristicType *cycleCount = [HKSampleType characteristicTypeForIdentifier:HKQuantityTypeIdentifierDistanceCycling]; return [NSSet setWithObjects: distanceWalkingRunning, StepCount,cycleCount , nil]; }
Mar ’25
Reply to Healthstore read only in objective-C ?
[quote='828498022, DTS Engineer, /thread/776072?answerId=828498022#828498022'] NSSet *readTypes = [NSSet setWithObject:[HKObjectType quantityTypeForIdentifier:HKQuantityTypeIdentifierStepCount]]; [healthKitStore requestAuthorizationToShareTypes:nil readTypes:readTypes completion:^(BOOL success, NSError * _Nullable error) { NSLog(@"%@", error); }]; [/quote] It's working. It ask for Steps and nothing else . I dont know what was bad , but tank you !
Mar ’25
Reply to help interpreting crash report (testflight)
I have the same with an iPad : zero symbols from my App. How can I analyse this ? Distributor ID: com.apple.TestFlight Hardware Model: iPad13,18 Process: maPollution [1680] Path: /private/var/containers/Bundle/Application/146B4588-48A1-48AD-8CC8-EDE01AE304F7/maPollution.app/maPollution Identifier: rva.maPollution Version: 2.0 (5) AppStoreTools: 16C7015 AppVariant: 1:iPad13,18:18 Beta: YES Code Type: ARM-64 (Native) Role: Background Parent Process: launchd [1] Coalition: rva.maPollution [1452] Date/Time: 2025-03-20 18:14:53.6644 +1100 Launch Time: 2025-03-20 18:12:45.4114 +1100 OS Version: iPhone OS 18.3.1 (22D72) Release Type: User Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x00005c8cb94929b0 -> 0x0000000cb94929b0 (possible pointer authentication failure) Exception Codes: 0x0000000000000001, 0x00005c8cb94929b0 VM Region Info: 0xcb94929b0 is not in any region. Bytes after previous region: 41226414513 Bytes before following region: 12997547600 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_NANO 300000000-320000000 [512.0M] rw-/rwx SM=COW ---> GAP OF 0xca0000000 BYTES commpage (reserved) fc0000000-1000000000 [ 1.0G] ---/--- SM=NUL reserved VM address space (unallocated) Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [1680] Triggered by Thread: 0 Thread 0 name: Thread 0 Crashed: 0 libobjc.A.dylib 0x000000018c843c20 objc_msgSend + 32 (:-1) 1 UIKitCore 0x0000000192c444c8 -[UIApplication _terminateWithStatus:] + 136 (UIApplication.m:7539) 2 UIKitCore 0x0000000191c9d644 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 112 (_UISceneLifecycleMultiplexer.m:819) 3 UIKitCore 0x00000001923eee8c -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 164 (_UISceneLifecycleMultiplexer.m:482) 4 UIKitCore 0x0000000192c3fc28 -[UIApplication workspaceShouldExit:withTransitionContext:] + 164 (UIApplication.m:4238) 5 FrontBoardServices 0x00000001a8e4bcd4 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 72 (FBSWorkspaceScenesClient.m:632) 6 FrontBoardServices 0x00000001a8e144c8 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168 (FBSWorkspace.m:445) 7 FrontBoardServices 0x00000001a8e4bc74 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 128 (FBSWorkspaceScenesClient.m:629) 8 libdispatch.dylib 0x0000000197086fa8 _dispatch_client_callout + 20 (object.m:576) 9 libdispatch.dylib 0x000000019708a9f0 _dispatch_block_invoke_direct + 284 (queue.c:515) 10 FrontBoardServices 0x00000001a8e0d378 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52 (FBSSerialQueue.m:285) 11 FrontBoardServices 0x00000001a8e0d2f8 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 240 (FBSSerialQueue.m:309) 12 FrontBoardServices 0x00000001a8e0d1d0 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:322) 13 CoreFoundation 0x000000018f33cf4c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1970) 14 CoreFoundation 0x000000018f33cee0 __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2014) 15 CoreFoundation 0x000000018f33fb40 __CFRunLoopDoSources0 + 244 (CFRunLoop.c:2051) 16 CoreFoundation 0x000000018f33ed3c __CFRunLoopRun + 840 (CFRunLoop.c:2969) 17 CoreFoundation 0x000000018f391284 CFRunLoopRunSpecific + 588 (CFRunLoop.c:3434) 18 GraphicsServices 0x00000001dc5cd4c0 GSEventRunModal + 164 (GSEvent.c:2196) 19 UIKitCore 0x0000000191ed6674 -[UIApplication _run] + 816 (UIApplication.m:3846) 20 UIKitCore 0x0000000191afce88 UIApplicationMain + 340 (UIApplication.m:5503) 21 UIKitCore 0x000000019223915c UIApplicationMain(_:_:_:_:) + 104 (UIKit.swift:565) 22 maPollution 0x00000001024e4240 specialized static UIApplicationDelegate.main() + 28 (/<compiler-generated>:20) 23 maPollution 0x00000001024e4240 static AppDelegate.$main() + 28 (AppDelegate.swift:0) 24 maPollution 0x00000001024e4240 main + 116 25 dyld 0x00000001b55d1de8 start + 2724 (dyldMain.cpp:1338)
Mar ’25
Reply to is Share broken ?
EDIT : I have found the cause , in fact this is not IOS the main cause, but BlueSky APP ! If I try to share a text and a link, it will accept the post , but not the link and only the text. I'm sure the link will be accepted if I post it as text. It's strange, I can share links and pictures to Bluesky in other part of IOS and in others apps.
Topic: UI Frameworks SubTopic: UIKit
Mar ’25
Reply to How do I handle force-quit in Swift
You gave me a direction to search : SceneDelegate. In "WillConnect to" , There was a line : UIApplication.shared.delegate = self i removed this line, rebuild with no error, what was this line doing here ? I do not remember.. And test this version. Put it in back ground , wait , force-kill ... "sceneDidDisconnect" is executed AND applicationWillTerminate in appDelegate too. And no more crash. Thank you.
Apr ’25
Reply to Xcode 16.3 reports ARM Assembly code as explanation of a crash
This problem was resolved by the intervention of an Apple engineer in another thread where I pointed out the bug report for Xcode 16.2, which almost pointed me to the correct culprit in the bug: ApplicationDelegate, in my Swift code. While Xcode 16.3 displays this ARM assembly code in a completely different report than 16.2. Do you see ApplicationDelegate in this assembly code? I don't. What I'm pointing out is that Xcode 16.3 doesn't help developers in my case. And regarding the link you provided, which is very comprehensive, I wonder why it isn't in the Xcode help where it would be very useful.
Apr ’25
Reply to Watch Simulator ( Xcode 16.3)
Thank you for your answer. The first problem has been solved , since the update of Xcode to 16.3 version: I can now emulate the Watch and the iPhone at the same time. for the rest , my own Watch (serie 10) has wifi stabilty problems (since the last watchOS update): it loose the connexion : sessionReachabilityDidChange change of value very fast : for example when I type this message, I had 9 change of value . It is the same on 2 different Wifi router at 1.5 or 2 meters from the Watch. This make the relation between Xcode and this Watch very pain full with a lot of message of connexion Lost, debugger not working, Watch not initilized and others. The ticket number is FB17176331
May ’25