我想在iOS上做出一些基本操作,並將其上傳到cocoapods,當我編輯xxx.podspec時,我無法指定反應和源鏈接的版本號。如何將React與cocoapods集成到我的podspec中
**
- 這是我的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',
#
任何人都可以幫我嗎?
我有固定的問題,說我的答案。謝謝 – user5319936