pushy / pushy-react-native

The official Pushy SDK for React Native apps.
Apache License 2.0
16 stars 20 forks source link

Fastlane fails on PushyModule #76

Closed ericchen0121 closed 2 years ago

ericchen0121 commented 2 years ago

Running RN 0.67 and Pushy. I'm able to run the app on Simulator and device with pushy. This autolinks the library, but I also manually linked regardless.

However, when i then try to run fastlane tool to build the app to push to TestFlight, I run into this error:

.../AppDelegate.m:43:4: use of undeclared identifier 'PushyModule' .../AppDelegate.m:43:4: error: use of undeclared identifier 'PushyModule' [16:16:49]: ▸ [PushyModule didFinishLaunchingWithOptions:launchOptions];

I tried adding an empty Pushy.Swift header, and changing the #import to reference the ../node_modules/pushy-react-native/ios/PushyModule.h. I also tried manually unlinking the library to no avail. Same error with the build.

Please help!

ericchen0121 commented 2 years ago

Also had this error right before the PushyModule error ` Compiling PushyModule.m

⚠️ .../node_modules/pushy-react-native/ios/PushyModule.m:84:125: 'UNAuthorizationOptionCriticalAlert' is only available on iOS 12.0 or newer [-Wunguarded-availability-new]

UNAuthorizationOptions options = UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionCriticalAlert;`
ericchen0121 commented 2 years ago

Figured it out... I had the import inside the

ifdef FB_SONARKIT_ENABLED