Log in or register to post comments

Skip Init on Unsupported Devices

October 4, 2011 - 1:35pm #1

Hello,

I am using QCAR in one of my game modes, but only on iOS devices with a camera. Everything works great for iPad1 (no camera), but when I test on iPod Touch 2nd Generation I get the following error and crash during the splash screen:

warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/info/dns.so (file not found).
-> applicationDidFinishLaunching()
QCAR Extension version 1.0.6
2011-10-04 16:06:24.002 GameName[469:307] INFO: QCAR SDK version 1.0.0

2011-10-04 16:06:24.116 GameName[469:307] CameraImpl: ERROR: could not find camera
2011-10-04 16:06:25.198 GameName[469:307] INFO: http response: 404

My Unity Build Settings are:
iPhone Only
Universal (armv6+armv7)
SDK version = iOS Latest
Target Version = 4.0

All test devices are connected to the internet via WiFi hotspot

Device with the Crash is an iPod Touch 2nd gen (OS 4.2.1)
Other devices tested (expected behavior)
iPod Touch 4th = GameStart OK QCAR OK
iPad Gen 1 = GameStart OK QCAR Unavailable (no camera)
iPad Gen 2 = GameStart OK QCAR OK

Any idea how to make my Touch 2nd Gen work like the iPad 1stGen? The 404 error makes me think missing link somewhere, but even so, doesn't QCAR fall back to default values if it can't reach the servers?

Thanks a bunch!

~Miguel

Re: Skip Init on Unsupported Devices

October 7, 2011 - 2:40am #5

Hi DragonsDen,

As you know, Unity generates the code for an iOS project, so will overwrite the Xcode project and source.

However, the code you need to modify is in the template code AppController.mm. Here you'll find various calls into QCAR which you should make conditional on camera availability.

(To avoid Unity overwriting the changes you need to always 'Append' when building for iOS, but you may need to make further measures to persist these changes. Can you modify Unity's template?)

Then make sure the Scene containing ARCamera isn't loaded when there's no camera - this should avoid invoking other scripts and parts of QCAR when it hasn't been initialised.

Re: Skip Init on Unsupported Devices

October 6, 2011 - 8:10am #4

I understand that 2nd Gen touch isn't supported. I'm not trying to do AR on 2nd Gen, I'm trying to get it to NOT CRASH on load. Also, I am using the Unity Extension not native SDK.

So I guess my question is where does QCAR decide it needs to be initialized? That way I can preempt the initialization with MoSR's camera check.

Thanks for your help!

~Miguel

Re: Skip Init on Unsupported Devices

October 5, 2011 - 12:24am #3

mslhii is correct.

If you want to determine at runtime whether to load QCAR use this standard snippet of iOS to detect the presence of a camera:

BOOL isCameraAvailable = [UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]

Re: Skip Init on Unsupported Devices

October 5, 2011 - 12:01am #2

there is no way to get the ipod touch 2nd gen working with the QCAR SDK. i don't think it's supported, especially since it doesn't have a camera. the app queries the qualcomm servers for info but cannot find the right settings to initialize it.

Log in or register to post comments