Instructions on how to build and run the project.
Follow steps 2-3 from this tutorial to prepare and build the Unity project as a framework. The resulting UnityFramework.framework
file can be copied to the unity/builds/ios
folder.
First run:
npm install
Then:
npm run ios
This will generate the React Native Xcode workspace but will fail to run first time because we are still missing the Unity related components. Run the following command to install the necessary cocoa pods:
rm -rf ios/Pods && rm -f ios/Podfile.lock && npx pod-install
Open the generated ^.xcworkspace^
project in ^Xcode^, open ^Info.plist^
, and add a new property ^Privacy - Camera Usage Description^
(or paste in the string ^NSCameraUsageDescription^
); this is required in order to ask for permission to use the camera for AR.
In your Unity project's Packages directory, find the ^Auki Labs ConjureKit/Runtime/Plugins/iOS/PosemeshAmplitude/PosemeshAmplitude.framework^ file.
Drag ^PosemeshAmplitude.framework^ into the ^Frameworks^ folder in Xcode's Project navigator view. Then in the project's general settings (open by clicking the project name at the top of the navigator), scroll down to the ^Frameworks, Libraries, and Embedded Content^ section and set the ^PosemeshAmplitude.framework^ embed mode to ^Embed & Sign^. Make sure you have properly configured the ^Signing & Capabilities^ settings too.
Clean the Xcode project by going to ^Product->Clean Build Folder^
.
To run the project on a connected device, run the following command and follow the instructions in the terminal.
npm run ios
Depending on your React Native app logic you will probably want to modify the files in the ^providers^ and ^utils^ folders to handle more complex communication between the Unity and React Native layers. If you have an existing React Native project you would need to partially or fully copy these folders to your project, install the ^@azesmway/react-native-unity^ dependency, and display the Unity view wherever appropriate.
To add your own Unity project, build it as a framework and replace ^UnityFramework.framework^ in the ^unity/builds/ios^ folder with it.
If the Unity view has a React Native overlay, the tap event might not get through the React Native layer to Unity. For this you might need to have all the UI on either the React Native side or on the Unity side when displaying the AR view.
Apply for a grant of AUKI tokens to get your project off the ground, and work directly with the Auki Labs team to get your creation to market. Successful applicants may be granted up to 100k USD worth of AUKI tokens, and development and marketing support from the Auki Labs team.