Hello
We use Datadog Mobile Vitals in our app and I'm trying to run some tools in Instruments for comparison. I'm not sure what tool should I use for some of those metrics:
Slow Renders
Description: With slow renders data, you can monitor which views are taking longer than 16ms or 60Hz to render.
Instruments equivalent: Hangs including microhangs (?)
CPU ticks per second
Description: RUM tracks CPU ticks per second for each view and the CPU utilization over the course of a session. The recommended range is <40 for good and <80 for moderate.
Instruments equivalent: CPU Profiler (?)
Frozen Frames -
Description: Frames that take longer than 700ms to render appear as stuck and unresponsive in your application. These are classified as frozen frames.
Instruments equivalent: Hangs with > 500ms (?)
Memory Utilization
Description: The amount of physical memory used by your application in bytes for each view, over the course of a session. The recommended range is <200MB for good and <400MB for moderate.
Instruments equivalent: Allocation (?)
Posts under iOS tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
🧠 Feature Proposal: Share & Delete Option for iOS Share Sheet
🔍 Problem:
Many users frequently share temporary content like group photos, screenshots, or memes. After sharing, these files often stay in the Photos or Files app, leading to storage clutter.
💡 Solution:
Introduce a "Share & Delete" option inside the default iOS Share Sheet.
📲 How it works:
User selects photo(s)/file(s)
Opens the Share Sheet
Sees two options:
📤 Share (Standard)
🗑️ Share & Delete (New Option)
After sharing, iOS prompts:
"Do you want to delete these items from your device?"
✅ Benefits:
Reduces storage usage
Simplifies file cleanup
Speeds up user workflow
🔐 Safety Considerations:
Confirm deletion after successful share
Show “Undo” or move to Recently Deleted
📂 Attribution:
Originally proposed by Vicky on July 20, 2025.
More Details & UI Mockup:
👉 GitHub: https://github.com/vicky2940/share-and-delete-feature
👉 Android Tracker Submission: https://issuetracker.google.com/issues/433195069
Please consider this small but impactful UX enhancement for future iOS versions.
Hi team, while i am using below code, i am getting two searchBar at top & bottom. Kindly refer below code & attached image
Code:
override func viewDidLoad() {
super.viewDidLoad()
title = "Test Data"
setupSearchData()
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
self.setupSearchData()
}
}
func setupSearchData() {
navigationController?.navigationBar.prefersLargeTitles = false
let searchController = UISearchController(searchResultsController: nil)
navigationItem.searchController = searchController
}
It is working fine for other iOS versions. In my real useCase, i will refresh screen after API completed, then this issue occurred in my app.
Hi everyone,
I’m testing our SwiftUI app on both Xcode simulator and a real iPhone. On the simulator, everything looks clean and aligned. But when I run it on an actual iPhone (same build, iOS 18), the layout looks broken—fonts overlap, spacing is off, and elements are misaligned.
Both screenshots are from the exact same screen and time. First is simulator, second is iPhone.
Any idea why this difference happens? Is there something I should check in terms of rendering or layout settings?
Thanks in advance!
When I ran the following code on a physical iPhone device that supports Apple Intelligence, I encountered the following error log.
What does this internal error code mean?
Image generation failed with NSError in a different domain: Error Domain=ImagePlaygroundInternal.ImageGeneration.GenerationError Code=11 “(null)”, returning a generic error instead
let imageCreator = try await ImageCreator()
let style = imageCreator.availableStyles.first ?? .animation
let stream = imageCreator.images(for: [.text("cat")], style: style, limit: 1)
for try await result in stream { // error: ImagePlayground.ImageCreator.Error.creationFailed
_ = result.cgImage
}
My team has been debugging problems with the SwiftUI List component this week.
We have found that it's performance is sub-optimal on iOS 16. You can see a simple grid of images, the scroll indicator stutters when scrolling down:
Now compare it to what happens when we use a ScrollView with a LazyVStack:
(An error occurred while uploading my second image, but pretend you see a scroll indicator moving smoothly down the side of the screen).
You can see the scroll indicator moves smoothly without issue.
We also found that the ScrollView combined with a LazyVStack properly calls onDisappear, which enables us to call a cancel method on the async image loading code that we use for our individual cells in this example. Though in a previous question, it was asserted that onDisappear cannot be reliably expected to be called in a List, I do not feel that answer is correct or proper behavior.
Is this a bug, or is this expected behavior on a List?
This is the cell that is being rendered:
struct UserGridCell: View {
let stackId: String
let user: ProfileGridCellUIModel
let userGridCellType: UserGridCellType
@State var labelFrame: CGRect = .zero
private var isOnlineAcessibilityValue: String {
return user.isOnline == true ? "" : ""
}
init(stackId: String,
user: ProfileGridCellUIModel,
userGridCellType: UserGridCellType
) {
self.stackId = stackId
self.user = user
self.userGridCellType = userGridCellType
}
var body: some View {
GeometryReader { containerGeometry in
ZStack(alignment: .bottom) {
HStack(spacing: 4) {
let statusAccentColor: Color = .red
Circle()
.frame(width: 8, height: 8)
.foregroundColor(statusAccentColor)
Text(String(user.remoteId) ?? "")
.lineLimit(1)
.foregroundColor(.black)
.overlay(GeometryReader { textGeometry in
Text("").onAppear {
self.labelFrame = textGeometry.frame(in: .global)
}
})
}
.frame(maxWidth: .infinity, alignment: .bottomLeading)
.padding(.leading, 8)
.padding(.trailing, 8)
.padding(.bottom, 8)
}
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom)
.contentShape(Rectangle())
.accessibilityLabel(Text(user.name ?? ""))
.accessibilityValue(isOnlineAcessibilityValue)
}
.background(
ZStack {
AsyncProfileImage(request: URLRequest(url: URL(string: "https://picsum.photos/id/\(100 + user.remoteId)/200/300")!))
}
.accessibilityHidden(true)
)
.overlay(
RoundedRectangle(cornerRadius: 4)
.stroke(.red, lineWidth: user.hasAnyUnreadMessages ? 4 : 0)
)
.cornerRadius(4)
}
}
This is the code that renders each cell:
struct ProfileGrid: View {
public static var AspectRatio: CGFloat = 0.75
@Environment(\.horizontalSizeClass) var horizontalSizeClass
@Environment(\.redactionReasons) private var reasons
private let stacks: [ProfileGridStackUIModel]
public init(stacks: [ProfileGridStackUIModel]
) {
self.stacks = stacks
}
var body: some View {
let columnCount: Int = 3
// If you use a list, you will get the stutter. If you use what you see below,
// it will render properly.
ScrollView {
LazyVStack {
ForEach(stacks, id: \.self) { stack in
Grid(stack: stack, columns: columnCount)
}
}
}
.buttonStyle(PlainButtonStyle())
.listStyle(PlainListStyle())
}
@ViewBuilder private func Grid(stack: ProfileGridStackUIModel, columns: Int) -> some View {
let chunks = stride(from: 0, to: stack.profiles.count, by: columns).map {
Array(stack.profiles[$0..<min($0 + columns, stack.profiles.count)])
}
ForEach(chunks, id: \.self) { chunk in
GridRow(chunk: chunk, stack: stack, columns: columns)
.listRowInsets(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0))
}
}
@ViewBuilder private func GridRow(chunk: [ProfileGridCellUIModel], stack: ProfileGridStackUIModel, columns: Int) -> some View {
let emptyElements = columns - chunk.count
HStack(spacing: 8) {
ForEach(chunk) { user in
UserGridCell(stackId: "id",
user: user,
userGridCellType: .grid)
.aspectRatio(ProfileGrid.AspectRatio, contentMode: .fill)
}
if emptyElements > 0 {
ForEach(0..<emptyElements, id: \.self) { _ in
Rectangle()
.foregroundColor(Color.clear)
.contentShape(Rectangle())
.frame(maxWidth: .infinity)
.aspectRatio(ProfileGrid.AspectRatio, contentMode: .fill)
}
}
}
}
}
Hello,
I am running into a bit of an issue with the Screen Timeout/Screen Lock setting and would like some clarification on.
First for a bit of context, I am enrolling personal iOS devices 18.0+ into the company MDM (Intune) with Account Driven User Enrollment. We are trying to set a screen timeout of 5 minutes and immediately after it asks for the passcode on the device, though this setting is not being applied and the device timeout setting can be set as "Never" on the user's end. This is a big security risk for the company I work for and and the issue with being HIPAA compliant.
According to the Microsoft Intune Support, "In iOS 18, when using Account-Driven User Enrollment for BYOD (Bring Your Own Device) scenarios, the screen lock timeout setting is indeed marked as “Not Applicable”. This is because Apple’s privacy-preserving model for personal devices restricts administrative control over system-level settings like screen lock or idle timeout."
I am needing clarification on the item mentioned from Microsoft Intune Support and if this setting is no longer able to be applied from the MDM with devices enrolled with Account Driven User Enrollment?
We are facing a serious issues with in app purchases in our app.
We offer 3 IAP: auto-renewable subscription 1W, auto-renewable subscription 1Y, non-consumable one-time purchase (LifeTime access)
In our case 90-95% of transactions fail and we mostly get SKError code=2 .
Sometime purchase fails several times for the same user so it’s very hard to believe that user intentionally cancels transaction for the same product 4 or even 5 times in a row.
It happens regardless iOS version, device model, our app version.
We've checked multiple threads with the same issue but coudn't find any solution.
We do not offer any promotions, product identifiers are valid... Some users are able to make a purchases without any issues.
I know there are several existing threads on this topic but things keep changing.
The release notes for Xcode 26 beta 3 have the following statements for a couple of resolved issues:
Asset Catalog
Fixed: Unable to set Icon Composer icon as alternate iOS icon (153305178) (FB18025356)
Icon Composer
Fixed: Icon Composer icons back deploy to older versions of iOS, macOS, and watchOS with inconsistent rendering. (152258860)
I had a working solution under beta 1 and beta 2 for both of these. But under beta 3, I am now seeing the new glass icons for my app when running on a simulated iOS 18 device. This is happening for both the main app icon and any alternates. This contradicts the statement that beta 3 fixes this issue.
There is no documentation (that I can find) describing how you are supposed to support old icons for iOS 18 and new glass icons for iOS 26. There is no documentation for how to support alternate glass icons for iOS 26.
What I'm doing at the moment (that worked before beta 3) was to have the normal iOS 18 app icons in the Asset catalog and to have the new glass icons added to the project. The filenames for the glass .icon files have the same name as the app icons in the Assets catalog. This worked under beta 1 and beta 2. And despite the Xcode 26 beta 3 release notes stating that Icon Composer icons no longer back deploy to iOS 18, I'm seeing the opposite. Beta 3 now does the opposite of that statement.
Does anyone have a working solution that supports old iOS 18 app icons and new iOS 26 glass icons using Xcode 26 beta 3?
Note, all of my testing is with simulated iOS devices and I'm running Xcode 26 beta 3 under macOS 15.5. Maybe that's an issue?
When using UIPageViewController inside a UITabBarController on iOS 26 with Liquid Glass adoption, visiting the PageViewController tab applies a blur effect to the navigation bar and tab bar even though the current child view controller of the pageView is not scrollable and does not reach behind these bars.
Questions:
Is this the expected behavior that the pageview's internal scroll view causes the bars to blur regardless of the page view's child content’s scrollability?
If so, is there an official way to make the blur effect appear only when the pageview's current child view controller actually scrolls behind the navigation bar or tab bar, and not in static cases?
Tried the same in SwiftUI using TabView and TabView with page style. Facing the same issue there as well.
Sample screenshots for reference,
Sample SwiftUI code,
struct TabContentView: View {
var body: some View {
TabView {
// First Tab: Paging View
PagingView()
.tabItem {
Label("Pages", systemImage: "square.fill.on.square.fill")
}
// Second Tab: Normal View
NavigationStack {
ListView()
}
.tabItem {
Label("Second", systemImage: "star.fill")
}
// Third Tab: Normal View
PageView(color: .blue, text: "Page 3")
.tabItem {
Label("Third", systemImage: "gearshape.fill")
}
}
.ignoresSafeArea()
}
}
struct PagingView: View {
var body: some View {
TabView {
PageView(color: .red, text: "Page 1")
PageView(color: .green, text: "Page 2")
PageView(color: .blue, text: "Page 3")
}
.tabViewStyle(.page) // Enables swipe paging
.indexViewStyle(.page(backgroundDisplayMode: .always))
.ignoresSafeArea()// Dots indicator
}
}
Hi everyone,
I've noticed a significant change in the visual behavior of List section headers between iOS 18 and iOS 26 beta that I'd like to clarify.
Current Behavior:
iOS 18 and earlier: Section headers with .listStyle(.plain) display with a translucent material background (regular material with blur effect) when pinned to the top during scrolling
iOS 26 beta: Section headers with .listStyle(.plain) appear with a transparent/clear background even when pinned to the top
Sample Code:
struct ContentView: View {
var body: some View {
NavigationStack {
List(1 ..< 5) { headerIndex in
Section {
ForEach(1...5, id: \.self) { rowIndex in
HStack {
Text("Row \(rowIndex)")
.frame(height: 40)
.padding(.horizontal)
.background(Color.blue)
Spacer()
Image(systemName: "chevron.right")
.foregroundStyle(.secondary)
.font(.title3)
}
}
} header: {
Text("Header \(headerIndex)")
.frame(height: 44)
}
.listRowSeparator(.hidden)
}
.listStyle(.plain)
.clipped()
}
}
}
Questions:
Is this change in header background behavior for .plain list style intentional in iOS 26?
If so, what's the recommended way to maintain the previous material background appearance when headers are pinned?
Should this be filed as feedback if it's unintended behavior?
Testing Environment:
Xcode 26.0 beta 3 (17A5276g)
iOS 26 beta (23A5287g) vs iOS 18.5
Tested on simulator
The translucent header background when pinned was quite useful for maintaining readability over scrolling content, so I'm hoping to understand if this is the new expected behavior or if there's a way to preserve the previous appearance.
Any insights would be greatly appreciated!
iOS 18.5
iOS 26 Beta
A method in my app now requires the override keyword when compiling with Xcode 26 beta / iOS 26 SDK, but if I add it, the current official Xcode 16.4 (iOS 18 SDK) throws a compile error. It's about 'toggleSidebar(_:)' in UIViewController.
The problem is:
Apple expects our apps to be ready for iOS 26 launch this fall, so I need to be actively developing and testing in the Xcode 26 beta now.
At the same time, I still need to submit updates to the App Store using the current official Xcode 16.4 until iOS 26 officially launches.
I'm using a single .xcodeproj file and can't keep manually adding/removing -DIOS_SDK_26_OR_LATER in Build Settings multiple times a day.
How to fix it and why isn't there a straightforward #if sdk(>=26.0) type of check for compile-time in Swift?
It's really frustrating to manage this override conflict.
I have discovered a gap in my understanding of user selected URLs in iOS, and I would be grateful if someone can put me right please.
My understanding is that a URL selected by a user can be accessed by calling url.startAccessingSecurityScopedResource() call. Subsequently a call to stopAccessingSecurityScopedResource() is made to avoid sandbox memory leaks.
Furthermore, the URL can be saved as a bookmark and reconstituted when the app is run again to avoid re-asking permission from the user.
So far so good.
However, I have discovered that a URL retrieved from a bookmark can be accessed without the call to url.startAccessingSecurityScopedResource(). This seems contrary to what the documentation says here
So my question is (assuming this is not a bug) why not save and retrieve the URL immediately in order to avoid having to make any additional calls to url.startAccessingSecurityScopedResource?
Bill Aylward
You can copy and paste the code below into a new iOS project to illustrate this. Having chosen a folder, the 'Summarise folder without permission' button fails as expected, but once the 'Retrieve URL from bookmark' has been pressed, it works fine.
import SwiftUI
import UniformTypeIdentifiers
struct ContentView: View {
@AppStorage("bookmarkData") private var bookmarkData: Data?
@State private var showFolderPicker = false
@State private var folderUrl: URL?
@State private var folderReport: String?
var body: some View {
VStack(spacing: 20) {
Text("Selected folder: \(folderUrl?.lastPathComponent ?? "None")")
Text("Contents: \(folderReport ?? "Unknown")")
Button("Select folder") {
showFolderPicker.toggle()
}
Button("Deselect folder") {
folderUrl = nil
folderReport = nil
bookmarkData = nil
}
.disabled(folderUrl == nil)
Button("Retrieve URL from bookmark") {
retrieveFolderURL()
}
.disabled(bookmarkData == nil)
Button("Summarise folder with permission") {
summariseFolderWithPermission(true)
}
.disabled(folderUrl == nil)
Button("Summarise folder without permission") {
summariseFolderWithPermission(false)
}
.disabled(folderUrl == nil)
}
.padding()
.fileImporter(
isPresented: $showFolderPicker,
allowedContentTypes: [UTType.init("public.folder")!],
allowsMultipleSelection: false
) { result in
switch result {
case .success(let urls):
if let selectedUrl = urls.first {
print("Processing folder: \(selectedUrl)")
processFolderURL(selectedUrl)
}
case .failure(let error):
print("\(error.localizedDescription)")
}
}
.onAppear() {
guard folderUrl == nil else { return }
retrieveFolderURL()
}
}
func processFolderURL(_ selectedUrl: URL?) {
guard selectedUrl != nil else { return }
// Create and save a security scoped bookmark in AppStorage
do {
guard selectedUrl!.startAccessingSecurityScopedResource() else { print("Unable to access \(selectedUrl!)"); return }
// Save bookmark
bookmarkData = try selectedUrl!.bookmarkData(options: .minimalBookmark, includingResourceValuesForKeys: nil, relativeTo: nil)
selectedUrl!.stopAccessingSecurityScopedResource()
} catch {
print("Unable to save security scoped bookmark")
}
folderUrl = selectedUrl!
}
func retrieveFolderURL() {
guard let bookmarkData = bookmarkData else {
print("No bookmark data available")
return
}
do {
var isStale = false
let url = try URL(
resolvingBookmarkData: bookmarkData,
options: .withoutUI,
relativeTo: nil,
bookmarkDataIsStale: &isStale
)
folderUrl = url
} catch {
print("Error accessing URL: \(error.localizedDescription)")
}
}
func summariseFolderWithPermission(_ permission: Bool) {
folderReport = nil
print(String(describing: folderUrl))
guard folderUrl != nil else { return }
if permission { print("Result of access requrest is \(folderUrl!.startAccessingSecurityScopedResource())") }
do {
let contents = try FileManager.default.contentsOfDirectory(atPath: folderUrl!.path)
folderReport = "\(contents.count) files, the first is: \(contents.first!)"
} catch {
print(error.localizedDescription)
}
if permission { folderUrl!.stopAccessingSecurityScopedResource() }
}
}
This happens when trying to connect to my development web server. The app works fine when connecting to my production server.
The production server has a certificate purchased from a CA.
My development web server has a locally generated certificate (from mkcert).
I have dragged and dropped the rootCA.pem onto the Simulator, although it doesn't indicate it has been loaded the certificate does appear in the Settings app and is checked to be trusted.
I have enabled "App Sandbox" and "Outgoing connections (Client)".
I have tested the URL from my local browser which is working fine.
What am I missing?
I have been trying for almost a week to get my app approved. It is like the Submission team doesn't even read my notes. The first complaint is that my app was for a specific business and shouldn't be for the general public. This is true, so I put in the notes that I had requested private distribution and I filled out the request for the app to be distributed privately. The review notes say that I need to distribute my app privately. This is very frustrating.
Also, they say the login button doesn't work. It works for everyone that uses it in the Test Flight. One nuance we have is that our servers will not respond to IP addresses that orginate outside of the US. I have this in caps in the notes. They still say that the Login button doesn't work. The app was written for iPhones, yet they keep testing it on an iPad.
There doesn't seem to be any way to communicate with the submission team other than through the test notes and they don't seem to be reading these. Can anyone direct me to where I can get some help on this?
Thanks,
Jim
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store
iOS
App Review
I have a transformation function that takes in data, executes some instructions, and returns an output. This function is dynamic and not shipped with the binary. Currently, I’m executing it using JavaScriptCore.JSContext, which works well, but the function itself is written in JavaScript.
Is there a way to achieve something similar using Swift – such as executing a dynamic Swift script, either directly or through other means? I know this is possible on macOS, but I’m not sure about iOS. I’ve also heard that extensions might open up some possibilities here. Any insights or alternative approaches would be appreciated.
Our application has initiated an NSURLSession data task, and we have received an initiation ID. However, Application not received callback on the subsequent activity: the task has not been requested, has not timed out, and no error callback has been received.
[06/17 09:29:40:559][ 0x282a7d8c0] Requested TaskIdentifier 120
2025-06-17 09:29:40.623337 +0530 nsurlsessiond SUBMITTING: com.apple.CFNetwork-cc-166-373-Task .<120>:A71666 default
2025-06-17 09:29:40.631280 +0530 dasd Submitted Activity: com.apple.CFNetwork-cc-166-373-Task .<120>:A71666 at priority 10 default
Seen couple of rejection with for CPUUsagePolicy and MemoryPressurePolicy
2025-06-17 09:29:40.989360 +0530 dasd com.apple.CFNetwork-cc-166-373-Task .<120>:A71666:[
{name: CPUUsagePolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{[Max allowed CPU Usage level]: Required:90.00, Observed:95.00},]}}
{name: MemoryPressurePolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{[memoryPressure]: Required:1.00, Observed:2.00},]}}
], FinalDecision: Must Not Proceed} default
2025-06-17 10:55:22.500277 +0530 dasd com.apple.CFNetwork-cc-166-373-Task .<120>:A71666:[
{name: MemoryPressurePolicy, policyWeight: 5.000, response: {Decision: Must Not Proceed, Score: 0.00, Rationale: [{[memoryPressure]: Required:1.00, Observed:2.00},]}}
], FinalDecision: Must Not Proceed} default
And more an hour later then it throws with an error BUT NEVER indicated the same to client
2025-06-17 10:55:27.426549 +0530 WAVE PTX Task .<120> is for <>.<>.<120> default
2025-06-17 10:55:27.776951 +0530 nsurlsessiond Task .<120> summary for task failure {transaction_duration_ms=5147145, response_status=-1, connection=0, reused=1, request_start_ms=0, request_duration_ms=0, response_start_ms=0, response_duration_ms=0, request_bytes=0, response_bytes=0, cache_hit=false} default
2025-06-17 10:55:27.777096 +0530 nsurlsessiond NDSession <714296D7-20F9-4A0A-8C31-71FB67F39A56> Task .<120> for client will be retried after error Error Domain=_nsurlsessiondErrorDomain Code=6 UserInfo={NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, _NSURLErrorRelatedURLSessionTaskErrorKey=, _NSURLErrorFailingURLSessionTaskErrorKey=} - code: 6 default
Then It got resumed and says successful but never got any callback on the same to client
2025-06-17 10:55:28.877245 +0530 nsurlsessiond NDSession <714296D7-20F9-4A0A-8C31-71FB67F39A56> Task .<120> resuming default
2025-06-17 10:55:55.225456 +0530 nsurlsessiond Task .<120> received response, status 401 content K default
2025-06-17 10:55:55.250371 +0530 nsurlsessiond Task .<120> finished successfully default
Please refer feedback for diagnose logs:
https://feedbackassistant.apple.com/feedback/18173303
Hi I have attempted to find a fix for my issue via documentation online and one phone support ( not code level support ) call to no end. I could continue to try various things but would like to see if someone else has encountered this issue and a fix for it.
Background: My Game app is live on App Store and has 1 classic leaderboard . I am now getting ready to submit an update to the app and it also entails adding a new recurring leaderboard. I added the leaderboard in App Store. I however have NOT uploaded my new build yet. I have also not added my leaderboards ( currently live and not live ) to any set.
When I try to submit scores using
GKLeaderboard.submitScore(_:context:player:leaderboardIDs:completionHandler:) to the new non-live leaderboard it works ( gives me no error )
When I try to load the scores from the new non-live leaderboard
GKLeaderboard.loadLeaderboards(IDs:completionHandler:)
loadEntries(for:timeScope:range:completionHandler:)
it fails. Error: "leaderboardID not found"
I could try ( and will )
uploading the new build to AppStore connect and associating the new leaderboard to it before testing again.
try associating each leaderboard to a set
Is there anything else that I should be aware of ?
Thanks in advance
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?
I installed the third beta of Xcode 26 with Xcode 16.4 installed on my machine. Once Xcode 26 was installed, all of my previous simulators were wiped out, leaving only the default iOS 26 simulators. I cannot create new simulators for iOS versions below 26. Here are my failed attempts to fix the issue:
Restarted Xcode 16.4 and my machine
Reinstalled the iOS 18.5 runtime
Uninstalled Xcode 26 and iOS 26 runtime
Reinstalled Xcode 16.4
Now, I literally cannot use a simulator in Xcode 16.4. Here is what I see when I try to create a new simulator in Xcode 16.4:
According to Xcode, the iOS 18.5 runtime is installed, so I have no idea what is going on. Is this a known issue? And how do I get Xcode 16.4 working with the iOS simulator?