ios - Weak reference to constans? -
i'm trying use library built in xcode 5 link in app in xcode 4. library has references constants defined in ios7 sdk, not in ios6 sdk.
so i'm getting error:
undefined symbols architecture armv7s: "_cbperipheralmanagerrestoredstateserviceskey", referenced from:
is there way preserve backward compatibility xcode 4 , sdk ios6?
+ (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; }
Comments
Post a Comment