Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6822791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:42:20+00:00 2026-05-26T21:42:20+00:00

Does anyone know if it is possible to load the config.xml and qcar-resources.dat (The

  • 0

Does anyone know if it is possible to load the config.xml and qcar-resources.dat (The files that contain the marker info) from outside the app bundle?

According to the official forums and documentation, it is not. However, there is an app out there called Blippar which seems to be doing it. I extracted the app Documents folder from an iPhone backup and they seem to have a config.xml in there that has more tracking markers than the one that is in the app bundle.

How could they have done this if the QCAR SDK doesn’t allow you to specify a location of the tracking files?

I tried being hacky and creating a category on NSBundle to override

  • (NSString *)pathForResource:(NSString *)name ofType:(NSString *)ext;

to return a path from the documents folder instead, but that didn’t seem to work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:42:20+00:00Added an answer on May 26, 2026 at 9:42 pm

    Ok, I’ve solved it.

    First I created a category on NSBundle, and created new implementations of pretty much every method related to loading files from the bundle, until I found the one Qualcomm are using, which is:

    - (NSString *)pathForResource:(NSString *)name ofType:(NSString *)ext inDirectory:(NSString *)subpath;
    

    Once I had that, I changed my category method to be:

    #define XFILPATH4DOCUMENT(_value) [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:_value]
    
    - (NSString *)pathForResourceOverride:(NSString *)name ofType:(NSString *)ext inDirectory:(NSString *)subpath
    {
        if (([name isEqualToString:@"config"] && [ext isEqualToString:@"xml"]) || ([name isEqualToString:@"qcar-resources"] && [ext isEqualToString:@"dat"]))
        {
            // OMG
            NSString *fileName = [NSString stringWithFormat:@"%@.%@", name, ext];
            NSString *path = XFILPATH4DOCUMENT(fileName);
            NSLog(@"%@", path);
            return path;
        }
        else
        {
            return [self pathForResourceOverride:name ofType:ext inDirectory:subpath];
        }
    }
    

    Then, through the magic of method swizzling:

    Swizzle([NSBundle class], @selector(pathForResource:ofType:inDirectory:), @selector(pathForResourceOverride:ofType:inDirectory:));
    

    Using this method:

    #import <objc/runtime.h> 
    #import <objc/message.h>
    
    void Swizzle(Class c, SEL orig, SEL replacement)
    {
        Method origMethod = class_getInstanceMethod(c, orig);
        Method newMethod = class_getInstanceMethod(c, replacement);
        if(class_addMethod(c, orig, method_getImplementation(newMethod), method_getTypeEncoding(newMethod)))
            class_replaceMethod(c, replacement, method_getImplementation(origMethod), method_getTypeEncoding(origMethod));
        else
            method_exchangeImplementations(origMethod, newMethod);
    }
    

    Which I got from the answer here: Method Swizzle on iPhone device

    Scary? Yes.

    But it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know if it is possible to load a KeyStore so that it
Does anyone know if its possible to turn off dreamweavers custom icons that it
Does anyone know if it is possible to load a windows phone 7 XAP
Does anyone know a library that would automatically load images as user scrolls down?
Does anyone know if its possible to validate an XML schema with another XML
Does anyone know that it is possible if it is possible to create an
Does anyone know if it possible to define the equivalent of a java custom
Does anyone know if its possible to create a new property on an existing
Does anyone know if its possible to use phing to copy an entire folder
Does anyone know if its possible to set the amount of memory available in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.