# Unity IOS support

**URL:** https://discourse.kitware.com/t/unity-ios-support/838
**Category:** Pulse Physiology Engine
**Created:** [May 18, 2022, 3:29pm UTC](https://discourse.kitware.com/t/unity-ios-support/838 "2022-05-18T15:29:45Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Ayfel](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@Ayfel](https://discourse.kitware.com/u/Ayfel)
#### Post date: [May 18, 2022, 3:29pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/1 "2022-05-18T15:29:45Z")

</div>

Hi,

We are working on a cross-platform solution that would include the Pulse Engine and we implement IOS as well but I see that there is no native plugin for it in the solution. Is there any way to get it working in IOS?

Thank you

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [May 18, 2022, 6:10pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/2 "2022-05-18T18:10:01Z")

</div>

I have not looked at the iOS development process in a while  
From what I understand, you need to write a custom apple/xcode script to build a dynamic lib that is iOS compliant. Its a pretty nitch process and I have not dug into it. Pulse does build static libraries, so you should be able to build the code base as is, then write [the necessary xcode script to pull in everything for the iOS library](https://stackoverflow.com/questions/19531612/how-to-build-library-written-by-c-and-use-in-ios)… But then I am not sure if that is going to be Unity compliant or not… as it’s going to need to encapsulate the interfaces used by the C# used by Unity…

You might be able to use CMake on a Mac to generate an XCode project, then some how configure XCode to build an iOS compliant version of the PulseC project… I am really not sure. It’s probably a could of days of investigation/work/experimentation to get the process down, but we currently don’t have that on our near term milestones.

---

<div class="post-metadata">

### Author: ![Keattikorn\_Samarnggo](https://discourse.kitware.com/user_avatar/discourse.kitware.com/keattikorn_samarnggo/32/745_2.png) [@Keattikorn\_Samarnggo](https://discourse.kitware.com/u/Keattikorn_Samarnggo)
#### Post date: [August 16, 2023, 12:29pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/3 "2023-08-16T12:29:57Z")

</div>

Hello,  
I have read the release notes version 4.2.0. It indicates that it does support iOS, however, I could not find version 4.2.0 on the repositories. How can I obtain version 4.2.0 of the engine which support iOS build?

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [August 16, 2023, 12:48pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/4 "2023-08-16T12:48:53Z")

</div>

Here is a [older build with an iOS native libraries](https://data.kitware.com/api/v1/file/62be6cd5bddec9d0c419f640/download)

I belive this asset only has windows and iOS

As part of our next unity release I will make sure all of our native platforms are a part of the asset  
(Win32,Win64,WinARM64, Linux64, MacOS intel & atom, Android, iOS)

---

<div class="post-metadata">

### Author: ![Keattikorn\_Samarnggo](https://discourse.kitware.com/user_avatar/discourse.kitware.com/keattikorn_samarnggo/32/745_2.png) [@Keattikorn\_Samarnggo](https://discourse.kitware.com/u/Keattikorn_Samarnggo)
#### Post date: [August 16, 2023, 2:12pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/5 "2023-08-16T14:12:31Z")

</div>

Thank you very much. I will try the package you sent in the post. Should I have any further question regarding building for iOS, will seek your advice again.

---

<div class="post-metadata">

### Author: ![Eason\_Li](https://discourse.kitware.com/user_avatar/discourse.kitware.com/eason_li/32/773_2.png) [@Eason\_Li](https://discourse.kitware.com/u/Eason_Li)
#### Post date: [September 14, 2023, 2:48am UTC](https://discourse.kitware.com/t/unity-ios-support/838/6 "2023-09-14T02:48:28Z")

</div>

Just follow up on that. I used the package for IOS you shared, but it gave the following error:

EntryPointNotFoundException: Allocate assembly: type: member:(null)  
PulseUnityEngine.BaseAllocate (System.Int32 model, System.String data\_dir) (at Assets/PulsePhysiologyEngine/Scripts/PulseUnityEngine.cs:63)  
Pulse.PulseEngineBase…ctor (Pulse.eModelType m, System.String data\_dir) (at \<8c06848ba3d4488281e2602f1faef351\>:0)  
PulseUnityEngine…ctor (Pulse.eModelType m, System.String data\_dir) (at Assets/PulsePhysiologyEngine/Scripts/PulseUnityEngine.cs:24)  
PulseEngineDriver.Start () (at Assets/PulsePhysiologyEngine/Scripts/PulseEngineDriver.cs:65)

Do you have any clue on how to fix it? Or when is the next unity release that consists IOS support?

Thanks in advance for your help!

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [September 14, 2023, 4:53pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/7 "2023-09-14T16:53:02Z")

</div>

I am going through the Unity Asset release process now  
I will ensure the iOS binary works

I would love to hear any feedback you would have on [what unity version the asset should be built on](https://discourse.kitware.com/t/unity-user-feedback/1105)

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [September 21, 2023, 9:20pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/8 "2023-09-21T21:20:50Z")

</div>

Hey @Eason_Li

I have pushed up the latest binaries for all supported platforms (including iOS and macOS silicon)

You can [check this repository out](https://gitlab.kitware.com/physiology/unity) under your projects Assets/PulsePhysiologyEngine folder  
This repository contains everything in the Unity Store Asset

I start out using the basic 3D application template  
Then manually create the PulsePhysiologyEngine folder under the Assets folder  
and check out this repository into that folder

 ![image](https://discourse.kitware.com/uploads/default/original/1X/1df6e02fd23ad24b21921a098ed981cc8f399b28.png)

See if you are able to deploy to iOS with this latest

---

<div class="post-metadata">

### Author: ![Eason\_Li](https://discourse.kitware.com/user_avatar/discourse.kitware.com/eason_li/32/773_2.png) [@Eason\_Li](https://discourse.kitware.com/u/Eason_Li)
#### Post date: [September 22, 2023, 2:25am UTC](https://discourse.kitware.com/t/unity-ios-support/838/9 "2023-09-22T02:25:54Z")

</div>

Thank you so much for your quick response. Yes, it works perfectly fine right now. Much appreciated to your hard work!

---

<div class="post-metadata">

### Author: ![zzxnnz](https://discourse.kitware.com/user_avatar/discourse.kitware.com/zzxnnz/32/800_2.png) [@zzxnnz](https://discourse.kitware.com/u/zzxnnz)
#### Post date: [October 6, 2023, 2:57am UTC](https://discourse.kitware.com/t/unity-ios-support/838/10 "2023-10-06T02:57:38Z")

</div>

Hi @abray, I also tried to update my unity project to use latest version from repository. It’s seems like android build broken.  
Android logcat gives me:  
`2023/10/06 08:46:26.710 8147 8168 Error Unity DllNotFoundException: Unable to load DLL 'PulseC'. Tried the load the following dynamic libraries: Unable to load dynamic library 'PulseC' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library "PulseC" not found`  
`2023/10/06 08:46:26.710 8147 8168 Error Unity at PulseUnityEngine.Allocate (System.Int32 model, System.String data_dir) [0x00000] in <00000000000000000000000000000000>:0 `  
`2023/10/06 08:46:26.710 8147 8168 Error Unity at Pulse.PulseEngineBase..ctor (Pulse.eModelType m, System.String data_dir) [0x00000] in <00000000000000000000000000000000>:0 `  
`2023/10/06 08:46:26.710 8147 8168 Error Unity at PulseEngineDriver.Start () [0x00000] in <00000000000000000000000000000000>:0`

 ![error](https://discourse.kitware.com/uploads/default/original/1X/5929d294d432df17d7c304bc0ab80a06b69f7a13.png)  
Is it just me or libraries for android broken again?

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [October 6, 2023, 10:53am UTC](https://discourse.kitware.com/t/unity-ios-support/838/11 "2023-10-06T10:53:22Z")

</div>

Hmmm  
I did not try and run the latest vitals scene on my phone. I’ll give it a shot. Maybe I just need to update the C++ shared object.

What kind of device are you trying to run on?

---

<div class="post-metadata">

### Author: ![zzxnnz](https://discourse.kitware.com/user_avatar/discourse.kitware.com/zzxnnz/32/800_2.png) [@zzxnnz](https://discourse.kitware.com/u/zzxnnz)
#### Post date: [October 6, 2023, 12:37pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/12 "2023-10-06T12:37:47Z")

</div>

Thank you! I’ll wait for updates then.  
I actually don’t have physical device, so I tried to run on emulator (BlueStacks), previous version did okay.

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [October 6, 2023, 12:42pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/13 "2023-10-06T12:42:39Z")

</div>

Can you quickly check if replacing this shared objects in our asset gets it working for you

I assume you are building against the ARM64 version, if you need regular ARM, I can get you that shared object

[https://data.kitware.com/api/v1/item/6520007543427b2e1b65c938/download](https://data.kitware.com/api/v1/item/6520007543427b2e1b65c938/download)

---

<div class="post-metadata">

### Author: ![zzxnnz](https://discourse.kitware.com/user_avatar/discourse.kitware.com/zzxnnz/32/800_2.png) [@zzxnnz](https://discourse.kitware.com/u/zzxnnz)
#### Post date: [October 6, 2023, 1:02pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/14 "2023-10-06T13:02:06Z")

</div>

Replacing shared object did help, it’s working now! Thank you!  
I wonder if you going to replace the file in the repository, or I should just use that shared object that you sent?

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [October 6, 2023, 1:04pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/15 "2023-10-06T13:04:13Z")

</div>

I will now push that into the repository, Just wanted to make sure that was the problem

That makes sense, thanks for finding this!

---

<div class="post-metadata">

### Author: ![zzxnnz](https://discourse.kitware.com/user_avatar/discourse.kitware.com/zzxnnz/32/800_2.png) [@zzxnnz](https://discourse.kitware.com/u/zzxnnz)
#### Post date: [October 6, 2023, 1:06pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/16 "2023-10-06T13:06:01Z")

</div>

Wonderful! Have a nice day 🙂

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [October 6, 2023, 1:06pm UTC](https://discourse.kitware.com/t/unity-ios-support/838/17 "2023-10-06T13:06:56Z")

</div>

Pushed to main
