Posts

Post not yet marked as solved
0 Replies
302 Views
A common AR use case is for a user to view a model in augmented reality and once correctly composed wish to share that view. Is there a recommended approach with ARKit 4 to capture a photo of the AR scene then invoke a share sheet to send to a contact or save to the camera roll? Best practice options for both UIKit and SwiftUI would be ideal. Additionally any advice on embedding GPS data into the image as you’d expect to get with a regular photo taken by the camera would be most appreciated.
Posted Last updated
.
Post not yet marked as solved
1 Replies
416 Views
The original release of SwiftUI required wrapping UIImagePickerController to access the camera. Has there been any update to this approach among the updates to SwiftUI announced at WWDC 2020?
Posted Last updated
.
Post not yet marked as solved
2 Replies
758 Views
It's possible to view example AR models in Safari on an iOS device on this page: https://developer.apple.com/augmented-reality/quick-look/ On my iPhone, after clicking on a model I have the option to view the model in "AR" or "Object" modes, where Object allows you to view the model just with a white background. In my app I'm displaying an AR model using AR Quick Look (called in a SwiftUI view). ARQuickLookView(name: "my-AR", arFileType: "reality") …which allows the user to view the model in "AR" mode, but I don't know how to enable "Object" mode as described above. Ideally I'd like to lock the view to "Object" mode only in this part of the app. How can I do that?
Posted Last updated
.
Post marked as solved
5 Replies
4.8k Views
Hello,This is a beginner question but it has me stumped. I have a JSON file in the bundle that includes valid UUIDs generated from within Xcode in the format "D9BB6CD0-FBB9-49B9-9076-07D49E1707B2". I want to store these in a UUID variable within a struct.struct model: Codable { var id: UUID var name: String … }I use a standard JSONDecoder() call to import the models.let importedModels = Bundle.main.decode([model].self, from: "models.json")All of the other JSON data imports correctly. In fact it's been working so well it took me a while to notice that the UUIDs were not being populated. I just get a nil value for variable id.I believe what's happening is that the decoder isn't initialising the UUID from the string properly and it's quietly failing (on UUID data only). But I don't understand why because in the definition for public struct UUID in Foundation it says, /// Create a UUID from a string such as "E621E1F8-C36C-495A-93FC-0C247A3E6E5F". /// /// Returns nil for invalid strings. public init?(uuidString string: String)So if the string is valid is should work and I am using valid strings.E621E1F8-C36C-495A-93FC-0C247A3E6E5F // Foundation documentation D9BB6CD0-FBB9-49B9-9076-07D49E1707B2 // from models.jsonAny help greatly appreciated.
Posted Last updated
.
Post marked as solved
2 Replies
1.1k Views
I have a static JSON file that's used as a data structure for importing information into my app. The JSON file doesn't change - if the content of the JSON file ever needs to be updated I'm happy (at this time) to issue an update in a point release. The JSON decoding only needs to be done once with the decoded result stored in an Environment variable for future reference. While it shouldn't be too computationally intensive to re-parse the JSON there really isn't any need once it's been done once.So my question is - in a SwiftUI app where should I run the JSON decoder? I've looked at AppDelegate.swift, SceneDelegate.swift and ContentView.swift but I'm not sure if any of these are the right place to run a once-off decoder. Any advice appreciated.
Posted Last updated
.
Post marked as solved
2 Replies
725 Views
I've searched for this topic and haven't found an answer so I'll ask here.My scenario is probably best illustrated with an example. Let's say I have an app that sells desktop images of cars for $1 each. As a promotion, if Ferrari wanted to make the desktop images of their cars free for say 30 days and pay me the $1 per download instead of the end user for that time period, is that possible?
Posted Last updated
.
Post marked as solved
6 Replies
2.2k Views
On the Creating 3D Content with Reality Composer page it says, "To get Reality Composer for iOS, request access to the beta version from the Apple Developer dowload page." But there is no request option on that page. However if you do a text search for "request" on that page it turns up one hidden result. Opening the Safari web inspector allowed me to find the following reference, "<p>Thank you for your interest in <span class="modal-agreement-name nowrap"></span>. We’ve received your request. If accepted, you'll receive an email from TestFlight.</p>"So… getting Reality Composer on iOS is kind of like a treasure hunt? I'm confused. I do have Xcode Version 11.0 beta 2 (11M337n) installed on my Mac and have been using Reality Composer there but want access to it on iOS too. Any assistance most appreciated.
Posted Last updated
.