iOS is the operating system for iPhone.

Posts under iOS tag

200 Posts

Post

Replies

Boosts

Views

Activity

ParticleEmitterComponent Position Offset Issue After iOS 26.1 Update – Seeking Solutions & Workarounds
Problem Summary After upgrading to iOS 26.1 and 26.2, I'm experiencing a particle positioning bug in RealityKit where ParticleEmitterComponent particles render at an incorrect offset relative to their parent entity. This behavior does not occur on iOS 18.6.2 or earlier versions, suggesting a regression introduced in the newer OS builds. Environment Details Operating System: iOS 26.1 & iOS 26.2 Framework: RealityKit Xcode Version: 16.2 (16C5032a) Expected vs. Actual Behavior Expected: Particles should render at the position of the entity to which the ParticleEmitterComponent is attached, matching the behavior on iOS 18.6.2 and earlier. Actual: Particles appear away from their parent entity, creating a visual misalignment that breaks the intended AR experience. Steps to Reproduce Create or open an AR application with RealityKit that uses particle components Attach a ParticleEmitterComponent to an entity via a custom system Run the application on iOS 26.1 or iOS 26.2 Observe that particles render at an offset position away from the entity Minimal Code Example Here's the setup from my test case: Custom Component & System: struct SparkleComponent4: Component {} class SparkleSystem4: System { static let query = EntityQuery(where: .has(SparkleComponent4.self)) required init(scene: Scene) {} func update(context: SceneUpdateContext) { for entity in context.scene.performQuery(Self.query) { // Only add once if entity.components.has(ParticleEmitterComponent.self) { continue } var newEmitter = ParticleEmitterComponent() newEmitter.mainEmitter.color = .constant(.single(.red)) entity.components.set(newEmitter) } } } AR Setup: let material = SimpleMaterial(color: .gray, roughness: 0.15, isMetallic: true) let model = Entity() model.components.set(ModelComponent(mesh: boxMesh, materials: [material])) model.components.set(SparkleComponent4()) model.position = [0, 0.05, 0] model.name = "MyCube" let anchor = AnchorEntity(.plane(.horizontal, classification: .any, minimumBounds: [0.2, 0.2])) anchor.addChild(model) arView.scene.addAnchor(anchor) Questions for the Community Has anyone else encountered this particle positioning issue after updating to iOS 26.1/26.2? Are there known workarounds or configuration changes to ParticleEmitterComponent that restore correct positioning? Is this a confirmed bug, or could there be a change in coordinate system handling or transform inheritance that I'm missing? Additional Information I've already submitted this issue via Feedback Assistant(FB21346746)
0
0
11
2h
ParticleEmitterComponent Position Offset Issue After iOS 26.1 Update – Seeking Solutions & Workarounds
Problem Summary After upgrading to iOS 26.1 and 26.2, I'm experiencing a particle positioning bug in RealityKit where ParticleEmitterComponent particles render at an incorrect offset relative to their parent entity. This behavior does not occur on iOS 18.6.2 or earlier versions, suggesting a regression introduced in the newer OS builds. Environment Details Operating System: iOS 26.1 & iOS 26.2 Framework: RealityKit Xcode Version: 16.2 (16C5032a) Expected vs. Actual Behavior Expected: Particles should render at the position of the entity to which the ParticleEmitterComponent is attached, matching the behavior on iOS 18.6.2 and earlier. Actual: Particles appear away from their parent entity, creating a visual misalignment that breaks the intended AR experience. Steps to Reproduce Create or open an AR application with RealityKit that uses particle components Attach a ParticleEmitterComponent to an entity via a custom system Run the application on iOS 26.1 or iOS 26.2 Observe that particles render at an offset position away from the entity Minimal Code Example Here's the setup from my test case: Custom Component & System: struct SparkleComponent4: Component {} class SparkleSystem4: System { static let query = EntityQuery(where: .has(SparkleComponent4.self)) required init(scene: Scene) {} func update(context: SceneUpdateContext) { for entity in context.scene.performQuery(Self.query) { // Only add once if entity.components.has(ParticleEmitterComponent.self) { continue } var newEmitter = ParticleEmitterComponent() newEmitter.mainEmitter.color = .constant(.single(.red)) entity.components.set(newEmitter) } } } AR Setup: let material = SimpleMaterial(color: .gray, roughness: 0.15, isMetallic: true) let model = Entity() model.components.set(ModelComponent(mesh: boxMesh, materials: [material])) model.components.set(SparkleComponent4()) model.position = [0, 0.05, 0] model.name = "MyCube" let anchor = AnchorEntity(.plane(.horizontal, classification: .any, minimumBounds: [0.2, 0.2])) anchor.addChild(model) arView.scene.addAnchor(anchor) Questions for the Community Has anyone else encountered this particle positioning issue after updating to iOS 26.1/26.2? Are there known workarounds or configuration changes to ParticleEmitterComponent that restore correct positioning? Is this a confirmed bug, or could there be a change in coordinate system handling or transform inheritance that I'm missing? Additional Information I've already submitted this issue via Feedback Assistant(FB21346746)
0
0
14
2h
Disconnect from AirPlay device programmatically
Hello there, I'm trying to implement feature which uses AirPlay with Apple TV. I want to disconnect from the device programmatically when something happens. Under something I mean a situation when a user wants to stop broadcasting (for example close the PiP window on his phone). I use this snippet: try audioSession.setCategory(.playAndRecord, options: .defaultToSpeaker) try audioSession.setActive(true, options: .notifyOthersOnDeactivation) It works fine sometimes but not always (it works on iOS 18 but it doesn't on iOS 17 or ). So I thought it's a bug and create a ticker to feedback assistant (FB21220013). The support told me write a post on the forum.
2
0
151
2h
Apple Pay In-App Provisioning – Apple server failure when adding a card
During Apple Pay in-app provisioning (EV_ECC_v2), our iOS app successfully obtains the issuer provisioning certificates and generates cryptographic material. The flow fails when Apple posts the card blob to Apple’s broker (card creation step), returning HTTP 500 from .../broker/v4/devices/{SEID}/cards. Steps: Call issuerProvisioningCertificates?encryptionVersion=EV_ECC_v2 → 200 OK; returns ECC leaf + Apple Root CA chain; nonce=2a831be4. 2. Build {encryptedCardData, activationData, ephemeralPublicKey} 3. POST /broker/v4/devices/{SEID}/cards Expected: 200 OK on /broker/v4/devices/{SEID}/cards, or 5xx with a descriptive error if payload/cryptography is invalid. Observed: 500 Internal Server Error from Apple broker on /cards (labeled “eligibility” in PassKit logs), causing a terminal failure in Wallet UI.
1
0
17
2h
Apple CDN connection error after changing server ip version to v6
The universal links for my apps stopped working. The server where the AASA files where hosted worked on IPV4 exclusively, a few days ago i changed the configuration to IPV6 only. I´ve created new IPV6 entries, renewed all certifactes and deleted all IPV4 entries for the domains. All seemed fine, but at Saturday I realized that my universal links stopped working for new user. What i´ve done to find the issue: Example domain that was used for debugging: "https://developffw.burns.fun" I´ve verified the AASA file is hosted properly by using different browsers and Postman to retrieve it. The file can be accessed and the certificates look fine. Output of curl -v https://developffw.burns.fun/.well-known/apple-app-site-association * Host developffw.burns.fun:443 was resolved. * IPv6: 2a01:4f8:13b:340a::2 * IPv4: (none) * Trying [2a01:4f8:13b:340a::2]:443... * schannel: disabled automatic use of client certificate * ALPN: curl offers http/1.1 * ALPN: server accepted http/1.1 * Established connection to developffw.burns.fun (2a01:4f8:13b:340a::2 port 443) from 2a00:79c0:65c:8b00:80ee:175b:3e2a:1e7d port 61014 * using HTTP/1.x > GET /.well-known/apple-app-site-association HTTP/1.1 > Host: developffw.burns.fun > User-Agent: curl/8.16.0 > Accept: */* > * Request completely sent off < HTTP/1.1 200 OK < Server: nginx/1.22.1 < Date: Mon, 15 Dec 2025 11:34:22 GMT < Content-Type: application/octet-stream < Content-Length: 329 < Last-Modified: Sat, 21 Dec 2024 08:53:11 GMT < Connection: keep-alive < ETag: "676681f7-149" < Accept-Ranges: bytes < { "applinks": { "details": [ { "appIDs": [ "6LN7G8JEA5.burns.FFW-Manager-SwiftUI.Debug"], "components": [ { "/": "/onboard", "?": { "id": "*"}, "?": { "name": "*"}, "?": { "token": "*" } } ] } ] } } * Connection #0 to host developffw.burns.fun:443 left intact I took a look at the headers from the Apple CDN network response. These indicate some sort of connection error. The response code is 404 Response headers: Apple-Failure-Details: {"cause":"dial tcp [2a01:4f8:13b:340a::2]:443: connect: network is unreachable"} Apple-Failure-Reason: SWCERR00305 Network error Apple-From: https://betaffw.burns.fun/.well-known/apple-app-site-association Apple-Try-Direct: false Via: https/1.1 defra2-vp-vst-003.ts.apple.com (acdn/268.16305), https/1.1 defra2-vp-vfe-004.ts.apple.com (acdn/268.16305), http/1.1 defra2-xdc-mx-028.ts.apple.com (acdn/3.16363), https/1.1 defra1-edge-fx-021.ts.apple.com (acdn/3.16363) X-Cache: hit-stale, miss, hit-fresh, miss CDNUUID: 4321f35e-b73b-4031-a054-7c63af69e126-712221049 Took a look at the log files of the server. I can´t find any entry from the Apple servers neither in the default logs nor in the error log entries. The curl attempts are logged with response code 200. I´ve tried sudo swcutil dl -d https://developffw.burns.fun/onboard in the Terminal on my MAC. Output: The operation couldn´t be completed. (SWCErrorDomain error 8.) This indicates to me threre is an issue for the Apple servers accessing my server. But I don´t know what could be the reason. There is no firewall configuration that could block the requests. And there has been no change at all besides the IPV4 / IPV6 protocol change. This issue is the same for all the domain listed on this server. I´v even created a new app for this purpose and created a new AASA entry and associated link. Same issue. I´m pretty much lost here. Everything looks fine from my side. Google assetlinks.json seem to work fine. I would really appreciate some help on how to solve this, i´m at my wits end.
3
0
57
16h
CIRAWFilter.outputImage first-time cost is huge (~3s), subsequent calls are ~3ms. Any official way to pre-initialize RAW pipeline (without taking a real photo)?
Hi Apple Developer Forums, I’m developing an iOS camera app that processes RAW captures using Core Image. I’m seeing a large “first use” performance penalty specifically when creating the CIImage from CIRAWFilter.outputImage. What’s slow (important detail) I’m measuring the time for: let rawFilter = CIRAWFilter(imageData: rawData, identifierHint: hint) let ciImage = rawFilter.outputImage This is not CIContext.render(...) / createCGImage(...). It’s just the time to access outputImage (i.e., building the Core Image graph / RAW pipeline setup). Observed behavior First time accessing CIRAWFilter.outputImage: ~3 seconds Second time (same app session, similar RAW): ~3 milliseconds So something heavy is happening only on first use (decoder initialization, pipeline setup, shader/library compilation, caching, etc.). Using Metal System Trace, I also noticed that during the slow first call there are many “Create MTLLibrary” events, while the second call doesn’t show this pattern. Warm-up attempts using bundled DNG I tried to “warm up” early (e.g., on camera screen entry) by loading a bundled DNG and then accessing CIRAWFilter.outputImage by taking a photo: Warm-up with a ~247 KB DNG → first real RAW outputImage cost drops to ~1.42s Warm-up with a ~25 MB DNG → first real RAW outputImage cost drops to ~843ms This helps, but it’s still far from the steady-state ~3ms. Warm-up by capturing a real RAW (works, but concerns) The only method that fully eliminates the delay is to trigger a real RAW capture programmatically before the user’s first photo, then use that captured rawData to warm up the CIRAWFilter.outputImage path. This brings the first user-facing capture close to the steady-state timing. However: In some regions, the camera shutter sound cannot be suppressed, so “hidden warm-up capture” is unacceptable UX. I’m also unsure whether triggering a real capture without an explicit user action could raise compliance/privacy concerns, even if the image is immediately discarded and never saved/uploaded. Questions Is the large first-time cost of CIRAWFilter.outputImage expected (RAW pipeline initialization / shader compilation)? Is there an Apple-recommended way to pre-initialize the Core Image RAW pipeline / Metal resources so the first outputImage is fast, without taking a real photo? Are there any best practices (e.g. CIContext creation timing, prepareRender(...), specific options) that reliably reduce this first-use overhead for CIRAWFilter? Attachments Figure 1: First RAW capture with no warm-up (~3s outputImage time) Figure 2: First RAW capture after warm-up with bundled DNG (improved but still hundreds of ms) Thanks for any guidance or experience sharing!
2
0
182
19h
How to add view below navigation bar to extend scroll edge effect
Hello! What UIKit API enables you to add a view below the navigation bar and extend the scroll edge effect below it in iOS 26? safeAreaBar is how you do it in SwiftUI but I need to achieve this design in my UIKit app (which has a collection view in a view controller in a navigation controller). struct ContentView: View { let segments = ["First", "Second", "Third"] @State private var selectedSegment = "First" var body: some View { NavigationStack { List(0..<50, id: \.self) { i in Text("Row \(i + 1)") } .safeAreaBar(edge: .top) { Picker("Segment", selection: $selectedSegment) { ForEach(segments, id: \.self) { Text($0) } } .pickerStyle(.segmented) .padding(.horizontal) .padding(.bottom, 8) } .navigationTitle("Title") .navigationBarTitleDisplayMode(.inline) } } }
3
1
337
1d
Importing files to Files.app in iOS 26 Simulator
In previous versions of the simulator, it was possible to import files into the Files app by dragging them from the Finder into the Simulator. It appears that in the iOS 26 Simulator, this opens the file in Safari. I've only tried it with .json files so far. The documentation at https://developer.apple.com/documentation/xcode/sharing-data-with-simulator says that the original behaviour should happen: To add files to Simulator, select one or more files in Finder on your Mac, then click the Share button. Select Simulator from the share destination list. Choose the simulated device from the drop-down list. Simulator opens the Files app, and lets you select where to save the files. I'd love to learn if this is intentional behaviour, and if so, what workarounds there might be. I use this pattern quite a lot, as I have a HealthKit app, and I've built a system that allows me to export workouts as JSON files from a real device, that I can then import into a simulator for testing. Edit: I found a workaround. Make a folder in Files.app, then search for it within ~/Library/Developer/CoreSimulator/Devices. Open the folder in Finder, then add any files you want to be available in the Simulator.
7
6
324
2d
BGContinuedProcessingTask register block not called, submit does not throw an error
I implemented BGContinuedProcessingTask in my app and it seems to be working well for everyone except one user (so far) who has reached out to report nothing happens when they tap the Start Processing button. They have an iPhone 12 Pro Max running iOS 26.1. Restarting iPhone does not fix it. When they turn off the background processing feature in the app, it works. In that case my code directly calls the function to start processing instead of waiting for it to be invoked in the register block (or submit catch block). Is this a bug that's possible to occur, maybe device specific? Or have I done something wrong in the implementation? func startProcessingTapped(_ sender: UIButton) { if isBackgroundProcessingEnabled { startBackgroundContinuedProcessing() } else { startProcessing(backgroundTask: nil) } } func startBackgroundContinuedProcessing() { BGTaskScheduler.shared.register(forTaskWithIdentifier: taskIdentifier, using: .main) { @Sendable [weak self] task in guard self != nil else { return } startProcessing(backgroundTask: task as? BGContinuedProcessingTask) } let request = BGContinuedProcessingTaskRequest(identifier: taskIdentifier, title: title, subtitle: subtitle) request.strategy = .fail if BGTaskScheduler.supportedResources.contains(.gpu) { request.requiredResources = .gpu } do { try BGTaskScheduler.shared.submit(request) } catch { startProcessing(backgroundTask: nil) } } func startProcessing(backgroundTask: BGContinuedProcessingTask?) { // FIXME: Never called for this user when isBackgroundProcessingEnabled is true }
8
0
205
2d
iOS 17 CarPlay message notification navigating to app instead of announcing messages
After the update to iOS 17, tapping on message notification shown on CarPlay Dashboard is navigating to the CarPlay app instead of announcing the message notification. Announce Notifications turned ON Announce Messages turned ON Announce New Messages option is selected Other apps message notifications are announced as expected when tapping on the notification implying that the settings are set as required. Enabled com.apple.developer.carplay-communication Class CustomCarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate { func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController) func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didDisconnectInterfaceController interfaceController: CPInterfaceController) func scene(_ scene: UIScene, willContinueUserActivityWithType userActivityType: String) }
1
0
910
3d
关于 WKWebView 加载本地文件时 localStorage 数据丢失的情况
在 iOS 平台使用 WKWebView 通过file://协议加载本地 HTML 文件时,存储在localStorage中的数据会在 App 后台切换、进程重启后偶尔丢失;但相同代码在安卓 / 鸿蒙平台无此问题。 现在的文档 仅明确了「默认数据存储(defaultDataStore)可将网站数据持久化到磁盘,非持久化存储(nonPersistent)仅存内存」的基础规则; 未提及「file://协议内容即使使用默认持久化存储,也会被归为临时内存存储」这一关键场景限制; 仅在WKURLSchemeHandler关联说明中隐含「自定义 URL 协议可处理 WebKit 原生不支持的 URL 方案」,但未直接关联file://的存储问题。 我找不到如何处理这个问题的官方文档,仅仅有其他的博客说需要增加http/https加载就没有这个问题。 请提供给我官方文档或者官方回复 关于出现这种file:/加载html出现问题的处理办法
2
0
174
3d
Can Critical Alerts Trigger Text-to-Speech and Vibration in Background & Terminated State?
Hello All, I want to implement Text-to-Speech (TTS) and vibration functionality when a push notification arrives. In my app, I am already using Critical Alerts, and the critical alert sound plays correctly in all app states. However, I need to confirm whether it is possible to trigger Text-to-Speech and custom vibration in all app states: Foreground Background Terminated (killed) state My Questions: Is it technically possible for iOS to run Text-to-Speech (using AVSpeechSynthesizer) when a critical alert notification arrives in background or terminated state? Is it possible to trigger custom vibration patterns from a critical alert when the app is not running? If yes, can someone please provide guidance or sample code on how to implement this? If no, can Apple explain the limitation or provide documentation confirming that TTS and vibration cannot be triggered in background/kill states? What works currently: TTS and vibration only work in foreground when the app is active. Critical alert sound works correctly in all states. I want confirmation on whether iOS supports background/terminated TTS and vibration, or if this is a platform restriction even when using Critical Alerts. Thank you!
1
0
264
3d
@state update not reflecting on UI.
I’m facing an issue in our native iOS app that occurs specifically on iOS 26.1 (not observed on any lower versions). When I update a @State field value, the UI does not reflect the change as expected. The @State variable updates internally, but the view does not re-render. This behaviour started after upgrading to iOS 26.1. Works fine on iOS 26.0 and earlier versions. Has anyone else encountered this issue or found a workaround? Any insights or suggestions would be greatly appreciated.
5
0
207
4d
iOS 26 didRegisterForRemoteNotificationsWithDeviceToken is not being called
We have an app in Swift that uses push notifications. It has a deployment target of iOS 15.0 I originally audited our app for iOS 26 by building it with Xcode 26 beta 3. At that point, all was well. Our implementation of application:didRegisterForRemoteNotificationsWithDeviceToken was called. But when rebuilding the app with beta 4, 5 and now 6, that function is no longer being called. I created a simple test case by creating a default iOS app project, then performing these additional steps: Set bundle ID to our app's ID Add the Push Notifications capability Add in application:didRegisterForRemoteNotificationsWithDeviceToken: with a print("HERE") just to set a breakpoint. Added the following code inside application:didFinishLaunchingWithOptions: along with setting a breakpoint on the registerForRemoteNotifications line: UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .alert, .sound]) { granted, _ in DispatchQueue.main.async { UIApplication.shared.registerForRemoteNotifications() } } Building and running with Xcode 26 beta 6 (17A5305f) generates these two different outcomes based upon the OS running in the Simulator: iPhone 16 Pro simulator running iOS 18.4 - both breakpoints are reached iPhone 16 Pro simulator running iOS 26 - only the breakpoint on UIApplication.shared.registerForRemoteNotifications is reached. Assuming this is a bug in iOS 26. Or, is there something additional we now need to do to get push notifications working?
7
4
899
5d
Unexpected behavior with multiple apps installed which use shared groups
If I have two iOS apps, with bundle ids com.mycompany.A and com.mycompany.B, and they both have the shared group id of group.com.mycompany.B, then they can read/write data to same file (in shared defaults or, for example, a Realm database saved to the same shared group location). What I have noticed is that if both apps get installed and some data X written to shared defaults (but data which isn't accessed by both apps i.e. if only app A uses this data), then if app A is deleted and reinstalled then X is not deleted in this situation (unless both apps A and B are deleted). I guess that is to be expected as they both use the same group id and the OS won't clear that area out unless both apps are deleted. However I think I am seeing a situation where if app A has group.com.mycompany.A as its group and app B has group.com.mycompany.B as its group, then this is still the same situation - data written by app B for doesn't get deleted if only app B is deleted/reinstalled on the phone. It won't get deleted unless both app B and A are deleted from the phone. This is not what I was expecting. I need to perform some more checks (its more complex to verify as app A is developed by one company and app B by another), but if this were to be the case would this be unexpected behavior by the OS? Presumably it would be unexpected as the container should be identified by the full group id and not a partial portion of the group id right?
2
0
52
5d
CallKit does not activate audio session with higher probability after upgrading to iOS 18.4.1
Hi, We've noticed that this issue occurs more frequently after upgrading to iOS 18.4.1 and can result in one-way audio. Our app uses CallKit with WebRTC to establish VoIP connections. However, on iOS 18.4.1, CallKit no longer triggers: func provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) We're currently comparing the occurrence rate across different iOS versions to better understand the impact. Could you please help analyze the root cause of this issue?
35
1
2.0k
5d
How do I prevent screenshots using SwiftUI?
Hi Team, How do I prevent screenshots using SwiftUI. I was using this solution on UIKit: extension UIView { func makeSecure() { DispatchQueue.main.async { let protectedView = UIView() self.superview?.addSubview(protectedView) // constraints... let secureView = SecureView() self.superview?.addSubview(secureView) // constraints... secureView.addSecureSubview(self) // constraints... } } } class SecureView: UIView { private lazy var secureField: UIView = { var secureField: UIView = UIView() // ... if let secureContainer = SecureField().secureContainer { secureField = secureContainer } ... return secureField }() required init() { ... } } Is it posible to do the same thing using SwiftUI. Do we have an example? What would you recommend when we work with confidencial information in SwiftUI like bank account information? Thanks in advance!
0
0
115
5d
Seeking clarity for pending termination for Apple Developer Membership
Hi all, It has been >30 days since my app was removed, and I was served with the pending account termination notice. Similar to others, I was flagged for section 3.2(f). Submitted an appeal, explicitly addressing every possible violation, offered to show source code with entire history, and also have all the email threads of me providing customer support to my users, and also multiple 5 star reviews. However, I was met with the rejection and the confirmation that the account would be terminated. Fast forward more than 30 days, my account is still here, but no closure or clarification at all regarding what I can do moving forward. Understandably, the team deals with millions of submissions and apps, but isn’t it reasonable (given that we pay $100/yr) to at least get some clarification on what went wrong? Currently, all I want to know is, Can I create a new account and develop other apps? Or will I risk getting banned again, hence wasting another $100? If I am able to proceed, what do I need to do to make sure my app doesn’t get randomly terminated again? Why aren’t there any signs or warnings? If anyone is able to assist me on this, I would greatly appreciate it. Thank you so much!
0
0
67
5d