1

I have the Objective-C version of Aquatic Prime working in my app. When I swap out the Objective-C class for the CoreFoundation functions, I can validate the license file once, but subsequent validation attempts in other parts of my code (using the same block of code) fails. Why?

APSetKey(key);
NSString *appSupportFolder = [(MyApp_AppDelegate *)[[NSApplication sharedApplication] delegate] applicationSupportFolder];

NSString *licFile = [appSupportFolder stringByAppendingPathComponent:@"license.myapp-license"];

CFURLRef licURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,  (CFStringRef)licFile, kCFURLPOSIXPathStyle, false);
CFDictionaryRef licenseDictionary = APCreateDictionaryForLicenseFile(licURL);
if (licenseDictionary) {
    // do something
    CFRelease(licenseDictionary);
}
CFRelease(key);
CFRelease(licURL);

I'm using XCode 4.1 on Lion but compiling against 10.6 64 bit.

Mike T
  • 1,163
  • 1
  • 11
  • 27

0 Answers0