Search results for

Building for iOS Simulator, but the linked and embedded framework ‘XX.framework‘ was built for

186,333 results found

Post

Replies

Boosts

Views

Activity

SwiftUI view state resetting after alert is shown
Seeing an issue in iOS 26.2 iPhone 17 simulator (haven't been able to reproduce on device or other simulators), where a view's state is reset after an alert is shown. In this example the first LibraryView has the issue when alert is shown, the second LibraryView maintains state as expected. struct ContentView: View { var body: some View { NavigationStack { List { VStack { LibraryView(title: Show view (Loss of state)) } LibraryView(title: Show view (Works as expected)) } } } } /// This view is from a package dependency and wants to control the presentation of the sheet internally public struct LibraryView: View { @State private var isPresented: Bool = false let title: String public init(title: String) { self.title = title } public var body: some View { Button(self.title) { self.isPresented = true } .sheet(isPresented: self.$isPresented) { ViewWithAlert() } } } private struct ViewWithAlert: View { @State private var isPresented: Bool = false @State private var presentedCount = 0 var b
Topic: UI Frameworks SubTopic: SwiftUI
11
0
404
1w
Reply to Query regarding hardware usage for Swift Student Challenge entry
Thanks for the question, there are better developers to answer your questions than I am, as I am not in that team. But if you need a device to show your capabilities beyond the simulator it seems like is allowed. Please check this reply: https://developer.apple.com/forums/thread/815172 I believe Swift Playgrounds supports the use of the front-facing camera for detecting body movements. Frameworks such as ARKit and Vision provide capabilities for face tracking and human body pose detection. ARKit's ARFaceTrackingConfiguration. Good luck, hopefully other people from that team jumps in this thread. But reading the Student Challenge Rule webpage, I do not see anything that prevents you. https://developer.apple.com/swift-student-challenge/policy/ Albert Pascual
  Worldwide Developer Relations.
1w
CallKit requestTransaction error code 2
Hello, In production, a large number of users experience outgoing call reporting fails with the following error: com.apple.CallKit.error.requesttransaction Code=2 The iOS version doesn't matter, errors are present in v15-26 Details My CXProvider held as a global singleton, so it’s unlikely to be deinited. There is no explicit call to CXProvider.invalidate() in the app. If I manually invalidate the CXProvider, I observe the expected failure when trying to create an outgoing call (com.apple.CallKit.error.requesttransaction error 2). However, If I recreate the CXProvider after the error, outgoing calls are reported correctly. Many users trigger the providerDidReset delegate method (CXProviderDelegate) before this error. According to the documentation, providerDidReset can be called by the system, and we are supposed to end all active calls, but the documentation doesn't suggest recreating the CXProvider. Question Should I recreate CXProvider after providerDidReset and forget about that, or could this er
5
0
345
1w
Reply to CallKit requestTransaction error code 2
So, let me start by going back to what I said here: ...is an XPC connection failure with callservicesd, typically caused by callservicesd crashing. That's not common, so if your app is causing frequent resets, then that's an issue that might be worth looking into. By definition, that's not a normal failure. Your app is basically being notified of a failure because it's not clear what else we can/should do. That also means I don't necessarily have a great solution, certainly not one I can guarantee to be reliable. That leads to here: there is no initial providerDidBegin for first CXProvider as logger misses early logs Do you have any sense about how long your app is typically able to stay active, both in terms of being awake/active and in absolute terms (wake or suspended)? This primarily comes up with long-running kiosks apps, but one of the issues that can happen to long-running apps is that as they get better and better at working for very long periods of time (in kiosk apps, this is typically days/weeks of
Topic: App & System Services SubTopic: General Tags:
1w
Reply to Can TextField handle undo?
I investigated further and found your answer! UndoManager is the API in the Foundation framework for undo/redo and SwiftUI has an environment value for that undoManager. This example disables undo on TextField on Mac struct ContentView: View { @Environment(.undoManager) var undoManager: UndoManager? var body: some View { VStack { TextField(Test, text: $text) } .task { undoManager?.disableUndoRegistration() } } } Let me know if this answers your question  Travis Trotto - DTS Engineer
Topic: UI Frameworks SubTopic: SwiftUI
1w
Reply to Smooth appearance switching
Thank you for the code and post. However, you have not provided the complete code, and the code you provided will not compile due to missing controls that are not defined. I recommend you provide a focused sample project that demonstrates both the unexpected output and the expected output as well the configuration of the project itself. If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project. Albert Pascual
  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
How to test CKShare across multiple accounts?
I'm testing CloudKit Sharing (CKShare) in my app. My app uses CloudKit Sharing to share private data between users (this is not App Store Family Sharing or purchase sharing, it's app-level sharing via CKShare). To properly test this, I need three or four Apple Accounts with distinct roles in my app. This means I need three/four separate iCloud accounts signed in on test devices. Simulators are probably ok: two acting as parents (share owner and participant): parent1.sandbox@example.com parent2.sandbox@example.com, one or two as a child (participant) child1.sandbox@example.com child2.sandbox@example.com except obviously using my domain name. I attempted to create Sandbox Apple Accounts in App Store Connect, but these don't appear to work with CloudKit Sharing. I then created several standard Apple Accounts, but I've now hit a limit — I believe my mobile number (used for two-factor authentication on the test accounts) has been flagged or rate-limited for account creation, and I can no longer create or
1
0
55
1w
Metal runtime shader library compilation and linking issue
In my project I need to do the following: In runtime create metal Dynamic library from source. In runtime create metal Executable library from source and Link it with my previous created Dynamic library. Create compute pipeline using those two libraries created above. But I get the following error at the third step: Error Domain=AGXMetalG15X_M1 Code=2 Undefined symbols: _Z5noisev, referenced from: OnTheFlyKernel UserInfo={NSLocalizedDescription=Undefined symbols: _Z5noisev, referenced from: OnTheFlyKernel } import Foundation import Metal class MetalShaderCompiler { let device = MTLCreateSystemDefaultDevice()! var pipeline: MTLComputePipelineState! func compileDylib() -> MTLDynamicLibrary { let source = #include using namespace metal; half3 noise() { return half3(1, 0, 1); } let option = MTLCompileOptions() option.libraryType = .dynamic option.installName = @executable_path/libFoundation.metallib let library = try! device.makeLibrary(source: source, options: option) let dylib = try! device.make
5
0
1k
1w
Reply to BLE Scanning
BLE scanning does not stop in the background. But it slows down. So for your situation, what is probably happening is: while you are juggling your scanning batches, stopping one and starting the other, it is possible that your app is not being able to start the next batch after stopping the previous one. If that happens, you would have stopped the scan but was never able to restart the other for one reason or another. If you believe the scan has actually stopped, you may want to double check the next batch was able to have started, perhaps confirm by logging the start if the next batch and see if you get there. And if you confirm the scan never starts, then debug why this is occurring. the scan is not stopping, but because it slows down when the app is in the background, you think it has stopped due to the inability to discover advertising peripherals. This is a standard behavior of iOS and the only solution would be to increase the advertising frequency of the peripherals. If the advertising interva
Topic: App & System Services SubTopic: Core OS Tags:
1w
BLE Scanning
iOS BLE Background Scanning Stops After Few Minutes to Hours Hi everyone, I'm developing a Flutter app using flutter_blue_plus that needs continuous BLE scanning in both foreground and background. Foreground scanning works perfectly, but background scanning stops after a few minutes (sometimes 1-2 hours). Current Implementation (iOS) Foreground Mode: Scans for 10 seconds with all target service UUIDs Batches and submits results every 10 seconds Works reliably ✅ Background Mode: Rotates through service UUIDs in batches of 7 Uses 1-minute batch intervals Maintains active location streaming (Geolocator.getPositionStream) Switches modes via AppLifecycleState observer // Background scanning setup await FlutterBluePlus.startScan( withServices: serviceUuids, // Batch of 7 UUIDs continuousUpdates: true, ); // Location streaming (attempt to keep app alive) LocationSettings( accuracy: LocationAccuracy.bestForNavigation, distanceFilter: 0, ); Lifecycle Management: AppLifecycleState.paused -> Start b
1
0
54
1w