Post

Replies

Boosts

Views

Activity

WorldMap doesn't contain all Anchors?
Background So, I've got an anchor that I add to my Session after performing a raycast from a user's tap. This anchor is named "PictureAnchor". This anchor is not getting saved in my scene's world map, and I'm not sure why. Information Gathering I keep an eye on my session by outputting some information in func session(_ session: ARSession, didUpdate frame: ARFrame) As the ARFrame's are processed I look at the scene's anchors via sceneView.scene.anchors.filter({$0.name == "PictureAnchor" and I see that my anchor is present in the sceneAnchors. However, when I do frame.anchors.filter to check the anchors of the ARFrame itself, my PictureAnchor is never present. Furthermore, if I "save" the worldMap, an Anchor named PictureAnchor is not present. Note: I could be totally wrong on how to read the data inside a saved world map, but I'm taking the anchors array at face value. Other Information I've noticed that the AR Persistence sample project actually checks for the anchor to be present in the ARFrame's anchors before permitting a save, but this condition is never happening for me. I also noticed that my scene can have over 100 anchors, and the frame can have over 40, but only around 8 or 16 anchors are saved to the world map. Main Question Restated So, my main question is, why is my user-added "PictureAnchor" not present in the ARWorldMap, when I save my scene's map? I see that it's present in the scene's anchors, but not present in the ARFrame's anchors. A model entity is visible in the scene after being attached to this anchor as well.
1
0
910
Feb ’22
Modify Reality Composer Asset in code?
Hello, I’ve noticed that when I set the image of a picture frame asset in Reality Composer it will change its size and aspect ratio to match the image. That’s pretty nice! I would like to let a user dynamically modify that picture while running the app. Is this possible? Or are the models properties you set in the composer locked in when you export?
1
0
992
Jan ’22
RealityKit or ARKit? Which is right for me?
I want to create a feature where a user can stick images down my app onto their walls. I want to persist their placements between launches and use pinching a panning gestures to manipulate the images. I see lots of articles going back a few years that show how to do this in ARKit, but going through WWDC videos I’m seeing a trend toward RealityKit, and am starting to think that’s the “right” thing to learn. Is RealityKit to most up to date secret sauce? Is there a sample project like this one but using RealityKit? https://developer.apple.com/documentation/arkit/environmental_analysis/placing_objects_and_handling_3d_interaction
1
0
2.1k
Jan ’22
Package.resolved file is missing from the repository
For my first build, my package.resolved was not committed to the respository. I've fixed that and if I check my main branch on GitHub I can see the package.resolved file in the xcshareddata directory. Even so, Xcode cloud is telling me that the file is missing and is failing to start my builds. Could there be a caching issue going on? My .gitignore file is empty.
3
0
1.8k
Dec ’21
[iOS15] Fruta Doesn't Launch With Populated State
Asking with the WWDC-10220 tag because Fruta is the sample code for this presentation. When launching Fruta on a landscape iPad Pro 11", the "State" of the application is completely empty until the user taps the back button. After tapping back everything appears to pop into place. Is this expected behavior in SwiftUI when using split screens? NavigationLinks are finicky and I'm expecting the programmatic setting of the primary column "selection" to be resolved on launch, not when the user taps back.
0
0
893
Jul ’21
[Getting Started] Selecting default navLink on startup.
So, I've got a SwiftUI app with a triple column splitView. When the app starts on an 11 inch iPad, the "primary" column is offscreen. The primaryColumn has a List full of navigationLinks. Like so: List { ForEach(items, id: \.itemID) { item in NavigationLink(tag: item, selection: $selectedItem) {               ItemDetailsView(item: item) ... Now, the selection of the first Column in the split view cascades through the rest of the app, so populating it is pretty important. I've tried having the selectedItem be set from an EnvironmentObject. I've also tried having it set in onAppear. Everything I try only causes a selection the "pop into place" whenever I expose the primary column of the sidebar. Am I going about this the wrong way? Is it because the sidebar is hidden by default?
1
0
824
Jul ’21
Black Screen After Dismissing Modal Controller
Hey All,Been digging around the internet looking for this one, and while stackoverflow has some relevant solutions, none are working for me.My View Hierarchy is the followingView--->UISplitViewController.view ( set as a child viewController )--------> rootViewController.view (set as the mainViewController of the splitView)--------> detailViewController.view (set as the detailViewController of the splitview)Via the iPhone 6 simulator(split view is always collapsed) I present a modal viewcontroller with the following code: UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; [navigationController.navigationBar setBarStyle:UIBarStyleBlack]; [navigationController setModalPresentationStyle:UIModalPresentationPopover]; navigationController.popoverPresentationController.sourceView = view; navigationController.popoverPresentationController.barButtonItem = barButtonItem; navigationController.popoverPresentationController.delegate = self; [self presentViewController:nav animated:YES completion:nil];I dissmiss the presented controller from that viewController by calling:[self dismissViewControllerAnimated:true completion:nil];If I set animated to "false" I dont have any problems, but it looks bad and doesnt make sense.I see some posts regarding this and custom presenatation methods, but Im not using anything custom here.Any Help is appreciated!EDIT:On iPhone the ModalPresentationStyle should default to UIModalPresentationOverFullScreen, so I tried setting the presentationStyle directly to that, and it worked!If I set the presentationStyle to "FullScreen" I get the same behavior, a black screen after dismissing.
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
3.8k
Apr ’21