danomatika / ofxPd

(maintained) a Pure Data addon for OpenFrameworks using libpd
Other
202 stars 45 forks source link

Can't run examples on iPad, iPhone with OF 0.9.8 #55

Closed thinium closed 7 years ago

thinium commented 7 years ago

Hi,

I'm having multiple issue running the examples.

Is ofxPd known to work on current iOS devices with OF 0.9.8?

danomatika commented 7 years ago

Yes, it works. I'm about to travel cross country, so I can't check this until the weekend.

thinium commented 7 years ago

OK, no problem. Have a great trip and speak soon!

cuinjune commented 7 years ago

@ukelady Hi, the examples works well for me. I tested the example on my iPad Air 2. I use OF 0.9.8 I used ES1 and it seems to be working fine. ofxAccelerometer works without any problems too.

@danomatika The only problem I found at the moment is that there can be problem with the audio when pd patch uses [adc~] object connected to [dac~], and while your iOS ofxPd app is running in the background, if you launch other audio apps that use AudioBus(or maybe it has to do with CoreAudio?) and then as soon as you get back to your ofxPd app, it will produce super loud audio click(Warning: watch your ears) and then audio will no longer work in your ofxPd app. This problem doesn't always occur but for me it happened about 4 out of 5 times.

I tested this using my iPad Air 2 and I used the latest version of ofxPd on OF 0.9.8 I can post this as a separate issue if you want. Let me know what you think :)

thinium commented 7 years ago

Hi Dan,

How do you add the ofxAccelerometer to your xcode project? I use the project generator but it can't find the ofxAccelerometer addon. Or do you use other IDE to compile the project?

This is the error I get related to the ofxAccelerometer:

Showing Recent Messages "_ofxAccelerometer", referenced from: ofApp::setup() in ofApp.o "ofxAccelerometerHandler::setup()", referenced from: ofApp::setup() in ofApp.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks!

On Tue, Jun 6, 2017 at 4:58 PM, cuinjune notifications@github.com wrote:

@ukelady https://github.com/ukelady Hi, the examples works well for me. I tested the example on my iPad Air 2. I use OF 0.9.8 I used ES1 and it seems to be working fine. ofxAccelerometer works without any problems too.

@danomatika https://github.com/danomatika The only problem I found at the moment is that there can be problem with the audio when pd patch uses [adc~] object connected to [dac~], and while your iOS ofxPd app is running in the background, if you launch other audio apps that use AudioBus(or maybe it has to do with CoreAudio?) and then as soon as you get back to your ofxPd app, it will produce super loud audio click(Warning: watch your ears) and then audio will no longer work in your ofxPd app. This problem doesn't always occur but for me it happened about 4 out of 5 times.

I tested this using my iPad Air 2 and I used the latest ofxPd. I can post this as a separate issue if you want. Let me know what you think :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/danomatika/ofxPd/issues/55#issuecomment-306513321, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUbHrtQOZ08W3g6PGcSDuT5ChSIjSWyks5sBWkmgaJpZM4NsO9U .

danomatika commented 7 years ago

That is an old example first created around 2011, so some things have probably changed with how ofxiOS is integrated into projects. It was working fine last time I checked though, but I can check again.

One thing to note, as the readme says, is that ofxPd (and all of my addons) track with the current OF release and not the master on Github.

danomatika commented 7 years ago

I just tested pdExampleIOS and it's working fine for me.

Note: Did you generate the project files with the "iOS (Xcode)" platform selected or "OS X (Xcode)"?

ablanton commented 7 years ago

Hi all,

Is this still an open issue? I am currently running ofx 9.8 with xcode 8.3.2 building onto an ipad mini and i'm getting an Apple Mach-O Linker Error. I cannot get it to build on the emulator or on the device. Is anyone else having this issue?

danomatika commented 7 years ago

Also, if you're working from OF downloaded as a zip from open frameworks.cc, you'll need to use the iOS build.

ablanton commented 7 years ago

Thanks for the reply Dano! Also I will try to consolidate the thread at https://forum.openframeworks.cc/t/openframeworks-and-pd-via-ofxpd/27237 to this git issue as I think it will clairify the issue and I will follow up on the other thread once this issue is clear.

Thanks for the quick reply!

ablanton commented 7 years ago

But I have tried most everything I can think of. the Mach-O error is pretty vague but I have seen it before with architectures and libraries. It's curious that yours is working and mine is not though. I have downloaded everything, I wonder if cloning is better.

danomatika commented 7 years ago

If the example doesn't build, that's a problem no matter if using release zip or GitHub clone. It should just work.

I just downloaded the current iOS OF zip and pdExampleIOS built and ran fine. Can you give me a screenshot of the link error? There is usually a drop down indicator somewhere that expands to show the low level compiler & linker info which explains things in more detail. On an error, it's usually in the main pane of Xcode in a red tinged box. I don't remember how to get there off the top of my head as I "just do it" at this point.

danomatika commented 7 years ago

A further note: ofxPd (and my other addons) are kept up to date with OF releases & not bleeding edge development. If you're using the master branch from Github, you're on your own as it's much easier to maintain things by updating after a release instead of chasing current development.

ablanton commented 7 years ago

Here is a screenshot, I'm also showing a lot of warnings (469) but that has been pretty normal for my use with libpd in general. But here is the error. It's also saying to use -v to show more information but I must admit I don't know how to do that and cannot find any information on how to compile (using a verbose mode?) in that way using xcode.

ablanton commented 7 years ago

sorry with screen shot + after my response i looked up verbose mode in xcode and i found these errors.

screen shot 2017-07-05 at 7 52 08 pm screen shot 2017-07-05 at 7 56 22 pm screen shot 2017-07-05 at 7 56 29 pm
danomatika commented 7 years ago

vtable errors mean C++ can't find the compiled implementation of the listed functions. This usually happens when a header is included but the corresponding .cpp or .mm is not built or linked.

Which example is this? pdExample or pdExampleIOS

ablanton commented 7 years ago

This is from the pitchShifterIOS example

ablanton commented 7 years ago

But it's the same through all of the examples as well as just adding ofxPd to a new project

danomatika commented 7 years ago

Can you add a screenshot listing the contents of the src folder in the Xcode sidebar?

ablanton commented 7 years ago

like this?

screen shot 2017-07-05 at 8 35 21 pm
ablanton commented 7 years ago
danomatika commented 7 years ago

Not sure what to tell you. I'm running 10.12.5 and Xcode 8.3.3. I downloaded a fresh OF 0.9.8 iOS zip, a fresh ofxPd zip, generated pdExampleIOS Xcode project, and built & ran the project in the simulator. Works fine.

ablanton commented 7 years ago

ok I'm on 8.3.2, i will update and see if that helps, and thanks for taking a look!

ablanton commented 7 years ago

Ok so if anyone else is having this issue I think it's coming from a duplicate lib reference or something. In looking at the verbose log I think a bunch of files are being duplicated. So that led me to search for 'apple Mach-o linker error ld: 30 duplicate symbols for architecture x87_64' that led to this stack overflow https://stackoverflow.com/questions/30022567/apple-mach-o-linker-error-duplicate-symbols-for-architecture-x86-64

So in my project I searched for 'gcc_no' and set the flag to No for 'No Common Blocks'. The project is now building but need to test to see if everything is working properly.

danomatika commented 7 years ago

Ok cool. We've run across this before with libpd on iOS. I've set the "-fcommon" compiler flag in the addon_config.mk which sets that value when the ProjectGenerator creates the Xcode project. Can you test by regenerating the project and building?