taichi-unity2 icon indicating copy to clipboard operation
taichi-unity2 copied to clipboard

Building Taichi-Unity Project on iOS (iPad)

Open Jenix8 opened this issue 2 years ago • 1 comments

Hi, I'm trying to build the project from Taichi-UnityExample on my iPad. I am facing difficulties in accomplishing this, so I'd like to ask for your help.

From what I understand, some libraries are required for this and they can be acquired as follows:

  • iOS/libtaichi_c_api.a: by building taichi repo using python3 build.py ios (v1.6.0+)
  • iOS/libtaichi_unity.a: by using sh build-ios.sh at root dir of taichi-unity2
  • macOS/arm64/libtaichi_c_api.dylib: by installing taichi (pip install taichi or developer installation)
  • macOS/arm64/libtaichi_unity.dylib: by cmake building taichi-unity2.

I cannot find the way to build "iOS/LaunchHook.m" that corresponds to the desired taichi version, but it seems that the same file can be used regardless of the version.

However, despite attempting the above entire process for multiple versions (1.5.0~1.7.0), I have not successfully built it on iOS. Thus I'd like to ask whether there is any mistake in my steps I've taken or if there are any necessary tasks for building on iOS that I might be unaware of.

Jenix8 avatar Feb 02 '24 12:02 Jenix8

I had solved this problem by changing "ti_submit" into "ti_flush" of lines 393, 399 in Assets/Taichi/Generated/taichi_core.cs.

Jenix8 avatar Feb 05 '24 07:02 Jenix8