Discuss the latest Apple technologies announced at WWDC23.

Posts under WWDC23 tag

84 Posts

Post

Replies

Boosts

Views

Activity

SwiftUI inspector full height
Adding an inspector and toolbar to Xcode's app template, I have: struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() .toolbar { Text("test") } .inspector(isPresented: .constant(true)) { Text("this is a test") } } } In the preview canvas, this renders as I would expect: However when running the app: Am I missing something? (Relevant wwdc video is wwdc2023-10161. I couldn't add that as a tag)
2
0
1.5k
Oct ’23
wwdc2023-10162 - Grid Navigation on macOS
In the video 'The SwiftUI cookbook for focus" a key detail is left out. https://developer.apple.com/videos/play/wwdc2023/10162/?time=1130 selectRecipe has no code provided meaning it leaves out a vital detail, how to handle up and down keyboard presses. If a LazyVGrid has 4 items per row with the current shape of the window and the user presses the down key, how is the application supposed to know which item is directly underneath the currently focused one? Or if they press up and they need to know which is directly above? What happens when the user resizes the window and the number of items per row changes? This would seem to require knowing the exact current layout of the window to return the correct recipe ID. The code provided isn't wrapped in a complex GeometryReader so I assume there's some magic I am missing here. I am trying to create a similar LazyVGrid that can be navigated with the keyboard as with the recipes grid here but have no means of implementing .onMoveCommand in such a way that makes sense. At the moment, SwiftUI seems to be intentionally built in such a way to defy all attempts to implement keyboard navigation.
0
2
732
Oct ’23
How to use ParameterSummaryBuilder?
I'm trying to put together an app intent that allows a user to navigate to a specific part of my app. I've built a basic intent, and set up an AppEnum with a case for each "screen" in my app a user should be allowed to navigate to (e.g. "All Posts", "Favourite Posts", etc.). In addition, I'd like to include additional parameters based on the enum selected. For example, I'd like to include an enum case "Post" where a user can configure a specific post to navigate to. This would mean I can have an enum of "All Posts", "Specific Post", "Favourite Posts" etc. which is cleaner than having a separate intent for "Open Specific Post"... Is this possible? I can see ParameterSummaryBuilder, AppIntent.Switch etc. but there are no docs or examples using these. Can you provide more information on whether this is possible, and show an example of Swift code to do this. Thanks!
1
0
1.1k
Sep ’23
How to install macOS 14 Sonoma or 13 Ventura on an external partition
I would like to install macOS 14 Sonoma on an external partition, but I couldn't find an installer on the developer website. It seems that it's only possible to upgrade from the System Settings, so I thought I would install Ventura first on the separate partition and then upgrade to Sonoma. I downloaded the Ventura installer from the App Store and selected the external partition during the installation, but when the Mac reboots, it just reboots into my main macOS partition. If I shut down and hold the power button pressed to select the boot partition (I have a M1 MacBook Pro 14" 2022), then nothing happens: an indeterminate progress indicator spins for a couple seconds, the partition list remains there and I can only successfully boot into my main partition again. I also tried running the installer from another macOS Ventura and macOS Monterey partition I had installed last year, but when I select the partition on which to install the new Ventura, nothing happens and I can only quit the installer. Is there a way to debug all these issues? How can I install macOS Sonoma on a separate partition without overwriting my main macOS Ventura install?
4
2
4.1k
Jun ’23
VisionOS SDK
Maybe it's just me but It's a bit weird to have so many Vision OS sessions when the beta SDK doesn't come out until later this month right? Like what's the point.. If we can't try building things.
6
2
2.9k
Jun ’23
SKStoreReviewController.requestReview in ios 17
Subject: Bug Report: Issue with SKStoreReviewController.requestReview on iOS 17 beta 1 - Review Prompt Not Displaying Dear Apple Developer Support, I hope this email finds you well. I am writing to inform you about a bug that I have encountered while testing my app on the latest iOS 17 beta 1. Specifically, I have noticed that the SKStoreReviewController.requestReview() method does not display the review prompt on this beta release. Despite invoking the method, the expected review window does not appear for users to provide feedback or rate the app. This issue seems to be isolated to iOS 17 beta 1, as previous iOS versions did not exhibit this behavior. I understand that beta versions are prone to bugs and issues, and I am reporting this matter to assist in the improvement of the platform before the official release. If there are any additional steps or information required to help investigate and resolve this issue, please let me know, and I will be more than happy to provide them. Resolving this bug would greatly benefit developers who rely on the SKStoreReviewController functionality within their apps. Thank you for your attention to this matter, and I appreciate your ongoing dedication to enhancing the iOS platform for app development. Kind regards, Alexey
1
0
2.4k
Jun ’23
Call actor-isolated function backed by a DispatchSerialQueue using DispatchSerialQueue.async
In What's New In Swift, a new DispatchSerialQueue-backed actor was introduced. We're able to call MainActor-annotated functions using DispatchQueue.main.async without errors or warnings. For example: @MainActor func randomFunc() { print("Hello World") } DispatchQueue.main.async { randomFunc() } However calling a globalActor-annotated function or a regular actor-isolated function backed by a DispatchSerialQueue, we get the warning Actor-isolated instance method 'randomFunc()' can not be referenced from a non-isolated context; this is an error in Swift 6. Code here: actor MyActor { private let queue: DispatchSerialQueue nonisolated var unownedExecutor: UnownedSerialExecutor { queue.asUnownedSerialExecutor() } init(queue: DispatchSerialQueue) { self.queue = queue } func randomFunc() { print("Hello World!") } } let queue = DispatchSerialQueue(label: "actorQueue") let actor = MyActor(queue: queue) queue.async { actor.randomFunc() // Warning here } Although it has a warning, the code still runs successfully and prints Hello World, but it would also do so from another DispatchQueue not used by the actor (this was tested in Version 15.0 beta (15A5160n) Playground). My question: Can we remove the warning resulting from calling an actor isolated function backed by DispatchSerialQueue A using A.async { }, if that's safe behavior? If it's not safe, why not?
0
0
2k
Jun ’23
Archive WWDC23 Slack channels
Dear Apple, please archive the wwdc23 slack Q&A for the time when the resource goes offline. There's tons of questions and answers that don't exist anywhere else or are extremely hard to find. E.g. answer to SPM checkouts folder: Question: Dear SwiftPM team, Is there any way to keep SPM checkouts outside of project's DerivedData folder? Since it is kept there, whenever DerivedData gets removed, packages need to re-fetch. Answer: Xcode looks at the IDEClonedSourcePackagesDirPathOverride user default in the com.apple.dt.Xcode defaults domain, and if it's set, the checkouts will be placed in that directory instead.
1
1
985
Jun ’23
It'll be possible to trigger actions based on user's position?
One thing that was not very clear for me on the WWDC videos regarding VisionOS app development was: If I want to trigger an action (let's say change the scene) using the user's relative position to do so, am I going to be able to do it? Example: If the user comes too close to an object, it starts to play some animation. Reference video: wwdc2023-10080
1
0
1k
Jun ’23
Section collapse triangle for section header no longer supported with NavigationStack?
Since NavigationView is now deprecated, I’m trying to update my code to use NavigationStack instead. However, I found that when using NavigationStack, section headers within an overall List view no longer have the collapsing triangle functionality. This used to work for NavigationView, List view, Section headers. Am I missing something? Is there a way to get back the section header collapse triangle within an overall List view when encapsulating within a NavigationStack?
3
1
2.2k
Jun ’23
Messages Extension Mac-catalyst & macOS Sonoma
Hi according to the documentation we can have Message extensions in Mac Catalyst 14+, and that the MSStickerBrowserView is supported from Mac Catalyst 13.1+. But it doesn't seem possible to actually build an extension app, or Sticker extension, embedded in a Mac Catalyst app and have it appear in macOS messages. Error: iMessage Applications are not available when building for Mac Catalyst. and error: iMessage / Sticker Pack extensions are not available when building for Mac Catalyst. With the announcement for macOS Sonoma that the Stickers will be available in Mac Messages, is this finally going to be possible? If this isn't possible, why is there support for Mac Catalyst?
1
3
1.1k
Jun ’23
@Observable and other SwiftUI Macros
The sessions showing off the new SwiftUI macros are missing a key element.... How are they enabled within XCODE?!??!? For instance the session "Discover Observation in SwiftUI" starts with the code block. @Observable class FoodTruckModel { var orders: [Order] = [] var donuts = Donut.all } Well.... Something is missing here! I'm sure it's that I need to import something.... but for an intro session it MIGHT be important to mention what needs to be imported and any other requirements. Because right now all I'm getting is "Unknown attribute 'Observable'" So far this is a VERY disappointing WWDC. I got all excited about VisionOS... Nope, all the SDK isn't being release for a month. Reality Composer Pro... Not out yet. SwiftUI macros... Sure let's dive right in to step 6 and not tell you what you need to get started with this feature.
4
4
3.6k
Jun ’23
SwiftUI inspector full height
Adding an inspector and toolbar to Xcode's app template, I have: struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() .toolbar { Text("test") } .inspector(isPresented: .constant(true)) { Text("this is a test") } } } In the preview canvas, this renders as I would expect: However when running the app: Am I missing something? (Relevant wwdc video is wwdc2023-10161. I couldn't add that as a tag)
Replies
2
Boosts
0
Views
1.5k
Activity
Oct ’23
WidgetKit: Interactive widget rapid tap bypasses app intent
Rapidly tapping on a Button in an interactive widget bypasses the button's AppIntent action, and launches the host app instead. I've filed a radar for this, but is there any known workaround for this behaviour? Doesn't seem to happen when using Apple's first party app widgets.
Replies
0
Boosts
0
Views
612
Activity
Oct ’23
How to get super class memberBlocks using Swift Macros?
I'm trying to create swift macros for initializer. I can't get the members of the inherited class.
Replies
1
Boosts
0
Views
600
Activity
Oct ’23
wwdc2023-10162 - Grid Navigation on macOS
In the video 'The SwiftUI cookbook for focus" a key detail is left out. https://developer.apple.com/videos/play/wwdc2023/10162/?time=1130 selectRecipe has no code provided meaning it leaves out a vital detail, how to handle up and down keyboard presses. If a LazyVGrid has 4 items per row with the current shape of the window and the user presses the down key, how is the application supposed to know which item is directly underneath the currently focused one? Or if they press up and they need to know which is directly above? What happens when the user resizes the window and the number of items per row changes? This would seem to require knowing the exact current layout of the window to return the correct recipe ID. The code provided isn't wrapped in a complex GeometryReader so I assume there's some magic I am missing here. I am trying to create a similar LazyVGrid that can be navigated with the keyboard as with the recipes grid here but have no means of implementing .onMoveCommand in such a way that makes sense. At the moment, SwiftUI seems to be intentionally built in such a way to defy all attempts to implement keyboard navigation.
Replies
0
Boosts
2
Views
732
Activity
Oct ’23
How to use ParameterSummaryBuilder?
I'm trying to put together an app intent that allows a user to navigate to a specific part of my app. I've built a basic intent, and set up an AppEnum with a case for each "screen" in my app a user should be allowed to navigate to (e.g. "All Posts", "Favourite Posts", etc.). In addition, I'd like to include additional parameters based on the enum selected. For example, I'd like to include an enum case "Post" where a user can configure a specific post to navigate to. This would mean I can have an enum of "All Posts", "Specific Post", "Favourite Posts" etc. which is cleaner than having a separate intent for "Open Specific Post"... Is this possible? I can see ParameterSummaryBuilder, AppIntent.Switch etc. but there are no docs or examples using these. Can you provide more information on whether this is possible, and show an example of Swift code to do this. Thanks!
Replies
1
Boosts
0
Views
1.1k
Activity
Sep ’23
TipKit; only for SwiftUI or also for Swift?
I liked the TipKit presentation -- nice and short and to the point, great introduction! All the code snippets were in SwiftUI. Will TipKit be available for regular UIKit / AppKit apps as well, or is it restricted to only being used within SwiftUI apps? thanks
Replies
3
Boosts
6
Views
4.2k
Activity
Aug ’23
Vision Pro used outside
There was no mention if the Vision Pro could be used outside. Several of the other AR/VR systems out there are prohibited from this (sensors overload). Can the Vision Pro be used in sunlight? Thanks!
Replies
3
Boosts
5
Views
3.3k
Activity
Aug ’23
How to install macOS 14 Sonoma or 13 Ventura on an external partition
I would like to install macOS 14 Sonoma on an external partition, but I couldn't find an installer on the developer website. It seems that it's only possible to upgrade from the System Settings, so I thought I would install Ventura first on the separate partition and then upgrade to Sonoma. I downloaded the Ventura installer from the App Store and selected the external partition during the installation, but when the Mac reboots, it just reboots into my main macOS partition. If I shut down and hold the power button pressed to select the boot partition (I have a M1 MacBook Pro 14" 2022), then nothing happens: an indeterminate progress indicator spins for a couple seconds, the partition list remains there and I can only successfully boot into my main partition again. I also tried running the installer from another macOS Ventura and macOS Monterey partition I had installed last year, but when I select the partition on which to install the new Ventura, nothing happens and I can only quit the installer. Is there a way to debug all these issues? How can I install macOS Sonoma on a separate partition without overwriting my main macOS Ventura install?
Replies
4
Boosts
2
Views
4.1k
Activity
Jun ’23
VisionOS SDK
Maybe it's just me but It's a bit weird to have so many Vision OS sessions when the beta SDK doesn't come out until later this month right? Like what's the point.. If we can't try building things.
Replies
6
Boosts
2
Views
2.9k
Activity
Jun ’23
SKStoreReviewController.requestReview in ios 17
Subject: Bug Report: Issue with SKStoreReviewController.requestReview on iOS 17 beta 1 - Review Prompt Not Displaying Dear Apple Developer Support, I hope this email finds you well. I am writing to inform you about a bug that I have encountered while testing my app on the latest iOS 17 beta 1. Specifically, I have noticed that the SKStoreReviewController.requestReview() method does not display the review prompt on this beta release. Despite invoking the method, the expected review window does not appear for users to provide feedback or rate the app. This issue seems to be isolated to iOS 17 beta 1, as previous iOS versions did not exhibit this behavior. I understand that beta versions are prone to bugs and issues, and I am reporting this matter to assist in the improvement of the platform before the official release. If there are any additional steps or information required to help investigate and resolve this issue, please let me know, and I will be more than happy to provide them. Resolving this bug would greatly benefit developers who rely on the SKStoreReviewController functionality within their apps. Thank you for your attention to this matter, and I appreciate your ongoing dedication to enhancing the iOS platform for app development. Kind regards, Alexey
Replies
1
Boosts
0
Views
2.4k
Activity
Jun ’23
Call actor-isolated function backed by a DispatchSerialQueue using DispatchSerialQueue.async
In What's New In Swift, a new DispatchSerialQueue-backed actor was introduced. We're able to call MainActor-annotated functions using DispatchQueue.main.async without errors or warnings. For example: @MainActor func randomFunc() { print("Hello World") } DispatchQueue.main.async { randomFunc() } However calling a globalActor-annotated function or a regular actor-isolated function backed by a DispatchSerialQueue, we get the warning Actor-isolated instance method 'randomFunc()' can not be referenced from a non-isolated context; this is an error in Swift 6. Code here: actor MyActor { private let queue: DispatchSerialQueue nonisolated var unownedExecutor: UnownedSerialExecutor { queue.asUnownedSerialExecutor() } init(queue: DispatchSerialQueue) { self.queue = queue } func randomFunc() { print("Hello World!") } } let queue = DispatchSerialQueue(label: "actorQueue") let actor = MyActor(queue: queue) queue.async { actor.randomFunc() // Warning here } Although it has a warning, the code still runs successfully and prints Hello World, but it would also do so from another DispatchQueue not used by the actor (this was tested in Version 15.0 beta (15A5160n) Playground). My question: Can we remove the warning resulting from calling an actor isolated function backed by DispatchSerialQueue A using A.async { }, if that's safe behavior? If it's not safe, why not?
Replies
0
Boosts
0
Views
2k
Activity
Jun ’23
Archive WWDC23 Slack channels
Dear Apple, please archive the wwdc23 slack Q&A for the time when the resource goes offline. There's tons of questions and answers that don't exist anywhere else or are extremely hard to find. E.g. answer to SPM checkouts folder: Question: Dear SwiftPM team, Is there any way to keep SPM checkouts outside of project's DerivedData folder? Since it is kept there, whenever DerivedData gets removed, packages need to re-fetch. Answer: Xcode looks at the IDEClonedSourcePackagesDirPathOverride user default in the com.apple.dt.Xcode defaults domain, and if it's set, the checkouts will be placed in that directory instead.
Replies
1
Boosts
1
Views
985
Activity
Jun ’23
It'll be possible to trigger actions based on user's position?
One thing that was not very clear for me on the WWDC videos regarding VisionOS app development was: If I want to trigger an action (let's say change the scene) using the user's relative position to do so, am I going to be able to do it? Example: If the user comes too close to an object, it starts to play some animation. Reference video: wwdc2023-10080
Replies
1
Boosts
0
Views
1k
Activity
Jun ’23
Section collapse triangle for section header no longer supported with NavigationStack?
Since NavigationView is now deprecated, I’m trying to update my code to use NavigationStack instead. However, I found that when using NavigationStack, section headers within an overall List view no longer have the collapsing triangle functionality. This used to work for NavigationView, List view, Section headers. Am I missing something? Is there a way to get back the section header collapse triangle within an overall List view when encapsulating within a NavigationStack?
Replies
3
Boosts
1
Views
2.2k
Activity
Jun ’23
AVFoundation on visionOS?
Will it be possible to get direct access to all the different cameras of Vision Pro via AVFoundation or indirectly via other frameworks? Which sensors (inner and outer color & IR cameras, LiDAR, TrueDepth camera) will developers have access to on visionOS?
Replies
4
Boosts
1
Views
2.9k
Activity
Jun ’23
API for UWB and AirTag in WWDC23 ?
Hi all! I was hoping that in WWDC23 sessions, there would be an announcement on a new API for ultra wide-band and AirTags, in order to have access on developing apps with interaction between iPhones and AirTags using the UWB technology. But, I cannot see anything related to this topic. Do you think there will be any good news this year ?
Replies
2
Boosts
1
Views
1.9k
Activity
Jun ’23
Messages Extension Mac-catalyst & macOS Sonoma
Hi according to the documentation we can have Message extensions in Mac Catalyst 14+, and that the MSStickerBrowserView is supported from Mac Catalyst 13.1+. But it doesn't seem possible to actually build an extension app, or Sticker extension, embedded in a Mac Catalyst app and have it appear in macOS messages. Error: iMessage Applications are not available when building for Mac Catalyst. and error: iMessage / Sticker Pack extensions are not available when building for Mac Catalyst. With the announcement for macOS Sonoma that the Stickers will be available in Mac Messages, is this finally going to be possible? If this isn't possible, why is there support for Mac Catalyst?
Replies
1
Boosts
3
Views
1.1k
Activity
Jun ’23
@Observable and other SwiftUI Macros
The sessions showing off the new SwiftUI macros are missing a key element.... How are they enabled within XCODE?!??!? For instance the session "Discover Observation in SwiftUI" starts with the code block. @Observable class FoodTruckModel { var orders: [Order] = [] var donuts = Donut.all } Well.... Something is missing here! I'm sure it's that I need to import something.... but for an intro session it MIGHT be important to mention what needs to be imported and any other requirements. Because right now all I'm getting is "Unknown attribute 'Observable'" So far this is a VERY disappointing WWDC. I got all excited about VisionOS... Nope, all the SDK isn't being release for a month. Reality Composer Pro... Not out yet. SwiftUI macros... Sure let's dive right in to step 6 and not tell you what you need to get started with this feature.
Replies
4
Boosts
4
Views
3.6k
Activity
Jun ’23