Discuss the latest Apple technologies announced at WWDC23.

Posts under WWDC23 tag

74 Posts
Sort by:
Post not yet marked as solved
3 Replies
735 Views
I'd like to implement a fully immersive space that's experienced by multiple Vision Pro users simultaneously via SharePlay. To do this, the multiple Vision Pro users will join a SharePlay-enabled visionOS window that has a button to enter a fully immersive space, which is also SharePlay-enabled. I tried following the WWDC sessions and docs, but they don't provide enough detail about integrating SharePlay into an existing window and immersive space. How can I adjust my SharePlay code so it makes my visionOS window + fully immersive space SharePlay-able? Please see existing code below for a SharePlay visionOS widow, thank you. P.S. WWDC ref. https://developer.apple.com/videos/play/wwdc2023/10087 import SwiftUI import RealityKit import RealityKitContent import GroupActivities import LinkPresentation struct SharePlayWorld: View, GroupActivity { @Environment(ViewModel.self) private var model @Environment(\.openWindow) private var openWindow @Environment(\.dismissWindow) private var dismissWindow @Environment(\.openImmersiveSpace) private var openImmersiveSpace @Environment(\.dismissImmersiveSpace) private var dismissImmersiveSpace var body: some View { @Bindable var model = model Toggle( model.isShowingPracticeSpace ? "Leave Space" : "Enter Space", isOn: $model.isShowingPracticeSpace ) .onChange(of: model.isShowingPracticeSpace) { _, isShowing in Task { if isShowing { await openImmersiveSpace(id: "SharePlayWorld") } else { await dismissImmersiveSpace() } } } .toggleStyle(.button) } // SHAREPLAY CODE private func startSharePlaySession() async { for await session in SharePlayWorld.sessions() { guard let systemCoordinator = await session.systemCoordinator else { continue } let isLocalParticipantSpatial = systemCoordinator.localParticipantState.isSpatial Task.detached { for await localParticipantState in systemCoordinator.localParticipantStates { if localParticipantState.isSpatial { // Start syncing scroll position } else { // Stop syncing scroll position } } } var configuration = SystemCoordinator.Configuration() configuration.spatialTemplatePreference = .sideBySide systemCoordinator.configuration = configuration session.join() } // Create the activity let activity = SharePlayWorld() // Register the activity on the item provider let itemProvider = NSItemProvider() itemProvider.registerGroupActivity(activity) // Create the activity items configuration let configuration = await UIActivityItemsConfiguration(itemProviders: [itemProvider]) // Provide the metadata for the group activity configuration.metadataProvider = { key in guard key == .linkPresentationMetadata else { return nil } let metadata = LPLinkMetadata() metadata.title = "Explore Together" metadata.imageProvider = NSItemProvider(object: UIImage(named: "explore-activity")!) return metadata } self.activityItemsConfiguration = configuration } } #Preview { SharePlayWorld() .environment(ViewModel()) }
Posted
by trigonaut.
Last updated
.
Post not yet marked as solved
0 Replies
323 Views
I have to turn off closed captions for every video in the WWDC catalogue. How can i set all videos CC to be off by default?
Posted
by RyanTCB.
Last updated
.
Post not yet marked as solved
0 Replies
724 Views
Related to this post. In my chat view, each time I load new page (items are added from top), the ScrollView jumps to top instead of maintaining scrollPosition. Here is my scroll view: GeometryReader { geometryProxy in ScrollView(showsIndicators: false) { VStack(spacing: 0) { if viewModel.isLoading { LoadingFooter() } messagesView .frame(minHeight: geometryProxy.size.height - loadingFooterHeight - bottomContentMargins, alignment: .bottom) } } .scrollDismissesKeyboard(.interactively) .defaultScrollAnchor(.bottom) .scrollPosition(id: $scrolledId, anchor: .top) .contentMargins(.bottom, bottomContentMargins, for: .scrollContent) .onChange(of: scrolledId, scrollViewDidScroll) } And this is the messages view @ViewBuilder var messagesView: some View { LazyVStack(spacing: 0) { ForEach(sectionedMessages) { section in Section(header: sectionHeaderView(title: section.id)) { ForEach(section, id: \.id) { message in MessageView(message: message) .padding(.horizontal, .padding16) .padding(.bottom, .padding8) .id(message.id) } } } .scrollTargetLayout() } } Printing the scrolledId after a page load, I can see it hasn't changed, but the ScrollView position does.
Posted
by itayAm.
Last updated
.
Post not yet marked as solved
0 Replies
511 Views
I'm experiencing an issue trying to install the 'mirroringworkoutssample' app from the official Apple documentation on my Apple Watch. When attempting a direct installation from the Apple Watch, I receive an error stating, "Cannot install this app due to an inability to verify its integrity." Has anyone else encountered this problem or can provide any solutions or insights? ** I have a 'Development' type certificate that allows for watchOS(it includes iOS, tvOS ..) development. ** also added WKCompanionAppBundleIdentifier com.example.apple-samplecode.MirroringWorkoutsSample7C76V3X7AB.watchkitapp
Posted
by hhajime.
Last updated
.
Post not yet marked as solved
24 Replies
19k Views
Hi, I am getting a linking error when building my app to run against an iOS17 device, using Xcode15. Same project builds and runs fine with Xcode 14 and iOS16. The linking error just says: clang: error: unable to execute command: Segmentation fault: 11 clang: error: linker command failed due to signal (use -v to see invocation) Not sure what I should try to overcome this. I can't run my app on an iOS17 device. It builds, links and runs just fine on a simulator.
Posted
by zulfishah.
Last updated
.
Post marked as Apple Recommended
682 Views
I am having trouble getting the new mirroring session API to send data to the companion device. when starting a workout on my watch I call startMirroringToCompanionDevice and then go onto my iOS workout manager to handle it via the workoutSessionMirroringStartHandler, I set the delegate here and can confirm that it is indeed not nil within that function but when I go to send some data across I get an error saying the remote session delegate was never set up. I noticed this same behaviour in the WWDC demo and have been unable to find a solution that will allow me to send data across the mirrored session even though I am able to control the workout session state(pause, resume, end) on both Phone and Watch. Has anyone else encountered this issue? Anyone have a solution?
Posted
by sebrob.
Last updated
.
Post not yet marked as solved
6 Replies
16k Views
Is it possible to use an iPhone running iOS 17 with Xcode 14.3.1? I tried to use the old method but nothing. In Xcode 15 inside DeviceSupport folder there isn't the folder of iOS 17.
Posted
by RedSun.
Last updated
.
Post not yet marked as solved
0 Replies
499 Views
Related to this StackOverflow post (not mine). In my chat view: ScrollView(showsIndicators: false) { messagesView } .safeAreaInset(edge: .bottom) { composerView } .scrollDismissesKeyboard(.interactively) Using interactively keyboard dismissing won't change the safe area size interactively causing a weird UI glitch like you can see in the post up above. The keyboard and composer play nice when I use it as tool bar, But I want my composer to always be visible (obviously), I've tried to play with FocusState to change the composer parent: .toolbar { ToolbarItem(placement: $isFocused ? .keyboard : .bottomBar) { bottomView } } But not only it redraws the view each time, it will also make the view lose its focus state, affectively releasing the keyboard. Plus it feels kind of a hack. What is the right way to make the composer move with the keyboard interactively and stay on screen while the keyboard is gone, like in iMessages?
Posted
by itayAm.
Last updated
.
Post not yet marked as solved
0 Replies
453 Views
I attempted to utilize the Background Assets feature for an iOS app. While debugging, I employed the following command to trigger the installation event: xcrun backgroundassets-debug -b <bundleID> -s --app-install -d <Device ID> This command worked flawlessly on an iPhone. However, when I attempted to trigger the installation event on a Mac, I encountered the following error message: The requested device to send simulation events to is not available. Verify that the device is connected to this Mac. Please note that the xcrun backgroundassets-debug -l command only displays a list of connected devices.Mac is not listed in that list.
Posted Last updated
.
Post not yet marked as solved
2 Replies
507 Views
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)
Posted
by Audulus.
Last updated
.
Post not yet marked as solved
0 Replies
340 Views
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.
Posted
by codecomet.
Last updated
.
Post not yet marked as solved
0 Replies
358 Views
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.
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.4k Views
The new ARKit 3D hand tracking looks amazing, but most of the demos seem to be done with the Vision Pro which has far more sensors than other iOS devices. Will the ARKit 3D hand tracking also be available on iOS Devices with LiDAR? If not, is there any alternatives developers can do to achieve similar 3D hand tracking on mobile devices to make the interaction experience consistent across devices? (I know Vision only detects 2D hand pose) Thanks!
Posted
by Dave_evaD.
Last updated
.
Post not yet marked as solved
1 Replies
678 Views
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!
Posted Last updated
.
Post not yet marked as solved
3 Replies
3.0k Views
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
Posted Last updated
.
Post not yet marked as solved
3 Replies
2.5k Views
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!
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.4k Views
Xcode Server is say goodbye at Xcode15 Beta. Hello Apple: As iOS developers and users of Xcode Server, we hope that Apple can retain the functionality of Xcode Server or provide an API for Xcode Server, open source the code, so that Xcode Server can continue to operate and provide better services for iOS developers. Additionally, Apple's recommendation of Xcode Cloud has raised some concerns among us. We are very grateful to Apple for creating this excellent tool that helps us automate building, testing, and deploying iOS applications, improving our development efficiency and quality. However, we are disappointed with the removal of Xcode Server from the latest Xcode 15 version. At the same time, we also have some doubts about Apple's proposed Xcode Cloud. Firstly, we hope that Apple can recognize that Xcode Server is an essential tool for iOS developers. Many development teams rely on Xcode Server for continuous integration and delivery, enabling them to quickly build, test, and deploy new versions of the application. If Xcode Server is removed, developers will need to spend more time and effort on these tasks, greatly reducing development efficiency and quality. Secondly, although Apple has proposed Xcode Cloud, we believe that it has some problems. Xcode Cloud is cloud-deployed, which presents limitations on private networks and data security, and lacks the ResetAPI of Xcode Server, making it difficult to integrate with other systems. Also, Xcode Cloud requires payment, which may be a considerable expense for individual developers and small teams. Therefore, we hope that Apple can reconsider and retain the functionality of Xcode Server or provide an API for Xcode Server, open source the code, so that Xcode Server can continue to operate and provide better services for iOS developers. At the same time, we also hope that Apple can continue to improve Xcode Cloud and address its problems to provide better cloud services for iOS developers. Thanks
Posted
by rbbtsn0w.
Last updated
.
Post not yet marked as solved
4 Replies
3.0k Views
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?
Posted
by Nickkk.
Last updated
.