rollbar / rollbar-ios

Objective-C library for crash reporting and logging with Rollbar.
https://docs.rollbar.com/docs/ios
MIT License
65 stars 61 forks source link

module.modulemap causing build fail #318

Closed hzeraat2 closed 3 years ago

hzeraat2 commented 4 years ago

In rollbar-react-native version 0.8.1 this file module.modulemap seems to be causing the build to fail:

We are using react-native version 0.60.5

node_modules/rollbar-react-native/ios/rollbar-ios/RollbarSwiftPM/module.modulemap:1:8: error: redefinition of module 'Rollbar'
module Rollbar {

Screenshot 2020-09-08 at 13 57 37

hzeraat2 commented 4 years ago

Please advise!

akornich commented 4 years ago

@hzeraat2 , SwiftPM is not officially supported by Rollbar-iOS SDK pre-v2 version releases (due to its SwiftPM incompatible dependencies). Please, do not include RollbarSwiftPM project into your solutions (it was an experimental project attempting to workaround the dependencies problem - but with no success). SwiftPM will be supported in the upcoming v2 release that is currently in its alpha-phase.

hzeraat2 commented 4 years ago

Thank you @akornich for the comments, I think RollbarSwiftPM has been used in the latest release of rollbar-react-native as well. We are trying to use version rollbar-react-native version 0.8.1 do you happen to know which version is more stable for us to use?
I had raised the same issue here Thanks

akornich commented 4 years ago

@hzeraat2 , correct, rollbar-react-native does use rollbra-ios SDK as its dependency but not via SwiftPM (i think, it is used as a git submodule so that RollbarSwiftPM is not "activated").

akornich commented 4 years ago

@hzeraat2 , i think if you make sure that you do not directly reference or include RollbarSwiftPM into any of your build targets - you should be able to build it with no problem. Please, follow these instructions: https://docs.rollbar.com/docs/react-native#section-getting-started

hzeraat2 commented 4 years ago

We found a solution to this problem . Basically in Xcode we had to adjust header search to avoid recursion. So all occarances of "$(SRCROOT)/../node_modules/rollbar-react-native/ios/\" should become: "$(SRCROOT)/../node_modules/rollbar-react-native/ios"**

akornich commented 4 years ago

@hzeraat2 , that makes sense. can we close the issue?