Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jschelpers/JavaScriptCore.h file not found #13010

Closed
playma opened this issue Mar 18, 2017 · 53 comments
Closed

jschelpers/JavaScriptCore.h file not found #13010

playma opened this issue Mar 18, 2017 · 53 comments
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@playma
Copy link

playma commented Mar 18, 2017

This is a clean repository, and I get some problem.
Can anyone help me?

2017-03-18 8 31 44

@shergin shergin added the Platform: iOS iOS applications. label Mar 19, 2017
@gerardus1995
Copy link

same

@allpwrfulroot
Copy link

+1

2 similar comments
@assitaliroma
Copy link

+1

@kingfun2015
Copy link

+1

@assitaliroma
Copy link

Just in case this help anyone, my version of cocoapods was 1.1.1 and not 1.2.0, I had to uninstall cocoapods and reinstall it again:

  1. sudo gem uninstall cocoapods
  2. sudo gem install cocoapods
  3. pod install
  4. build and enjoy

@laowenlu
Copy link

@assitaliroma me too!

@kingfun2015
Copy link

@assitaliroma do well

@philohelp
Copy link

I get the error too in a brand new react-native init. I dont have any use of pod in the project.

@znafets
Copy link

znafets commented Apr 4, 2017

same here trying to build an example project and get :
RCTSamplingProfilerPackagerMethod.mm:14:9: 'jschelpers/JavaScriptCore.h' file not found

Build failed

@wzy911229
Copy link

+1

@znafets
Copy link

znafets commented Apr 5, 2017

Nope, cannot confirm your findings. I just included the Javascript.framework explicitly in build phases as you recommend but with no success as to the build still fails with the exact same error

@yanush
Copy link

yanush commented Apr 9, 2017

+1

@8088
Copy link

8088 commented Apr 10, 2017

add JavaScriptCore.framework it work for me.

@armenr
Copy link

armenr commented Apr 10, 2017

I fixed this in my project with a simple change.

See screenshot:
screen shot 2017-04-10 at 11 38 35 am

Just had to explicitly include libjschelpers.a to my build phases, under "Link Binary with Libraries"

@MountainHill
Copy link

@playma Have you solve the problem? I also have this problem and do't know how to deal with.

@qianyanseu
Copy link

@armenr Tried your solution but no luck. Are you using swift or Objective-C? What is your Xcode version?

@yanush
Copy link

yanush commented Apr 11, 2017

armenr solution worked for me.
I'm using RN 0.43.2, Xcode 8.3.1
These are the steps that I took:

  1. Show the Project navigator
  2. Click on your project in the tree
  3. Select a project target to the first target in your Targets list
  4. Switch to General tab
  5. Scroll to the bottom of the tab
  6. Click the + button
  7. Add libjschelpers.a
  8. Product -> Clean
  9. Product -> Build

@hrk-ys
Copy link

hrk-ys commented Apr 13, 2017

cocoapods
1.1.1 ng
1.2.1 ok

@qianyanseu
Copy link

@hrk-ys Confirm.

Cocoapods 1.1.1 not good, 1.2.0 OK

@gemma-ferreras
Copy link

Any solution is working for me.

RN 0.42.3, Xcode 8.2.1

@hanweixing
Copy link

@assitaliroma it works for me, thanks

@Kottidev
Copy link

@assitaliroma thanks for your solution

@jeanregisser
Copy link
Contributor

Just upgraded from RN 0.44 to 0.45.0-rc.0, using CocoaPods, I got the jschelpers/JavaScriptCore.h import error.

In case you get the same error, you now have to add BatchedBridge in the React subspecs list in your Podfile.

See 5aca739
You can also try CxxBridge instead of BatchedBridge but the shipped npm version doesn't yet contain the third-party-podspecs folder with Folly.podspec, GLog.podspec and DoubleConversion.podspec.

@xie244135119
Copy link

i have this problem , the version of cocoapods is 1.1.1 。i reinstall the cocoapods(1.2.1) and solve the problem

facebook-github-bot pushed a commit that referenced this issue May 12, 2017
Summary:
Hi,

Today I upgraded from RN 0.44 to 0.45.0-rc.0 and noticed I add to include either `CxxBridge` or `BatchedBridge` in the React subspecs in my Podfile to get my project to compile again (#13010).

Adding `BatchedBridge` works fine. However I wanted to try `CxxBridge` as described in 5aca739 but couldn't do it since the required `third-party-podspecs` folder with `Folly.podspec`, `GLog.podspec` and `DoubleConversion.podspec` hadn't been included in the npm release.

So here is the fix for that.
It should be included in the next 0.45.0-rc release.

Let me know what you think.
Closes #13922

Differential Revision: D5051477

Pulled By: javache

fbshipit-source-id: e5c527f1ee9c84734d3e3a3d85ec3f1e5d648bef
@thiensubs
Copy link

I was update to cocoapods version: 1.2.1. It still not working.
Still error with include jschelpers/JavaScriptCore.h

@bosung90
Copy link

bosung90 commented May 19, 2017

For those of you who still get error, try jeanregisser's method and include BatchedBridge or CxxBridge in pod React

@Liqiankun
Copy link

@bosung90 It works for me! Thank you a lot!

@GideonLiu
Copy link

@jeanregisser It works for me! Thank you a lot!

@iOSGongyu
Copy link

@jeanregisser It works for me! Thank you a lot!

@jaimeagudo
Copy link

Using a Podfile based on the suggested https://github.com/mhorowitz/native-navigation-boilerplate/blob/master/ios/Podfile. With pod install I got

Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `GLog` from `../node_modules/react-native/third-party-podspecs/GLog.podspec`
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `Yoga` from `../node_modules/react-native/ReactCommon/yoga`
Downloading dependencies
Installing DoubleConversion (1.1.5)
Using Firebase (4.0.2)
Using FirebaseAnalytics (4.0.1)
Using FirebaseCore (4.0.2)
Using FirebaseInstanceID (2.0.0)
Using FirebaseMessaging (2.0.0)
Installing Folly (2016.09.26.00)
Installing GLog (0.3.4)
Installing GoogleMaps 2.3.0 (was 2.1.1)
Using GoogleToolboxForMac (2.1.1)
Using Protobuf (3.3.0)
Installing React 0.45.1 (was 0.45.1)
Using Yoga (0.45.1.React)
Installing boost (1.59.0)

[!] Error installing boost
[!] /usr/bin/tar xfz /var/folders/_g/jhvwjlrn4q16j_npb_r5z90m0000gn/T/d20170619-49969-1fhjcem/file.tgz -C /var/folders/_g/jhvwjlrn4q16j_npb_r5z90m0000gn/T/d20170619-49969-1fhjcem

tar: Unrecognized archive format
tar: Error exit delayed from previous errors.

My Podfile


source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'

target 'myproject' do
  use_frameworks!

  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  # Third party deps
  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'


  pod 'React', path: '../node_modules/react-native', :subspecs => [
    'Core',
    'RCTActionSheet',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket',
#    'CxxBridge',
#    'BatchedBridge',
    'DevSupport'
  ]
  pod 'GoogleMaps'  # <~~ remove this line if you do not want to support GoogleMaps on iOS

# installing Firebase
  pod 'Firebase/Messaging'
  pod 'Firebase/Core'
end


the problem seems to be the redirect on the download page which is not handled correctly. Thing is I have seen boost is depended by Folly but I don't know why it's getting this old version

@prateekkohli1989
Copy link

@bosung90 it works for me! Thank you a lot!

@zouweiyi
Copy link

pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'DevSupport',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
'BatchedBridge',# 加上这个

'CxxBridge', 这个不加

在这里继续添加你所需要的模块

]

@luchaoqun123
Copy link

@ BatchedBridge this is worked to me

@thienpow
Copy link

can't find libjschelpers.a

@anhtuank7c
Copy link

BatchedBridge is worked to me

@shaikhussian
Copy link

@jaimeagudo i am facing same problem here is my podfile
`# Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'FINGERBOWL' do

Uncomment the next line if you're using Swift or would like to use dynamic frameworks

use_frameworks!

Pods for FINGERBOWL

pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
pod 'React', path: '../node_modules/react-native', :subspecs => [
'Core',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'RCTWebSocket',

'CxxBridge',

'BatchedBridge',

'DevSupport'

]

pod 'GoogleMaps' # <~~ remove this line if you do not want to support GoogleMaps on iOS

pod 'react-native-maps', :path => '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => '../node_modules/react-native-maps'
target 'FINGERBOWLTests' do
inherit! :search_paths
# Pods for testing
end

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
end
end
target 'FINGERBOWL-tvOS' do

Uncomment the next line if you're using Swift or would like to use dynamic frameworks

use_frameworks!

Pods for FINGERBOWL-tvOS

target 'FINGERBOWL-tvOSTests' do
inherit! :search_paths
# Pods for testing
end

end
`
still i am getting the error like this schelpers/JavaScriptCore.h file not found

@sajidcosmo
Copy link

After adding 'BatchedBridge', I end up with 'Linker command failed with exit code 1 (use -v to see invocation)'

@anhtuank7c
Copy link

@sajidcosmo Delete Derived data folder
screen shot 2017-06-30 at 2 51 35 pm

@sajidcosmo
Copy link

It didn't help man. Any other solution?

@Liqiankun
Copy link

@sajidcosmo That could be CocoaPods' problem!

@anhtuank7c
Copy link

@sajidcosmo Please do pod update to get latest libs version.
Do remove existing your_project.xcworkspace, Podfile.lock and Pods folder,
then do pod install again
PS: (inside you ios folder ;))

@mmailhos
Copy link

mmailhos commented Jul 2, 2017

@sajidcosmo I am having the same issue right now. Were you able to solve that linking issue?

@sajidcosmo
Copy link

The issue has disappeared on its own without giving me a clue.

@RajnishTomar
Copy link

Faced same issue, I did fix by removing derived data and unnecessary linked framework under build phases.
to remove dervide data - click on Xcode->Prefrences->Location->Derived Data->Delete All existing files. Good luck!

@aofeilin
Copy link

aofeilin commented Jul 6, 2017

BatchedBridge is worked to me in podfile @shaikhussian thanks

@indu127pal
Copy link

after update Cocoapods 1.1.1 to 1.2.0
screen shot 2017-07-10 at 6 25 20 pm

@indu127pal
Copy link

If anyone solves this issue, kindly replies.

@PanRada
Copy link

PanRada commented Jul 11, 2017

anyone solves ? all solution dosent work still

@sy19921103
Copy link

a89a9c71-509f-4ba7-bfea-2c691e72f7a7

@daywong1119
Copy link

add BatchedBridge solved the problem.
for those who sill have this issue, here is the checklist

  • Update cocoapod to version 1.2.x
  • Remove {YourProjectName}.xcworkspace
  • Remove Pods folder
  • Run pod install again

@billpatterson
Copy link

For everyone responding about cocoa pods: this is NOT a cocoa-pods specific problem. It may turn up with cocoa pods, and updating magic with cocoapods may help you, but it ALSO occurs in projects that do not use cocoa pods in any way.
The issue is not fixed/closed/resolved by fixes that address only cocoa pods solutions.

I have this issue in my React Native project, which involves zero use of cocoa pods anywhere. Others have said the same.

@tslater
Copy link

tslater commented Jan 12, 2018

@billpatterson Have you found a resolution? I'm having cocoapodless problems as well.

@facebook facebook locked as resolved and limited conversation to collaborators Jun 6, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests