Log in or register to post comments

VuforiaSDK integration in existing project

May 13, 2013 - 2:19am #1

Hi,

 

I already have a project and I try to integrate VuforiaSDK in it, but I got stuck in an error "-[EAGLView myVal]: unrecognized selector sent to instance". I think is a matter of combining Objective-C with Objective-C++ but I cannot figure out how to solve this. I cannot rename all my .m files into .mm , that's for sure. I have tried to set the compiler to Objectve-C++ for all sources but I get errors in existing sources...

If you have any idea how to solve this, please help! It's realy urgent. Thanks!

 

Regards,

Bogdan P

VuforiaSDK integration in existing project

May 13, 2013 - 7:34am #6

VuforiaSDK needs Objective-C++

This is not true as the core SDK is multiplatform written in portable C++, which is why we have an Android version ;)

The samples use a mixture of Objective C/C++, but the underlying core library is simply a C++ library

 

I cannot rename all my .m files into .mm , that's for sure

Maybe you cannot, but it may be worth doing a quick test here to see if it could work?

 

Either way if you cannot get it to work by integrating existing sample code, you may have to try building a sample from scratch in Objective C to see if it could work - which basically means replicating Image Targets into your own app.

 

N

VuforiaSDK integration in existing project

May 13, 2013 - 4:38am #5

No warnings, nothing!

So, if I take out all other sources from my project there is no problem, but if I put them all together it gives me that crush... From what I've learned so far, my best guess is that VuforiaSDK needs Objective-C++ and my project uses Objective-C and I have to find a way to combine those two (without renaming the .m file as I use other frameworks as well) . I really need to make this work so if you have any clue please help!

VuforiaSDK integration in existing project

May 13, 2013 - 4:20am #4

Actually, none of EAGLView class properties or methods are visible at runtime..

Then the compiler should come up with some warnings, prior to "unrecognised selector" at runtim - these ought to be investigated.

It may be worth doing a much simpler test, as it would point to a fundamental problem with your project / approach.

 

N

VuforiaSDK integration in existing project

May 13, 2013 - 4:13am #3

That is a string property added only for test reason. The XCode sees that property but the compilator doesn't. Actually, none of EAGLView class properties or methods are visible at runtime... I have made a new project with Vuforia from scratch and works just fine, but not with my project.

VuforiaSDK integration in existing project

May 13, 2013 - 3:15am #2

[EAGLView myVal]: unrecognized selector sent to instance

..means that while your code may have compiled, the runtime is trying to find the "myVal" method in your EAGLView, which it cannot - hence the error.

So check that this function exists.

It's is also worth spending some time with the samples to increase your understanding and knowledge which will make integration with your own projects much easier.

 

N

Log in or register to post comments