Skip to content

[iOS] pod lib lint React.podspec --subspec='Core' did not pass validation #20002

@JesseRom

Description

@JesseRom

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 9.3.0
Yarn: 1.7.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: Not Found

Packages: (wanted => installed)
react: ^16.3.1 => 16.4.1
react-native: 0.55.4 => 0.55.4

Core subspec

s.subspec "Core" do |ss|
ss.dependency "Yoga", "#{package["version"]}.React"
ss.source_files = "React//*.{c,h,m,mm,S,cpp}"
ss.exclude_files = "
/tests/",
"IntegrationTests/
",
"React/DevSupport/",
"React/Inspector/
",
"ReactCommon/yoga/",
"React/Cxx
/",
"React/Fabric/
",
ss.ios.exclude_files = "React/**/RCTTV*."
ss.tvos.exclude_files = "React/Modules/RCTClipboard
",
"React/Views/RCTDatePicker*",
"React/Views/RCTPicker*",
"React/Views/RCTRefreshControl*",
"React/Views/RCTSlider*",
"React/Views/RCTSwitch*",
"React/Views/RCTWebView*"
ss.header_dir = "React"
ss.framework = "JavaScriptCore"
ss.libraries = "stdc++"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => ""$(PODS_TARGET_SRCROOT)/ReactCommon"" }
end

Description

I want to make a react-native private pod using the React.podspec file in the node_modules/react-native directory, but I am using the following command:
pod lib lint React.podspec --sources='git@gitlab.xiaoenai.net:ios/xspecs.git,https://github.com/CocoaPods/Specs' --allow-warnings --verbose --subspec=' Core'
When verifying the subspec 'Core', the following error was reported:
    ** BUILD FAILED **
    
    The following build commands failed:
    CompileC /Users/JesseRom/Library/Developer/Xcode/DerivedData/App-cobxrvjzprxgjhbaftnqmampbnkm/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/React.build/Objects-normal/i386/RCTDevSettings.o React/React/Modules /RCTDevSettings.mm normal i386 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
    (1 failure)
   Testing with xcodebuild.
 -> React/Core (0.55.4)
    - ERROR | [iOS] [React/Core] xcodebuild: Returned an unsuccessful exit code.
    - WARN | [iOS] [React/Core] xcodebuild: React/React/Base/RCTConvert.m:356:1: warning: implicit conversion loses integer precision: 'unsigned long long' to 'UIDataDetectorTypes' (aka 'enum UIDataDetectorTypes' ) [-Wshorten-64-to-32]
    - NOTE | [iOS] [React/Core] xcodebuild: React/React/Modules/RCTDevSettings.mm:14:9: fatal error: 'jschelpers/JavaScriptCore.h' file not found
    - WARN | [React/Core] xcodebuild: React/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.h:17:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness ]
    - NOTE | [React/Core] xcodebuild: React/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.h:17:16: note: insert '_Nullable' if the pointer may be null
    - NOTE | [React/Core] xcodebuild: React/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.h:17:16: note: insert '_Nonnull' if the pointer should never be null

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.
You can use the --no-clean option to inspect any issue.

When I am confused why the subspec ‘Core’ cannot be verified. 
From the given error message - NOTE | [iOS] [React/Core] xcodebuild: React/React/Modules/RCTDevSettings.mm:14:9: fatal error: 'jschelpers/JavaScriptCore.h' file not found
It seems that the subspec ‘Core’ dependency on the subspec ‘jschelpers’

How to deal with this issue, any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: iOSiOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions