ExistentialAudio/SwiftOSC

Totally noob question: How to embed this SwiftOSC

enzyme69 opened this issue · 11 comments

I am stuck in actually embedding the SwiftOSC into my iOS project. I copy the whole folder of compiled SwiftOSC, and do an import, but nothing.... No such module 'SwiftOSC'

Tested using this method to import framework, but does not work.
https://stackoverflow.com/questions/3352664/how-to-add-existing-frameworks-in-xcode-4

So we need client and server, my idea is to use the Face AR (iPhone X) to send OSC message from the iPhone into the Mac. Similar to TouchOSC, but actually using Face Camera and tracking my head and facial expression. Maybe the iPhone become a server or client?

Any possible example template?

Thanks beforehand.

Create a new project and link the framework.
screen shot 2017-10-01 at 11 37 05 pm

screen shot 2017-10-01 at 11 37 33 pm

screen shot 2017-10-01 at 11 37 43 pm

Looks like you need to link twice. The first time imports the files and the 2nd time links the framework. No idea why you need to do it twice. Probably missing something simple but that’s what you need to do.

Some test code to make sure things are running.
screen shot 2017-10-01 at 11 38 33 pm

If everything works properly and you have OSC Monitor open from my macOS examples you should see this.

screen shot 2017-10-01 at 11 39 40 pm

Make sure you build the Framework first before building the project.

I think I missed a step. Make sure you imbed the framework. I'm uploading a demo iOS app for you to look at.

Thanks Devin, I will follow the step by step and see how it goes. Will update..

When I looked around, I thought what I need to do was to compile the framework first, and then copy paste the .framework into my project... this still not working.
screen shot 2017-11-11 at 14 43 51

Following your steps now....

I changed the name of that project file from "SwiftOSC for iOS.xcodeproj" into "SwiftOSCforiOS.xcodeproj" and did the linking following your steps.

Module not found error is gone, but I am getting new strange error and the app crashes:

screen shot 2017-11-11 at 15 17 38

Embedding binary step is not clear still. Investigating .... wonder what that "image not found" means.

Thanks Devin looking forward to this. If it works, I will make tutorial about it from scratch. This embed thing is supposedly simple.

I dragged the framework into "Embedded Binaries" under General and seems to do the work.

screen shot 2017-11-11 at 15 56 53

Thanks for your help, I will do some test. The idea is to get the Face AR or AR tracking to send OSC message.