Search results for

Swift 6

49,193 results found

Post

Replies

Boosts

Views

Activity

Learn to code / beginner
Hello everyone, I’m completely new to programming and Apple development, but I’ve always had the strong wish to learn coding and to work more deeply with Apple’s system structures. My main questions are: How should I best start learning? For example, is Swift Playgrounds the right first step? How should I continue afterwards to gain further knowledge, possibly in areas like system architecture, cybersecurity, or cloud computing (even though I don’t want to commit too early to one direction)? Can you recommend a learning schedule or intensity (e.g., how often per day or week I should practice) for someone who works full-time? Is my current MacBook Air (2020, Intel i3, 8 GB RAM, 250 GB SSD) still suitable for learning and beginner development, or would you recommend upgrading to a newer model? On top of that, my English is not perfect yet – is it possible to improve it alongside learning coding? I’m very motivated to finally start this journey, even though I once turned down an IBM apprenticeship when
4
0
139
2w
When applied to a nested struct, @Generable macro results in infinite nested response from Foundation Model
When the @Generable is applied toward a Swift struct declared within another struct, and when said nested struct is defined as the type of one of the properties of another @Generable type, which is in turn defined as the output format of Foundation Model session, Foundation Model can stuck in a loop trying to create a infinitely nested response, until the context window limit exceeded error is triggered. I have filed feedback FB19987191 with a demo project. Is this expected behavior?
1
0
507
1w
tvOS 26 + Xcode 26 debugger won't launch
I have been using tvOS 18 and Xcode 26 all summer without issue but since updating the tv to the latest tvOS 26 beta I am now unable to attach to debug builds. When using the Run button in Xcode the build completes, the tv screen goes black and then I see a warning in Xcode: Launching App Name is taking longer than expected. Do you want to continue to wait? LLDB is likely reading from device memory to resolve symbols. If I continue to wait after around 5 mins, in the Xcode console, I see: warning: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not find the on-disk shared cache for this device. This will likely reduce debugging performance. But the process on the tv hangs indefinately. Hitting stop in Xcode disconnects the debugger but the app then finishes launching successfully on the TV. Trying to use Debug > Attach to process > [App Name] once it is running also just hangs the app and waits until stopped. When stopping the hung debugger I see an Xcode error with the
1
0
210
1w
Feedback NetworkListener: Endpoint, QUIC
Good morning, I have been playing with he new Networking framework released in beta, and i think its amazing how powerful and simple it is. However i have been tackling some issues with it, it seems that the NetworkListener does not allow us to configure a specific endpoint for any of the protocols, UDP, TCP (QUIC, TLS) Is this intended or just not missing features as of the Beta ? I figured out how to use bonjour to get a port (as i am brand new to using Networking on macOS and Swift) I get that the use of this is mainly as a client to connect to servers, but it would make more sense to have a high level abstraction of what already exist, wouldn't it be more intuitive to configure a NetworkEndpoint that contains either a Bonjour Service or an endpoint with configured port that we can then configure on the Listener, instead of doing .service(...) ?
1
0
82
1w
Iphone 16 is not connecting to WiFi7 AP with MLO Suitb encryption(WPA3 Enterprise 192bit Security + Wi-Fi7 IEEE802.11be MLO)
Furuno AP(EW750) is sending EAPOL M1 message, but Iphone16 is not responding with EAPOL M2 message, Hence Iphone16 is unable to connect to Qualcomm based AP with MLO suiteb encryption. Issue impact: All the Iphone16 users cannot connect to WiFi7 AP with MLO suiteb encryption globally. Predominantly, Iphone users tend to connect to more secured wifi networks using WPA3 suiteb encryption, hence many of the iphone users will experience the connectivity issue significantly. Topology: AP Hardware: Furuno WiFi7 AP(EW770) The Furuno WiFi7 AP uses Miami IPQ5332 with waikiki radio QCN9274 (Qualcomm based chipset) AP software: SPF12.2 CSU3 IPhone16 software: (18.3.1 or 18.5 ) I phone16 wifi capabilities: 802.11 b/a/g/n/ac/ax/be Radius server details: Radius server: Laptop running with Ubuntu Radius package: 3.0.26dfsggit20220223.1.00ed0241fa-0ubuntu3.4 Version: 3.0.26 Steps: Power on the Wi-Fi 7 Access Point with the Miami chipset, and flash it with the SPF 12.2 CSU3 image. Enable both 5 GHz and 6 GHz radios o
1
0
28
1w
SIGTRAP crash in CoreGraphics font rendering pipeline (iOS 18.4)
We're observing new crashes specifically on iOS 18.4 devices with this pattern: Exception Type: SIGTRAP Exception Codes: fault addr: 0x000000019bc0f088 Crashed Thread: 0 Thread 0 0 libsystem_malloc.dylib _xzm_xzone_malloc_from_tiny_chunk.cold.1 + 36 1 libsystem_malloc.dylib __xzm_xzone_malloc_from_tiny_chunk + 612 2 libsystem_malloc.dylib __xzm_xzone_find_and_malloc_from_tiny_chunk + 112 3 libsystem_malloc.dylib __xzm_xzone_malloc_tiny_outlined + 312 4 CoreGraphics CG::Path::Path(CG::Path const&) + 132 5 CoreGraphics _CGPathCreateMutableCopyByTransformingPath + 112 6 CoreGraphics _CGFontCreateGlyphPath + 144 7 CoreGraphics _CGGlyphBuilderLockBitmaps + 1112 8 CoreGraphics _render_glyphs + 292 9 CoreGraphics _draw_glyph_bitmaps + 1116 10 CoreGraphics _ripc_DrawGlyphs + 1464 11 CoreGraphics CG::DisplayList::executeEntries(std::__1::__wrap_iter*>, std::__1::__wrap_iter*>, CGContextDelegate*, CGRenderingState*, CGGStack*, CGRect const*, __CFDictionary const*, bool) + 1328 12 CoreGraphics _CGDisp
3
0
484
May ’25
NSTextList not rendering on MacOS
In the WWDC22 talk What's new in TextKit and text views (https://developer.apple.com/videos/play/wwdc2022/10090?time=408), it was announced (at minute 6:45) that TextKit 2 & NSTextList is supposed to be working on both UIKit and AppKit. While NSTextLists are correctly rendering on iOS, they are not working on macOS. The paragraphs aren't inset and the numbers/bullets do not render in front of the list items. Any help? let textView = NSTextView(frame: self.view.bounds) textView.translatesAutoresizingMaskIntoConstraints = false self.view.addSubview(textView) let safeArea = view.safeAreaLayoutGuide NSLayoutConstraint.activate([ textView.topAnchor.constraint(equalTo: safeArea.topAnchor), textView.bottomAnchor.constraint(equalTo: safeArea.bottomAnchor), textView.leadingAnchor.constraint(equalTo: safeArea.leadingAnchor), textView.trailingAnchor.constraint(equalTo: safeArea.trailingAnchor) ]) let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.textLists = [NSTextList(markerFormat: NSTextList.M
7
0
619
Sep ’24
Membership migration from an individual to an organization
Hey guys, did someone tried recently to migrate membership from an individual to an organisation? I initiated the process on 1st of May, and as final step sent confirmation documents on 7th of May. Since then I don't have any updates, tried to contact support, but they said that they can't help as legal team is reviewing. So I wanted to ask is it ok to wait for 6 weeks? I thought this would take 2-4 weeks
1
0
45
Jun ’25
Reply to How is BGContinuedProcessingTask intended to be used?
Thanks for your detailed responses. I took what you said in the first response and built a simple generic queue which integrates with BGContinuedProcessingTask. I'm attaching the code in case it helps others and because it illustrates some of my lingering questions/suggestions/difficulties. I'm building it with: Swift version 6 Nonisolated(nonsending) by default Approachable concurrency/default MainActor disabled (new projects seem to have this enabled by default) (this list not in order of importance) Queues themselves get leaked. The registerWithScheduler method illustrates what I mean by this - the closure must retain self (the queue). It's not a dealbreaker because I imagine queues will not hold on to that many resources, just descriptions of jobs to run, but it's not ideal. Ideally, the BGTask title/subtitle APIs would accept a LocalizedStringResource so localised strings can be submitted cross-process. It may be interesting to elevate the priority of the queue-draining Task if running
1w
Xcode 26 Link Error
Using xcode 26 with linker flag -ld_classic,get an error : 0 0x1042b9778 __assert_rtn + 160 1 0x1042bc560 ld::tool::SymbolTableAtom<x86_64>::classicOrdinalForProxy(ld::Atom const*) (.cold.3) + 0 2 0x1041f3da8 ld::tool::SymbolTableAtom<x86_64>::classicOrdinalForProxy(ld::Atom const*) + 172 3 0x1041f4c1c ld::tool::SymbolTableAtom::addImport(ld::Atom const*, ld::tool::StringPoolAtom*) + 140 4 0x1041f6500 ld::tool::SymbolTableAtom::encode() + 396 5 0x1041e83a8 ___ZN2ld4tool10OutputFile20buildLINKEDITContentERNS_8InternalE_block_invoke.413 + 36 6 0x182a95b2c _dispatch_call_block_and_release + 32 7 0x182aaf85c _dispatch_client_callout + 16 8 0x182acc478 _dispatch_channel_invoke.cold.5 + 92 9 0x182aa7fa4 _dispatch_root_queue_drain + 736 10 0x182aa85d4 _dispatch_worker_thread2 + 156 11 0x182c49e28 _pthread_wqthread + 232 A linker snapshot was created at: /tmp/app-2025-06-13-215652.ld-snapshot ld: Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5
19
0
1.2k
Aug ’25
Reply to Native Crash - Unknown Function (/usr/lib/system/libsystem_kernel.dylib) Unknown Function (/usr/lib/system/libsystem_kernel.dylib)
Yes! If you Quick Look that in the Finder, you’ll get a human readable version of it. My comments below are based on that. The presence of the Last Exception Backtrace section indicates that your app crashed due to an unhandled language exception. Looking at the associated backtrace I see this: Last Exception Backtrace: 0 CoreFoundation … __exceptionPreprocess + 164 1 libobjc.A.dylib … objc_exception_throw + 88 2 CoreFoundation … +[NSObject(NSObject) _copyDescription] + 0 3 CoreFoundation … ___forwarding___ + 1492 4 CoreFoundation … _CF_forwarding_prep_0 + 96 5 UnityFramework … 0x10b164000 + 26948776 6 UnityFramework … 0x10b164000 + 26953748 7 UnityFramework … 0x10b164000 + 26918904 8 UnityFramework … 0x10b164000 + 26917296 9 UnityFramework … 0x10b164000 + 26902496 10 UnityFramework … 0x10b164000 + 27452572 11 libdispatch.dylib … _dispatch_call_block_and_release + 32 Frame 11 is Dispatch calling a block on a queue. Frames 10 through 5 are your third-party runtime. Frames 4 through 0 are a telltale pa
Topic: App & System Services SubTopic: Core OS Tags:
1w
Native Crash - Unknown Function (/usr/lib/system/libsystem_kernel.dylib) Unknown Function (/usr/lib/system/libsystem_kernel.dylib)
Hi, I encountered the following error while trying to launch a video game developed with Unity and running on an iPhone 12 and iPhone 16 Pro. Native StackTrace: Thread 2 (crashed) 0 libsystem_kernel.dylib 0x00000001d40102ec 1 libsystem_c.dylib 0x000000019330fba0 2 UnityFramework 0x000000010e7bc744 3 UnityFramework 0x000000010dc1c22c 4 UnityFramework 0x000000010cc26da4 5 CoreFoundation 0x000000018b4af984 6 libobjc.A.dylib 0x0000000183277140 7 libc++abi.dylib 0x00000001e7d20068 8 libc++abi.dylib 0x00000001e7d2000c 9 libdispatch.dylib 0x0000000193256de8 10 libdispatch.dylib 0x000000019325e400 11 libdispatch.dylib 0x000000019325ef30 12 libdispatch.dylib 0x0000000193269cb4 13 libdispatch.dylib 0x0000000193269528 14 libsystem_pthread.dylib 0x00000001e7e00934 15 libsystem_pthread.dylib 0x00000001e7dfd0cc
5
0
90
1w
Network framework crashes on fork
Hello, I have a Cocoa application from which I fork a new process (helper sort of) and it crashes on fork due to some cleanup code probably registered with pthreads_atfork() in Network framework. This is crash from the child process: Application Specific Information: *** multi-threaded process forked *** BUG IN CLIENT OF LIBPLATFORM: os_unfair_lock is corrupt Abort Cause 258 crashed on child side of fork pre-exec Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_platform.dylib 0x194551238 _os_unfair_lock_corruption_abort + 88 1 libsystem_platform.dylib 0x19454c788 _os_unfair_lock_lock_slow + 332 2 Network 0x19b1b4af0 nw_path_shared_necp_fd + 124 3 Network 0x19b1b4698 -[NWConcrete_nw_path_evaluator dealloc] + 72 4 Network 0x19af9d970 __nw_dictionary_dispose_block_invoke + 32 5 libxpc.dylib 0x194260210 _xpc_dictionary_apply_apply + 68 6 libxpc.dylib 0x19425c9a0 _xpc_dictionary_apply_node_f + 156 7 libxpc.dylib 0x1942600e8 xpc_dictionary_apply + 136 8 Network 0x19acd5210 -[OS_nw_dicti
4
0
2.2k
1w
Reply to Network framework crashes on fork
This came up on Swift Forums and I wanted to drop some links here, just for the record: How to prevent crash due to Swift Runtime initializing os_log on macOS? is the Swift Forums thread itself. A fork() in the road [1] is a research paper that offers valuable insight into the overall issue. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] https://www.microsoft.com/en-us/research/wp-content/uploads/2019/04/fork-hotos19.pdf
1w
Core Data initialization causes app to deadlock on startup
Users have been reporting that the TestFlight version of my app (compiled with Xcode 26 Beta 6 17A5305f) is sometimes crashing on startup. Upon investigating their ips files, it looks like Core Data is locking up internally during its initialization, resulting in iOS killing my app. I have not recently changed my Core Data initialization logic, and it's unclear how I should proceed. Is this a known issue? Any recommended workaround? I have attached the crash stack below. Thanks! crash_log.txt
2
0
78
1w