This is my code:
-
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
Class BluetoothManager = objc_getClass( “BluetoothManager” ) ;
id btCont = [BluetoothManager sharedInstance ] ;
[self performSelector:@selector(toggle:) withObject:btCont afterDelay:1.0f] ;
return YES;
} -
(void)toggle:(id)btCont
{
BOOL currentState = [btCont enabled] ;
NSLog(@“currentState:%d”, currentState);
}
I used privateframework BluetoothManager and import the headers it needs .And It worked well with the set of Standard architecture.
The log is :
BTM: attaching to BTServer
currentState:1
But when with the set architecture of armv7 , It just didn’t work .
The log:
BTM: attaching to BTServer
currentState:0
Can anyone give me some tips? I will be forever grateful.