You helper instance is a local variable in the -connect
method.
So ARC release it (and the CBCentralManager instance) before you can receive delegate methods.
Make your helper an instance variable (or property) of PrimaryViewController, and this will fixed your problem.
@interface PrimaryViewController : UIViewController
{
// BTHelper instead of btHelper, to follow naming convention
BTHelper *_bluetoothManager;
}
@end
@implementation PrimaryViewController
-(IBAction)connect
{
// FIXME: this don't check if _bluetoothManager is already instantiated
_bluetoothManager = [[BTHelper alloc] init];
[_bluetoothManager activateBluetooth];
}
@end