Broader Frontends
Author : Kazuhiro Hara
Article permalink

Things an old MacBook 12 can still do toward visionOS development

Of course I can read documentation or existing articles, but I want to begin development itself, not only reading. So I will move forward with what I can do.

As I wrote last time, it seemed that my MacBook 12 inch cannot be used for visionOS development.

Incidentally, I did end up buying a Mac mini.

Because I customized it, it will probably take a while to arrive. I could do something else until then, but once I have decided to do this, I want to move forward with whatever I can.

I am thinking about developing in XCode, but my real target is development in Unity.

The XR apps I develop for other devices are made with Unity, so if I can use the same development environment, that would be ideal. There seems to be a webinar for Unity, my main target, at the end of this month. I signed up immediately.

For now, that means doing the basics in XCode, but I do not have that much experience using XCode. I have worked on React Native apps before, so I have touched XCode in general, but mainly for building or for parts that absolutely had to be written in XCode.

I have no experience developing with Swift, so I need to learn from that ecosystem. That said, rather than studying for the sake of studying, I want to build what I should build and learn along the way.

Even if I cannot write visionOS-specific code, I can write Swift code as long as I have XCode, so it seems possible to keep moving forward. I decided to start by writing app logic and utility-like general-purpose functions.

Fortunately, Swift has something like npm called Swift Package Manager, and you can create your own packages. In other words, I can continue developing the parts that are not tied to a specific platform.

So I created my own package and started developing. XCode itself is slow on my MacBook 12 inch, but that cannot be helped.

You can create a package template with swift package init, similar to npm init, and it even automatically generates a test code template. I was able to create a small function and get its unit test passing.

I uploaded it to a private GitHub repository, so when the Mac mini arrives, I should be able to properly create a visionOS project and import it. If I am misunderstanding something, I will treat that as a learning experience and use it as fuel.

UnityvisionOS

Share