Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How use Vuforia?

Hi I'm trying to develop an iOS app with Vuforia SDK, but where I can find a way to start to integrate this SDK? I looked on the Vuforia web site, but there aren't any interesting documentation about how to integrate the SDK in my app? There's a tutorial that I can follow to understand how it works? On the official web site there are tutorial only for Unity, but I want to develop my app in Objective-C. I hope you can help me

like image 857
lucgian841 Avatar asked Nov 04 '13 15:11

lucgian841


People also ask

Is Vuforia easy to use?

Augmented Reality 3D Training Platform The Vuforia Dashboard is quite easy and user friendly.

How does Vuforia work in Unity?

Device Tracking with Vuforia Device Tracking maintains tracking even when a target is no longer in view. It's automatically enabled for all targets when the Positional Device Tracker is enabled. For HoloLens applications, the Positional Device Tracker is started automatically in Unity.

How does Vuforia engine work?

Vuforia Engine offers robust and accurate tracking by using the Device Pose Observer that includes tracking a Vuforia target even when the object or content is no longer in the camera view. Note that some Vuforia features are required to run on a Device Pose supported device.


2 Answers

I realize this is a very old thread, but maybe you'll get an email ping, or perhaps a Google-er will find this useful.

So let me guess, you want to use one of Vuforia's sample apps, but in your own project, right? And you imported everything and made it look just like their project, but it won't even come close to compiling, right? And that sample app is almost certainly the SampleVideo example? If so, read on…

1) Xcode will get the import wrong if you simply include the library in your project. What you want to do is…

a) make a copy of the build folder inside the Vuforia API and put it somewhere else

b) rename that to something more useful, like "Vuforia"

c) use Add… to put that new folder into your own project (you can refer to it, I copy)

d) go to Build Settings, type "search" into the search bar (seems redundant, I know)

e) you should now see two very important lines, Header Search Paths and Library Search Paths. if you don't, you need to find them

f) double-click on header search paths so the pop-up gizmo appears. press the + button. Now go into the finder, find the Vuforia/include folder (which might be inside your own project if you copied it, like I do) and drag that folder into the pop-up gizmo

g) repeat for the Library, but drag the lib folder in instead.

Ok, done! No, sorry, I lied…

2) import the code from their samples that you want. It might be in several different folders

3) go to Build Phases and while that screen is up, do a build.

4) lots of errors will appear about ARC. use the search bar to find those files and add a "-fno-objc-arc" flag to each one. Repeat as required.

5) do another build, note that you're missing libraries which Vuforia couldn't be bothered to tell you about (sigh). So in Build Phases, open Link Binary With and add…

a) AVFoundation b) AudioToolbox c) QuartzCore d) CoreMedia e) CoreVideo f) MediaPlayer g) OpenGLES h) CoreMotion i) SystemConfiguration

6) do another build. Now you'll get a different error, but it won't be obvious it's different until you click on it. Look for "missing required architecture". If you see this, change your target to your phone, because Vuforia doesn't work in the simulator. Which makes sense because it doesn't have a camera… or not, because my apps do a lot more than just Vuforia but this limitation means I can't test any of it on the sim. (sigh)

7) so you switch the target to your shiny new iPhone 5S, build and… get errors about missing architectures. So now you see it's missing arm64… so you have to go to your Build Settings, remove Standard Architectures and add in armv7 and armv7s.

8) now you can look at the warnings and go about fixing the errors in their code, and the long-ago deprecated calls. naturalSize is easy:

AVURLAsset getting video size

One last warning. Once you get everything compiling and such, you'll try to import one of the Vuforia headers into your own code and then you'll get another error about "namespace". Make sure to change any file that imports from their code to a .mm as well.

Are you having fun yet?

like image 69
Maury Markowitz Avatar answered Oct 09 '22 16:10

Maury Markowitz


I hope this link will be helpful for you, https://developer.vuforia.com/resources/dev-guide/step-2-installing-vuforia-sdk-ios

https://developer.vuforia.com/resources/dev-guide/getting-started-ios-native-sdk

  1. Place your unarchived Vuforia sdk in your development directory/folder.
  2. Add libQCAR.a framework in your project.
  3. Set libQCAR.a framework path in XCode build setting "Library Search Paths"
  4. Set Vuforia header classes folder path from unarchived Vuforia sdk in your development directory/folder in "Header Search Paths"
like image 29
Tirth Avatar answered Oct 09 '22 17:10

Tirth