【发布时间】:2017-01-28 15:04:10
【问题描述】:
我想在 iOS 上用 react native 做一些基本的操作,然后上传到 cocoapods,当我编辑 xxx.podspec 时,我无法指定 react 的版本号和源链接。
**
- 这是我的 podspec:
**
s.ios.deployment_target = '8.0'
s.source_files = 'SCCReactNative/Classes/**/*'
# s.resource_bundles = {
# 'SCCReactNative' => ['SCCReactNative/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
s.dependency 'React', :git => 'https://github.com/facebook/react-native.git', :tag => 'v0.31.0', :subspecs => [
'Core',
'RCTImage',
'RCTNetwork',
'RCTText',
'RCTWebSocket',
'ART',
'RCTActionSheet',
'RCTAdSupport',
'RCTCameraRoll',
'RCTGeolocation',
'RCTPushNotification',
'RCTSettings',
'RCTVibration',
'RCTLinkingIOS',
#'RCTTest',
]`enter code here`
**
- 这是错误
**
[!] Invalid `SCCReactNative.podspec` file: undefined local variable or method `source' for Pod:Module.
# from /Users/huangcheng/Desktop/Project/SCCReactNative/SCCReactNative.podspec:50
# -------------------------------------------
# s.dependency 'SCCUtil'
> s.dependency 'React', source => 'https://github.com/facebook/react-native.git' ,tag => 'v0.31.0' ,subspecs => [
# 'Core',
#
谁能帮帮我?
【问题讨论】:
标签: objective-c react-native cocoapods podspec