+ (NSString *)getCoreBluetoothConstantByName:(NSString *)name
{
void *libHandle = dlopen("/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth", RTLD_LOCAL);
if (libHandle != NULL)
{
NSString **key = dlsym(libHandle, [name cStringUsingEncoding:NSASCIIStringEncoding]);
dlclose(libHandle);
return [[*key copy] autorelease];
}
return nil;
}
Weak reference to constans?
-
04-06-2022 - |
Question
I'm trying to use some library built in XCode 5 to link in some app in XCode 4. That library has references to constants defined in iOS7 SDK, but not in iOS6 SDK.
So I'm getting this error:
Undefined symbols for architecture armv7s: "_CBPeripheralManagerRestoredStateServicesKey", referenced from:
Is there any way to preserve backward compatibility with XCode 4 and SDK for iOS6?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow