Search results for

Swift 6

49,211 results found

Post

Replies

Boosts

Views

Activity

tvOS 26 Bugs – Persistent UI animation issues: app launch stutter, text rendering jumps, shadow jumps, abrupt swipe transitions
Hello :-) I‘m not entirely sure, if I‘m on the correct Place here. But I would like to report some Bugs with tvOS 26 (Beta 6) to the Apple Engineers! Description I am reporting multiple persistent UI animation issues observed in tvOS 26 (Beta 3). These issues have been reproducible across multiple tvOS releases. They are subtle but noticeable, and they affect the overall polish and perceived quality of the system. I am happy to provide high-quality video captures for each of the issues described below. ⸻ Bug #1: App launch animation stutter/jump Summary: The zoom-in animation from a Springboard icon to full-screen app stutters or jumps at the moment the app becomes full screen. Steps to reproduce: 1. On Springboard, select any app icon. 2. Observe the zoom-in animation. Expected result: Smooth, continuous zoom without frame drops or jumps. Actual result: Animation visibly stutters/jumps at the full-screen transition. Possible cause: Timing issue in Core Animation interpolation or abrupt view hierarch
2
0
292
4w
macOS 26: NSTokenField crashes due to NSGenericException caused by too many Update Constraints
This example application crashes when entering any text to the token field with FAULT: NSGenericException: The window has been marked as needing another Update Constraints in Window pass, but it has already had more Update Constraints in Window passes than there are views in the window. The app uses controlTextDidChange to update a live preview where it accesses the objectValue of the token field. If one character is entered, it also looks like the NSTokenFieldDelegate methods tokenField(_:styleForRepresentedObject:) tokenField(_:editingStringForRepresentedObject:) tokenField(_:representedObjectForEditing:) are called more than 10000 times until the example app crashes on macOS Tahoe 26 beta 6. I've reported this issue with beta 1 as FB18088608, but haven't heard back so far. I have multiple occurrences of this issue in my app, which is working fine on previous versions of macOS. I haven't found a workaround yet, and I’m getting anxious of this issue persisting into the official release.
0
0
53
4w
Reply to @State variable returns empty despite being set in .onAppear function
Another point. In DataView, index should not be a State variable. Add a button in ContentView VStack { if showView && (index >= 0) && (index < data.count) { DataView(datum: data[index]) } Spacer() HStack { Text(Index: (index) -> ) Button(Next) { index += 1 if index >= data.count { index = 0 } } } } You will see that text in DataView does not change Text(DataView (datum.str)) always says DataView String 1 Now change DataView as follows to get it updated on index change by button press: struct DataView: View { /*@State*/ var datum: Data2 var body: some View { Text(DataView (datum.str)) } } Note: I renamed data to datum for an array item, to differentiate from the array. Now, I have to update my initial answer. In fact, no need for showView and Dispatch (even though that made it work). Just test index: if (index < data.count) { DataView(datum: data[index]) Without the index test, it crashes… Swift/ContiguousArrayBuffer.swift:691: Fatal error: Index out of range Reason is t
Topic: Design SubTopic: General Tags:
4w
FoundationModels tool calling not working (iOS 26, beta 6)
I have a fairly basic prompt I've created that parses a list of locations out of a string. I've then created a tool, which for these locations, finds their latitude/longitude on a map and populates that in the response. However, I cannot get the language model session to see/use my tool. I have code like this passing the tool to my prompt: class Parser { func populate(locations: String, latitude: Double, longitude: Double) async { let findLatLonTool = FindLatLonTool(latitude: latitude, longitude: longitude) let session = LanguageModelSession(tools: [findLatLonTool]) { A prompt that populates a model with a list of locations. Use the findLatLon tool to populate the latitude and longitude for the name of each location. } let stream = session.streamResponse(to: Parse these locations: (locations), generating: ParsedLocations.self) let locationsModel = LocationsModels(); do { for try await partialParsedLocations in stream { locationsModel.parsedLocations = partialParsedLocations.content } } catch { print(Error
2
0
322
4w
Reply to Dynamic Library cannot call exposed C function
@DTS Engineer you are right, the KERN_PROTECTION_ERROR really through me off. I updated today to Xcode 26 beta 5 and with my dylib compiled with debug symbols all of the sudden I can see where the null invocation is happening However, I don't have any idea why the compiler is stripping this symbols when packaging for TestFlight/Debugging. I've already added a lot of preprocessor directives to try to keep the symbols intact. Any idea what could I try? #define EXPORT __attribute__((visibility(default), used, retain)) extern C { EXPORT void ios_prepare_request(const char *url) { NSString *urlString = [NSString stringWithUTF8String:url]; request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString]]; } void force_symbol_registration() { // Force these symbols to be included in the binary by referencing them volatile void *ptrs[] = {(void *)ios_prepare_request, (void *)ios_set_request_header, (void *)ios_present_webview, (void *)ios_close_webview, (void *)ios_get_browser_cookies_for_current_url, (v
Topic: Code Signing SubTopic: General Tags:
4w
Reply to Dynamic Library cannot call exposed C function
Thanks for the crash report. The standard DTS mantra is “Always ask for a crash report first.” I failed to do that in this case, to my own detriment )-: The crash report snippet in your original post, and the discussion of Rust and so on, confused me into thinking that this problem is more complex than it is. However, your crash report makes it clear as to exactly what’s going on: Thread 3 name: Thread 3 Crashed: 0 ??? 0x0000000000000000 0x0 + 0 1 sdk 0x0000000105931ec0 0x105820000 + 1121984 This isn’t a weird code signing issue. Rather, your code has simply jumped to nil. [quote='853477022, ospfranco, /thread/795348?answerId=853477022#853477022, /profile/ospfranco'] I guess cocoapods masqueraded the issue. [/quote] Possibly. I often see cross-platform code deploy the -undefined linker option, which has a tendency to turn build-time errors into run-time errors. Needless to say, I’m not a fan [1]. If you’re curious about how Mach-O symbols work, I talk about that extensively in Understanding Mach-O Symbols. Th
Topic: Code Signing SubTopic: General Tags:
4w
Managing the order of Transparent Proxies from MDM Profile
We have an application which is written in Swift, which activates Transparent Proxy network extension. Our Transparent Proxy module is a system extension, which is exposing an app proxy provider interface (We are using NETransparentProxyProvider class and in extension’s Info.plist we use com.apple.networkextension.app-proxy key.) We are using JAMF MDM profile for installing our transparent proxy in customer environment. We are using VPN payload(https://developer.apple.com/documentation/devicemanagement/vpn) for this network system extension. This payload does not have any field for order. As per https://developer.apple.com/documentation/devicemanagement/vpn/transparentproxy-data.dictionary documentation there is another payload for TransparentProxy and we could create a Transparent Proxy profile using iMazingProfile Editor. Noticed that, if we add the Order attribute to the VPN/TransparentProxy payload, while installing the extension, the save to preferences fails with Error in saving TP configuratio
14
0
188
4w
iPad Pro M1 unable to connect to external devices after updating to iPadOS 26 Beta 5/6
I usually connect my iPad Pro M1 to an external monitor via the USB-C port without any issues. However, after updating to iPadOS 26 Beta 5 and now Beta 6, the connection no longer works. To troubleshoot, I tested other devices and setups: Tried connecting a wireless mouse via a 2.4GHz USB receiver - no response. Tried connecting the iPad to my MacBook via USB-C to USB-C cable - not recognized. Both the external monitor and mouse still work perfectly with my MacBook Air (macOS 18.6). This leads me to believe there may be a problem with the iPad’s USB-C data transfer functionality. I’ve checked the iPadOS 26 Beta Release Notes and found no mention of this issue. Is anyone else experiencing the same problem? Has Apple acknowledged it or provided any updates? Thanks for your help!
0
0
77
4w
Reply to Dynamic Library cannot call exposed C function
@DTS Engineer I just tried the SPM version of the package and found out that on release config, it crashes with a undefined symbol. I guess cocoapods masqueraded the issue. When ran with the debug scheme then it runs fine. The Package.swift is defined as follows // swift-tools-version: 5.8 import PackageDescription let package = Package( name: OpacityCore, platforms: [ .iOS(.v13) ], products: [ .library( name: OpacityCore, targets: [OpacityCoreObjc, OpacityCoreSwift]) ], dependencies: [], targets: [ .binaryTarget( name: sdk, path: sdk.xcframework ), .target( name: OpacityCoreObjc, dependencies: [sdk], path: src/objc, publicHeadersPath: ., cSettings: [ .headerSearchPath(../../include) ], linkerSettings: [ .linkedFramework(CoreTelephony), .linkedFramework(CoreLocation), .linkedFramework(WebKit), ] ), .target( name: OpacityCoreSwift, dependencies: [OpacityCoreObjc], path: src/swift ), ] )
Topic: Code Signing SubTopic: General Tags:
4w
Reply to Swift 6 Minimum Requirement for App Store
I can't speak to urgency, because that could be interpreted as a future looking timeframe. As a process, I would enable the Swift 5 stricter concurrency checking in code that you control to gauge what the important issues in your code base are, and decide what it would mean to fix them in terms of complexity. After that, try out the Swift 6 language mode, and see what other issues the complier identifies, once again with an eye for complexity. You can then take that information about the technical complexity and use that as information in your overall scheduling and mangement of your software project, and when the best time to do the work is. Since you can do that on a module-by-module basis, there's no need to jump to Swift 6 all at once. You can turn it on just for one module where perhaps there are no issues, or they are easy to address, after updating the language mode, and expand outward from there. And looking at this from the other direction, if there's a module where the iss
Aug ’25