I'm creating a react native app, but need to make some adjustments in native iOS code to support push notifications when integrating a CRM system.
I've created a swift file (according to the guide here) that's bridged to Object-C code.
The Swift file is imported like this: #import "app-Swift.h"
and declared like this MyAppPushNotificationsHandler* pnHandlerObj = [[MyAppPushNotificationsHandler alloc] init];
If I:
- add it directly after the
"app-Swift.h"I get the errorUse of undeclared identifier 'pnHandlerObj'further down in the file where I'm using it - if I add it just above the
didFinishLaunchingWithOptions(below @interface and @implementation AppDelegate) I get the two errorsUse of undeclared identifier 'MyAppPushNotificationsHandler'andUnknown type name 'MyAppPushNotificationsHandler'
Does anyone know what I'm missing here? Thanks a lot.
