I'm trying to retrieve some info from the main bundle:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
CFStringRef bundleVer = CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey);
NSString *appVersion = (__bridge NSString *)bundleVer;
}
I can get the CFStringRef (in debug I can see the proper value associate to the variable), but when I try to cast it to NSString my appVersion variable has "null" value (previously it was nil).
What am I doing wrong?
I'm using ARC.
EDIT: It seems that I have problem with my project, every NSString object can't be assigned even with a simple static assignment, the value of the test variable is (null)
NSString *test = @"";