objective-ccocoainheritancesfauthorizationpluginview

Objective-C libraries multiple inheritance


I'm extending the NameAndPassword example (https://github.com/skycocker/NameAndPassword) and I need to acces IOBluetooth methods in this implementation file: https://github.com/skycocker/NameAndPassword/blob/master/NameAndPasswordPlugin.m

The interface looks like this:

@interface EXNameAndPassword : SFAuthorizationPluginView 

How do I make it inherit from CBCentralManagerDelegate like in appdelegate:

@interface AppDelegate : NSObject <CBCentralManagerDelegate, CBPeripheralDelegate>

I need EXNameAndPassword to inherit both from SFAuthorizationPluginView and CBCentralManagerDelegate and stuff. I believe this is quite easy, I'm just an obj-c beginner. I read about composition but I can't get it to work.

What I have currently is

 @interface EXNameAndPassword : SFAuthorizationPluginView <CBCentralManagerDelegate, CBPeripheralDelegate>

but I keep getting warnings about properties non synthesized -- I didn't have to synthesize them in my project which didn't require SFAuthorizationPluginView inheritance, therefore I guess I'm doing something wrong.


Solution

  • I got the problem.

    @interface EXNameAndPassword : SFAuthorizationPluginView <CBCentralManagerDelegate, CBPeripheralDelegate> 
    

    is perfectly fine, I just had to disable architectures other than x86_64 in build settings.

    Source: http://www.cocoabuilder.com/archive/cocoa/198573-property-problem.html