Mac Catalyst

RSS for tag

Start building a native Mac app from your current iPad app using Mac Catalyst.

Mac Catalyst Documentation

Posts under Mac Catalyst tag

147 Posts
Sort by:
Post not yet marked as solved
1 Replies
523 Views
I have a SCNView with a UIPinchGestureRecognizer for zooming. This gesture recognizer works nicely on trackpads, but not with a computer mouse. Therefore I'd like to intercept the scrolling of a mouse as a fallback to accomplish the zooming.Unfortunately I cannot figure out how to detect the scrolling of a mouse on Catalyst in a view, is there any way to do that?
Posted
by
Post not yet marked as solved
2 Replies
682 Views
My UIDocumentBrowserViewController-based Mac Catalyst app shows the "open window" when launched; fine. but there is also a blank document window. Once I pick a document, and present my document view controller over my UIDocumentBrowserViewController subclass, the window is filled with the documents contents. How do I get it to hide the blank window behind it?
Posted
by
Post not yet marked as solved
5 Replies
1.3k Views
In an app ported to Mac Catalyst, the camera interface always turned out to be blank.I have checked: the capabilities includes "Camera", the privacy setting in info.plist is there (the iPad app shows the camera fine), and I even try to include front camera for UIImagePickerController. if UIImagePickerController.isSourceTypeAvailable(.camera) { let imagePicker = UIImagePickerController() imagePicker.sourceType = .camera imagePicker.delegate = self imagePicker.cameraDevice = .front // added for Mac self.present(imagePicker, animated:true, completion:nil) }The error I got is: "[Generic] Could not create video device input: Error Domain=AVFoundationErrorDomain Code=-11814"
Posted
by
Post not yet marked as solved
20 Replies
3k Views
Sync between iOS and Mac Catalyst is intermitent. The fundamental issue is slow and inconsistent remote notifications being sent to and received by the Mac Catalyst app.When making changes in the Mac Catalyst app, those changes are successfully pushed to the iCloud private database and the iOS or iPadOS app successfully receives the remote notification indicating the change. In short, the MacOS -> iOS direction is seemless. When making changes in the other direction, we run into problems. A change in the iOS app successfully gets pushed up to the iCloud private database, and other iOS or iPadOS devices successfully receive the remote notification. However, Mac Catalyst apps most commonly will not receive the remote notification at all, or – occassionally – will receive it several minutes after the change took place. Rarely will the Mac Catalyst app receive the notification in a timeframe consistent with the performance of iOS apps (within 2-4 seconds).Why are Mac Catalyst apps having so much trouble receiving these CloudKit-triggered remote notifications? (Note that these issues are present in both development and production environments.)
Posted
by
Post not yet marked as solved
1 Replies
915 Views
On our iOS app, on the login page, we have a username field and a password field.When pressing RETURN, in the keyboard, the app move to the next responder or starts the login process if all the fields are filled.When running the app in MAC Catalina, if one of those fields is the first responder a FLOATING "Password..." button appears on the left of the Window - See attachment.When we write something the text is inserted in the textView but the ENTER Key is not detected anymore. This "Passwords..." Button has now the FOCUS. We also tried to implement- (NSArray *) keyCommands { ... }method in the underlying viewController but it doesn't solve the issue.Anybody knows how to disable it or how to solve the issue on Mac Catalyst?Here is the screenshot:https://www.dropbox.com/s/ri43wx3b1z83x5g/Login-Pwd.png?dl=0Regards,Marco
Posted
by
Post not yet marked as solved
1 Replies
485 Views
We have a need for continuous background processing as we are a network listener observing the state of many local network items that have no understanding of anything like push notifications, etc.On iOS this can be solved via Guided Access, thus forcing foreground access on a permanent basis. In our case, users are perfectly fine with that as they purchase the Apple devices specifically for this software.On Catalyst, there is no Guided Access. I had assumed this would be trivial because Cocoa doesn't stop execution for background apps, but Catalyst appears to simulate iOS by trying to stop any app not in the foreground even when the machine does not even have a battery (eg. iMac) and the concept of background tasks framework to save battery makes no sense, and it does so pretty quickly (30 seconds - 3 minutes).In reviewing the new background APIs, all of it seems to ignore these use cases. My real question as per the title is "how do I get continuous background processing time on Catalyst?" As I have asked that fruitlessly for a decade on iOS, in this case I will modify the need to be more realistic, "given reality that Apple does not (yet) recognize network listeners as a valid background activity, what background behavior can I use on Catalyst to ensure as close to permanent background execution as possible?"Note that, while we require continuous background execution, our actual CPU time is essentially zero. We just listen for specific network activity and take actions based on it. So I'm trying to figure out the best heuristic to get the longest lasting execution time, specifically on Catalyst. Thanks for any advice!
Posted
by
Post not yet marked as solved
3 Replies
1.4k Views
Hi guysI successfully uploaded to the Appstore for iOS an app with several extensions, but when I try to upload the same app for Mac AppStore ( a Mac Catalyst App ) I get the following error from Xcode on two extensionsERROR ITMS-90355: "Missing Info.plist value. No value for NSExtensionPrincipalClass found in extension Info.plist for MyApp.app/Contents/PlugIns/MyExtension.appex"These extensions are a Share Extension and an Action Extension that have a storyboard file, so if I set the NSExtensionPrincipalClass key in the Info.plist file I get the following message in consoleInvalid Configuration: Either NSExtensionMainStoryboard or NSExtensionPrincipalClass must be specified in the extension's Info.plist file but not both.And of course the extension interface does not appear and nothing worksAnybody got an idea how to solve this?Apple engineers and evangelists, do you have any suggestions?Alternatively there is the possibility to set only the NSExtensionPrincipalClass key in the Info.plist file and then call the storyboard file programmatically ?Thank you all in advanceVanni
Posted
by
Post marked as solved
2 Replies
1.2k Views
I'm attemping to use UIDocumentPickerViewController, but when I run the app in development, I get an entitlements error:[OpenSavePanels] ERROR: Unable to display save panel: your app is missing the User Selected File Read/Write app sandbox entitlement. Please ensure that your app's target capabilities include the proper entitlements.My entitlements do incldue "User Selected File: Read/Write" in the App Sandbox section.I'm using "Automatically manage signing" and I tried clearing out all provisioning profiles, but this doesn't seem to help.
Posted
by
Post not yet marked as solved
2 Replies
462 Views
It appears that the setBccRecipients call on MFMailComposeViewController is not working for Catalyst.The same code works on iOS, and it works on Catalyst in setCcRecipients and setToRecipients variations correctly, and the documentation says the call is supported, but it returns an error message saying: "setToBccRecipients is not supported" and does nothing.This is odd, because it is getting the name of the call wrong, as well.Has anyone else encountered this problem?
Posted
by
Post not yet marked as solved
7 Replies
2.2k Views
I have an iOS app which I'm trying to build with mac Catalyst. It works well locally but I'm having problems when I try and build a notarized version to send to testers. I have sucessfully notarized the app but when I run it, nothing happens. Console logs this:default 10:10:46.455899+0000 taskgated-helper 70673: 0xdfd172 Checking profile: XC OSX: com.hacknicity.adaptivity.aerror 10:10:46.455919+0000 taskgated-helper 70673: 0xdfd172 com.hacknicity.adaptivity.a: Unsatisfied entitlements: com.apple.developer.user-fontserror 10:10:46.455934+0000 taskgated-helper 70673: 0xdfd172 Disallowing: com.hacknicity.adaptivity.adefault 10:10:46.456962+0000 amfid 184: 0xdfd304 /Users/geoff/Desktop/Adaptivity.app/Contents/MacOS/AdaptivityA signature not valid: -67671default 10:10:46.457021+0000 kernel 0: 0xdfd3ce proc 70702: load code signature error 4 for file "AdaptivityA"default 10:10:46.457380+0000 kernel 0: 0xdfd3cf Security policy would not allow process: 70702, /Users/geoff/Desktop/Adaptivity.app/Contents/MacOS/AdaptivityAdefault 10:10:46.465528+0000 ReportCrash 530: 0xdfce46 Parsing corpse data for process AdaptivityA [pid 70702]default 10:10:47.329601+0000 ReportCrash 530: 0xdfce46 Saved crash report for AdaptivityA[70702] version ??? to AdaptivityA_2020-02-25-101047_Villanelle-2.crashThe iOS app has the Fonts->Use Installed Fonts capability configured in Xcode and I use UIFontPickerViewController to allow the user to choose a custom font. That view controller simply doesn't appear on Mac Catalyst, so I conditionally removed that part of the UI. However, the entitlements are shared between the iOS and Catalyst versions so I can't have it enabled in one and not in the other.I suspect I might need to switch to manual signing so I can use separate provisioning profiles for the iOS and Catalyst versions. That seems like it shouldn't be necessary...
Posted
by
Post not yet marked as solved
1 Replies
621 Views
Here is a list of things that Mac Catalyst do not appear to be able to do. Does anyone else experience this ?- MultiPeer connectivity on Mac Catalyst will not connect to an ios device. catalyst ask to join , Then accept on ipad I get this message on Ipad and catatlyst stalls out . [MCNearbyServiceBrowser] Browser got invite response with nil connectionData.- Playing Sounds ( AVAudioPlayer ) on Mac Catalyst does not play audio.- Scheduling local notifications on Mac Catalyst does not work.- Selection of a UICollectionView Cell does not select on Mac Catalystlet selectedItems = colVw.indexPathsForSelectedItems // Works fine on ipad but always empty for MacCatalyst
Posted
by
Art
Post not yet marked as solved
1 Replies
602 Views
When I'm trying to copy a text from the FMP (FileMakerPro) and paste it to any textfield of my app, I'm getting asian symbols instead of copied text.It happens both when I'm launching a MacOS app, or an iOS app in the simulator.Seems like the FMP uses some kind of RTF the app cannot recognize. I tried to check the text from the pasteboard in different methods of a custom textfield class like shouldChangeCharactersIn of UITextFieldDelegate, or in textPasteConfigurationSupporting of UITextPasteDelegate, but I'm always getting symbolsPasting the same text into a SearchBar or any Text Field of any other apps like Slack, Apple Music, Browser works well.Also, Copy/Paste works well in app too when I'm copying RTF from browser, pdf files with different languages and rich text, so I'm not sure how to track the issueI was able to fix it on the iPad and tested on a simulator:let pasteBoard = UIPasteboard.general let options: [NSAttributedString.DocumentReadingOptionKey : Any] = [ .documentType: NSAttributedString.DocumentType.rtf ] if let data = pasteBoard.data(forPasteboardType: "public.rtf"), let attString = try? NSAttributedString(data: data, options: options, documentAttributes: nil){ return attString }But this code doesn't work on Mac OS. The app just stucks at this line let data = pasteBoard.data(forPasteboardType: "public.rtf"),I was hoping to use NSPasteBoard to do the same trick, but NSPasteBoard is not allowed for Catalyst.Is there any way to fix it or I need to file a ticket for that bug?
Posted
by
Post marked as solved
1 Replies
994 Views
Hi,in my Catalyst app, a UITableView can be scrolled with two fingers on the trackpad. What doesn't work is dragging a mouse over it while clicking the mouse button. Is this supposed to work? In places where I use UIGestureRecognizers, they work with mouse drags.Thanks,Markus
Posted
by
Post not yet marked as solved
1 Replies
265 Views
Hi!I am trying to copy an mp4 or m4v video file to the general pasteboard and then paste it into iMessage.let url = Bundle.main.url(forResource: "video", withExtension: "mp4") let videoData = Data(contentsOf: url) UIPasteboard.general.setData(videoData, forPasteboardType: "public.mpeg-4"I can see the video is indeed in the pasteboard but it won't copy into iMessage. This is on macOS while developing an app using Catalyst.Thanks
Posted
by
Post marked as solved
2 Replies
657 Views
Hey, on iOS we always access the document folder assuming it exists, but on Catalyst we ran into issues caused by the fact that the document folder does not exist, so we had to create it first. Is it normal behaviour on catalyst ?
Posted
by
Post not yet marked as solved
3 Replies
1k Views
I've created an iOS app that works fine. I ticked the box in Xcode for Catalyst and its works fine on my machine, my wife's MacBook, and also a friends iMac. However, during the App Review process it got rejected as it crashed. Is anyone good at crash reports please? It seems to crash on Thread 8 - Core Location. I've just shown that portion of the report but if you need it all just let me know (didn't want to just dump a load of text that all): Thread 8 Crashed:: Dispatch queue: com.apple.CoreLocation.0x7fd60de16fa0 0 libsystemkernel.dylib 0x00007fff6f3aa33a pthreadkill + 10 1 libsystempthread.dylib 0x00007fff6f466e60 pthreadkill + 430 2 libsystemc.dylib 0x00007fff6f331808 abort + 120 3 com.apple.corelocation 0x00007fff36298273 0x7fff36290000 + 33395 4 com.apple.locationsupport 0x00007fff5aa1383c 0x7fff5aa04000 + 63548 5 com.apple.locationsupport 0x00007fff5aa1379b 0x7fff5aa04000 + 63387 6 com.apple.locationsupport 0x00007fff5aa0716c CLConnection::handleMessage(std::1::sharedptr<CLConnectionMessage>) + 156 7 com.apple.locationsupport 0x00007fff5aa0f321 0x7fff5aa04000 + 45857 8 com.apple.locationsupport 0x00007fff5aa104eb 0x7fff5aa04000 + 50411 9 libxpc.dylib 0x00007fff6f4a72bc xpcconnectioncalleventhandler + 56 10 libxpc.dylib 0x00007fff6f4a61cb xpcconnectionmachevent + 934 11 libdispatch.dylib 0x00007fff6f2096f8 dispatchclientcallout4 + 9 12 libdispatch.dylib 0x00007fff6f21ebc9 dispatchmachmsginvoke + 435 13 libdispatch.dylib 0x00007fff6f20eaf6 dispatchlaneserialdrain + 263 14 libdispatch.dylib 0x00007fff6f21f71c dispatchmachinvoke + 481 15 libdispatch.dylib 0x00007fff6f20eaf6 dispatchlaneserialdrain + 263 16 libdispatch.dylib 0x00007fff6f20f5d6 dispatchlaneinvoke + 363 17 libdispatch.dylib 0x00007fff6f218c09 dispatchworkloopworkerthread + 596 18 libsystempthread.dylib 0x00007fff6f463a3d pthreadwqthread + 290 19 libsystempthread.dylib 0x00007fff6f462b77 start_wqthread + 15
Posted
by
Post not yet marked as solved
9 Replies
1.1k Views
On a macOS app generated with Catalyst, the method SKCloudServiceController.requestUserToken(forDeveloperToken:completionHandler:) returns a SKErrorDomain. The error is: Error Domain=SKErrorDomain Code=0 "Ocorreu um erro desconhecido" UserInfo={NSLocalizedDescription=Ocorreu um erro desconhecido} Has something changed regarding this method on macOS or is this a bug?
Posted
by
Post not yet marked as solved
4 Replies
557 Views
I'm porting my iPhone/iPad App to Mac Catalyst. First time I ran it got "Use Location while in use" pop up, gave consent. Next time I ran it - the consent is saved which is OK. I want to delete all settings and test from scratch. Deleted the folder in Library/Containers, derived data folder. But these settings are stored somewhere else. Where are they stored?  
Posted
by