Make your first Apple Vision Pro app!

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 93

  • @iTarek
    @iTarek 10 месяцев назад +26

    Three months ago, you created this amazing video. You need to create more videos. This is the most useful video I've seen in the field of developing for VisionOS.

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад +6

      Thanks for your kind words, I’m super glad you find this tutorial useful!

    • @richie_01
      @richie_01 3 месяца назад

      This

  • @rick75916
    @rick75916 10 месяцев назад +4

    Thanks Yuma for sharing this great tutorial! I'm new to both swift and swiftUI, your tutorial addresses many aspects of creating a complete VR application for VisionOS. It is a great starting point for anyone new in this field. It is impressive that know all this stuff at your age!

  • @Darkienzo1
    @Darkienzo1 10 месяцев назад +1

    Great tutorial man, new to visionOS here and your videos are easy to follow and very informative.

  • @AmmaniNair-h4i
    @AmmaniNair-h4i 9 месяцев назад +1

    This is awesome and so useful. Great job. Hope to see more!

  • @ton101_zh
    @ton101_zh 10 месяцев назад +8

    please make more video like this! And especially for non-ever Swift people.

  • @danielrossy7453
    @danielrossy7453 Год назад +4

    Great tutorial! Thank you so much! Please keep going with VisionOS, really helpful

    • @AnyoneCanCode
      @AnyoneCanCode  Год назад +2

      Thanks for your kind words! I’ll try to make some follow up tutorials when I’m free from school and other projects 😅

  • @KaleidoKurt
    @KaleidoKurt 11 месяцев назад +6

    Great tutorial, thanks for putting this together! Any plans to make a more in depth visionOS tutorial? That's something that I would pay for as a beginning in Swift.
    Also, I suggest slowing down a bit and walking through the concepts a bit more. I had to pause every few seconds because you were going so quickly :) otherwise great!

    • @AnyoneCanCode
      @AnyoneCanCode  11 месяцев назад +3

      Thanks! I’ll see if I can put together another tutorial when I’m free.
      Thanks for your feedback as well! I’m trying to strike a balance between keeping the tutorials short and adding more detail, since I don’t want to bore anyone 😅 I’ll take this into consideration though!

  • @175726
    @175726 11 месяцев назад

    Thanks!

    • @AnyoneCanCode
      @AnyoneCanCode  11 месяцев назад

      You’re welcome, and thanks for this! 😊

  • @benyao788
    @benyao788 10 месяцев назад +3

    vision os development is exciting!

  • @ClarkyXR
    @ClarkyXR 4 месяца назад

    My mind is blown just watching you code

  • @JestrStudios
    @JestrStudios 10 месяцев назад

    Love to see a video now that the AVP is out where you show how to deploy to the headset :)

  • @jermanoid
    @jermanoid 11 месяцев назад +1

    Great job. Can't wait to watch more

  • @ibrews
    @ibrews Год назад +4

    great tutorial! I come from Unity and Unreal so this was a wonderful introduction to using Swift for Apple Vision Pro. For some reason my dice don't cast shadows though even though I have the HDR scene and code set up the same as you.

    • @AnyoneCanCode
      @AnyoneCanCode  Год назад +1

      Hi! Adding the GroundingShadowComponent should be enough to add shadows to the dice. It could also be a bug since the VisionOS is still in a beta state, so restarting Xcode might help. Hope this helps!

    • @ibrews
      @ibrews Год назад

      @@AnyoneCanCode no dice (lol) so probably a bug. Thank you though!

  • @175726
    @175726 11 месяцев назад +1

    Great job, I subscribed and i'm looking forward to your next vision pro lesson. Keep up the great work.

    • @AnyoneCanCode
      @AnyoneCanCode  11 месяцев назад

      Thanks for subscribing! I’m glad you liked the tutorial!

  • @mtheuma
    @mtheuma 10 месяцев назад

    Thank you! This is the best tutorial I've seen on this topic yet. One question, one of Apple's tutorials recommends adding .usd models into a swift package so that they are optimised automatically at run time. Have you tried this? Does it change anything in the way you access and address the model?

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад +1

      Thanks! If you want to load the model from a swift package, you will need to add an import statement for your package. You can then load the entity using the .entity(named:) function, which will load your .usd model! I would suggest taking a look at Apple’s “Hello World” sample code, which should answer what you’re looking for. Hope this helps!

  • @stephanemaurel5516
    @stephanemaurel5516 5 месяцев назад

    Wonderfull !!!! Existing a way to have the dice interact with real environment (like fall from table, bounce on wall, …) ?

    • @AnyoneCanCode
      @AnyoneCanCode  4 месяца назад

      Certainly! You can use Scene Understanding to make the dice interact with the real environment. This isn’t available to test on a simulator, so you’ll need a physical device to test it. Hope this helps!

    • @stephanemaurel5516
      @stephanemaurel5516 4 месяца назад

      @@AnyoneCanCode ​ thanks, I'll test it. If someone has one idea how I can have the hand velocity when I throw a virtual object front of me ??? when I release the object, it fall front of me, not mtter of the force I use to throw it 😢thanks for help and large thanks for this video !!!!!!

  • @aajn88
    @aajn88 10 месяцев назад +2

    On minute 19:36, my dice doesn't fall. I've checked the code several times and seems identical. Not sure if anything has changed since the video. I've also restarted XCode and the simulator but no luck :( do you know what's the issue? Maybe someone else has had this issue?

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад

      Hi! This could be because you haven’t set the dice’s physics body to dynamic. Other than this, it is difficult to know what the issue is, so I would recommend making sure there’s no typos!

  • @BlaineL
    @BlaineL 11 месяцев назад

    Hi! From the future here 😊
    Very nice clean presentation! Thank you for sharing. I just finished the Harvard CS50 python course and made a cribbage and dice (10,000) game for my final projects. I've made a few games for iOS and Unity, too.. but I'm really excited to make a ProVision 'Dice 10,000' game and your tutorial has inspired me to start working on it ! 👍

    • @AnyoneCanCode
      @AnyoneCanCode  11 месяцев назад

      Thanks, I’m glad you found my tutorial helpful! Best of luck with your Vision Pro game!

  • @nemesis0720
    @nemesis0720 10 месяцев назад +1

    hi,
    can you help me how I can manipulate blend shapes of a usdz file?
    I would appreciate any advice

  • @jessetilly3030
    @jessetilly3030 10 месяцев назад

    Great video and thanks for the help getting started. Is it just me or does the dice hang around after you've closed the app? Is there a cleanup step missing from the app on its closure?

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад

      Thanks! I’m not aware of any cleanup steps for VisionOS apps because garbage collection should be handled automatically. It’s likely to be a bug in the simulator, but could also be something I missed!

  • @cooz6683
    @cooz6683 9 месяцев назад

    please make more video like this!

  • @martodonn
    @martodonn 9 месяцев назад

    I could really use your help creating a vr/augmented realty app for vision pro.

  • @aryamandarda7654
    @aryamandarda7654 10 месяцев назад

    Great video! I did have a question. Around 24:50, when I drag the dice inwards so like vertically downwards, it falls through the floor and disappears completely. Any idea as to why this might be happening?

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад +1

      Thanks! That’s a great point. Since the dice can be dragged anywhere, it is possible to clip it through the ground. This may not be an issue on a physical device, since you can’t phase your hand through the ground 😅
      A quick fix would be to set a minimum y-value and prevent the dice’s position from going below that value. Hope this helps!

  • @shirpurkar
    @shirpurkar 10 месяцев назад +1

    Great tutorial, bro make an adavance level demo. Thanks for your efforts

  • @rickyyy2006
    @rickyyy2006 9 месяцев назад

    Hi sir, just want to know if buying a Vision Pro is going to allow me to build and test Vision Pro applications?
    On Apple website, it says need a Vision Pro development kit. Thanks a lot

    • @AnyoneCanCode
      @AnyoneCanCode  8 месяцев назад

      Hi! Any Vision Pro will work with testing your apps. I’d recommend using the regular Vision Pro since you can connect over WiFi!

  • @truedesireelements2040
    @truedesireelements2040 10 месяцев назад

    Thank you I truly hope to create my first app soon. I will search your videos to see if you have anything on Unity to Vision OS? I hope you do, as I like the way you teach... I appreciate you...

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад

      Thank you! I don’t have any Unity tutorials yet, but I’ll definitely consider it!

  • @lukelavery313
    @lukelavery313 10 месяцев назад

    Good video. What minimum specs do you recommend for developing with the vision os simulator?

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад

      I’ve found the simulator works best on Apple Silicon Macs!

  • @ClarkyXR
    @ClarkyXR 4 месяца назад

    I don't know where ive gone wrong but I'm at the build dice falling stage and it just hangs in the air and you cannot grab it either. Im using my own USDZ object but should work?

    • @AnyoneCanCode
      @AnyoneCanCode  4 месяца назад

      Hi! Make sure you’re the object you’re retrieving from the USDZ file is the actual mesh - there tends to be multiple empty objects containing the model itself! You may need to access a child of the root object.

  • @SegmenationFault
    @SegmenationFault Год назад +1

    Great video! I was wondering what changes you made to the dice usdz file to make it movable. It seems that Reality Composer let you add behaviors that did this, but with the recent updates (i believe xcode 15.0 beta 8), reality composer is gone. Reality composer pro still exists but i cant find a way to add behaviors to an object on there.

    • @AnyoneCanCode
      @AnyoneCanCode  Год назад

      Thanks! I didn’t do anything special to the usdz file to make it movable. You just have to make sure that you’re making the mesh object movable, since usdz files tend to add blank parent objects!
      For the dice, i had to add some extra code to get the usdz’s children to fetch the actual mesh. Hope this helps!

    • @SegmenationFault
      @SegmenationFault Год назад

      Yes that helps, thank you! I think my issue was that (.first) wasn’t working since my usdz object had multiple children in a different order. Just had to do dice.children[1].children.first instead
      My Object:
      ▿ 'Camera' : Entity, children: 1
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'Camera' : PerspectiveCamera
      ⟐ PerspectiveCameraComponent
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'Cube' : Entity, children: 1
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'Cube_001' : ModelEntity
      ⟐ Transform
      ⟐ ModelComponent
      ⟐ SynchronizationComponent
      ▿ 'Light' : Entity, children: 1
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'Light' : SpotLight
      ⟐ Transform
      ⟐ SynchronizationComponent
      ⟐ SpotLightComponent
      Dice used in the tutorial:
      ▿ '' : Entity, children: 1
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'dice02' : Entity, children: 1
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'Cube' : ModelEntity
      ⟐ Transform
      ⟐ ModelComponent
      ⟐ SynchronizationComponent
      @@AnyoneCanCode

    • @chompskiGG
      @chompskiGG 10 месяцев назад

      @@SegmenationFault I don't know anything about usdz files. How would I find out the structure of my model like you did here? I also can't get physics to apply.

    • @SegmenationFault
      @SegmenationFault 10 месяцев назад

      ​@@chompskiGG hey! You just have to print it, here's my code snippet:
      if let diceModel = try? await Entity(named: "cube2"),
      let dice = diceModel.children[1].children.first {
      print(dice)
      print(diceModel)
      //other code
      }
      which then prints
      ▿ 'Cube_001' : ModelEntity
      ⟐ Transform
      ⟐ ModelComponent
      ⟐ SynchronizationComponent
      for "dice" specifically , and
      ▿ '' : Entity, children: 3
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'Camera' : Entity, children: 1
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'Camera' : PerspectiveCamera
      ⟐ PerspectiveCameraComponent
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'Cube' : Entity, children: 1
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'Cube_001' : ModelEntity
      ⟐ Transform
      ⟐ ModelComponent
      ⟐ SynchronizationComponent
      ▿ 'Light' : Entity, children: 1
      ⟐ Transform
      ⟐ SynchronizationComponent
      ▿ 'Light' : SpotLight
      ⟐ SpotLightComponent
      ⟐ Transform
      ⟐ SynchronizationComponent
      for the original dice model. Hope that helps and let me know if you have more questions!

  • @184Simon
    @184Simon 10 месяцев назад

    Amazing tutorial, I bought the code and material, and everything works fine on my Macbook. How can I run this app on my real Apple Vision Pro?

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад +1

      Thanks and congrats on getting a Vision Pro! You can connect Xcode to your Vision Pro over WiFi on the same network. If you open Remote Devices in your Vision Pro settings and go to Devices and Simulators on Xcode, you should be able to pair the device. After that, enable Developer Mode in your AVP’s settings, restart, then run the app from Xcode. Hope this helps!

  • @xarain
    @xarain Год назад

    Thanks for sharing. Curious to know how does the actual "in-headset" experience look like?

    • @AnyoneCanCode
      @AnyoneCanCode  Год назад

      When you wear the Vision Pro, you'll be able to use hand gestures and manipulate the 3D objects directly. For example you can pinch to pick up the dice!

    • @xarain
      @xarain Год назад

      @@AnyoneCanCode
      Understood but you have tried it yourself since I could only see from your emulator
      Another question what kind of rework is required to cross deploy this into a Meta Quest headset?
      👍

    • @AnyoneCanCode
      @AnyoneCanCode  Год назад +2

      This tutorial is made specifically for Apple Vision Pro. If you want to deploy it to Meta as well, a game engine like Unity could be an option!

  • @gonzalomenevichian2167
    @gonzalomenevichian2167 11 месяцев назад

    Great, TY, is any app assistance to create code if we are not a deep programer like you?

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад

      Of course, there are LLMs like ChatGPT or Bard which can assist you with your code. However I strongly suggest that you don’t rely on them when learning how to code!

  • @joetaveras5470
    @joetaveras5470 10 месяцев назад

    I am able to load 3d files into the Simulator, but how do I make it such that I can then move those 3D entities around? My 3D files do not load with the white bar underneath like yours. Please advise!

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад

      Hi! This tutorial explains how you can make the object interactive and drag it around. Unlike windows, there won’t be a white bar below the object, but instead you can just click and drag on the object itself. Hope this helps!

  • @TaylorMcwilliam-s7r
    @TaylorMcwilliam-s7r 10 месяцев назад

    Pro Tip: once project is complete copy all code and paste in VS Code code pilot and have it explain the code line by line to gain deeper insights into concepts, code and frameworks.

    • @projectembers
      @projectembers 8 месяцев назад

      hello, do you mean github copilot chat?

  • @chompskiGG
    @chompskiGG 10 месяцев назад

    I am trying to make another app using some lessons from this video, but I've run into a problem. When I do the variables similar to your "diceData" the variables only change within their respective files. So if I change, for example, "rolledNumber" in the ImmersiveView it will only change there and the variable will be unchanged in the ContentView.
    I have "ImmersiveView(spaceData: SpaceData())" in the App file and "var spaceData: SpaceData" in both the ImmersiveView and ContentView. Is there any thing I can try or test to make this work?

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад

      When you write “ImmersiveView(spaceData: SpaceData())”, the brackets “()” after SpaceData will create a new instance of the data, which means that it won’t update the data across your files. You should reference your “spaceData” variable instead, which should solve the issue. Hope this helps!

    • @chompskiGG
      @chompskiGG 10 месяцев назад

      @@AnyoneCanCode I actually got it working with an ObservableObject but thank you for the detailed response. Is there anyway to add walls or use the users house (ARKit?) so the objects don't roll forever?

  • @scottbaker8528
    @scottbaker8528 4 месяца назад

    What happens when you walk past the virtual environment you're in?

  • @j0_ztex683
    @j0_ztex683 7 месяцев назад

    Thanks Luffy !

  • @stancartmankenny
    @stancartmankenny 11 месяцев назад

    is it possible to just get direct access to the left-eye and right-eye screens, to port an app that is already vr-capable?

    • @AnyoneCanCode
      @AnyoneCanCode  11 месяцев назад

      Hi! Are you trying to write directly to the screen? If so, I don’t believe that is possible at the moment. A hacky work-around may be to place head-locked content in front of the user and render your VR content onto there. Otherwise, you can always create an immersive space and add your VR content there! Hope this helps!

  • @nikokatsantonis1664
    @nikokatsantonis1664 11 месяцев назад

    Do you need to be granted an VisionOS devloper kit to actually create apps?

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад

      You don’t need to! You can use the simulator to test your app and then publish it. Of course, you can request to have your app reviewed on a physical Vision Pro, or apply to go to a developer lab (if you’re near one) to try it out yourself!

  • @andreiavram4050
    @andreiavram4050 Год назад

    Hey, is it a method to scale/movve an attachment/3d object when I hovered it with the eyes? I tried with HoverEffect with lift but it only highlights the object for everything I tried.

    • @danielrossy7453
      @danielrossy7453 Год назад

      Hey, there is no option to track eye movements in VisionOS due to security reasons

    • @AnyoneCanCode
      @AnyoneCanCode  Год назад +1

      Hi! I can confirm that eye tracking on VisionOS isn’t available, exactly as what Daniel mentioned.

  • @andreiavram4050
    @andreiavram4050 Год назад

    Hello, what should I do If I want to rotate a component onDrag gesture instead of moving? (I need something like, when I drag left rotate to left and when I drag right rotate to right)
    I've tried this:
    .onChanged{ value in
    let speed: Float = 0.1
    var newAngle = value.entity.transform.rotation.angle + speed * Float((value.translation.width / abs(value.translation.width)))
    if (newAngle < 0){
    newAngle = 2 * Float(Double.pi) - newAngle
    }
    value.entity.transform = Transform(
    scale: value.entity.transform.scale,
    rotation: simd_quatf(angle: newAngle, axis: SIMD3(x: 0, y: 1, z: 0)),
    translation: value.entity.transform.translation
    )
    }
    But it does'nt work with negative angles

  • @ton101_zh
    @ton101_zh 10 месяцев назад

    16:40 How you know those functions?

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад

      Apple’s documentation is a good resource to know what functions to use! Xcode also has autocomplete which gives you a good hint as to what to use.

  • @maksimkuznetsov9993
    @maksimkuznetsov9993 10 месяцев назад

    Can I start to create on Windows system?

  • @ledezmalove63
    @ledezmalove63 10 месяцев назад

    I have a idea really 2 different ideas that would have most likely similar coding for the app ... Could I pay you to make a app for me ?

  • @MaterDeiBusiness
    @MaterDeiBusiness 10 месяцев назад

    Because this is marketed as a beginner tutorial, you need to slow down and explain each step and function more. I basically just copied your code, but I didn't understand what I was doing and I'm gonna have trouble recreating it.

    • @AnyoneCanCode
      @AnyoneCanCode  10 месяцев назад

      This is a beginner tutorial for those who are new to VisionOS development, and there is some required basic knowledge of Swift. I’m trying to strike a balance between keeping the videos short and adding depth to the tutorial! I’ll keep this in mind if I create a more beginner-friendly video. Thanks!

  • @johnpill1
    @johnpill1 11 месяцев назад

    Exceptional tutorial! Get a quieter keyboard though! :D

  • @byktorvictor
    @byktorvictor Год назад +2

    Dang Homie!!!
    you went missing for a while

    • @AnyoneCanCode
      @AnyoneCanCode  Год назад +1

      I’ve been busy with my other projects 😄

  • @christopherknowles
    @christopherknowles 10 месяцев назад

    Nice hat.