Post not yet marked as solved
Programmatically detect if iOS app is running on a Mac,
is that possible?
I'm trying to build my iOS app to macOS Catalyst. Everything works fine when running locally on my machine via Xcode, but an error occurs when I archive and try to upload to the notarisation service:
Cannot create a Mac Catalyst Developer ID provisioning profile for "br.com.marcosatanaka.music-harbor".
The App Groups capability is not available for Mac Catalyst Developer ID provisioning profiles. Disable this feature and try again.
I have the App Groups capability enabled on my app's target Signing & Capabilities tab on Xcode. But, when I go to the Apple Developer portal under Certificates, Identifiers & Profiles > Profiles and select the Mac Catalyst provisioning profile (automatically generated by Xcode), the App Groups capability is not present on the Enabled Capabilities section.
I can work around this issue by removing the com.apple.security.application-groups entitlement when building for Mac Catalyst, but that causes me a runtime error when Core Data tries to access the store located on the shared container. I also need it to be on a shared container because I want to access the database from both the main app and also the new widget extension.
How can I add the App Groups capability to my Mac Catalyst provisioning profile?
Post not yet marked as solved
I noticed that sometimes, when opening my Mac Catalyst app, the window is not resized to the size I left it the last time.
Should I restore it manually when launching the app, or is the system responsible for it? And if it so, why it doesn't work sometimes?
Post not yet marked as solved
I am extremely worried about my certificates/profiles and need help fixing the issue. I have my app in the Apple app store for iPhone, iPad, and Mac and have sent out multiple updates. I just recently updated my Xcode to Xcode 12 and can no longer send my Mac Catalyst version of the app to Apple's notary service and get these errors:
Cannot create a Mac Catalyst Developer ID provisioning profile for "". The App Groups capability is not available for Mac Catalyst Developer ID provisioning profiles. Disable this feature and try again. Provisioning profile failed qualification Profile doesn't include the selected signing certificate. Provisioning profile failed qualification Profile doesn't support App Groups. Before this point, I had not generated a new Developer ID profile since February and have had App Groups in my app for many months and sent out multiple updates and notaries with it. After tons of research, I saw that it maybe has something to do with my Developer ID Profile so I looked into it on the Apple developer website and saw that the status said invalid. I made a new one, removed the invalid one, and tried the steps of archiving a new build and trying to send it to Apple's notary but ended up getting the same error.
I have done more research and stumble upon https://developer.apple.com/support/certificates/ and saw that removing a profile may cause me to not update my current apps in the app store. Did I remove my entire access to update my apps???
I still can not figure out the notary issue and am now extremely worried that I have messed up my chances of updating my app again. Can you please help me with both issues?
I have a Mac update I would like to send out to the App Store as soon as possible but want to know if it's safe before sending it to users.
Post not yet marked as solved
App Tracking Transparency - https://developer.apple.com/documentation/apptrackingtransparency is marked as available for Mac Catalyst 14.0 on Apple Documentation. It does not seem to be the case while testing with Xcode 12.
When importing framework in project settings, AppTrackingTransparency.framework is flagged "iOS/iPad only". Resulting an expected but unexpected error when importing library in a Swift file:
AppTrackingTransparency is not available when building for Mac Catalyst. Consider using #if !targetEnvironment(macCatalyst) to conditionally import this framework when building for iOS. Should I use AppTrackingTransparency through a macOS Bundle and wait macOS 11.0 SDK ?
Post not yet marked as solved
I changed the name of my target. I'm now getting the following assertion failure with my pulldown menus:
** Assertion failure in -[UINSResponderProxy _initWithWrappedResponder:orMenuProxy:forAction:sender:], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3920.40.401/UIKitMacHelper/App/UINSResponderProxy.m:194
How do I fix this?
Post not yet marked as solved
I’m trying to embed a helper Mac Catalyst app into an Appkit app. Is this possible? When I add it in the copy file phase I get a build error “Building for macOS but the embedded app was built for Mac Catalyst.” Are there any work arounds for this?
Post not yet marked as solved
Hi, this might sounds dumb, but to create a distribution profile for Mac Catalyst app, should I choose Mac or Mac Catalyst?
When select "Mac Catalyst" type, I saw this message, which concerns me since I don't use any "maccatalyst" prefix for our apps.
To generate a provisioning profile for an App ID with a "maccatalyst" prefix, search for the iPad app's App ID. Then select the App ID under "Enabled App IDs with an associated application identifier".
Seeing these when trying to create an xcframework for Apple Silicon that supports Mac Catalyst and the iOS Simulator:
Both ios-arm64-simulator and ios-x86_64-simulator represent two equivalent library definitions.
Both ios-arm64-maccatalyst and ios-x86_64-maccatalyst represent two equivalent library definitions.
Here's the command:
xcodebuild -create-xcframework \
		-framework ./xcframework-build/catalyst-x86_64/opencv2.framework \
		-framework ./xcframework-build/catalyst-arm64/opencv2.framework \
		-framework ./xcframework-build/osx-x86_64/opencv2.framework \
		-framework ./xcframework-build/osx-arm64/opencv2.framework \
		-framework ./xcframework-build/iphonesimulator-arm64/opencv2.framework \
		-framework ./xcframework-build/iphonesimulator-x86_64/opencv2.framework \
		-framework ./xcframework-build/iphoneos-arm64/opencv2.framework \
		-output ./xcframework-build/opencv2.xcframework
From my understanding fat binaries for these frameworks isn't valid, but maybe it is in this case? These are static frameworks if that matters at all.
Using Xcode 12.2 RC.
Post not yet marked as solved
I have a Mac Catalyst app with some custom SwiftUI sliders. After upgrading to macOS Big Sur I've noticed that the sliders are difficult to use.
After some digging and debugging it looks like the DragGesture is interrupted (i.e. stopped without calling onEnded) as soon as the cursor leaves the dragged view's frame. So, if you drag slowly everything's good, go a bit faster and you 'loose' the knob.
In iOS, iPadOS and Catalina the same code works just fine.
I have filed this to Apple using the Feedback Assistant, but thought that maybe you'll have some thoughts on this or maybe a workaround ideas. Have you got any?
Kind regards,
Jan
I have been working with several SwiftUI apps using Catalyst for Mac support. There seems to be a major issue where the entire app or portions of the app become unresponsive to clicks or other events seemingly because a loss of focus. Sometimes it is recoverable by clicking around random parts of the window, but sometimes it is just stuck. Does anyone know how to get this under control, or perhaps start controlling which parts of the app get focus?
Also, when returning from modal states, focus seems to land on a random ui element. I would like to know how to control this.
Post not yet marked as solved
Does anyone know how IAPs and receipt validation is supposed to work when an iOS app is run on a new Arm Mac?
I have an iOS app which I'm pleased to discover runs well on my new Arm Mac mini. The app has non-consumable IAPs. At startup it parses the app receipt. A receipt is present, but my existing receipt validation code decides that it has the wrong hash. (This is with the app installed from the App Store, not a local build.)
I'm aware that receipt validation is different for native Mac apps, including catalyst apps (e.g. getting a device GUID from the ethernet MAC addresses etc.) But what is supposed to happen in the case of a regular iOS app running on macOS? Is this documented anywhere? Has anyone got IAPs working, with local receipt validation?
Post not yet marked as solved
Running macOS 11.0.1 (20B29) with Xcode 12.2 (12B45b), with a brand new Xcode project configured as follows
File -> New Project -> iOS -> App Interface: SwiftUI Lifecycle: UIKit App Delegate Language: Swift Uncheck all checkboxes
In xcodeproj target, select Mac checkbox
Run app on Mac
I get the following errors
2020-11-26 21:24:42.940494+0000 Test[85254:1719377] [UIFocus] Focus system disabled
2020-11-26 21:24:43.029918+0000 Test[85254:1719377] [UIFocus] Focus system enabled
2020-11-26 21:24:43.606709+0000 Test[85254:1719377] [UIFocus] Focus system disabled
In my actual app, I get a lot more of these - certain interactions like opening a popover can trigger them. If the last message was Focus system enabled, stuff works fine. If the last is Focus system disabled, a load of elements like Toggle and Slider aren't clickable. I couldn't figure out how to get it to end on an enabled state.
I also tested this on my DTK and get the same errors on the 11.1 Big Sur beta with 12.3 Xcode beta.
Facing new behavior and issues with my Mac Catalyst document-based app on macOS Big Sur 11.1 run on Intel processor.
A. Getting some new "Focus system enabled" and many "Focus system disabled" messages. Does anyone know what these messages are about?
B. But even worse after getting the following message: "Did present bridged document browser". Actually did not see that before. Does anyone know what this message is about?
Error: The first "Did present Bridget document browser" message appears when presenting the UIDocumentBrowserViewController, which maybe makes sense. After selecting and loading the document and transitioning to the document controller, the document content appears in the view. All fine so far. But then immediately the same message appears again and the view with the document disappears (without viewWillDisappear or anything) and the UIDocumentBrowserViewController is shown again. Hence it is not possible to open and update an existing document anymore! The creation of a new document is still possible and works fine.
Error: When opening a document from the Finder (outside the app), a "Save" window appears, which never did before. If you click "Save", it tells you that the file already exists and if you want to replace it. If you click "Replace", the document import fails with the alert message that the document can not be copied, because an item with the same name already exists. Hence it's not possible to open and update an existing document using the same name anymore!
Except for macOS Big Sur 11.1 the app runs fine on all platforms and versions: macOS 10.15.7, iPadOS 14.3, iOS 14.3. Using Xcode 12.3.
Post not yet marked as solved
It says UIRefreshControl is not supported when running Catalyst apps in the Mac idiom. Consider using a Refresh menu item bound to ⌘-R what would I need to do to fix this to make my apps work with Catalyst?
Post not yet marked as solved
It appears that on an Apple Silicon Macs, we cannot do unit tests for Swift Packages using Mac Catalyst.
Steps to produce:
0. Get an Apple Silicon Mac. Go to an empty folder, create a new Swift Package using swift package init.
Open the created Package.swift, select the running destination to be My Mac (Mac Catalyst).
Run the tests.
I was getting the following error:
code signature in [generated test path] not valid for use in process using Library Validation: Trying to load an unsigned library.
I did not get this issue on my Intel Mac. On Apple Silicon Macs, set the destination to an iOS simulator or a “pure” Mac destination also works.
How to bypass this issue, or is this a bug from Xcode? I am running the latest Xcode 12.3.
Post not yet marked as solved
Hi!
I have problem with Mac Catalyst.
I have written an application for iOS with SideBar/ToolBar. Everything is looking great and native.
But when I am trying to run it on Mac with Catalyst (with Optimise for Mac selected) Sidebar and Toolbar aren't looking Big Sur-native.
I know that SideBar should be List() with .listStyle(SidebarListStyle())
My project has new lifecycle, so I can't do anything in SceneDelegate.
import SwiftUI
@main
struct SpenTApp: App {
let persistenceController = PersistenceController.shared
var body: some Scene {
WindowGroup {
NavigationView {
SideBarView()
.environment(\.managedObjectContext, persistenceController.container.viewContext)
HomeView()
.environment(\.managedObjectContext, persistenceController.container.viewContext)
}
.navigationViewStyle(DoubleColumnNavigationViewStyle())
}
}
}
Post not yet marked as solved
Hi,
I can't create an ad-hoc distribution profile on App Store Connect.
I have registered different Mac UUIDs under my devices, but when I try to create a mac ad-hoc profile, I can't add them to the profile.
If I check "Include Mac Devices" they don't even appear.
Have you ever faced something similar? Is it a known bug?
I'm trying to distribute my Mac catalyst app to a few users with ad-hoc to try it out, but this seems impossible.
Post not yet marked as solved
On iOS emulator :I can select a printer from the UIPrinterPickerController dialog and retrieve the printer
I can connect to that printer with UIPrinter.contactPrinter
I can send multiple jobs to that printer silently (no dialog) with UIPrintInteractionController
Same code or any similar code on macOS Catalyst :Absolutely nothing is working. I see nothing, no dialog, no errors in the log.
Post not yet marked as solved
Working on the Mac Catalyst version of an iPad app. I don't know if this is a bug, intended behavior, or a setting I am missing. But how do you change (or what value is used) the app name shown in the main menu and the About box?
For example, let's say my app's "Bundle name" in Info.plist is "MyCoolApp" and the "Bundle display name" is "My Cool App".
When the app is run on iOS, I see "My Cool App" under the icon on the home screen. Perfect. But on the Mac, the app's main menu shows "MyCoolApp". Tapping on that menu includes the "About MyCoolApp" menu. The About box also shows "MyCoolApp" under the app icon. Other standard default menus also reference "MyCoolApp".
I want all of those to show "My Cool App", not "MyCoolApp".
What needs to be changed to get the "Bundle display name" to be used?