Posts

Post marked as solved
2 Replies
0 Views
This can be done by adding an macOS plugin which has access to the whole AppKit API.  Then you can set the desired appearance there at runtime, for example: NSApplication.shared.appearance = NSAppearance(named: .darkAqua) For more information please see this StackOverflow question: How to set dark mode for NSToolbar in macOS Catalyst app?
Post not yet marked as solved
3 Replies
0 Views
I have exactly the same problem - although all information in the .plist file and the localized InfoPlist.strings files is there, my app gets rejected and I don't know how to reproduce the issue. Does anybody knows a solution for this?
Post not yet marked as solved
4 Replies
0 Views
I have the same problem - what is service name for resetting the location permissions in macOS 11.1? Is there a list with all the available service names?
Post marked as solved
2 Replies
0 Views
Thanks - yes, exactly this is the problem here, the crash appears only for alerts with no actions. I use them for progress messages which disappear automatically if the work is completed.Adding a 'dummy' action fixes the crash, but to make the alert disappear you have to press this button.Calling [UIViewController dismissViewControllerAnimated:completion:] executes the completion code,but does not hide the alert.Is there a solution without this dummy button?Is it possible to use the NSAlert from AppKit directly here in an UIKitForMac app?
Post marked as solved
3 Replies
0 Views
The solution is to call[NSURL startAccessingSecurityScopedResource / stopAccessingSecurityScopedResource]before resp. after accessing the file at the new URL delivered by the NSFileCoordinator.
Post marked as solved
3 Replies
0 Views
One addition: If I set LSSupportsOpeningDocumentsInPlace to NO in my info.plist,the "old" behaviour is restored: If I select a file in the Files app, it is downloaded,I see a screen with the filename on it and can provide the file to my app using the Share button.But I would like to use LSSupportsOpeningDocumentsInPlace = YES to showmy document files in the Files app.What do I have to do to handle this in-place-opening in my app in the right way?
Post marked as solved
13 Replies
0 Views
Meanwhile I found the solution for the Swift problem:I had to remove the @NSApplicationMain attribute from the delegate classand put the startup code into a separate main.swift file, then everything is fine.No, I did not try your first suggestion until now, but I will do this soon.
Post marked as solved
13 Replies
0 Views
I have been developing iOS apps for more almost 8 years now, and already at the beginning I have decided to work without IB.Working with IB seemed very tedious to me, I found it very much easier to do the UI things directly by code. I think this also helped me to better understand how things really work instead relying onsome "magic".Now I am starting my first macOS project and I would like to know if I can develop a macOS app in the same way (without IB).I don't know how this will end up, perhaps I follow the advices in the other posts and use IB for the menu or some more.But to make my decision, I would like to know how the code-only solution looks like.
Post marked as solved
13 Replies
0 Views
Thanks for the link, but unfortunately I am not enough experienced in Swift to get this working.My problem here is that I don't know where to place the main block in the Swift app template generated by Xcode.Maybe I can figure this out with some more time.
Post marked as solved
13 Replies
0 Views
Thanks for your answer, but my intention was to create the app just programmatically and really without using IB, storyboards, .xibs ...I know the solution for iOS, this looks like:- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.backgroundColor = [UIColor whiteColor]; self.window.rootViewController = ...; // use an appropriate view controller here [self.window makeKeyAndVisible]; return YES; }I'm searching for the macOS equivalent for this.