Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Terminal Codes
Hello Apple Developers and users I am writing this message reguarding some help on some performance codes/settings I can use for my Macbook since I recently downloaded the MacOs Tahoe 26.2 and its been very glitchy and laggy with gaming and just using my mac normally I have tried using a FPS unlocker and downloading Metal 4 the FPS unlocker hasent worked at all I am still stuck on the normal 60 FPS and need some advice/help. Thank you. Kind regards Zachary
0
0
74
1w
Reply to Foundation models not detectable in Xcode simulator
Thanks for the post, I have only questions for you to narrow down and make sure I understand the platform not working. Can you provide me the version of Xcode and what simulator are you using to ensure that the simulator you're using is compatible with the Foundation Model framework. Since your M1 Air and iPad Pro M5 are both Apple silicon devices, the simulator should generally support the latest frameworks. Make sure you have the latest version of Xcode installed. Update the simulator images to the latest version available. If possible, try running your app on a different simulator that you know works well with your app. You can choose from a list of simulators available in Xcode. Can you provide me that? Can you provide me exactly the error you are getting in the simulator. Look at the error logs in Xcode for more specific information about what might be causing the issue. This can help in diagnosing the problem more accurately. If possible, test your app on a real device using the same model as y
1w
Reply to iOS App never gets Bluetooth connection
I am going to suggest that your issue is more structural than a Bluetooth connection problem if even print(App initializing) is not printing. Once you get that working (perhaps start with a clean Hello world! project to make sure your code is running. And then you can add the Bluetooth functionality to it using examples. Unfortunately our sample projects are a bit dated, and outside the watchOS sample Interacting with Bluetooth peripherals during background app refresh, we don't have any SwiftUI examples that demonstrate CoreBluetooth. Currently, the CoreBluetooth framework is not fully compatible with SwiftUI, and requires the use of @UIApplicationDelegateAdaptor var delegate: ApplicationDelegate and handle your CoreBluetooth logic in a UIKit class. In the above example, you will find an iOS target BARBluetooth, which will show how the SwiftUI/UIKit integration is handled. (do not consider the code there as a full example though, as that is a specific app that only accompanies the
Topic: App & System Services SubTopic: Core OS Tags:
1w
Reply to Localizing NSAlarmKitUsageDescription
Thanks for the post, this is very interesting, can you provide a little more context about how Xcode marks the string as stale? Screenshots or a way to reproduce it quickly? This is the key you ad adding into your Info.plist? https://developer.apple.com/documentation/BundleResources/Information-Property-List/NSAlarmKitUsageDescription Ensure there are no hidden characters or encoding issues in your InfoPlist.xcstrings file that might confuse Xcode. What happens when you keep it only in the Info.plist? Do you get the same results with just the relevant code in a small test project? 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. Thanks, Albert Pascual
  Worldwide Developer Relations.
1w
iOS App never gets Bluetooth connection
I am developing an iOS App for a Bluetooth peripheral using SwiftUI with Swift 5 or 6. I have a few past attempts that got so far (connected to a peripheral), and some downloaded examples that connect to peripherals. Lately (last month or so), my current attempt never gets BleManager to start, and every attempt ends at my View that says 'please enable Bluetooth'. The Xcode console is totally blank with no print outputs. Coding Assistant suggested the init() in my @main structure could contain print(App initializing), but even that never prints. Coding Assistant suggests: • Open your project's Info.plist in Xcode. • Make sure UIApplicationSceneManifest is present and configured for SwiftUI, not referencing any storyboard. • Ensure UIMainStoryboardFile is not present (or blank). but there is no info.plist because it is no longer required. Downloaded sample code runs and connects to peripherals, so Bluetooth is working on my iPhone and the Bluetooth device is accessible. My older attempts used
2
0
82
1w
Reply to Why doesn’t Transaction.updates emit reliably?
My app is a Mac app that uses the AppKit framework. It is not a SwiftUI app, nor is it an iOS app. It uses SwiftUI for some views. The sample project code is similar to my code snippet but is built using the SwiftUI design pattern. I want Transaction.updates and Product.SubscriptionInfo.Status.updates to work, but they are not detecting the changes I make when I make purchases, nor are they detecting purchases when using the Xcode Transaction Manager. Also, I use subscriptionStatusTask(for:priority:action:) modifier where I use ProductView and it doesn't work. It is supposed to react in real time. It works if I reload the view by switching to another view and then back. I believe it is less to do with the code and is something else. Maybe the Xcode project file settings is messed up or I am missing something. I tried restarting the Mac and clearing the derived data. Likewise, as I mentioned, it works perfectly in a fresh Xcode project with a minimal setup, but it doesn’t work in my
Topic: App & System Services SubTopic: StoreKit Tags:
1w
UserDefaults.standard losing all data on iOS26
Hello. We are facing very silent and hardly replicable issue. All UserDefaults.standard data the application saved and was using to determine the state of app is lost and app behaves as if it was freshly installed. The issue always occurs only if we leave app on background for long time or if we manually swipe the app from the background apps. In case we swipe, this issue can occur in minutes, hours or up to 2 days by our latest testing. One important factor is that the app was developed using iOS18 in which issue never occured. Next it was being tested on iOS26 and it did everytime. Any currently available version of iOS26 reported this issue, all the way up to 26.2.1 (23C71). Our application is going through major upgrade of its whole lifecycle and services so it is possible this issue is caused by a bug in development as the production version does not report this issue neither on iOS26 of any version. The following list contains how we tried to fix this issue but none of which helped. App prewarm
1
0
77
1w
Reply to App Review cannot complete auto-renewable subscription purchase (Guideline 2.1) although sandbox & TestFlight work
App Review states they are unable to buy the in-app purchase Have you asked what they mean by 'unable to make a subscription purchase'? It could mean that the purchase sheet doesn't appear they don't see a button leading to the purchase sheet they don't see a list of products they tap something that is not even a button or something without a tap gesture I would make sure that I were on the same turf as theirs.
Topic: App & System Services SubTopic: StoreKit Tags:
1w
Reply to Unexpected CoreBluetooth background suspension without active location updates
SUB : iBeacon Monitoring in Flutter App: Background Wake-Up from Killed State, Time Limits for BLE, and Handling Multiple Regions/Identifiers Hello Engineer, 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 be
Topic: App & System Services SubTopic: Core OS Tags:
1w
Swiftui Map Leagal Text is transformed when rotationEffect is applied to Map
I have a problem when applying rotationEffect to a map in in SwiftUI. The legal text in the map is transformed as shown in this image: The following code is part of a much larger and complex view; it is a minimal example to reproduce the error: import SwiftUI import MapKit struct ContentView: View { @State private var offset = CGSize.zero var body: some View { ZStack { let drag = DragGesture() .onChanged { g in offset.width = g.translation.width offset.height = g.translation.height } Map(interactionModes: [.zoom]) .frame(width: 320, height: 220) .rotationEffect(.degrees(Double(offset.width / 12))) .highPriorityGesture(drag) } } } I hope you can help me with this problem.
1
0
39
1w
How do I control a SwiftUI TextField with a game controller?
I've coded a text-adventure game in SwiftUI. (My game has no graphics or sound effects.) My app already supports keyboard navigation; I would like to add support for game controllers on iPhone. I can't figure out how to do it. I especially can't see any way to allow controller users to enter text in a TextField. I've read https://developer.apple.com/documentation/gamecontroller/supporting-game-controllers and it's all about button events. There's no reference to SwiftUI at all in that documentation, or any input-method editing at all. The only mention of keyboard is about treating the keyboard itself as if it were a game controller providing button events. How do I implement this?
0
0
58
1w
protocol witness error in Playgrounds
I'm importing SwiftUI, Foundation and Charts into an iOS app I'm writing in Swift in Xcode Playgrounds and am getting this error: error: Couldn't look up symbols: protocol witness table for Foundation.Date : Charts.Plottable in Charts the code looks like this in just two example files: file 1, the view import Foundation import SwiftUI import Charts import PlaygroundSupport struct FirstChart_WithDates: View { private let data = ChartDateAndDoubleModel.mockData(months: 3) var body: some View { Chart(data) { item in BarMark( x: .value(Label, item.date, unit: .month), y: .value(Value, item.value) ) } .padding() .aspectRatio(1, contentMode: .fit) .dynamicTypeSize(.accessibility1) ChartDateAndDoubleModelView(data: data) } } struct ChartDateAndDoubleModelView: View { var data: [ChartDateAndDoubleModel] var body: some View { VStack { HeaderRowView(texts: [date, value]) ForEach(data) { datum in HStack { Text(datum.date.formatted(date: .abbreviated, time: .omitted)) .frame(maxWidth: .infinity) // TODO
1
0
41
1w
SwiftUI toolbar items clip DocumentGroup rename affordance
Hi — I’m seeing the DocumentGroup rename/title affordance get clipped on iPad when I populate the navigation bar with SwiftUI toolbar items in .topBarLeading, .principal, and .topBarTrailing (trailing is an HStack of controls). Example: .toolbar { ToolbarItem(placement: .topBarLeading) { UndoRedoControlsView(...) } ToolbarItem(placement: .principal) { Text(canvasInfoTitle).lineLimit(1) } ToolbarItem(placement: .topBarTrailing) { HStack { ... } } } .navigationBarTitleDisplayMode(.inline) Is there a recommended way to structure toolbar content so the system’s document title/rename control always has space (or a way to reserve space / avoid clipping), short of removing .principal or moving items into menus?
Topic: UI Frameworks SubTopic: SwiftUI
0
0
35
1w