Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I declare interface in AppDelegate.h in Xcode?

I'm using React Native to make an iOS Application.

I need to add some code to AppDelegate.h file.

However, after searching about this, I realized that it's impossible to declare two interfaces at the same time.

How can I integrate these two interfaces?

// here's the code in AppDelegate.h

@interface AppDelegate : UMAppDelegateWrapper <RCTBridgeDelegate>

    @property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter;
    @property (nonatomic, strong) UIWindow *window;


@end


@interface AppDelegate : UIResponder <UIApplicationDelegate, AppsFlyerTrackerDelegate>
@end

like image 949
GWANHUI KIM Avatar asked Oct 15 '25 14:10

GWANHUI KIM


1 Answers

Suposing that UMAppDelegateWrapper is a subclass of UIResponder, you can merge both as follows:

@interface AppDelegate : UMAppDelegateWrapper <UIApplicationDelegate, AppsFlyerTrackerDelegate,RCTBridgeDelegate>

    @property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter;
    @property (nonatomic, strong) UIWindow *window;


@end
like image 155
L33MUR Avatar answered Oct 17 '25 03:10

L33MUR



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!