最近尝试做了pod setup,我得到了这个:
-bash: /usr/local/bin/pod: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我按照Ray Wenderlich的指南安装了cocoapods,我得到了这个问题,所以我不知道发生了什么.
我已经将我的 flutter 包更新到最新版本,现在 IOS 不再工作了。
当我尝试更新 Pod 时,它显示此错误:
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
Firebase/Firestore (~> 6.0) was resolved to 6.0.0, which depends on
Firebase/CoreOnly (= 6.0.0)
cloud_functions (from `.symlinks/plugins/cloud_functions/ios`) was resolved to 0.0.1, which depends on
Firebase/Functions (~> 5.18) was resolved to 5.18.0, which depends on
Firebase/CoreOnly (= 5.18.0)
Run Code Online (Sandbox Code Playgroud)
这是我的 pubspec.yaml(与 Firebase 相关):
firebase_core: "^0.4.0"
firebase_auth: "^0.11.0"
firebase_analytics: "^3.0.0"
cloud_firestore: "^0.11.0+1"
cloud_functions: "^0.3.0" …Run Code Online (Sandbox Code Playgroud) 我正在尝试从pod规范上的存储库分支安装代码,并且基于文档,这应该工作:
s.dependency 'repository_name',
:git => 'https://github.com/account_name/repository_name.git',
:branch => 'experimental_branch'
Run Code Online (Sandbox Code Playgroud)
但是我收到了类似[!]不支持的版本要求的错误.更新CocoaPods可能会解决问题.
它直接从pod文件安装时有效:
pod 'ObjectiveRecord', :git => 'https://github.com/supermarin/ObjectiveRecord.git', :branch => '2-0-experimental'
Run Code Online (Sandbox Code Playgroud)
有人知道吗?谢谢!
如何在podspec中指定依赖项的本地路径?
喜欢:s.dependency'MyLibrary',:path =>'../MyLibrary'
谢谢
Podspec 是:
Pod::Spec.new do |s|
s.name = 'MyPod'
s.version = '0.1.0'
s.summary = 'my summary.'
s.platform = :ios, '13.0'
s.description = <<-DESC
My description.
DESC
s.homepage = 'https://github.com/MyAccount/MyPod'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Me' => 'my@email.com' }
s.source = { :git => 'https://github.com/MyAccount/MyPod.git', :tag => s.version.to_s }
s.swift_version = '5.0'
s.source_files = 'MyPod/Classes/**/*'
s.static_framework = true
s.dependency 'Firebase'
s.dependency 'Firebase/Core'
s.dependency 'Firebase/Auth'
s.dependency 'Firebase/Database'
s.dependency 'GoogleSignIn'
s.dependency 'GoogleAPIClientForREST/Core'
s.dependency 'GoogleAPIClientForREST/Sheets'
s.dependency 'GTMAppAuth' …Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个 Flutter 插件来使用本机库。我尝试使用的这个库存储在私有存储库中,可以与 Swift 依赖管理器一起使用。
这让我很头痛,因为我无法在我的插件中添加私有存储库依赖项(我找不到在 .podspec 文件中执行此操作的方法),所以我做了什么:
MyDependency.xcframework文件夹到MyPlugin/ios文件夹s.preserve_paths = 'MyDependency.xcframework'
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework MyDependency' }
s.vendored_frameworks = 'MyDependency.xcframework'
Run Code Online (Sandbox Code Playgroud)
这样做我可以在插件的源代码中使用 MyDependency 。
我当前的问题是:这仅适用于 Simulator。
在此之前,该项目在真实设备上运行没有任何问题。
另外,我直接使用 Swift 依赖管理器中的依赖项进行了测试,并且运行良好。我认为问题在于我将框架添加到插件的方式。
我分叉了CBZSplashView,我想在我自己的项目中使用它.
为了确保问题不是来自我,我从头开始创建一个Xcode项目.
我的项目Podfile包含一行:
pod 'CBZSplashView', :git=> 'git@github.com:rvirin/CBZSplashView.git', :branch => 'remy'
Run Code Online (Sandbox Code Playgroud)
当我跑步pod install或者pod update我有原始版本的吊舱 - 而不是我的前叉.
我做错了什么?
该:git参数会覆盖podspec的源.
我尝试修改podspec以指示源文件现在位于我的存储库中,但也无法正常工作.
记录pod update --verbose:
-> Pre-downloading: `CBZSplashView` from `git@github.com:rvirin/CBZSplashView.git`, tag `1.0.1`
> GitHub download
$ /usr/bin/git config core.bare
true
$ /usr/bin/git config core.bare
true
> Updating cache git repo (/Users/rvi/Library/Caches/CocoaPods/GitHub/8520768890e6fa2ea91b3d9e8bb9f2afbb31ab60)
$ /usr/bin/git remote update
Fetching origin
> Cloning to Pods folder
$ /usr/bin/git clone /Users/rvi/Library/Caches/CocoaPods/GitHub/8520768890e6fa2ea91b3d9e8bb9f2afbb31ab60 /Users/rvi/Devs/Lima/iOS/Lima/Pods/CBZSplashView
Cloning into '/Users/rvi/Devs/Lima/iOS/Lima/Pods/CBZSplashView'...
done.
$ …Run Code Online (Sandbox Code Playgroud) 我的 podspec 看起来像这样:
Pod::Spec.new do |s|
s.name = 'flutter_vlc_player'
s.version = '0.0.3'
s.summary = 'A new Flutter project.'
s.description = <<-DESC
A new Flutter project.
DESC
s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'MobileVLCKit', '~> 3.3.10'
s.static_framework = true
s.ios.deployment_target = '9.0'
end
Run Code Online (Sandbox Code Playgroud)
如何设置:modular_headers => truefor s.dependency 'MobileVLCKit', '~> 3.3.10'?我试着用像 …
我刚刚使用pod trunk push在Specs Repo中发布了Beta版本的Pod .我想知道是否有任何方法可以从Spec Repo中删除此版本Spec.我没有通过pod命令找到任何方法.
我正试图通过CocoaPods网站访问我的图书馆信息,但我无法做到.所有其他库似乎都能够扩展(我的是MKWeatherUndergroundKit)

这是我的podspec
Pod::Spec.new do |s|
s.name = "MKWeatherUndergroundKit"
s.version = "0.6"
s.summary = "A simple iOS and OS X library for retrieving weather information using the Weather Underground API"
s.homepage = "https://github.com/MendyK/MKWeatherUndergroundKit"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "MendyK" => "myEmail@gmail.com" }
s.social_media_url = "https://twitter.com/MenndK"
s.platform = :ios, '8.0'
s.source = { :git => "https://github.com/MendyK/MKWeatherUndergroundKit.git", :tag => "0.6"}
s.source_files = "MKWeatherUndergroundKit/*.{h,m}"
s.resources = "MKWeatherUndergroundKit/Climacons.ttf"
s.requires_arc = true
s.frameworks = 'CoreGraphics', 'CoreLocation'
end
Run Code Online (Sandbox Code Playgroud) podspec ×10
cocoapods ×8
ios ×6
flutter ×2
git ×2
objective-c ×2
podfile ×2
xcode ×2
cocoa ×1
firebase ×1
flutter-ios ×1
github ×1
ruby ×1
swift ×1
xcodebuild ×1