Skip to content

iOS: custom module crashes on react-native 0.53+ #18092

Closed
@btoueg

Description

@btoueg

Following up on issue #17430 that has been closed for no reason (apparently the bot was unable to parse that I'm having the issue on RN 0.53.0, you hear me bot? I'm using react-native@v0.53.0 or if you prefer react native v0.53.0 the latest one available thanks!)

Original report by @af-fes

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

OS: macOS High Sierra 10.13.3
Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0.1 AI-171.4443003

Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.53.0 => 0.53.0

My full copy/paste

I have the exact same issue here. Here is my stacktrace:

image 21

I'm using RN v0.53.0 and my Podfile is the following:

platform :ios, '8.0'

ENV['COCOAPODS_DISABLE_STATS'] = "true"

def install_pods
  rn_path = '../node_modules/react-native'
  rn_maps_path = '../node_modules/react-native-maps'

  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'GLog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  # To use CocoaPods with React Native, you need to add this specific Yoga spec as well
  pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
  pod 'React', path: rn_path, subspecs: [
    'Core',
    'CxxBridge',
    'RCTActionSheet',
    'RCTAnimation',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTPushNotification',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket',
    'BatchedBridge'
  ]

  pod 'AWSCore', '~> 2.3.6'
  pod 'AWSS3', '~> 2.3.6'
  pod 'Firebase/Messaging', '~> 4.8.2'
  pod 'Firebase/Core', '~> 4.8.2'
  pod 'Firebase/Crash', '~> 4.8.2'
  pod 'GoogleMaps', '2.5.0'
  pod 'FBSDKCoreKit', '~> 4.23'
  pod 'FBSDKShareKit', '~> 4.23'
  pod 'FBSDKLoginKit', '~> 4.23'
  
  pod 'BVLinearGradient', path: '../node_modules/react-native-linear-gradient'
  pod 'RNFS', path: '../node_modules/react-native-fs'
  pod 'RNVectorIcons', path: '../node_modules/react-native-vector-icons'
  pod 'react-native-blur', path: '../node_modules/react-native-blur'
  pod 'react-native-camera', path: '../node_modules/react-native-camera'
  pod 'react-native-fbsdk', path: '../node_modules/react-native-fbsdk/ios'
  pod 'react-native-fcm', path: '../node_modules/react-native-fcm'
  pod 'react-native-image-picker', path: '../node_modules/react-native-image-picker'
  pod 'react-native-maps', path: rn_maps_path
  pod 'react-native-orientation', path: '../node_modules/react-native-orientation'
  pod 'react-native-google-maps', path: rn_maps_path  # Remove this line if you don't want to support Google Maps on iOS
  pod 'react-native-video', path: '../node_modules/react-native-video'
  pod 'SentryReactNative', path: '../node_modules/react-native-sentry'
end

target "MyProject" do
  install_pods
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'react-native-google-maps'
      target.build_configurations.each do |config|
        config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
      end
    end
    if target.name == "React"
      target.remove_from_project
    end
  end
end

Funnily enough, the issue arise only on one of our 4 dev machines.

I haven't found a work-around yet, otherwise than banning development on that machine 😢

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions