mac-catalyst

Is there a way to send the user to the app's privacy settings under macOS like we do in iOS?

假装没事ソ 提交于 2021-02-19 07:31:56
问题 Like many apps, my iOS app offers the user a chance to open the app's settings page if a certain privacy permission has been disabled. In iOS, using the special UIApplicationOpenSettingsURLString / openSettingsURLString URL takes the user to the app specific page of the Settings app. There the user sees various privacy settings used by the app in addition to any settings setup in the Settings.bundle provided by the app (if any). While working on the Mac Catalyst port of the iOS app, this is

macCatalyst app: how to close a window without terminating the app?

本小妞迷上赌 提交于 2021-02-08 05:34:11
问题 I'm developing an app by using macCatalyst. When user has closed the window on mac version, the app is terminated. It was possible to change this behavior in cocoa by using: applicationShouldTerminateAfterLastWindowClosed method or by setting NSSupportsAutomaticTermination to NO in plist file. How can I get the same in a macCatalyst app? 回答1: I've discussed the problem with Apple technical developer support. After a long discussion, they accepted that this is a bug on Apple side. It's

Build iOS App having Google Sign with support for Mac

此生再无相见时 提交于 2021-01-27 22:15:06
问题 I have manually embedded the Google Sign In framework into an iOS app with the .bundle and .framework files. After adding the Mac as deployment target with the most recent Xcode and macOS Catalina versions I get the following error message when trying to run the app on the Mac. Building for Mac Catalyst, but the linked framework 'GoogleSignIn.framework' was built for iOS + iOS Simulator. You may need to restrict the platforms for which this framework should be linked in the target editor, or

SKProductsRequest does not return SKProductsResponse in Catalyst app

混江龙づ霸主 提交于 2021-01-25 07:06:28
问题 I have an existing iOS app that contains in-app purchases. I've done the following to port it to macoS, built in Xcode by adding Mac as a target. added a macOS platform to the existing app on App Store Connect. I did not upload a macOS version yet. completely log out of App Store. run app from Finder. I also tested running from the command line to see if there were any console messages that popped up. As you can imagine, I create an SKProductsRequest object and call start(). Whereas the iOS

AVAudioEngine reconcile/sync input/output timestamps on macOS/iOS

本秂侑毒 提交于 2021-01-23 06:37:00
问题 I'm attempting to sync recorded audio (from an AVAudioEngine inputNode ) to an audio file that was playing during the recording process. The result should be like multitrack recording where each subsequent new track is synced with the previous tracks that were playing at the time of recording. Because sampleTime differs between the AVAudioEngine 's output and input nodes, I use hostTime to determine the offset of the original audio and the input buffers. On iOS, I would assume that I'd have

UIDocumentPickerViewController doesn't show any contents on Mac Catalyst

淺唱寂寞╮ 提交于 2020-12-01 12:23:06
问题 UIDocumentPickerViewController works on iOS but not on Mac Catalyst. Is there any alternatives to workaround this issue? BTW, NSOpenPanel is unavailable on Mac Catalyst. 回答1: There's extra code in @UnchartedWorks' excellent answer. Here's a cleaner version with some options, more copy/paste-able into your code. This works on iOS, iPadOS, and Mac Catalyst (without using a #if conditional). import Foundation import SwiftUI import MobileCoreServices /// A wrapper for a

UIDocumentPickerViewController doesn't show any contents on Mac Catalyst

拈花ヽ惹草 提交于 2020-12-01 12:11:22
问题 UIDocumentPickerViewController works on iOS but not on Mac Catalyst. Is there any alternatives to workaround this issue? BTW, NSOpenPanel is unavailable on Mac Catalyst. 回答1: There's extra code in @UnchartedWorks' excellent answer. Here's a cleaner version with some options, more copy/paste-able into your code. This works on iOS, iPadOS, and Mac Catalyst (without using a #if conditional). import Foundation import SwiftUI import MobileCoreServices /// A wrapper for a

How to open file dialog with SwiftUI on platform “UIKit for Mac”?

耗尽温柔 提交于 2020-11-30 12:34:48
问题 NSOpenPanel is not available on platform "UIKit for Mac": https://developer.apple.com/documentation/appkit/nsopenpanel If Apple doesn't provide a built-in way, I guess someone will create a library based on SwiftUI and FileManager that shows the dialog to select files. 回答1: Here's a solution to select a file for macOS with Catalyst & UIKit In your swiftUI view : Button("Choose file") { let picker = DocumentPickerViewController( supportedTypes: ["log"], onPick: { url in print("url : \(url)") }