Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Dive into the world of programming languages used for app development.

All subtopics
Posts under Programming Languages topic

Post

Replies

Boosts

Views

Activity

Terrible news. "sysctl -a" works as intended in macOS ! Great news for macOS developers
This is great for writing device drivers and somewhat fine tuning macOS for performance! And somewhat foresnical data (ie this matches that in this situation; ie kern.stack_size: 16384 vs allocating x, xy, xyz to this resource Good luck! and if you find any exploits the bug security line (and there is a bug bounty, that means they pay for exploits!) is product hyphen security at apple dot com Good luck !! unidef (also don't goto unidef.org its actually some kind of "troll" thing!) (and yeah I had a website =/)
1
0
13
3h
Can FamilyControls ApplicationToken or CategoryToken expire? If yes, how to detect and handle it?
How to programmatically check if ApplicationToken or ActivityCategoryToken is expired in FamilyActivityPicker? I'm building a Screen Time-based parental control app using FamilyControls and ManagedSettings. We use FamilyActivityPicker to allow the user to select apps and categories to restrict, and we apply the shield using: store.shield.applications = .specific(selection.applicationTokens) store.shield.applicationCategories = .specific(selection.categoryTokens) Sometimes, we observe that the shield silently fails to apply — no error is thrown, but the restrictions aren't enforced. I suspect this may be due to expired or invalid tokens, possibly if the app was removed or the selection became stale. My Questions: Can ApplicationToken or ActivityCategoryToken expire or become invalid over time? If yes, is there a supported or recommended way to detect whether a token is still valid before applying it to the shield? Is comparing the current shield values (store.shield.applications and store.shield.applicationCategories) after applying them a reliable validation method? What's the best practice to handle expired tokens (e.g. re-prompt the FamilyActivityPicker, or show a fallback)? What Is the Expiration Duration of Tokens from FamilyActivityPicker? Any guidance or insight from the Screen Time/FamilyControls team would be greatly appreciated! Thank you!
0
0
5
3h
[StoreKit External Purchase] Testing token retrieval in development environment with React Native
Question on token testing in development: Hello, I'm developing a React Native application using StoreKit External Purchase. I'm having difficulties testing the transaction token retrieval in the development environment. Specific questions: Is it possible to test the transaction token retrieval in development/sandbox environment? Is there a special testing mode for developers that would allow simulating token reception without going through the App Store? Are there specific debugging tools to verify proper token reception? Question on native implementation: Regarding the native implementation of StoreKit External Purchase: Is there detailed documentation on creating native modules for React Native that implement StoreKit External Purchase? Can you confirm if the following approach is correct for native implementation: Using NSClassFromString(@"ExternalPurchase") Calling presentNoticeSheetWithURL:completion: Retrieving the token in the completion block Are there any code examples for complete native implementation? Question on implementation validation: For validating StoreKit External Purchase implementation: How can we verify that our implementation is correct before App Store submission? Are there validation tools or automated tests to check compliance? What are common errors to avoid during implementation? Question on best practices: Regarding implementation best practices: What's the best way to handle potential errors during token retrieval? How to handle cases where the user cancels the transaction? What are the recommended security checks for server-side token validation? Question on documentation: I'm looking for additional resources on StoreKit External Purchase: Is there specific documentation for integration with frameworks like React Native? Are there complete code examples for native implementation? Where can I find information about testing and debugging best practices? Additional technical question: Technical implementation details: What's the correct way to handle the ExternalPurchase class initialization in React Native native modules? Are there specific requirements for the URL passed to presentNoticeSheetWithURL? How should we handle the token in the completion block to ensure it's properly passed back to React Native? Question on testing workflow: Testing workflow questions: What's the recommended testing workflow for External Purchase implementation? How can we verify the token format and validity before production deployment? Are there any tools or methods to simulate the complete purchase flow in development?
0
0
16
5h
Default Actor Isolation and foundational protocols
I've been testing my open source libraries with Swift 6.2 and the new Default Actor Isolation concurrency build setting set to MainActor (with Complete strict concurrency turned on). My library Destinations uses protocols extensively, often applying conformance to foundational Swift protocols like Hashable and Identifiable. Many of these basic protocols are not flagged as running on the @MainActor in Beta 1, leading to situations like this: Given this example code: public protocol Contentable: Identifiable { var id: UUID { get } } final class ContentModel: Contentable { let id: UUID = UUID() } I get the warning: Multiline Conformance of 'ContentModel' to protocol 'Contentable' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode The fix it suggests is to put a @MainActor before the Contentable protocol declaration in ContentModel, which seems to be a new attribute configuration in Swift 6.2. This solves the warning, but would create a lot of extra noise across the codebase. Was it an oversight or a temporary omission that protocols like Hashable and Identifiable do not run on @MainActor by default, or is there some other reason they are excluded? Considering how often protocols in our code may conform to foundational protocols like this, it seems at odds to the MainActor mode of the Default Actor Isolation setting given that it was created to make concurrency easier and less boilerplate to implement.
2
0
44
1d
Snapshot error
Hey everyone, I have a problem with an app im creating. The code doesn't have any errors but the console has this that pops up: Snapshot request 0x1054191d0 complete with error: <NSError: 0x10541a970; domain: FBSSceneSnapshotErrorDomain; code: 4; "an unrelated condition or state was not satisfied"> { NSLocalizedDescription = an error occurred during a scene snapshotting operation; }
1
0
27
1d
Using InlineArray on older OS versions
Hi, I’m trying to use the new InlineArray type, but noticed that it is unfortunately only available on macOS 26 and not on macOS 15 and others. As this is quite an essential type, I was wondering if this is intended or will this change in later beta’s? Not having it available on older Darwin platforms would severily limit it’s usage in the coming years. Thanks!
1
0
60
5d
Understanding an assertion failure in a crash log
Last night my iPhone game crashed while running in debug mode on my iPhone. I just plugged it into my Mac, and was able to find the ips file. The stack trace shows the function in my app where it crashed, and then a couple of frames in libswiftCore.dylib before an assertion failure. My question is - I've got absolutely no idea what the assertion failure actually was, all I have is... 0 libswiftCore.dylib 0x1921412a0 closure #1 in closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) + 228 1 libswiftCore.dylib 0x192141178 closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) + 327 2 libswiftCore.dylib 0x192140b4c _assertionFailure(_:_:file:line:flags:) + 183 3 MyGame.debug.dylib 0x104e52818 SentryBrain.takeTurn(actor:) + 1240 ... How do I figure out what the assertion failure was that triggered the crash? How do I figure out what line of code in takeTurn(...) triggered the failing assertion failure?
2
0
60
1w
Image Not Displaying on Some Devices – Same Code, Inconsistent Behavior
I'm encountering an issue where certain images are not displaying on some iOS devices, while the same code works perfectly on others. There’s no error or crash — just some images fail to load or display. I've confirmed the image URLs and formats are correct. Has anyone faced a similar issue or could suggest what might be causing this inconsistent behavior? Thanks in advance!
1
0
41
1w
Integrating App Clips in .NET MAUI iOS APP
We have an iOS App built in .NET MAUI (Multi-platform App UI). This is a web view App. We wish to integrate APP Clips into this App. But we are unable to do it, due to less available resources online on such implementation. We do not wish to share code between .NET MAUI App and App clips We understand it is not possible to add APP Clips without a parent swift/Xcode app. As an alternative solution we were thinking to Create a new APP in APP Store Connect using XCode/swift and integrate app clips to it. This parent app when downloaded by users will only redirect users to our MAIN .NET MAUI app to app store connect. We need to know if such apps will be approved by APPSTORE Connect? Please guide us on this Also please do let us know if you have any other solution to integrate App clips to a .NET MAUI App
1
0
88
1w
Trailing closure bug?
i am trying to build my code and have ran into this error. "Trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure" i have been trying to figure it out for so long, and even ai cant figure it out. is this a bug, or am i missing some obvious way to fix this ? func loadUser(uid: String, completion: (() -&gt; Void)? = nil) { db.collection("users").document(uid).getDocument { [weak self] snapshot, error in guard let data = snapshot?.data(), error == nil else { completion?(); return } DispatchQueue.main.async { self?.currentUser = User( username: data["username"] as? String ?? "Learner", email: data["email"] as? String ?? "", profileImageName: "person.circle.fill", totalXP: data["totalXP"] as? Int ?? 0, currentStreak: data["currentStreak"] as? Int ?? 0, longestStreak: data["longestStreak"] as? Int ?? 0, level: data["level"] as? Int ?? 1, levelProgress: data["levelProgress"] as? Double ?? 0.0, xpToNextLevel: data["xpToNextLevel"] as? Int ?? 100, completedLessons: data["completedLessons"] as? [String] ?? [] ) self?.saveUser() completion?() } } }
2
0
116
2w
Issue with Swift 6 migration issues
We are migrating to swift 6 from swift 5 using Xcode 16.2. we are getting below errors in almost each of our source code files : Call to main actor-isolated initializer 'init(storyboard:bundle:)' in a synchronous non isolated context Main actor-isolated property 'delegate' can not be mutated from a nonisolated context Call to main actor-isolated instance method 'register(cell:)' in a synchronous nonisolated context Call to main actor-isolated instance method 'setup()' in a synchronous nonisolated context Few questions related to these compile errors. Some of our functions arguments have default value set but swift 6 does not allow to set any default values. This requires a lot of code changes throughout the project. This would be lot of source code re-write. Using annotations like @uncheck sendable , @Sendable on the class (Main actor) name, lot of functions within those classes , having inside some code which coming from other classes which also showing main thread issue even we using @uncheck sendable. There are so many compile errors, we are still seeing other than what we have listed here. Fixing these compile errors throughout our project, would be like a re-write of our whole application, which would take lot of time. In order for us to migrate efficiently, we have few questions where we need your help with. Below are the questions. Are there any ways we can bypass these errors using any keywords or any other way possible? Can Swift 5 and Swift 6 co-exist? so, we can slowly migrate over a period of time.
1
0
97
2w
Can I use @_implementationOnly import in my Framework
We have FrameworkA which needs to use another FrameworkB internally to fetch a token. Now when I try to use this FrameworkA, we are seeing an issue with internal framework i.e. No such module 'FrameworkB'. But when I use @_implementationOnly import for the internal FrameworkB, I didn't see any issues. So just wanted to check If I can go ahead and use this @_implementationOnly import flag in Production?
2
0
70
3w
libsystem_c.dylib: Assertion failed: (p->val == key), function lookup_substsearch, file collate.c, line 596.
At least with macOS Sequoia 15.5 and Xcode 16.3: $ cat test.cc #include &amp;lt;locale.h&amp;gt; #include &amp;lt;string.h&amp;gt; #include &amp;lt;xlocale.h&amp;gt; int main(void) { locale_t l = newlocale(LC_ALL_MASK, "el_GR.UTF-8", 0); strxfrm_l(NULL, "ό", 0, l); return 0; } $ c99 test.c &amp;amp;&amp;amp; ./a.out Assertion failed: (p-&amp;gt;val == key), function lookup_substsearch, file collate.c, line 596. Abort trap: 6
3
0
100
3w
Xcode
Hello, I'm not a developer. I have an app in the App Store and an Apple Developer account. I have two questions: 1. I'm trying to find out exactly where the source code of my app is located - I can't. It should be in Xcode. There is only Xcode cloud in my account, which is inactive. 2. I want to find out what programming language my app is written in. How do I do this?
2
0
94
3w