I would like to create a macOS app without using Interface Builder.How must the Xcode macOS app template be modified after deleting Main.storyboard and its corresponding Info.plist lineto show a single simple window at startup?
Post not yet marked as solved
Due to some problems with my app, I would like to make it "invisible" in the App Store for a while to stop acquiring new users, but I would like to be able to publish bugfix updates for the existing users.
Is this possible somehow?
Hi,
in my app the user can choose between a light and a dark appearance.
This is done by setting the overrideUserInterfaceStyle of the window.
On macOS (Catalyst) the app uses an NSToolbar, which always appears in the mode set for the system, regardless what ist set for the overrideUserInterfaceStyle of the window (see screenshot).
Since this is not a good visual impression, I would like to know how I can set light/dark mode for the NSToolbar too.
Post not yet marked as solved
I would like to change the color of the icon and the label of a NSToolbarItem in my Catalyst app, just like assigning a tint color to a UIButton.
How can I do this?
Post not yet marked as solved
Hi everybody,in my app I would like to provide the ability to copy files stored inside the app to the Files app or the Finder in macOS using Catalyst.On iOS, everything works fine with the following code: if let provider = NSItemProvider(contentsOf: url) {
provider.suggestedName = pdfFilename
UIPasteboard.general.url = url
UIPasteboard.general.itemProviders = [provider]
}But on macOS this doesn't work, if I execute this code I get the messages:[sandbox] CreateSandboxExtensionData failed: url null[general] Sandbox extension data required immediately for flavor public.file-url, but failed to obtain.Does anyone have an idea what I have to do here?
Post not yet marked as solved
I am using SF Symbols as images for the tabs in my app, but they aren't positioned correctly.If I useself.tabBarItem.image = UIImage(systemName: "ellipsis")the ellipsis image is top-aligned in the tab.What do I have to do to get a vertically centered image?
I have a problem with using UIAlertController in my apps built for UIKitForMac: If I press the "OK" button in the box displaying the message, the app crashes with an "-[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array"exception like this:2019-06-09 18:47:35.613479+0200 macalerts[3018:179110] [General] *** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array2019-06-09 18:47:35.613566+0200 macalerts[3018:179110] [General] ( 0 CoreFoundation 0x00007fff3a56fc63 __exceptionPreprocess + 250 1 libobjc.A.dylib 0x00007fff6fa3806b objc_exception_throw + 48 2 CoreFoundation 0x00007fff3a62f12a _CFThrowFormattedException + 202 3 CoreFoundation 0x00007fff3a504f4a -[__NSArrayM objectAtIndexedSubscript:] + 142 4 UIKitCore 0x00007fff768389d9 __48-[UIAlertController(iOSMac) _createBridgedAlert]_block_invoke_2 + 75 5 libdispatch.dylib 0x00000001003849b3 _dispatch_call_block_and_release + 12 6 libdispatch.dylib 0x000000010038598f _dispatch_client_callout + 8 7 libdispatch.dylib 0x000000010039583a _dispatch_main_queue_callback_4CF + 1865 8 CoreFoundation 0x00007fff3a4becaa __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 9 CoreFoundation 0x00007fff3a4be3e8 __CFRunLoopRun + 2370 10 CoreFoundation 0x00007fff3a4bd821 CFRunLoopRunSpecific + 499 11 HIToolbox 0x00007fff3919d7fd RunCurrentEventLoopInMode + 292 12 HIToolbox 0x00007fff3919d53d ReceiveNextEventCommon + 600 13 HIToolbox 0x00007fff3919d2c7 _BlockUntilNextEventMatchingListInModeWithFilter + 64 14 AppKit 0x00007fff3784ccf8 _DPSNextEvent + 990 15 AppKit 0x00007fff3784ba6b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 16 AppKit 0x00007fff378461b7 -[NSApplication run] + 658 17 AppKit 0x00007fff3783804b NSApplicationMain + 777 18 AppKit 0x00007fff37cbc022 _NSApplicationMainWithInfoDictionary + 16 19 UIKitMacHelper 0x00007fff6a599ef9 UINSApplicationMain + 424 20 UIKitCore 0x00007fff765bea91 UIApplicationMain + 2206 21 macalerts 0x0000000100002b6b main + 75 22 libdyld.dylib 0x00007fff70d967a9 start + 1)This even happens when I "isolate" the problem in a simple single view app where I bring up a UIAlertController in viewDidAppear like this: override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) let ac = UIAlertController(title: "Title", message: "Message", preferredStyle: .alert) self.present(ac, animated: true) }Does anybody know ho to solve this?
Post not yet marked as solved
I'm writing an app which provides several different color themes.It would be great to change the app icon and the launch image according to the active theme.I know an app may have several alternate app icons - but what about launch storyboards?Is it possible to use different storyboards, or is it possible to dynamically modify the launch storyboard in some way,for example changing the tint color of some of its views?
Post not yet marked as solved
I would like to share entries from my diary app including their timestamps.I tried to use a Date object as an item in UIActivityViewController, but this seems to have no effect.Does anybody know how to do this?
Post not yet marked as solved
Since none of the predefined CoreData merge policies suit my needs, I would like to create my own.I think this should be possible by subclassing NSMergePolicy, but it is not clear to me what do to exactly to resolve a NSMergeConflict in [NSMergePolicy resolveOptimisticLockingVersionConflicts:error:].Could anybody provide some deeper explanation or sample code for this?
I have an app which has defined a document type and is able to open such files with a given extension.This works perfectly for example with AirDrop or from Mail, but it does not work with the new Files app in iOS 11on a real device.It works in the simulator, there are two cases: If the URL of the file to open comes in via- (BOOL) application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)optionsI check if the file attributes are accessible. If so, I can use the file item directly, if not, I use[NSFileCoordinator coordinateReadingItemAtURL:options:error:byAccessor:],the file is downloaded from iCloud and I can process it using the new URL delivered by the result handler.On a real device this does not work - I get an error that I am not having the access rights to access the file attributes.If I am using the NSFileCoordinator, the result handler returns without an error, but trying to access the item at the new URLleads to the same problem.Does anybody have an idea what I can do to solve this?
Post not yet marked as solved
Does anybody know what causes the debug message"Error loading timezone data from file system. This is a serious problem. Calendar data is not guaranteed to be accurate."?It appears when calling [EKEventStore predicateForEventsWithStartDate:endDate:calendars:],but only on the device, not in the simulator. My app calls this method several times with different dates,but I cannot see any relation between the dates used and the appearance of this message.It appears to show up randomly.