Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to Help! App Review Stuck in Guidelines 5.1.1(i) and 5.1.2(i) Loop
Good news—we have successfully addressed the final App Store requirements thanks to detailed feedback from the review team. This process, though intensive, proved to be a blessing in disguise. The iOS app is now more polished and robust than our current Android version. We’ve already identified a list of improvements derived from this review that we plan to implement on Android over the next few weeks to ensure parity and quality across both platforms. Thanks again for the help.
1w
🎧Define if headphones is only playing device for current session
I need to apply headphone-specific scenario only when headphones are the sole active playback device in my iOS audio app. Problem that there is no absolute way to definitively understand that headphones are the sole active playback device AVAudioSession.currentRoute.outputs portTypes don't guarantee headphones: let session = AVAudioSession.sharedInstance() let outputs = session.currentRoute.outputs let headphonesOnly = outputs.count == 1 && (outputs.first?.portType == .headphones || outputs.first?.portType == .bluetoothA2DP || outputs.first?.portType == .bluetoothHFP || outputs.first?.portType == .bluetoothLE) The issue in code above that listed bluetooth profiles (A2DP, HFP, LE) can be used by any audio device, not only headphones Is there any public API on iOS that can: Distinguish Bluetooth headphones vs Bluetooth speakers when both use A2DP/LE? Expose the user’s “Device Type” classification (headphones / speaker / car stereo, etc.) that is shown in Settings → Bluetooth → Device Type? Prov
0
0
64
1w
XCode: cannot pair devices
Since upgrading to a new Mac I have been unable to pair XCode to devices using the Devices and Simulators window. When I press the + button I get 'no devices found'. I have a second Mac which works as expected. When I try 'xcrun devicectl list devices' the phone I've connected shows up with limited information and is 'unavailable'. If I run 'sudo xcrun devicectl list devices' then I get a message telling me not to run xcrun as root but also the full information about the phone as expected, plus it shows the status as 'available (paired)'. So the device seems to be defined with root privileges but XCode is not. I am running XCode 26.2 but this issue has been around since 26.0. Any suggestions welcome.
1
0
110
1w
Vision OS Persona
I’m seeing a camera/capture routing issue on visionOS when multiple WindowGroups are open at the same time. I have a SwiftUI view that starts an AVCaptureSession on onAppear and stops it on onDisappear. The camera feed is displayed in a subview that only exists inside one window. However, when I open additional windows (other WindowGroups) in the same app, the camera perspective/route changes unexpectedly — it looks like the capture is being re-associated with a different scene/window, even though the camera view never moved and no other view starts capture. Expected behavior Opening additional windows should not affect the active capture session or camera routing for the existing camera view. The camera feed should remain stable and tied to the window hosting. Actual behavior When multiple windows are open, the camera feed “switches perspective” / appears to re-route, as if the system changes which scene is considered active for capture. This happens without any explicit code calling startSession()
0
0
57
1w
String Catalog Symbols: No Reference-Language Fallback for Partially Translated Locales
I'm having troubles converting my string catalog to symbols because for partly translated languages there is no fallback to the reference language. Let me give you an example. Example Assume an app that supports two languages: English and Japanese. The app is very simple and has only two strings, using symbols in a String Catalog: Key: .helloWorld → “Hello World!” Key: .info → “Information” Case 1: No Japanese translations If I launch the app in Japanese and neither string is translated, English is used as a fallback. The UI shows: “Hello World!” “Information” This is exactly what I would expect. Case 2: Only one string translated Now assume I translate only one string into Japanese: .helloWorld → “こんにちは世界” When I launch the app in Japanese now: .helloWorld correctly shows “こんにちは世界” .info shows info, not “Information” So instead of falling back to English, the key is displayed. This issue does not pop up when I don't use symbols. Because then, my SwiftUI Text elements contain the English ideal text a
1
0
48
1w
VideoMaterial Black Screen on Vision Pro Device (Works in Simulator)
VideoMaterial Black Screen on Vision Pro Device (Works in Simulator) App Overview App Name: Extn Browser Bundle ID: ai.extn.browser Purpose: A visionOS web browser that plays 360°/180° VR videos in an immersive sphere environment Development Environment & SDK Versions Component Version Xcode 26.2 Swift 6.2 visionOS Deployment Target 26.2 Swift Concurrency MainActor isolation enabled App is released in the TestFlight. Frameworks Used SwiftUI - UI framework RealityKit - 3D rendering, MeshResource, ModelEntity, VideoMaterial AVFoundation - AVPlayer, AVAudioSession WebKit - WKWebView for browser functionality Network - NWListener for local proxy server Sphere Video Mechanism The app creates an immersive 360° video experience using the following approach: // 1. Create sphere mesh (10 meter radius for immersive viewing) let mesh = MeshResource.generateSphere(radius: 10.0) // 2. Create initial transparent material var material = UnlitMaterial() material.color = .init(tint: .clear) // 3. Create entity an
0
0
139
1w
Reply to Biometrics prompt + private key access race condition on since iOS 26.1
Well, that’s not good. I suggest you retry this on the current 26.3 beta, just in case. Assuming the problem shows up there as well, you should file a bug about it. Make sure to include a sysdiagnose log taken shortly after reproducing the problem, ideally as soon as you see the fuzzy screen you showed in your screenshot. Once you’re done, please post your bug number and I’ll take another look. At the API level, one option you have is to create an LAContext and pass it in to each SecItemCopyMatching call via kSecUseAuthenticationContext. It’s not clear whether you’re doing that or not. Please confirm either way. It’s also not clear if it’s even the right thing to do. This technique makes sense when the user performs a single high-level operation that requires multiple cryptographic operations with the same key. However, if the user performs two separate high-level operations back-to-back and that reproduces this issue, then trying to work around this using kSecUseAuthenticationContext isn’t
Topic: Privacy & Security SubTopic: General Tags:
1w
Reply to How can I create a more complex XPCPeerRequirement?
Entitlements and code-signing requirements are very different. See the following for more background on each: TN3125 Inside Code Signing: Provisioning Profiles TN3127 Inside Code Signing: Requirements You can use a code-signing requirement to check for an entitlement, for example: % codesign --verify -R '=entitlement [com.apple.security.app-sandbox] exists' -v /Applications/Pages.app … /Applications/Pages.app: explicit requirement satisfied % codesign --verify -R '=entitlement [com.apple.security.app-sandbox] exists' -v /usr/bin/true … test-requirement: code failed to satisfy specified code requirement(s) However, entitlements are tricky to use in this situation because: You can’t create a provisioning profile that authorises a custom requirement. Many of of the popular entitlements are either unrestricted on macOS, or only restricted in that they clear the entitlement-validate flag [1]. Given that, I think maintaining your previous approach makes sense, that is, check for the Team ID and a list of c
Topic: Code Signing SubTopic: Entitlements Tags:
1w
Reply to How to accept CloudKit shares with the new SwiftUI app lifecycle?
CloudKit share acceptance still requires a UIWindowSceneDelegate on iOS. Can try this approach ---- Keep SwiftUI lifecycle @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } } } Add SceneDelegate import UIKit import CloudKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { func windowScene( _ windowScene: UIWindowScene, userDidAcceptCloudKitShareWith metadata: CKShare.Metadata ) { acceptShare(with: metadata) } } Register it in Info.plist UISceneDelegateClassName = SceneDelegate
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
When is the kTCCServiceEndpointSecurityClient permission set by macOS?
[Q] When is the kTCCServiceEndpointSecurityClient set by macOS and in which conditions? From what I'm gathering, the kTCCServiceEndpointSecurityClient can not be set by a configuration profile and the end user can only grant full disk access. I searched for documentation on Apple's develop website (with the kTCCServiceEndpointSecurityClient search) and did not get any useful result. Using a more complete search engine, or the forum search engine, only points to the old annoying big bug in macOS Ventura. The problem I'm investigating is showing a process being listed as getting granted kTCCServiceEndpointSecurityClient permissions in the TCC database when: it's not an Endpoint Security client. it does not have the ES Client entitlement. the bundle of the process includes another process that is an ES Client and is spawn-ed by this process but I don't see why this should have an impact. This process is supposed to have been granted kTCCServiceSystemPolicyAllFiles via end user interaction or configurati
2
0
78
1w
IAP Purchase Fails During App Review – Circular Dependency Between App Approval and IAP Approval
Hello everyone, I’m facing an issue with In-App Purchases during App Review and would appreciate guidance from anyone who has encountered a similar situation. Context: New iOS/iPadOS app, first submission. One Non-Consumable In-App Purchase. IAP was created, fully configured, and submitted together with the app version. IAP status in App Store Connect: In Review. App includes Restore Purchase and uses standard StoreKit purchase flow. Paid Apps Agreement is accepted. Problem: During Apple’s review, when the reviewer taps the purchase button, a generic error appears: “Purchase failed. An error occurred, please try again.” Apple rejected the app under Guideline 2.1 – Performance – App Completeness, stating that the IAP shows a bug. What seems to be happening: The IAP itself is still in review and therefore not fully active, which causes the purchase attempt to fail. However, the app cannot be approved because the purchase fails, creating a circular dependency: App cannot be approved because IAP purchase
2
0
75
1w
Reply to How to animate `UIHostingController.view` frame when my View's size changes?
@DTS Engineer I am expecting the part on the left, in SwiftUI to animate exactly like the counterpart in UIKit on the right. But they do not; UIKit animation affects both UIView.center and UIView.bounds, and they travel using the same timing curve over the same duration, which makes it seem that the top of the UIKit view is attached to the top of the screen. However, this illusion is not preserved for SwiftUI view because UIHostingController.view.center is not animated; it's teleported to the end position. And I also happen to know that really bounds are not animated either, the UIView actually just fully teleports to the new state, while only the SwiftUI content is animated. And my question is - what is the way to make UIHostingController animate along its SwiftUI content? Can you maybe confirm that there isn't a built-in support for that?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
iBeacon Monitoring in Flutter App: Background Wake-Up from Killed State, Time Limits for BLE, and Handling Multiple Regions/Identifiers
Hello Apple Developer Community, I'm developing a cross-platform app using Flutter and the flutter_beacon library to handle iBeacon detection on iOS. My goal is to wake up the app in the background when it's in a killed/terminated state upon entering/exiting beacon regions, allowing for BLE communication (e.g., ranging or connecting to beacons). I've configured the necessary Info.plist keys for always location access and background location modes, and it works partially for single regions, but I have some specific questions/issues regarding reliability and limitations: Background Execution Time After Wake-Up: When the app is woken in the background by a region monitoring event (enter/exit) from a killed state, approximately how much time (in seconds) does iOS allocate for the app to run before suspending it again? Is this sufficient for performing BLE operations like ranging beacons or establishing a short connection, or are there stricter limits in terminated wake-ups compared to standard background
1
0
96
1w