How-To Tutorials
Swift
visionOS on Swift
this article provides an overview of the ditto sdk for visionos, instructions on how to get started, as well as steps outlining example integration with our demo chat app, dittochat docid 9eyfpnj xg4j r85evdah /#getting started /#exploring with a demo app in beta as an early preview, our swift sdk now offers support for the visionos target — enabling you to sync apple vision pro devices on or offline across devices including iphone, android, and other apple vision pros for more information about the visionos platform, see the official apple documentation for https //developer apple com/visionos/ getting started to get started with the ditto sdk for visionos on swift confirm you have the minimum requirements xcode version 15 2 or later visionos platform version 1 0, 1 1, or 1 2 explore with either a prebuilt app, your existing ditto backed app, or a brand new app to use a prebuilt app, clone, install dependencies, build, and run the dittochat demo app upgraded to visionos beta release version 4 8 0 ( /#exploring with a demo app ) to enable apple vision pro compatibility for an existing app already integrated with ditto, add version 4 8 0 visionos beta ditto swift package dependencies to your project for dependencies, go to the getditto/dittoswiftpackage repo in github dittoswiftpackage/releases/tag/4 8 0 visionos beta 1 https //github com/getditto/dittoswiftpackage/releases/tag/4 8 0 visionos beta 1 to build a new app, install the ditto sdk for swift with the 4 8 0 visionos beta 1 dependency rule (see docid\ fonmhjphdglwdezchoonq ) once installed and your environment configured for visionos, the ditto swift sdk automatically enables apple vision pro compatibility for your app exploring with a demo app if you prefer learning by doing, run the upgraded demochat app with an apple vision pro simulator ensure you have the visionos version 1 0, 1 1, or 1 2 installed in xcode clone the visionos beta https //github com/getditto/demoapp chat/tree/visionos beta branch of the getditto/demoapp chat github repo bash git clone b visionos beta https //github com/getditto/demoapp chat git navigate to the /ios directory bash cd demoapp chat/ios set up the environment variables bash cp env template env open the env file located in the /ios directory, and then enter your sync credentials for peer to peer authentication add your sync credentials (app id and online playground token) available from the https //portal ditto live/? gl=1 1cej9hc ga mjaxodm3oduymi4xnze4njuznzyz ga d8pmw3ccl2 mtcxodc1nde1os45ljaumtcxodc1nde1os42mc4wlja (see docid 1zqho9hlq mo6v1aqnazl ) ditto app id=xxxxxxxx xxxx xxxx xxxx xxxxxxxxxxxx ditto playground token=yyyyyyyy yyyy yyyy yyyy yyyyyyyyyyyy from xcode, using the apple vision pro simulator, build the app and sync for the minor changes in progress for dittochat enabled with visionos compatibility, see https //github com/getditto/demoapp chat/pull/124 pull request in github