Dive into the world of programming languages used for app development.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

[iOS] Shared Resources for two Apps from the same developer
Is it possible that AppA and AppB which are from the same developer share some local resources on a given device.For instance:Can the data written by App A, be read by App B (through Shared Defaults or any other mechanism)?The following link is to a similar question raised on stackoverlfow. I wanted to be certain thus, raising this question on Apple Dev Forums.https://stackoverflow.com/questions/9079378/shared-resources-for-two-apps-from-the-same-developer
11
0
9.4k
Dec ’21
How detect SDK version
I have the following code:@implementation NSWindow (Coordination) - (NSPoint)convertPointFromScreen:(NSPoint)point { NSRect rect = NSMakeRect(point.x, point.y, 1, 1); return [self convertRectFromScreen:rect].origin; }I get a compiliation warning:Category is implementing a method which will also be implemented by its primary classI know Swift has builtin preprocessor directives to detect SDK version, but don't know how to do this in objc. Any suggestions?
6
0
8.2k
Nov ’21
Unable to get USB bsdname from macOS Monterey 12 Bate4 of Intel processor
I can’t get USB bsdname from macOS Monterey 12 Bate4 of Intel processor: I have use the "IORegistryEntrySearchCFProperty" function to get the bsdName of the io_service_t, It worked fine on macOS Big Sur's M1 and Intel MBP. Also it worked fine on macOS Monterey App M1. But it always returned nil on macOS Monterey Intel MBP. It involves the following code: void getBsdName(io_service_t usbDevice) { CFStringRef bsdName = NULL;         for(int i = 0; i < 500; i++)         {             bsdName = (CFStringRef)IORegistryEntrySearchCFProperty(usbDevice,                                                                    kIOServicePlane,                                                                    CFSTR( kIOBSDNameKey ),                                                                    kCFAllocatorDefault,                                                                    kIORegistryIterateRecursively );             if(!bsdName) {                 // If don't get a bsd name, keep waiting in 5s.                 usleep(10000);                 continue;             }                          printf("[%s]: Found bsd name for device %d.\n”, __func__, usbDevice);             break;         } } Why it happened? Or is there another way to get it?
5
0
2.2k
Nov ’21
pragma mark in Objc organization style
Hi Yesterday I was finishing a project on Objc, and then found a code organization style, and then responsible for this style of colleague B found me and said he kind of thing specification writing, I recommend this kind of not official, for the code neatness and readability requirements, I came here to seek an answer, although this problem does not affect the logic of the code, I still want a standard answer. But I still want a standard answer, before I have searched and asked a lot of people are recommended to write my way, and finally colleagues B also said that I may have problems with this way of writing, so I missed any details? Colleague B's recommended writing style #pragma mark - #pragma mark Initialization My recommended writing style #pragma mark - Initialization Best wishes!
1
0
929
Nov ’21
How to play audio from NSData in a library in Objective C
I'm trying to play an audio content built from NSData inside a library (.a). It works properly when my code is inside an app. But it is not working when in a library, I get no error and no sound playing. NSError * errorAudio = nil; NSError * errorFile; // Clear all cache NSArray* tmpDirectory = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:NSTemporaryDirectory() error:NULL]; for (NSString *file in tmpDirectory) {     [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@%@", NSTemporaryDirectory(), file] error:NULL]; } // Set temporary directory and temporary file NSURL * tmpDirURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES]; NSURL * soundFileURL = [[tmpDirURL URLByAppendingPathComponent:@"temp"] URLByAppendingPathExtension:@"wav"]; [[NSFileManager defaultManager] createDirectoryAtURL:tmpDirURL withIntermediateDirectories:NO attributes:nil error:&errorFile]; // Write NSData to temporary file NSString *path= [soundFileURL path]; [audioToPlay writeToFile:path options:NSDataWritingAtomic error:&errorFile]; if (errorFile) {     // Error while writing NSData } else {     // Init audio player     self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL error:&errorAudio];     if (errorAudio) {         // Audio player could not be initialized     } else {         // Audio player was initialized correctly         [audioPlayer prepareToPlay];         [audioPlayer stop];         [audioPlayer setCurrentTime:0];         [audioPlayer play];     } } I don't check errorFile intros piece of code, but when debugging I can see that value is nil. My header file #import <AudioToolbox/AudioToolbox.h> #import <AVFoundation/AVFoundation.h> @property(nonatomic, strong) AVAudioPlayer * audioPlayer; My m file #import <AudioToolbox/AudioToolbox.h> #import <AVFoundation/AVFoundation.h> @synthesize audioPlayer; I've been checking for dozens of posts but cannot find any solution, it always works properly in an app, but not in a library. Any help would be greatly appreciated.
0
0
1.2k
Nov ’21
Universallinking opening wrong paths
My AASA file contains: { {...} "applinks": { "apps": [], "details": [ { "appIDs": [ "XXXXXXXX.BUNDLEID" // AASA File contains correct values ], "components": [ "/login/" ] } ] } } My App correctly opens when I browse to /login/. However, my App also opens on all other paths aswell. For example /resetPassword/ is also directed to my App with universalLinking, which I don't want, as it should be handled in the Browser. What am I missing? I was sure only /login/ should be directed to the app, and I don't seem to be able to prevent opening the app when navigating to other paths. I have tried returning NO within my continueUserActivity based on the userActivity.webpageURL without success. - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler I have also tried to add NOT * in the components array for the AASA file. Still the App will open when navigating to any path of my domain, regardless of the AASA Files components.
1
0
704
Nov ’21
New Objective-C project: what can't I do?
My next UIKit project will be in Objective-C. You can argue about why and such, but please know that there are idealist reasons for it. Having said that, what are the main things that aren't supported anymore in Objective-C (= only in Swift)? I don't mean language features, but mainly functional stuff like controls or services (eg. in-app purchases).
2
0
913
Oct ’21
WeakSelf/StrongSelf dance: __strong needed?
I read today in the Swift book:__weak typeof(self) weakSelf = self; self.block = ^{ __strong typeof(self) strongSelf = weakSelf; [strongSelf doSomething]; } // Excerpt From: Apple Inc. “Using Swift with Cocoa and Objective-C (Swift 3.1).”When I saw '__strong' I got a bit concerned - in the past I had always used "typeof(self) strongSelf = weakSelf;, think the typeof made strongSelf strong.Yikes! Did I get it wrong all these years???
2
0
3.2k
Sep ’21
EXC_CORPSE_NOTIFY crash on STWebpageController loadView
Hi All, Working on one browsing application for iOS. While browsing and closing tabs, application gets crash on few of client devices. In console log we can see following details: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Fatal error occured Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 87053 named com.apple.ScreenTime.ScreenTimeWebExtension.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo= In crash file, following can be seen. Incident Identifier: 68DF3B97-3DD2-4E55-B350-B424CEF955F8 Hardware Model: iPhone11,6 Process: Browser [86470] Path: /private/var/containers/Bundle/Application/B1B7A7F8-3CEC-4952-97D1-D2A5C1203684/Browser.app/Browser Identifier: jp.co.rakuten.mobile.browser Version: 1.4.3.0 (1.0.0) AppStoreTools: 12E506 AppVariant: 1:iPhone11,6:14 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: jp.co.rakuten.mobile.browser [642] Date/Time: 2021-09-23 20:38:41.1239 +0900 Launch Time: 2021-09-23 20:35:53.2268 +0900 OS Version: iPhone OS 14.7.1 (18G82) Release Type: User Baseband Version: 3.04.01 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x194bfe708 __exceptionPreprocess + 220 (NSException.m:199) 1 libobjc.A.dylib 0x1a97087a8 objc_exception_throw + 60 (objc-exception.mm:565) 2 CoreFoundation 0x194b003b8 +[NSException raise:format:arguments:] + 100 (NSException.m:146) 3 Foundation 0x195ed64c4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132 (NSException.m:231) 4 ScreenTime 0x1c960c544 __31-[STWebpageController loadView]_block_invoke + 612 (STWebpageController.m:104) 5 UIKitCore 0x196feb160 __146-[NSExtension(UIViewControllerAdditions) _instantiateViewControllerWithInputItems:asAccessory:traitCollection:listenerEndpoint:connectionHandler:]_block_invoke_3 + 284 (NSExtension_UIKitAdditions.m:94) 6 libdispatch.dylib 0x1947e9a84 _dispatch_call_block_and_release + 32 (init.c:1466) 7 libdispatch.dylib 0x1947eb81c _dispatch_client_callout + 20 (object.m:559) 8 libdispatch.dylib 0x1947f9c70 _dispatch_main_queue_callback_4CF + 884 (inline_internal.h:2557) 9 CoreFoundation 0x194b78340 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1790) 10 CoreFoundation 0x194b72218 __CFRunLoopRun + 2524 (CFRunLoop.c:3118) 11 CoreFoundation 0x194b71308 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242) 12 GraphicsServices 0x1ac1f4734 GSEventRunModal + 164 (GSEvent.c:2259) 13 UIKitCore 0x1975ef75c -[UIApplication _run] + 1072 (UIApplication.m:3269) 14 UIKitCore 0x1975f4fcc UIApplicationMain + 168 (UIApplication.m:4740) 15 Browser 0x102eb4768 (anonymous namespace)::RunUIApplicationMain(int, char**) + 144 (chrome_exe_main.mm:65) 16 Browser 0x102eb4768 main + 744 (chrome_exe_main.mm:98) 17 libdyld.dylib 0x19482dcf8 start + 4 Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001c2de9334 __pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001e086da9c pthread_kill + 272 (pthread.c:1582) 2 libsystem_c.dylib 0x000000019dfc5b84 abort + 124 (abort.c:118) 3 libc++abi.dylib 0x00000001a97e9bb8 abort_message + 132 (abort_message.cpp:78) 4 libc++abi.dylib 0x00000001a97daec8 demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:67) 5 libobjc.A.dylib 0x00000001a96e705c _objc_terminate() + 144 (objc-exception.mm:701) 6 libc++abi.dylib 0x00000001a97e8fa0 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59) 7 libc++abi.dylib 0x00000001a97e8f2c std::terminate() + 48 (cxa_handlers.cpp:88) 8 libdispatch.dylib 0x00000001947eb830 _dispatch_client_callout + 40 (object.m:562) 9 libdispatch.dylib 0x00000001947f9c70 _dispatch_main_queue_callback_4CF + 884 (inline_internal.h:2557) 10 CoreFoundation 0x0000000194b78340 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1790) 11 CoreFoundation 0x0000000194b72218 __CFRunLoopRun + 2524 (CFRunLoop.c:3118) 12 CoreFoundation 0x0000000194b71308 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242) 13 GraphicsServices 0x00000001ac1f4734 GSEventRunModal + 164 (GSEvent.c:2259) 14 UIKitCore 0x00000001975ef75c -[UIApplication _run] + 1072 (UIApplication.m:3269) 15 UIKitCore 0x00000001975f4fcc UIApplicationMain + 168 (UIApplication.m:4740) 16 Browser 0x0000000102eb4768 (anonymous namespace)::RunUIApplicationMain(int, char**) + 144 (chrome_exe_main.mm:65) 17 Browser 0x0000000102eb4768 main + 744 (chrome_exe_main.mm:98) 18 libdyld.dylib 0x000000019482dcf8 start + 4 Since it is not happening in run time debugger attached mode, so not able to find actual reason behind this crash, any help would be appreciated.
0
0
626
Sep ’21
App to support iPhone 12 has dual-sim cards
iPhone 12 has dual-sim cards, in iOS System, set Secondary sim card as main, then in App, objective-c, use [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:12345"] options:@{} completionHandler:^(BOOL success) to make a call, iOS System will still use the First sim card to call. If making a call directly in iOS system dial panel, it will use the Secondary sim card to call. Why? How to solve this?
2
0
636
Sep ’21
get crash log programmatically
hi all,i need to get crash logs programmatically when my application restarts after a crash. I know that if I enable a configuration given by apple, crashlogs are maintained in the device, which I can access using itunes / xcode. But i want to do it programmatically in my next app restart,Thanks in advance for any helpregardsjniba
10
0
7.5k
Sep ’21
IOServiceGetMatchingServices not returning graphics model data
I want graphics card details using objective c. used IOServiceGetMatchingServices api for it, its working fine in Intel processor machine, but not returning model info for M1 machine. here is the code I was using    CFMutableDictionaryRef matchDict = IOServiceMatching("IOPCIDevice");        io_iterator_t iterator;        if (IOServiceGetMatchingServices(kIOMasterPortDefault,matchDict,                    &amp;iterator) == kIOReturnSuccess)   {      io_registry_entry_t regEntry;            while ((regEntry = IOIteratorNext(iterator))) {        CFMutableDictionaryRef serviceDictionary;        if (IORegistryEntryCreateCFProperties(regEntry,                          &amp;serviceDictionary,                           kCFAllocatorDefault,                           kNilOptions) != kIOReturnSuccess)       {          IOObjectRelease(regEntry);          continue;       }        const void *GPUModel = CFDictionaryGetValue(serviceDictionary, @"model");                if (GPUModel != nil) {          if (CFGetTypeID(GPUModel) == CFDataGetTypeID()) {            NSString *modelName = [[NSString alloc] initWithData:                       (NSData *)GPUModel encoding:NSASCIIStringEncoding];                        NSLog(@"GPU Model: %@", modelName);           [modelName release];         }       }        CFRelease(serviceDictionary);        IOObjectRelease(regEntry);     }      IOObjectRelease(iterator);   }
2
0
1.6k
Aug ’21
iOS UIAlertController Line separator missing in iPhone 12 Device, iOS 15 but Issue not reproducing in iPhone 12 Device, iOS 15 Simulator
The line separator is missing in the alert controller. I am encountering this issue only in the iPhone 12 series devices running iOS 15, in the other versions it works fine. Please share your inputs. Screen capture from iPhone 12 Device IOS 15 (Line separator is absent) But available in iPhone 12 IOS 15 Simulator UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"My title"       message:@"My subtitle"       preferredStyle:UIAlertControllerStyleAlert];              UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault       handler:^(UIAlertAction * action) {}];              [alert addAction:defaultAction];       [m_window.rootViewController presentViewController:alert animated:YES completion:nil];
0
0
427
Aug ’21
Objective-C, separating code by architecture
In my Obj-C wrapper object, I am wanting to surround some code with #define checking to be able to target specific targets - arm64 or Simulator. It would appear that we can "create" custom defines in the project settings : Apple Clang - Preprocessing -> Preprocessor Macros I have tried defining 'ARM64' under the section 'Debug' for 'Any IOS Sdk', presuming that this will be for a real iPad and thus an arm64 environment - as opposed to the simulator, an x86 environment. I then put #ifdef ARM64 ... #else ... #endif around my code, but the compiler is still complaining about 64bit calls. Can this actually be done, as we are able to do from within swift ? Am I going about this the right way ?
3
0
2.2k
Aug ’21
[iOS] Shared Resources for two Apps from the same developer
Is it possible that AppA and AppB which are from the same developer share some local resources on a given device.For instance:Can the data written by App A, be read by App B (through Shared Defaults or any other mechanism)?The following link is to a similar question raised on stackoverlfow. I wanted to be certain thus, raising this question on Apple Dev Forums.https://stackoverflow.com/questions/9079378/shared-resources-for-two-apps-from-the-same-developer
Replies
11
Boosts
0
Views
9.4k
Activity
Dec ’21
About IAP SKProductsRequest crash
I really can't find the reason for the crash.
Replies
1
Boosts
0
Views
637
Activity
Dec ’21
How detect SDK version
I have the following code:@implementation NSWindow (Coordination) - (NSPoint)convertPointFromScreen:(NSPoint)point { NSRect rect = NSMakeRect(point.x, point.y, 1, 1); return [self convertRectFromScreen:rect].origin; }I get a compiliation warning:Category is implementing a method which will also be implemented by its primary classI know Swift has builtin preprocessor directives to detect SDK version, but don't know how to do this in objc. Any suggestions?
Replies
6
Boosts
0
Views
8.2k
Activity
Nov ’21
Any update from Apple on CVE-2021-42574 fix ?
Any update from Apple on CVE-2021-42574 fix ?
Replies
2
Boosts
0
Views
483
Activity
Nov ’21
Unable to get USB bsdname from macOS Monterey 12 Bate4 of Intel processor
I can’t get USB bsdname from macOS Monterey 12 Bate4 of Intel processor: I have use the "IORegistryEntrySearchCFProperty" function to get the bsdName of the io_service_t, It worked fine on macOS Big Sur's M1 and Intel MBP. Also it worked fine on macOS Monterey App M1. But it always returned nil on macOS Monterey Intel MBP. It involves the following code: void getBsdName(io_service_t usbDevice) { CFStringRef bsdName = NULL;         for(int i = 0; i &lt; 500; i++)         {             bsdName = (CFStringRef)IORegistryEntrySearchCFProperty(usbDevice,                                                                    kIOServicePlane,                                                                    CFSTR( kIOBSDNameKey ),                                                                    kCFAllocatorDefault,                                                                    kIORegistryIterateRecursively );             if(!bsdName) {                 // If don't get a bsd name, keep waiting in 5s.                 usleep(10000);                 continue;             }                          printf("[%s]: Found bsd name for device %d.\n”, __func__, usbDevice);             break;         } } Why it happened? Or is there another way to get it?
Replies
5
Boosts
0
Views
2.2k
Activity
Nov ’21
pragma mark in Objc organization style
Hi Yesterday I was finishing a project on Objc, and then found a code organization style, and then responsible for this style of colleague B found me and said he kind of thing specification writing, I recommend this kind of not official, for the code neatness and readability requirements, I came here to seek an answer, although this problem does not affect the logic of the code, I still want a standard answer. But I still want a standard answer, before I have searched and asked a lot of people are recommended to write my way, and finally colleagues B also said that I may have problems with this way of writing, so I missed any details? Colleague B's recommended writing style #pragma mark - #pragma mark Initialization My recommended writing style #pragma mark - Initialization Best wishes!
Replies
1
Boosts
0
Views
929
Activity
Nov ’21
How to play audio from NSData in a library in Objective C
I'm trying to play an audio content built from NSData inside a library (.a). It works properly when my code is inside an app. But it is not working when in a library, I get no error and no sound playing. NSError * errorAudio = nil; NSError * errorFile; // Clear all cache NSArray* tmpDirectory = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:NSTemporaryDirectory() error:NULL]; for (NSString *file in tmpDirectory) {     [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@%@", NSTemporaryDirectory(), file] error:NULL]; } // Set temporary directory and temporary file NSURL * tmpDirURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES]; NSURL * soundFileURL = [[tmpDirURL URLByAppendingPathComponent:@"temp"] URLByAppendingPathExtension:@"wav"]; [[NSFileManager defaultManager] createDirectoryAtURL:tmpDirURL withIntermediateDirectories:NO attributes:nil error:&amp;errorFile]; // Write NSData to temporary file NSString *path= [soundFileURL path]; [audioToPlay writeToFile:path options:NSDataWritingAtomic error:&amp;errorFile]; if (errorFile) {     // Error while writing NSData } else {     // Init audio player     self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL error:&amp;errorAudio];     if (errorAudio) {         // Audio player could not be initialized     } else {         // Audio player was initialized correctly         [audioPlayer prepareToPlay];         [audioPlayer stop];         [audioPlayer setCurrentTime:0];         [audioPlayer play];     } } I don't check errorFile intros piece of code, but when debugging I can see that value is nil. My header file #import &lt;AudioToolbox/AudioToolbox.h&gt; #import &lt;AVFoundation/AVFoundation.h&gt; @property(nonatomic, strong) AVAudioPlayer * audioPlayer; My m file #import &lt;AudioToolbox/AudioToolbox.h&gt; #import &lt;AVFoundation/AVFoundation.h&gt; @synthesize audioPlayer; I've been checking for dozens of posts but cannot find any solution, it always works properly in an app, but not in a library. Any help would be greatly appreciated.
Replies
0
Boosts
0
Views
1.2k
Activity
Nov ’21
Universallinking opening wrong paths
My AASA file contains: { {...} "applinks": { "apps": [], "details": [ { "appIDs": [ "XXXXXXXX.BUNDLEID" // AASA File contains correct values ], "components": [ "/login/" ] } ] } } My App correctly opens when I browse to /login/. However, my App also opens on all other paths aswell. For example /resetPassword/ is also directed to my App with universalLinking, which I don't want, as it should be handled in the Browser. What am I missing? I was sure only /login/ should be directed to the app, and I don't seem to be able to prevent opening the app when navigating to other paths. I have tried returning NO within my continueUserActivity based on the userActivity.webpageURL without success. - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler I have also tried to add NOT * in the components array for the AASA file. Still the App will open when navigating to any path of my domain, regardless of the AASA Files components.
Replies
1
Boosts
0
Views
704
Activity
Nov ’21
NEHotspotConfigurationManager-Connect to captive Portal wifi
The wifi icon does not light up after the code is connected to public wifi. There is no way to keep the wifi connection down and lit up.
Replies
1
Boosts
0
Views
428
Activity
Oct ’21
New Objective-C project: what can't I do?
My next UIKit project will be in Objective-C. You can argue about why and such, but please know that there are idealist reasons for it. Having said that, what are the main things that aren't supported anymore in Objective-C (= only in Swift)? I don't mean language features, but mainly functional stuff like controls or services (eg. in-app purchases).
Replies
2
Boosts
0
Views
913
Activity
Oct ’21
WeakSelf/StrongSelf dance: __strong needed?
I read today in the Swift book:__weak typeof(self) weakSelf = self; self.block = ^{ __strong typeof(self) strongSelf = weakSelf; [strongSelf doSomething]; } // Excerpt From: Apple Inc. “Using Swift with Cocoa and Objective-C (Swift 3.1).”When I saw '__strong' I got a bit concerned - in the past I had always used "typeof(self) strongSelf = weakSelf;, think the typeof made strongSelf strong.Yikes! Did I get it wrong all these years???
Replies
2
Boosts
0
Views
3.2k
Activity
Sep ’21
EXC_CORPSE_NOTIFY crash on STWebpageController loadView
Hi All, Working on one browsing application for iOS. While browsing and closing tabs, application gets crash on few of client devices. In console log we can see following details: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Fatal error occured Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 87053 named com.apple.ScreenTime.ScreenTimeWebExtension.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo= In crash file, following can be seen. Incident Identifier: 68DF3B97-3DD2-4E55-B350-B424CEF955F8 Hardware Model: iPhone11,6 Process: Browser [86470] Path: /private/var/containers/Bundle/Application/B1B7A7F8-3CEC-4952-97D1-D2A5C1203684/Browser.app/Browser Identifier: jp.co.rakuten.mobile.browser Version: 1.4.3.0 (1.0.0) AppStoreTools: 12E506 AppVariant: 1:iPhone11,6:14 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: jp.co.rakuten.mobile.browser [642] Date/Time: 2021-09-23 20:38:41.1239 +0900 Launch Time: 2021-09-23 20:35:53.2268 +0900 OS Version: iPhone OS 14.7.1 (18G82) Release Type: User Baseband Version: 3.04.01 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x194bfe708 __exceptionPreprocess + 220 (NSException.m:199) 1 libobjc.A.dylib 0x1a97087a8 objc_exception_throw + 60 (objc-exception.mm:565) 2 CoreFoundation 0x194b003b8 +[NSException raise:format:arguments:] + 100 (NSException.m:146) 3 Foundation 0x195ed64c4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132 (NSException.m:231) 4 ScreenTime 0x1c960c544 __31-[STWebpageController loadView]_block_invoke + 612 (STWebpageController.m:104) 5 UIKitCore 0x196feb160 __146-[NSExtension(UIViewControllerAdditions) _instantiateViewControllerWithInputItems:asAccessory:traitCollection:listenerEndpoint:connectionHandler:]_block_invoke_3 + 284 (NSExtension_UIKitAdditions.m:94) 6 libdispatch.dylib 0x1947e9a84 _dispatch_call_block_and_release + 32 (init.c:1466) 7 libdispatch.dylib 0x1947eb81c _dispatch_client_callout + 20 (object.m:559) 8 libdispatch.dylib 0x1947f9c70 _dispatch_main_queue_callback_4CF + 884 (inline_internal.h:2557) 9 CoreFoundation 0x194b78340 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1790) 10 CoreFoundation 0x194b72218 __CFRunLoopRun + 2524 (CFRunLoop.c:3118) 11 CoreFoundation 0x194b71308 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242) 12 GraphicsServices 0x1ac1f4734 GSEventRunModal + 164 (GSEvent.c:2259) 13 UIKitCore 0x1975ef75c -[UIApplication _run] + 1072 (UIApplication.m:3269) 14 UIKitCore 0x1975f4fcc UIApplicationMain + 168 (UIApplication.m:4740) 15 Browser 0x102eb4768 (anonymous namespace)::RunUIApplicationMain(int, char**) + 144 (chrome_exe_main.mm:65) 16 Browser 0x102eb4768 main + 744 (chrome_exe_main.mm:98) 17 libdyld.dylib 0x19482dcf8 start + 4 Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001c2de9334 __pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001e086da9c pthread_kill + 272 (pthread.c:1582) 2 libsystem_c.dylib 0x000000019dfc5b84 abort + 124 (abort.c:118) 3 libc++abi.dylib 0x00000001a97e9bb8 abort_message + 132 (abort_message.cpp:78) 4 libc++abi.dylib 0x00000001a97daec8 demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:67) 5 libobjc.A.dylib 0x00000001a96e705c _objc_terminate() + 144 (objc-exception.mm:701) 6 libc++abi.dylib 0x00000001a97e8fa0 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59) 7 libc++abi.dylib 0x00000001a97e8f2c std::terminate() + 48 (cxa_handlers.cpp:88) 8 libdispatch.dylib 0x00000001947eb830 _dispatch_client_callout + 40 (object.m:562) 9 libdispatch.dylib 0x00000001947f9c70 _dispatch_main_queue_callback_4CF + 884 (inline_internal.h:2557) 10 CoreFoundation 0x0000000194b78340 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1790) 11 CoreFoundation 0x0000000194b72218 __CFRunLoopRun + 2524 (CFRunLoop.c:3118) 12 CoreFoundation 0x0000000194b71308 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242) 13 GraphicsServices 0x00000001ac1f4734 GSEventRunModal + 164 (GSEvent.c:2259) 14 UIKitCore 0x00000001975ef75c -[UIApplication _run] + 1072 (UIApplication.m:3269) 15 UIKitCore 0x00000001975f4fcc UIApplicationMain + 168 (UIApplication.m:4740) 16 Browser 0x0000000102eb4768 (anonymous namespace)::RunUIApplicationMain(int, char**) + 144 (chrome_exe_main.mm:65) 17 Browser 0x0000000102eb4768 main + 744 (chrome_exe_main.mm:98) 18 libdyld.dylib 0x000000019482dcf8 start + 4 Since it is not happening in run time debugger attached mode, so not able to find actual reason behind this crash, any help would be appreciated.
Replies
0
Boosts
0
Views
626
Activity
Sep ’21
UIWebView sending duplicate request in 302 redirects
I am facing an issue where UIWebview is sending duplicate requests generated from 302 redirects, which is causing the apis to call multiple times and that results in failure.
Replies
2
Boosts
0
Views
668
Activity
Sep ’21
App to support iPhone 12 has dual-sim cards
iPhone 12 has dual-sim cards, in iOS System, set Secondary sim card as main, then in App, objective-c, use [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:12345"] options:@{} completionHandler:^(BOOL success) to make a call, iOS System will still use the First sim card to call. If making a call directly in iOS system dial panel, it will use the Secondary sim card to call. Why? How to solve this?
Replies
2
Boosts
0
Views
636
Activity
Sep ’21
get crash log programmatically
hi all,i need to get crash logs programmatically when my application restarts after a crash. I know that if I enable a configuration given by apple, crashlogs are maintained in the device, which I can access using itunes / xcode. But i want to do it programmatically in my next app restart,Thanks in advance for any helpregardsjniba
Replies
10
Boosts
0
Views
7.5k
Activity
Sep ’21
IOServiceGetMatchingServices not returning graphics model data
I want graphics card details using objective c. used IOServiceGetMatchingServices api for it, its working fine in Intel processor machine, but not returning model info for M1 machine. here is the code I was using    CFMutableDictionaryRef matchDict = IOServiceMatching("IOPCIDevice");        io_iterator_t iterator;        if (IOServiceGetMatchingServices(kIOMasterPortDefault,matchDict,                    &amp;iterator) == kIOReturnSuccess)   {      io_registry_entry_t regEntry;            while ((regEntry = IOIteratorNext(iterator))) {        CFMutableDictionaryRef serviceDictionary;        if (IORegistryEntryCreateCFProperties(regEntry,                          &amp;serviceDictionary,                           kCFAllocatorDefault,                           kNilOptions) != kIOReturnSuccess)       {          IOObjectRelease(regEntry);          continue;       }        const void *GPUModel = CFDictionaryGetValue(serviceDictionary, @"model");                if (GPUModel != nil) {          if (CFGetTypeID(GPUModel) == CFDataGetTypeID()) {            NSString *modelName = [[NSString alloc] initWithData:                       (NSData *)GPUModel encoding:NSASCIIStringEncoding];                        NSLog(@"GPU Model: %@", modelName);           [modelName release];         }       }        CFRelease(serviceDictionary);        IOObjectRelease(regEntry);     }      IOObjectRelease(iterator);   }
Replies
2
Boosts
0
Views
1.6k
Activity
Aug ’21
iOS UIAlertController Line separator missing in iPhone 12 Device, iOS 15 but Issue not reproducing in iPhone 12 Device, iOS 15 Simulator
The line separator is missing in the alert controller. I am encountering this issue only in the iPhone 12 series devices running iOS 15, in the other versions it works fine. Please share your inputs. Screen capture from iPhone 12 Device IOS 15 (Line separator is absent) But available in iPhone 12 IOS 15 Simulator UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"My title"       message:@"My subtitle"       preferredStyle:UIAlertControllerStyleAlert];              UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault       handler:^(UIAlertAction * action) {}];              [alert addAction:defaultAction];       [m_window.rootViewController presentViewController:alert animated:YES completion:nil];
Replies
0
Boosts
0
Views
427
Activity
Aug ’21
Objective-C, separating code by architecture
In my Obj-C wrapper object, I am wanting to surround some code with #define checking to be able to target specific targets - arm64 or Simulator. It would appear that we can "create" custom defines in the project settings : Apple Clang - Preprocessing -> Preprocessor Macros I have tried defining 'ARM64' under the section 'Debug' for 'Any IOS Sdk', presuming that this will be for a real iPad and thus an arm64 environment - as opposed to the simulator, an x86 environment. I then put #ifdef ARM64 ... #else ... #endif around my code, but the compiler is still complaining about 64bit calls. Can this actually be done, as we are able to do from within swift ? Am I going about this the right way ?
Replies
3
Boosts
0
Views
2.2k
Activity
Aug ’21