Posts

Post not yet marked as solved
0 Replies
474 Views
have an Objective C app originally developed in Xcode 12.3 on Catalina and ported to Xcode 13.4 on Monterey. The minimum OS version is set to 10.12 (Catalina). In the app is a class ImageController defined as below, with a number of functions ImageController.h #import <Cocoa/Cocoa.h> @class AppDelegate; … @interface ImagesController : NSArrayController {     … - (void)addFileAtIndex:(NSString *)filePath index:(NSUInteger)index; } ImageController.m #import "ImagesController.h" … #import "AppDelegate.h" … @implementation ImagesController - (void)addFileAtIndex:(NSString*)filePath index:(NSUInteger) index{ ... NSMutableArray *filesToAdd = [NSMutableArray array]; [filesToAdd addObject:[CSSImageInfo containerWithPath:filePath]];       NSMutableIndexSet *indexSet = [NSMutableIndexSet indexSetWithIndex:index];        self insertObjects:filesToAdd atArrangedObjectIndexes:indexSet];        NSInteger selectedIndex = [self selectionIndex]; …     } When the function addFileAtIndex is called (with [imagesController addFileAtIndex:filename index:selectedIndex]; the app running on Monterey it executes normally. When is is called from the app running on Catalina it is never entered. What do I have to do to make the function accessible on Catalina?
Posted Last updated
.
Post not yet marked as solved
0 Replies
356 Views
When running an Objective C app in Xcode 13.4 on Monterey on a 2019 MacBook Pro , app menu options sometimes only appear for as long the touchpad is pressed and the app is not responsive to menu selections. The Apple menu behaves similarly. The app can only be closed by stopping the run in Xcode. This behaviour is not reproducible - sometimes the menu appears normally.
Posted Last updated
.
Post not yet marked as solved
0 Replies
346 Views
I have an Objective-C MacOS app originally developed in Catalina on a 2012 Macbook Pro and recently ported to a 2019 MacBook Pro running Monterey and using Xcode 13.4 in response the App Store no longer accepting apps developed in Xcode 12, which is the newest version supported by Catalina. The app is targeting MacOS 12.0 (Catalina). The app builds and runs OK on Monterey, but when run on Catalina it crashes and the crash log error reason (NSCFConstantString stringByAppendingString:]: nil argument) is incorrect, as diagnosed by a series of log statements. The statement on which it fails is calling setSelectionIndex on an ImagesController class, which uses the NSArrayController interface.
Posted Last updated
.
Post marked as solved
13 Replies
2.1k Views
After submitting my app for review, I received a rejection on account of it crashing in MacOS 12.4 environment. The Objective-C app was developed in MacOS 12.4 and the app runs OK in Xcode and as a standalone executable. The crash log shows the exception type as SIGABRT and documentation. indicates that the crash may arise from an uncaught exception. Part of the crash log is shown below. How can I find out where the problem is occurring in my code? Application Specific Backtrace 0: 0 CoreFoundation 0x00000001b15e5198 __exceptionPreprocess + 240 1 libobjc.A.dylib 0x00000001b132fe04 objc_exception_throw + 60 2 CoreFoundation 0x00000001b150cc98 -[__NSArrayM copyWithZone:] + 0 3 Caption Pro 0x000000010259db78 Caption Pro + 105336 4 Caption Pro 0x000000010259cc58 Caption Pro + 101464 5 Caption Pro 0x000000010259c720 Caption Pro + 100128 6 CoreFoundation 0x00000001b1558854 -[NSSet makeObjectsPerformSelector:] + 216 7 AppKit 0x00000001b40a678c -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1080 8 AppKit 0x00000001b409aa70 loadNib + 416 9 AppKit 0x00000001b4099fa0 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 800 10 AppKit 0x00000001b4099ba4 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 220 11 AppKit 0x00000001b4099974 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 388 12 AppKit 0x00000001b408b740 NSApplicationMain + 576 13 dyld 0x00000001027c508c start + 520 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x1b1462d98 __pthread_kill + 8 1 libsystem_pthread.dylib 0x1b1497ee0 pthread_kill + 288 2 libsystem_c.dylib 0x1b13d2340 abort + 168 3 libc++abi.dylib 0x1b1452b08 abort_message + 132 4 libc++abi.dylib 0x1b1442950 demangling_terminate_handler() + 336 5 libobjc.A.dylib 0x1b1338320 _objc_terminate() + 144 6 libc++abi.dylib 0x1b1451ea4 std::__terminate(void (*)()) + 20 7 libc++abi.dylib 0x1b1454c1c __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 36 8 libc++abi.dylib 0x1b1454bc8 __cxa_throw + 140 9 libobjc.A.dylib 0x1b132ff6c objc_exception_throw + 420 10 CoreFoundation 0x1b150cc98 -[__NSSingleObjectArrayI objectAtIndex:] + 140 11 Caption Pro 0x10259db78 0x102584000 + 105336 12 Caption Pro 0x10259cc58 0x102584000 + 101464 13 Caption Pro 0x10259c720 0x102584000 + 100128 14 CoreFoundation 0x1b1558854 -[NSSet makeObjectsPerformSelector:] + 216 15 AppKit 0x1b40a678c -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1080 16 AppKit 0x1b409aa70 loadNib + 416 17 AppKit 0x1b4099fa0 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 800 18 AppKit 0x1b4099ba4 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 220 19 AppKit 0x1b4099974 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 388 20 AppKit 0x1b408b740 NSApplicationMain + 576 21 dyld 0x1027c508c start + 520
Posted Last updated
.
Post not yet marked as solved
0 Replies
342 Views
I have an Objective-C app which ran OK on Catalina in Xcode 12.3 on a 2012 Macbook Pro. Since App Store will now only accept apps developed on Xcode 13, which does not run on Catalina (the newest OS that the 2012 Macbook will support) I purchased a 2019 Macbook running Monterey, in which I have Xcode 13.4.1 installed. When I run Xcode in Monterey it is much faster ( despite the slower clock rate of the 2019 machine) but a number of bugs have appeared. The major one is that a toolbar created in Interface Builder on Xcode 12.3 is not correctly formatted in an application built from Xcode 13.4.1, even though it appears OK in design mode. This bug was fixed by re-creating the toolbar in Xcode 13.4.1. When running in Xcode 13.4.1, Menu options sometimes do not appear at all and if they do appear, they only show when the touchpad is pressed and held down - they disappear if it stops being pressed. This applies to the Apple menu items as well. If the app is closed in Xcode, the Apple menu items appear normally. Other apps have their menus appearing and responding normally. If a toolbar item is clicked to show an NSPanel (via [ setIsVisible:true]; in this state, the NSPanel may not be shown and cannot be closed by clicking the red dot at the top LH corner. If the app is in the state where menus are not shown when the touchpad is clicked, adding a breakpoint in an action and resuming execution with ctrl-cmd-Y sometimes changes the app state so that menu items are shown as expected. Restarting Xcode does not change the app state, and nor does restarting the Mac or cleaning the build folder.
Posted Last updated
.
Post not yet marked as solved
1 Replies
439 Views
An application toolbar in an XIB file created in XCode 12.3 on MacOS Catalina from an Objective-C project appears as below But in XCode 13.4 it appears as below (the rotate icon has been changed) When the application is run under Xcode 13.4 or on MacOS Monterey the application toolbar appears as below How can I make the toolbar appear as it does in Xcode 12.4 when running on Monterey or using Xcode 13.4?
Posted Last updated
.
Post not yet marked as solved
0 Replies
340 Views
I'm trying to sign into a Sandbox account which is visible in App Store Connect from an iPhone 6 running iOS 12.5.5. After submitting Sandbox account or Apple ID credentials, a gear wheel appears but when it disappears the Sign In prompt reappears. If I enter invalid credentials, immediate feedback they they are invalid is shown.
Posted Last updated
.
Post not yet marked as solved
2 Replies
982 Views
I am developing an app to run on iOS 12.4 or newer using Xcode 12.3 on MacOS Catalina. On my screens I have a number of navigation bar buttons which have a system icon specified as well as text in Interface Builder. When running on an iOS 14.3 simulator, the bar button icons appear but on an iOS 12.4 simulator (and an iOS 12.4 device) the icons do not appear and only text is shown. The buttons still work OK on iOS12.4. How can I make system icons appear in Navigation bar button items in Xcode 12.4?
Posted Last updated
.
Post not yet marked as solved
0 Replies
360 Views
I have developed a MacOS app with a toolbar in Catalina running on a 2013 Macbook Pro and the toolbar height is sufficient to show all icons in half the screen as shown below: However a user has reported that their toolbar appears as shown below, where the toolbar is reduced in height and the icons so widely spaced that some are not shown and appear as pop-up menu items which are disabled. Is this a consequence of using a newer OS than Catalina? Is there a way of increasing the toolbar height so that all icons are shown in newer versions of MacOS?
Posted Last updated
.
Post not yet marked as solved
0 Replies
507 Views
I would like to be able to select a photo in iOS using Swift from the Photos library using UIImagePicker and copy all the image (with modified Exif metadata) to a new photo which I save in Photos. If I use UIActivityViewController to choose the save option (from copy/save/assign to contact/print/add to shared album/save to file), the input image Exif metadata is not transferred when I create a new UIimage from the loaded image data with the modified metadata. How can get the image with modified Exif metadata attached to the saved photo?
Posted Last updated
.
Post not yet marked as solved
4 Replies
476 Views
I have a Swift 5 app that I would like to test on an iPad simulator but the only iPad simulator available is iPad (8th generation). I have a 5th generation iPad which is running iPadOS 15.4 which is presumably capable of running a Swift 5 app but its simulator does not appear in the list of possible iOS simulators.
Posted Last updated
.
Post not yet marked as solved
0 Replies
460 Views
In an Objective C project for MacOS using XCode 12.3 I define variables of various types including NSRect and CGFloat at the start of a class implementation region so that they are accessible from all methods. When I add a breakpoint in a method, some of the variables can be displayed by hovering the cursor over the variable in the code window or examining the variables window. However, some class-level variables are not shown in the variables window or by hovering over them. Attempting to examine then using po in the debugger console shows an undeclared variable error. Class-level variables of type CGFloat which are assigned are visible but not variables that do not have values assigned. None of the objects class NSRect appearing on the RHS of assignments are visible when hovering over the or by using po in the debugger console.
Posted Last updated
.
Post not yet marked as solved
0 Replies
331 Views
I have an Xcode 12.3 XIB project using Objective C running on Catalina with a panel to which I have added a vertical split view of type NSSplitview using default attributes. The split view divider is not visible when I run the application, but objects placed in each pane of the NSSplitview are. The invisible divider (there is no change in the cursor when moving over where the divider should be) means that NSSplitview does not work. If a create a new XIB project, an NSSplitview control added to a panel is visible OK, so I think there is something about the parent project which is upsetting NSSplitview.
Posted Last updated
.
Post not yet marked as solved
4 Replies
1.4k Views
I am trying to create a file from a text string in a web server in a folder C:\inetpub\wwwroot\AlekaConsulting\AlekaConsulting\License using IIS 10.0.14393.0 on a Windows Server 2016 environment using the following Objective-C code on macOS Catalina, but no file is created and the returnString variable contains the error message 405 - HTTP verb used to access this page is not allowed. The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access. The same error appears if I use PUT rather than POST as HTTPmethod. No verbs are listed in the Request Filtering tab of IIS Manager, which means no verbs are blocked. webDav is not installed as a server feature. Content can be successfully read from files in the specified folder. Is the error connected with the URL being accessed via https? (void) UploadFileContent: (NSString *) fileContent{ NSString *urlString = @"https://captionpro.com.au:444/AlekaConsulting/License"; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; [request setURL:[NSURL URLWithString:urlString]]; [request setHTTPMethod:@"POST"]; NSMutableData *body = [NSMutableData data]; NSString *boundary = @"---------------------------14737809831466499882746641449"; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary]; [request addValue:contentType forHTTPHeaderField:@"Content-Type"]; [body appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"parameter1\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:fileContent] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithFormat:@"--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [request setHTTPBody:body]; NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; NSLog(@"%@", returnString); } fg
Posted Last updated
.