iOS is the operating system for iPhone.

All subtopics
Posts under iOS topic

Post

Replies

Boosts

Views

Activity

Sharing file creates new UIScene each time, how to prevent this
I have an App which supports multiple windows on the iPad. The App can receive URLs from other Apps (via application.openURL()) and also files via "share sheet" (via UIActivityViewController). When receiving a URL from another App the delegate method scene(_ scene: UIScene, openURLContexts URLContexts: Set) will be called on an existing UIScene, however when a file is received through the share sheet from another App, a new UIScene is created and therefore also a new window (eg the delegates application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) and scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) are called). In both cases I do get the URL and file just fine, however I do not want to get new UIScenes and windows created when receiving a file via share sheet. How can I prevent to get a new UIScene or window? The received files should be used in the existing windows and should not create new ones.
0
0
91
Sep ’25
System Accessories Misaligned After Trait Override in UITableViewCells or UICollectionViewCells
I'm encountering an issue with system accessories in UICollectionViewCells after overriding the trait collection. Specifically, the accessories are misaligned and shifted downwards. This issue occurs when using setOverrideTraitCollection (other trait override methods produce the same result). Interestingly, this doesn't happen with all accessories; for example, the disclosureIndicator is scaled correctly. If I don't use setOverrideTraitCollection (or other trait override methods), the system accessories scale as expected. Here's a code snippet demonstrating the issue. I have a "Fix Size" button that overrides the trait collection to a UITraitCollection with a UIContentSizeCategory of large. The "Follow Settings" button resets the trait collection, allowing the views to scale according to the system settings. import UIKit class ViewController: UIViewController { let button: UIButton = { let button = UIButton(type: .system) button.setTitle("Fix Size", for: .normal) return button }() let buttonRe: UIButton = { let button = UIButton(type: .system) button.setTitle("Follow Settings", for: .normal) return button }() var listItems: [Int] = [1, 2, 3, 4, 5] var collectionView: UICollectionView? override func viewDidLoad() { super.viewDidLoad() button.addTarget( self, action: #selector(ViewController.buttonTapped), for: .touchUpInside ) buttonRe.addTarget( self, action: #selector(ViewController.buttonTappedToRe), for: .touchUpInside ) view.backgroundColor = .white view.addSubview(button) view.addSubview(buttonRe) setupCollectionView() if let collectionView = collectionView { view.addSubview(collectionView) } } override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() collectionView?.frame = CGRect( x: 0, y: 0, width: view.bounds.width, height: view.bounds.height - 100 ) button.frame = CGRect( x: 0, y: view.bounds.height - 100, width: view.bounds.width / 2, height: 50 ) buttonRe.frame = CGRect( x: view.bounds.width / 2, y: view.bounds.height - 100, width: view.bounds.width / 2, height: 50 ) } @objc func buttonTapped() { setOverrideTraitCollection( UITraitCollection(preferredContentSizeCategory: .large), forChild: self ) } @objc func buttonTappedToRe() { setOverrideTraitCollection(nil,forChild: self) } private func updateCollectionViewLayout() { guard let collectionView = collectionView else { return } collectionView.collectionViewLayout.invalidateLayout() collectionView.performBatchUpdates(nil) collectionView.reloadData() } private func setupCollectionView() { var config = UICollectionLayoutListConfiguration(appearance: .insetGrouped) config.trailingSwipeActionsConfigurationProvider = { [weak self] indexPath in let deleteAction = UIContextualAction(style: .destructive, title: "Delete") { [weak self] _, _, completion in self?.deleteItem(at: indexPath) completion(true) } return UISwipeActionsConfiguration(actions: [deleteAction]) } let layout = UICollectionViewCompositionalLayout.list(using: config) let collectionView = UICollectionView(frame: view.bounds, collectionViewLayout: layout) collectionView.delegate = self collectionView.dataSource = self collectionView.register(UICollectionViewListCell.self, forCellWithReuseIdentifier: "cell") collectionView.isEditing = true self.collectionView = collectionView } private func deleteItem(at indexPath: IndexPath) { listItems.remove(at: indexPath.item) guard let collectionView = collectionView else { return } collectionView.deleteItems(at: [indexPath]) } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) if previousTraitCollection?.preferredContentSizeCategory != traitCollection.preferredContentSizeCategory { updateCollectionViewLayout() } } } extension ViewController: UICollectionViewDataSource { func numberOfSections(in collectionView: UICollectionView) -> Int { return 1 } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return listItems.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! UICollectionViewListCell var content = UIListContentConfiguration.valueCell() content.text = "Item \(listItems[indexPath.item])" cell.contentConfiguration = content cell.accessories = [.delete( options: UICellAccessory.DeleteOptions( reservedLayoutWidth: .custom(50) ) )] return cell } } extension ViewController: UICollectionViewDelegate { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { collectionView.deselectItem(at: indexPath, animated: true) } } The attached screenshot illustrates the misalignment that occurs after tapping the 'Fix Size' button, with the system accessibility text size set to accessibilityExtraExtraExtraLarge setting Has anyone else experienced this issue or have suggestions on how to resolve it? Any help would be greatly appreciated!
0
0
116
Sep ’25
HCE Permission and Background Access for Corporate NFC Integration
Hello, We are currently developing an application that uses the Host-based Card Emulation (HCE) entitlement to enable corporate access functionality. With this entitlement, we have successfully established HCE communication and can interact with our access control systems to unlock doors. Our question is related to improving the user experience: We would like this access functionality to work without requiring the app to be in the foreground, as this adds friction for users during entry. Specifically, we would like to know: Is it possible for our app to coexist with Apple Wallet as the default contactless app, so that: Our app handles NFC interactions for corporate access (e.g., opening doors). Apple Wallet remains the default for payments. If that coexistence is not possible, and our app is set as the default contactless app, Will the system still need to launch our app into the foreground to complete a transaction (e.g., to emulate the NFC card)? Or is there a way to trigger HCE responses in the background (e.g., using a background process or service extension)? Any guidance on how to configure the app for optimal background access behavior, while maintaining compatibility with Wallet, would be greatly appreciated. Thank you in advance.
0
0
78
Sep ’25
Navigation title not visible in SplitViewController in macCatalyst on iOS 26
We are using a column style split view controller as root view of our app and in iOS26 the navigation titles of primary and supplementary view controllers are not visible and secondary view controller title is displayed in supplementary column. Looks the split view hidden all the child view controllers title and shown the secondary view title as global in macCatlayst. The right and left barbutton items are showing properly for individual view controllers. Facing this weird issue in iOS26 betas. The secondary navigation title also visible only when WindowScene,titlebar.titleVisibility is not hidden. Kindly suggest the fix for this issue as we can't use the secondary view navigation title for showing supplementary view's data. The issue not arises in old style split views or when the split view embedded in another splitView. Refer the sample code and attachment here let splitView = UISplitViewController(style: .tripleColumn) splitView.preferredDisplayMode = .twoBesideSecondary splitView.setViewController(SplitViewChildVc(title: "Primary"), for: .primary) splitView.setViewController(SplitViewChildVc(title: "Supplementary"), for: .supplementary) splitView.setViewController(SplitViewChildVc(title: "Secondary"), for: .secondary) class SplitViewChildVc: UIViewController { let viewTitle: String init(title: String = "Default") { self.viewTitle = title super.init(nibName: nil, bundle: nil) } override func viewDidLoad() { super.viewDidLoad() self.title = viewTitle self.navigationItem.title = viewTitle if #available(iOS 26.0, *) { navigationItem.subtitle = "Subtitle" } let leftbutton = UIBarButtonItem(barButtonSystemItem: .cancel, target: nil, action: nil) navigationItem.leftBarButtonItem = leftbutton let rightbutton = UIBarButtonItem(barButtonSystemItem: .add, target: nil, action: nil) navigationItem.rightBarButtonItem = rightbutton } }
0
0
247
Sep ’25
Video on Safari iOS - UI/UX of Shadow Content User Agent
Hi, when I display an HTML page with a on Safari iOS, I get a nice UI. Great! At the first look I see a video frame with an arrow-in-a-circle button in the middle. Very nice. I click on the arrow and I get a fullscreen view while the video begins to play. I watch the video then I pause it then I click on the top-left x button. So I go back to my html page and the video is perfectly there as it was before. But, there is an annoying new detail. The video frame is really dark, it still presents all the controls and a "different" arrow button to play it again. In other words that nice video-frame, that nice picture, is not longer visible on the page. That nice page with nice pictures has now an almost-black rectangle. Too bad. Sure I can click on the video (outside the controls) then the controls and the black overlaying frame disappear. I can see that nice picture again. Finally. Well, but the arrow-in-a-circle button to play the video disappeared. Now the user cannot longer understand that's a video to play. It looks just like any other pictures to admire statically. Is any way to get the previous first look of the video? The one clear, with the current frame and the arrow-in-a-circle look?
0
0
192
Apr ’25
Metal recommendedMaxWorkingSetSize vs actual RAM on iPhone (LLM load fails)
Context I’m deploying large language models on iPhone using llama.cpp. A new iPhone Air (12 GB RAM) reports a Metal MTLDevice.recommendedMaxWorkingSetSize of 8,192 MB, and my attempt to load Llama-2-13B Q4_K (~7.32 GB weights) fails during model initialization. Environment Device: iPhone Air (12 GB RAM) iOS: 26 Xcode: 26.0.1 Build: Metal backend enabled llama.cpp App runs on device (not Simulator) What I’m seeing MTLCreateSystemDefaultDevice().recommendedMaxWorkingSetSize == 8192 MiB Loading Llama-2-13B Q4_K (7.32 GB) fails to complete. Logs indicate memory pressure / allocation issues consistent with the 8 GB working-set guidance. Smaller models (e.g., 7B/8B with similar quantization) load and run (8B Q4_K provide around 9 tokens/second decoding speed). Questions Is 8,192 MB an expected recommendedMaxWorkingSetSize on a 12 GB iPhone? What values should I expect on other 2025 devices including iPhone 17 (8 GB RAM) and iPhone 17 Pro (12 GB RAM) Is it strictly enforced by Metal allocations (heaps/buffers), or advisory for best performance/eviction behavior? Can a process practically exceed this for long-lived buffers without immediate Jetsam risk? Any guidance for LLM scenarios near the limit?
0
0
514
Oct ’25
After iOS 18.4, files are called multiple times in WKWebView
Since the transition to iOS 18.4, we have been having an issue where when loading an m3u8 file specified in the src attribute of a video tag in WKWebView, the ts file is loaded repeatedly. Are there any good ideas for this? Also, if there have been any changes to the specifications of WKWebView, we would appreciate it if you could let us know.
0
0
349
May ’25
The UIRequiredDeviceCapabilities key in the Info.plist is still set up in such a way that the app will not install on the device used in review.
I've seen other similar posts with no clear answers and solutions. My Unity app has been rejected several times with this message: The UIRequiredDeviceCapabilities key in the Info.plist is still set up in such a way that the app will not install on the device used in review. Review device details: Device type: iPhone 13 mini OS version: iOS 18.4 Next Steps Please check the UIRequiredDeviceCapabilities key to verify that it contains only the attributes required for the app features or the attributes that must not be present on the device. Attributes specified by a dictionary should be set to true if they are required and false if they must not be present on the device. I have made sure the submitted app has only one value for UIRequiredDeviceCapabilities, arm64, which is required by Unity. Initially Metal was listed as well, but I've removed it in trying to fix this problem. Additionally, I've ran the app through TestFlight and it functions fine. I'm not sure what else to try to fix this issue, though I've seen from other posts that indicate this type of rejection could possibly be a bit of a red herring and the real issue could be something else. Any help would be appreciated
0
1
133
Apr ’25
Tab bar inline icon text .compact mode in size classes in iPad in iOS 18..4.1
I am trying to do inline to icon and text in tab bar but it is not allowing me to do it in compact, but it showing me in regular mode , but in regular mode tab bar going at top in portrait mode , But my requirement is tab bar required in bottom with icon and text in inline it showed by horizontally but it showing to me stacked vertically, will you guide me on this so that I can push the build to live users.
0
0
113
May ’25
Setting Required Capabilities for Foundation Models
Cross-posting this from https://developer.apple.com/forums/thread/795707 per ask from DTS Engineer: Is there any way to ensure iOS apps we develop using Foundation Models can only be purchasable/downloadable on App Store by folks with capable devices? I would've thought there would be a Required Capabilities that App Store would hook into for Apple Intelligence-capable devices, but I don't seem to see it in the documentation here: https://developer.apple.com/documentation/bundleresources/information-property-list/uirequireddevicecapabilities The closest seems to be iphone-performance-gaming-tier as that seems to target all M1 and above chips on iPhone & iPad. There is an ipad-minimum-performance-m1 that would more reasonably seem to ensure Foundation Models is likely available, but that doesn't help with iPhone. So far, it seems the only path would be to set Minimum Deployment to iOS 26 and add iphone-performance-gaming-tier as a required capability, but I'm a bit worried that capability might diverge in the future from what's Foundation Model / Apple Intelligence capable since we're really wanting the devices with Apple Neural Engine sufficient for Apple Intelligence features in the SDKs (like Foundaton Models, Image Playgrounds, Audio Transcription, etc.) While I understand for the majority of apps they'll want to just selectively add in Apple Intelligence features and so can be usable by folks whose devices don't support it, the app experience I'm building doesn't make sense without the Foundation Models being available and I'd rather not have a large number of users downloading the app to be told "Sorry, your device is not capable of Apple Intelligence and so can't use this app" I've created a Feedback Assistant ticket tracking the question/ask here: FB19366221
0
0
109
Aug ’25
Having an issues viewing application on testflight after successfully sending it to app store connect with eas
Hello, Im having an issue seeing my application appear in in testflight. as soon as i run the command eas submit - p ios --latest it completes and says Your binary has been successfully uploaded to App Store Connect! It is now being processed by Apple - you will receive an email when the processing finishes. It usually takes about 5-10 minutes depending on how busy Apple servers are. When it's done, you can see your build here: the app sometimes flashes on the screen in testflight then is gone forever This is an expo react native application.... I was able to submit builds but all of a sudden this started occuring.
0
0
131
Aug ’25
Sandbox restriction Error 159: Tap to Pay integration in iOS app
Hi all, I am hope someone could assist me with the below error if you ever ran into this during Tap-to-Pay functionality integration on iOS/iPadOS devices. Pre-condition: I have received required entitlements for the Tap-to-Pay integration and created Sandbox test account to validate my development work. Used updated development profile with the new capabilities required for the Integration. When i try to test my flow, i keep receiving this error, with multiple sandbox accounts in developer portal. Error (refreshContext): proxy error handler [ Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.merchantd.transaction was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.merchantd.transaction was invalidated: failed at lookup with error 159 - Sandbox restriction.} ] I greatly appreciate if anyone faced this issue or any knowledge on how to address this error. Thanks in advance. Best regards, Govardhan.
0
0
265
Jul ’25
Problem with login access and security on iOS 26, iPhone 13 Pro Max
Hi, I have an iPhone 13 Pro Max running iOS 26.0 (beta). After installing the update, I get a message stating that I need to update my Apple account settings. When I log in, it freezes and nothing can be done. I also can't access the login and security settings, as it also freezes and won't progress. Also, the option to install beta versions has disappeared. I don't know why? Could it be that since I have the latest beta, the option disappears until a new update? Please help!
0
0
215
Aug ’25
tabBarMinimizeBehavior not working if subview has TabView with .tabViewStyle(.page)
We are using a TabView as the TabBarController in our app for main navigation. On one of the tabs we have a view that consists of a TabView with .tabViewStyle(.page) in order to scroll horizontally between pages inside of that specific tab. The .tabBarMinimizeBehavior(.onScrollDown) works on all the other TabItem views, but for this one it does not recognise any vertical scrolling in any of the pages, in order to minimize the TabBar. I believe this is a bug? If we don't wrap the views inside the TabView with .page style, we are able to get the expected behaviour using the tabBarMinimizeBehavior. Please let us know if this is going to be fixed in a future iOS 26 beta release.
0
3
210
Jul ’25