Post

Replies

Boosts

Views

Activity

OBJECT CAPTURE API
Now that we have the Vision Pro, I really want to start using Apple's Object Capture API to transform real objects into 3D assets. I watched the latest Object Capture vid from WWDC 23 and noticed they were using a "sample app". Does Apple provide this sample app to VisionOS developers or do we have to build our own iOS app? Thanks and cheers!
3
0
1.4k
Jun ’23
VOLUMES!
Very excited about the potential of using 3D video within a volume for VisionOS. For example, I want to offer experiences where users can see a video playing in a volume and have the ability to walk around it. My question is, how would you capture 3D video that would play in this volume? Thanks
0
0
460
Jul ’23
Swift UI NavigationLink Oval Button Needs to Disappear
I've setup a NavigationLink so users can tap on the image and they're taken to another view, in this case "FenderExperience". I can't for the life of me figure out how to make this oval bar behind the image disappear. Is this an Xcode preview issue? I'm running Xcode 15.2 struct BrandImage: View { var body: some View { VStack(alignment: .leading) { NavigationStack { Text("Ralph Lauren") .font(.title) .padding(.bottom, -5) Image("RL") .resizable() .scaledToFit() .frame(width: 300, height: 200) .overlay( RoundedRectangle(cornerRadius: 0) .stroke(Color.white, lineWidth: 2)) Text("Fender") .font(.title) .padding(.bottom, -5) NavigationLink(destination: FenderXperience()) { Image("Fender II") .resizable() .scaledToFit() .frame(width: 300, height: 95) .overlay( RoundedRectangle(cornerRadius: 0) .stroke(Color.white, lineWidth: 2)) } Text("Burton") .font(.title) .padding(.bottom, -5) Image("Burton") .resizable() .scaledToFit() .frame(width: 300, height: 200) .overlay( RoundedRectangle(cornerRadius: 0) .stroke(Color.white, lineWidth: 2)) Text("Ray Ban") .font(.title) .padding(.bottom, -5) Image("Ray Ban") .resizable() .scaledToFit() .frame(width: 300, height: 200) .overlay( RoundedRectangle(cornerRadius: 0) .stroke(Color.white, lineWidth: 2)) Text("Levi's") .font(.title) .padding(.bottom, -5) Image("Levis II") .resizable() .scaledToFit() .frame(width: 300, height: 200) .overlay( RoundedRectangle(cornerRadius: 0) .stroke(Color.white, lineWidth: 2)) } } .padding(.leading, 50) } } #Preview { BrandImage() }
0
0
576
Jan ’24
Model3D in Data Structure
I'm trying to use Model3D in a similar fashion to how I've used Image in the below data structure for my visionOS app and I keep getting the following error message. Reference to generic type 'Model3D' requires arguments in <...> Here is my data structure code. import Foundation import SwiftUI import RealityKit struct BrandEcommData: Hashable, Codable, Identifiable { var id: Int var brand: String var name: String var category: String var itemDetail: String var price: String var itemDescription: String var imageName: String var ThreeDitem: String var image: Image { Image(imageName) } var volume: Model3D { Model3D(ThreeDitem) } }
3
0
818
Feb ’24
Model3D Not Appearing in Simulator
Anyone else having issues where you can see your 3D models in Xcode preview but when running simulator all you see is the progress view spinner? Below is my Model3D load that I can see in preview but in simulator it only shows the spinner. Any suggestions? import RealityKit struct Three_D_Ad: View { var body: some View { VStack { Image("Fender") Text("Fender Stratocaster") .font(.title) Text("Legendary Sound") Model3D(named: "Fender") { model in model .resizable() .scaledToFit() .scaleEffect(0.75) } placeholder: { ProgressView() } } } } #Preview { Three_D_Ad() }
2
0
795
Feb ’24
Xcode Preview Causing Crashes
Building in visionOS and one of my Swift UI views keeps causing Xcode to crash. The root issue is within the preview code, stuck on updating the preview code to prevent Xcode from crashing. When I run the simulator the app works perfectly, no bugs or issues. Any advice on how to update the preview code would be very helpful :) import RealityKit import RealityKitContent struct BrandImage: View { @State private var currentIndex: Int = 0 @Environment(\.openWindow) private var openWindow @EnvironmentObject var sharedAppState: SharedAppState var brand: [BrandEcommData] var initialBrand: BrandEcommData init(brand: [BrandEcommData], initialBrand: BrandEcommData) { self.brand = brand self.initialBrand = initialBrand if let initialIndex = brand.firstIndex(where: { $0.id == initialBrand.id}) { _currentIndex = State(initialValue: initialIndex) } } var body: some View { HStack(spacing: 0) { ZStack { ForEach(0..<brand.count, id: \.self) { index in if index == currentIndex { VStack { Text(brand[index].brand) .padding(.top, 5) brand[index].image .resizable() .scaledToFit() } .transition(.scale) } } HStack { Button(action: { withAnimation { self.currentIndex = (self.currentIndex - 1 + brand.count) % brand.count sharedAppState.currentModelId = brand[currentIndex].id } }) { Image(systemName: "arrow.left.circle.fill") .font(.largeTitle) .foregroundStyle(.linearGradient( colors: [.black, .gray], startPoint: .top, endPoint: .bottom)) } .padding(.leading, 20) Spacer() Button(action: { withAnimation { self.currentIndex = (self.currentIndex + 1) % brand.count sharedAppState.currentModelId = brand[currentIndex].id } }) { Image(systemName: "arrow.right.circle.fill") .font(.largeTitle) .foregroundStyle(.linearGradient( colors: [.black, .gray], startPoint: .top, endPoint: .bottom)) } .padding(.trailing, 20) } VStack { HStack { Spacer() Button(action: { openWindow(id: "volumetric") }) { Image(systemName: "cube.transparent") .font(.title) .padding() .foregroundStyle(.linearGradient( colors: [.black, .gray], startPoint: .top, endPoint: .bottom)) } } Spacer() } } .frame(maxWidth: .infinity) Rectangle() .frame(width: 2) .foregroundStyle(.linearGradient( colors: [.black, .gray], startPoint: .top, endPoint: .bottom)) VStack { Text(brand[currentIndex].name) .font(.title2) Text(brand[currentIndex].itemDetail) .font(.subheadline) Text(brand[currentIndex].itemDescription) .padding() Text(brand[currentIndex].price) } } .onAppear { sharedAppState.currentModelId = initialBrand.id } } } #Preview { if let initialBrand = ecommdata?.first { BrandImage(brand: ecommdata!, initialBrand: initialBrand) } else { Text("Unable to load 3D Asset") } }
4
0
993
Feb ’24
Shopify iOS SDK Apple Pay CSR Error: CSR algorithm/size incorrect. Expected: RSA(2048)
Integrating Apple Pay for a Shopify Store via headless ecomm. Shopify on the backend/iOS + visionOS app on the front end. Shopify won't admit that they're at the wrong here BUT they are. The available CSR file from Shopify that you download is not using the encryption method Apple accepts, therefore you have to work some OpenSSL magic on your Mac terminal to create the correct encryption Apple Developer requires. Open Chat GPT 4.0 or later and type in the below, your issue is solved on that front. "I'm trying to upload a certificate signing request file to create a merchant identity certificate for Apple Pay. I'm getting the following error message from Apple, "CSR algorithm/size incorrect. Expected: RSA(2048)". What does this mean and how do I fix the CSR file? I've uploaded the CSR file for reference." My issue now is that Shopify gives me an error when attempting to upload the Merchant ID certificate from Apple Developer. Simply stating, "An error occurred while trying to save the certificate." Anyone else get this far and run into this issue? Thanks
0
0
580
Apr ’24