Just watched the Targeting Content with Multiple Windows video. My app uses UIApplicationShortcutItem and UIApplication.shortcutItems.So I thought it would be useful to set the targetContentIdentifier property of each shortcut item so when the user selects one of the shortcuts, they can be brought to the mose appropriate scene in the app.But UIApplicationShortcurItem targetContentIdentifer is a read-only property. Is this is mistake?The documentation for UISceneActiviationConditions states (emphesis mine):Many different objects contain a targetContentIdentifier property, including NSUserActivity, UNNotificationContent, and UIApplicationShortcutItem. When creating those objects, fill that property with a value that uniquely describes the event and matches your scenes' predicates.Kind of hard to do when the property is read-only.Am I missing something or is this an API bug?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
For the stock Camera app there is a Grid setting. Is there any way to get a UIImagePickerController with a source type of Camera to honor that Grid setting? Or would this need to be an enhancement request for Apple?
As best as I can tell, the only messages sent to a MEMessageActionHandler for processing are those going to the Inbox. I'm trying to write a Mail extension that processes incoming messages, most importantly those that go straight to the Junk folder, but none of those messages go to the extension.
Is there some setting I may be missing or can a MEMessageActionHandler only process emails going to the Inbox?
Background:
I've had an app in the iOS app store for many years. Quite recently I published a Mac version of the app. The Mac version uses the same bundle id and the app is setup in App Store Connect to be the same app. It's my understanding that with this setup, if a user purchases the iOS version, they don't need to pay for the macOS version (or vice versa).
The iOS app started out as a paid app and was later transitioned to a free app with in-app purchases. The new macOS version also supports the same IAPs.
If it makes a difference, the macOS version is built from the iOS code base using Mac Catalyst.
The app uses old StoreKit1 on-device receipt validation.
Issue:
I have a longtime user of the iOS app that has recently installed the macOS version. Their attempt to restore purchases in the macOS version is not resulting in anything being restored. The user originally purchased the old iOS version before it had any in-app purchases.
I log diagnostic info in the app and the user sent me those logs. One of the things I show in the log is information from the receipt. The on-device receipt validation my app does is indicating it is a valid receipt.
The problem is that the receipt states the original version of the app corresponds to the new macOS build. i would expect the receipt to show the version originally purchased years ago on iOS.
Question:
What is supposed to happen in a case like this? When the macOS version of the app requests (and gets) an updated receipt, is the receipt supposed to show the original version as the first macOS version of the app or is it supposed to show the first downloaded version, regardless of OS?
What is the correct logic for restoring purchases if the macOS receipt has no indication of the user ever having used the iOS version for years?
Is there any way for a 3rd party macOS app to receive some sort of notification for a change to the Text Size accessibility setting in the Settings app? I have not been able to find any API for this. Several Apple apps (Mail, Notes, and others) update text size based on the setting. I'd like to do the same in my own macOS app.
Under macOS 26 and iPadOS, the Help menu in many cases has a menu item for "App Help". This item has the following icon:
I need to use this in my own app. I am unable to find this icon in SF Symbols 7 beta. I've scanned all of the icons under "What's New". I've searched for "help", "light", and "bulb" and this icon does not appear.
Does anyone know if it's even a new SF Symbol? Or does anyone know of a way to use this icon?
Before I file a bug report I wanted to verify that I'm not missing something.
If I setup a view controller in a navigation controller and I add a view with a constraint that lines it up with the view controller's view's layoutMarginsGuide (leadingAnchor or trailingAnchor), in several cases the view will not line up with buttons added in the navigation bar. Under iOS 18 everything lines up as expected.
To demonstrate, create a new iOS project based on Swift/Storyboard. Setup the storyboard to show a UINavigationController with one UIViewController. Then in ViewController.swift (the one embedded in the navigation controller), use the following code:
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .yellow
title = "Layout Margins"
let leftCancel = UIBarButtonItem(systemItem: .cancel)
navigationItem.leftBarButtonItem = leftCancel
let rightCancel = UIBarButtonItem(systemItem: .cancel)
navigationItem.rightBarButtonItem = rightCancel
let leftView = UIView()
leftView.backgroundColor = .blue
leftView.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(leftView)
let rightView = UIView()
rightView.backgroundColor = .red
rightView.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(rightView)
NSLayoutConstraint.activate([
leftView.widthAnchor.constraint(equalToConstant: 80),
leftView.heightAnchor.constraint(equalToConstant: 80),
leftView.leadingAnchor.constraint(equalTo: self.view.layoutMarginsGuide.leadingAnchor),
leftView.topAnchor.constraint(equalTo: self.view.layoutMarginsGuide.topAnchor),
rightView.widthAnchor.constraint(equalToConstant: 80),
rightView.heightAnchor.constraint(equalToConstant: 80),
rightView.trailingAnchor.constraint(equalTo: self.view.layoutMarginsGuide.trailingAnchor),
rightView.topAnchor.constraint(equalTo: self.view.layoutMarginsGuide.topAnchor),
])
}
}
This adds a "Cancel" button to both ends of the navigation bar and it adds two little square views lined up with the leading and trailing layout margins.
Here's the results:
iPad running iPadOS 26 beta 3 (note the misalignment). This is really jarring when trying to align another glass button below the cancel button:
iPad running iPadOS 18.5 (aligned just fine):
iPhone in portrait running iOS 26 beta (aligned just fine):
iPhone in landscape running iOS 26 beta (no alignment at all):
iPhone in portrait running iOS 18.5 (aligned just fine):
iPhone in landscape running iOS 18.5 (aligned just fine):
Under iOS 26 on an iPhone (simulator at least) in portrait, the cancel buttons line up with the colored squares. That's good. In landscape, the colored squares have much larger margins as expected (due to the larger safe areas caused by the notch), but the cancel buttons in the navigation bar are not using the same margins. This one is debatable. Under iOS 18 the cancel buttons use larger margins to match the larger safe area. But I can see why under iOS 26 they changed this since the navigation bar doesn't interfere with the notch. But it's inconsistent.
Under iOS 26 on an iPad (simulator at least), it's wrong in any orientation. Despite the lack of any notch or need for a larger safe area, the colored squares are indented just a bit more than the buttons in the navigation bar. I see no reason for this. Under iOS 18 everything lines up as expected.
My real question at this point: Is the mismatched margins on an iPad under iOS 26 between the buttons in the navigation bar and other views added to the view controller a likely bug or am I missing something?
Is anyone else using one of the "Dark" editor themes (such as "Default (Dark)" or "Classic (Dark)" in Xcode? And is anyone doing this with Xcode 26 on macOS 26?
Here's the result while using the "Default (Dark)" theme while my Mac is in "light" mode:
Note that the black background of the editor goes all the way to the far left edge of the Xcode window. The large gray area in the project tree is the black background bleeding through the sidebar.
This is really distracting. Is there a way to fix this (besides not using a dark theme - I've been using dark themes for over 30 years)? This appears to be a poor design decision in macOS 26 to have split views show the background of the secondary column behind the primary column. iPadOS 26 has the same issue (see https://developer.apple.com/forums/thread/800073).
I have an iPad app that supports multiple scenes.
I discovered some issues with my app's user interface that I would like to tweak based on whether the user has setup multitasking (in iPadOS 26) as "Full Screen Apps" or "Windowed Apps".
Is there any API or way to determine the current iPadOS 26 multitasking setting?
I've looked at UIDevice.current.isMultitaskingSupported and UIApplication.shared.supportsMultipleScenes. Both always return true no matter the user's chosen multitasking choice.
I also looked at UIWindowScene isFullScreen which was always false. I tried to look at UIWindowScene windowingBehaviors but that was always nil.
I'm looking for a way to make the following possible in Xcode (26.0 or later):
I select one or more lines of code. I then enter a hotkey (or select a menu item) that results in adding the line:
#ifdef SOME_MACRO
before the selection and adding the line:
#endif
after the selection.
Example:
Start with the following lines of code:
BOOL x = NO;
int y = 4;
NSString *str = @"Hello";
If I then highlight the int y = 4; line and use the proper hotkey or menu, the result would be:
BOOL x = NO;
#ifdef SOME_MACRO
int y = 4;
#endif
NSString *str = @"Hello";
Is something like this possible in Xcode?
I looked at code snippets but that doesn't seem to support wrapping existing code.
I looked at the Xcode Settings under Editor and Shortcuts and didn't see a way to add such a custom shortcut.
I have an Intel Mac running macOS Monterey 12.6. I'm running Xcode 14.2.
I created a new iOS project. I deleted the "Mac (Designed for iPad)" destination and added the "Mac (Mac Catalyst)" destination.
Unlike the iOS minimum deployment target, oddly there is no place to set the macOS minimum deployment target. I had to go to the target's Build Settings and change it there.
I then chose "My Mac (Mac Catalyst)" as the build target and built the project. So far, so good.
I then tried to run the app. I get a dialog with the following message:
Could not launch “SampleApp”
The app is incompatible with the current version of macOS. Please check the app's deployment target.
Clicking on the Details button gives lots of info. Some things I see are:
...
"device_osBuild" = "12.6 (21G115)";
...
"sdk_canonicalName" = "macosx13.1";
"sdk_osVersion" = "13.1";
But I'm not running macOS 13.1. I have macOS 12.6. Oddly there's no mention of the deployment target being set to 12.4 (which I set in the target's Build Settings).
If I go to Xcode -> Preferences -> Platforms, I see "macOS 13.1" listed as built-in. Tapping on the + button there is no option for macOS.
So my question is how do I support running a Mac Catalyst app on an Intel Mac running macOS 12.6 while using Xcode 14.2?
Can it be done? What steps do I need to take?
I've reloaded the project. I've restarted Xcode. I've done a clean build. Nothing changes.
While working on the Mac Catalyst version of my iOS app, I noticed something interesting. I have a UITextView with the allowsEditingTextAttributes property enabled. When running the app on a Mac, the context menu that appears when right-clicking inside the UITextField includes the menu item "Import from iPhone or iPad". That brings up a menu with 3 options each for my iPhone and iPad that I happen to connected to my Mac recently. There options include "Take Photo", "Scan Documents", and "Add Sketch".
I created a brand new iOS app project and simply added a UITextView to the main view controller. After setting allowsEditingTextAttributes to true, it shows the same behavior.
Some questions:
Is this documented anywhere? I'm guessing this is related to Continuity Camera in some way. But there's no mention of this anywhere that I've seen so far.
How can I prevent this menu from appearing? Nothing related to these menus comes through the canPerformAction(_:withSender:) method. And nothing related to these menus is part of the menu item array sent to the UITextViewDelegate textView(_:editMenuForTextIn:suggestedActions:) method. I need to remove this menu in my app because while I support some text attributes (bold, italic, underline), I do not want to allow pictures to be added.
Does anything else in iOS under Mac Catalyst automatically get similar support? If so, what?
I have a brand new macOS app (built with Mac Catalyst and based on a long existing iOS app) I've submitted to App Store Connect for review. It was rejected due to my Contacts purpose string not being deemed sufficient (despite being the same one the iOS version of the app has been using for years).
Anyway, I made a change to the privacy string and submitted a new build. The new build was rejected and a screenshot showed the About screen with the new build number as well as the privacy string from the original build, not the new build. So I verified that my archive did in fact have an Info.plist with the updated privacy string. So I resubmitted that build again for review and it was rejected again for the same reason. Despite the reviewer claiming, at my request, that a fresh install of the latest build was used.
So I changed the privacy string again and submitted a 3rd new build, again verifying the archive that I was sending through the Xcode Organizer did have the updated (now 3rd) privacy string.
And again the app has been rejected. Despite 2 new builds, the reviewers are still seeing the original privacy string.
Does anyone have any ideas on how to get this resolved?
I'm running macOS 15.5. I now have Xcode 26 and I'm testing my iOS app against iOS 26. I've encountered several UIKit / iOS 26 bugs I'd like to report. In Feedback Assistant I choose "Developer Technologies & SDKs". Eventually I get asked "What build does the issue occur on?". The list of choices is:
iOS 18.2 Seed 4
iOS 18.1.1
iOS 17.7.2
An earlier iOS build
I'm not sure
So how to I report this as an iOS 26 beta 1 issue?
My UIKit/Mac Catalyst app supports a user opening multiple windows (multiple scenes). One of these is a special scene that shows content that I want to appear in front of all other app windows/scenes, even while the user is interacting with one of the app's other scenes. I do not need this special scene to stay in front of the windows of other apps, just in front of the windows of my own app.
While I'm not 100% sure, it seems that AppKit supports this through the NSWindow level property. I can't find any equivalent feature in UIKit/Mac Catalyst. UIWindow windowLevel is not the same thing since that only affects the order of windows within a given scene. I need an entire scene (and its windows) to stay in front of my app's other scenes (and their windows).
I don't see anything relevant in UIWindow, UIScene, UIWindowScene, UISceneSession, UIScene.ActivationRequestOptions, or UIWindowScene.ActivationRequestOptions.