Closed fbartho closed 4 years ago
Workaround is to allow non-modular headers at a Project level (temporarily -- as this is considered a problem in one of your libraries -- and probably a sign that other build weirdness will happen)
Thanks for raising @fbartho, I agree that the temporary solution is not ideal. We are going to look into a better fix by moving the import into the .m file (tbc).
@fbartho, I've just learned that a patch was applied in 2.23.7 to the missing BugsnagPlugin.h header to the podspec file. Please can you upgrade to 2.23.7 and confirm if this fixes the issue?
@steve-nester-uk -- I tested against 2.23.9, and there's a new error:
Trying 2.23.7 now.
Problem is resolved with exactly 2.23.7
-- Do you need me to file a different Github Issue about 2.23.9
or is this sufficient?
Hey @fbartho, thanks for letting us know. We're already aware of this issue (moving to v2.23.8
or v2.23.9
) you can track it here: https://github.com/bugsnag/bugsnag-react-native/issues/462. When making this upgrade, what steps did you take to produce the error? We've not reproduced this error, so are unable to test fixes against it.
Description
We have code that is importing
<BugsnagReactNative/BugsnagReactNative.h>
from this, we were calling[BugsnagReactNative start];
inside of a section of code (called fromappDidFinishLaunching
)Issue
This wasn't an issue, until we upgraded one of our cocoapods dependencies (ZendeskChat) to their V2.
I'm a maintainer of
react-native-zendesk-chat
and I'm trying to upgrade it.That updated pod spec has these lines:
```ruby Pod::Spec.new do |s| s.name = "RNZendeskChat" s.version = package['version'] s.summary = package['description'] s.license = package['license'] s.authors = package['author'] s.homepage = package['homepage'] s.platform = :ios, "10" s.source = { :git => "https://github.com/taskrabbit/react-native-zendesk-chat.git", :tag => "v#{s.version}" } s.source_files = "ios/*.{h,m}" s.static_framework = true s.framework = 'Foundation' s.framework = 'UIKit' s.dependency 'React' s.dependency 'ZendeskChatSDK' end ```Environment
Library versions:
cocoapods version (if any) (
pod -v
):1.9.3
(Note that the new command for this ispod --version
)iOS/Android version(s): 12.2
simulator/emulator or physical device?: Simulator
debug mode or production?: Debug
[x] (iOS only)
[BugsnagReactNative start]
is present in theapplication:didFinishLaunchingWithOptions:
method in yourAppDelegate
class?Interesting Podfile details
Also, we have flipper disabled!
Example code snippet
Code is just:
Error messages:
``` Showing All Messages /Users/fbarthelemy/Code/TRClient5/node_modules/bugsnag-react-native/cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.h:30:9: Include of non-modular header inside framework module 'BugsnagReactNative.Bugsnag': '../node_modules/bugsnag-react-native/cocoa/vendor/bugsnag-cocoa/Source/BugsnagPlugin.h' /Users/fbarthelemy/Code/TRClient5/ios/TRClient/AppDelegate.m:23:9: Could not build module 'BugsnagReactNative' ``` Error is in Bugsnag.h: ![Screenshot of the error in Bugsnag.h](https://user-images.githubusercontent.com/209712/86411817-83197a00-bc72-11ea-94fd-5b28afa7faf3.png)Potentially related ticket: #442