私はこのpodspecを使用して、反応させ、ネイティブのv0.46.4とヨガに依存している私のココアタッチフレームワーク(SWIFTバージョン4.0)、のためのプライベートcocoapodを構築しようとしている:「特定の反応ネイティブバージョンに依存してプライベートCocoaPodを構築するにはどうすればよいですか?
react_native_version = '0.46.4'
Pod::Spec.new do |s|
s.name = 'MyLibrary'
s.version = '0.1.0'
s.source = { :git => 'https://github.com/mylibrary.git', :tag => s.version.to_s,
:git => 'https://github.com/facebook/react-native.git', :tag => "v#{react_native_version}"
}
s.platform = :ios, '11.0'
s.requires_arc = true
s.source_files = 'MyLibrary/Classes/**/*.swift'
s.resources = 'MyLibrary/Assets/*.{png,storyboard}'
s.public_header_files = 'MyLibrary/Classes/**/*.h'
s.frameworks = 'UIKit', 'ARKit', 'SceneKit', 'SpriteKit'
s.dependency 'ADAL', '~> 2.2'
s.dependency 'Yoga', "#{react_native_version}.React"
s.dependency 'React/Core', react_native_version
s.dependency 'React/BatchedBridge', react_native_version
s.dependency 'React/DevSupport', react_native_version
s.dependency 'React/RCTText', react_native_version
s.dependency 'React/RCTImage', react_native_version
s.dependency 'React/RCTLinkingIOS', react_native_version
s.dependency 'React/RCTSettings', react_native_version
s.dependency 'React/RCTVibration', react_native_version
s.dependency 'React/RCTGeolocation', react_native_version
s.dependency 'React/RCTActionSheet', react_native_version
s.dependency 'React/RCTAnimation', react_native_version
s.dependency 'React/RCTNetwork', react_native_version
s.dependency 'React/RCTWebSocket', react_native_version
End
そしてI私はこのようなポッドLIB用糸くず実行するとリンターチェックに合格することができませんでしメートル:
ポッドLIBの糸くずをMyLibrary.podspec --sources = https://github.com/facebook/react-native.git,master
-> MyLibrary (0.1.0)
- WARN | source: The version should be included in the Git tag.
- ERROR | [iOS] unknown: Encountered an unknown error (An
unexpected version directory `Base` was encountered for the
`/Users/administrator/.cocoapods/repos/facebook/React` Pod in the
`React` > repository.
私はhttps://guides.cocoapods.org上のドキュメントを読んでの完了たくさんしました仲間これが正しいかどうかわかりませんが、リポジトリの特定のバージョンを参照する構文、またはこれがサポートされているかどうかは、podspecです。
(私が使用しているCocoaPods 1.3.1 XCode9とスウィフト4)
私が疑ったように、私がここでやろうとしていることはサポートされていません。しかし、本当に不思議なことに、Podspecの依存関係によって引き起こされる問題をどのように克服するのでしょうか?そして、PodfileとPodspecの間の依存関係を宣言するこの異なるレベルの柔軟性の背後にある理由は何ですか? – user101010