patricksebastien / libpd4unity

libpd for unity 3d
101 stars 20 forks source link

Add support for iOS #15

Closed n1zzo closed 7 years ago

n1zzo commented 8 years ago

Hi, I made a six-month development game for my university course:

https://polimi-game-collective.itch.io/gravitone

I successfully used your library, exporting for Windows Linux and Android. However I'd really like to add iOS support. How difficult will it be to support that platform? I never programmed in Objective-C but I offer my help in testing.

Maybe we can take inspiration from Kalimba's iOS code.

Have a nice day!

thefuntastic commented 7 years ago

So essentially it's possible to theoretically run the library on iOS because I've done it before, although performance was not great.

The main difference is that you need to change the dllImport headers to internal (I'm on mobile atm but this is covered in the unity docs). From there I think it was a matter of messing with build flags in the X code to create an ios libpd.bundle, but it's been a very long time so I don't remember and my osx build machine isn't set up anymore.

I had hoped to contribute this back at some stage, but I got stuck on how to make it compatible with the current repo and got busy so I wouldn't hold your breath. If you could crack it would be a great contribution though ;)

On Sun, 28 Aug 2016 08:46 Niccolò Izzo, notifications@github.com wrote:

Hi, I made a six-month development game for my university course:

https://polimi-game-collective.itch.io/gravitone

I successfully used your library, exporting for Windows Linux and Android. However I'd really like to add iOS support. How difficult will it be to support that platform? I never programmed in Objective-C but I offer my help in testing.

Maybe we can take inspiration from Kalimba's iOS code.

Have a nice day!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/patricksebastien/libpd4unity/issues/15, or mute the thread https://github.com/notifications/unsubscribe-auth/AASFXu6Bxdgivdd3pwCFtjsu8PSKC9Toks5qkS6ygaJpZM4Ju3Jm .

n1zzo commented 7 years ago

Hi, sorry for the long wait. I've managed to run libpd on iOS following the steps you suggested. Thanks a lot for that, but as soon as my game starts, unity throws an exception and everything crashes.

img_2016-10-02 16 05 04

This is the log of what happens, did you ever seen something similar in your experience? If I'll make this work I'll try to make a pull request with all the necessary changes and step by step instruction on how to make this work.

Thanks for your support!

n1zzo commented 7 years ago

p.s. sorry for the screen picture, I could have make a screenshot :)

n1zzo commented 7 years ago

Ok, fixed! Now I'll make a pull request.