在更新我的项目时,其中包含以下行Podfile:
pod 'UIView-Autolayout', :git => 'https://github.com/dkk/UIView-Autolayout.git'
Run Code Online (Sandbox Code Playgroud)
使用该命令pod update我想更新此github存储库中的pod,该存储库具有以下podspec:
Pod::Spec.new do |s|
s.name = 'UIView-Autolayout'
s.version = '0.2.2'
s.license = 'MIT'
s.platform = :ios, '6.0'
s.summary = 'Category on UIView to simplify the creation of common layout constraints.'
s.homepage = 'https://github.com/jrturton/UIView-Autolayout'
s.author = { 'Richard Turton' => 'jrturton@gmail.com' }
s.source = { :git => 'https://github.com/jrturton/UIView-Autolayout.git', :tag => s.version.to_s }
s.source_files = 'Source/*.{h,m}'
s.requires_arc = true
end
Run Code Online (Sandbox Code Playgroud)
作为输出我得到:Installing UIView-Autolayout 0.2.1 (was 0.2.1).为什么不安装版本0.2.2? …
也许我误解了s.ios.vendored_frameworks工作方式,但我正在尝试在我自己的 SDK(用于 voip 部分)中使用/集成Sinch.framework,但在我的 ReplaceMe.swift 中,我无法从中导入或使用任何东西
我使用后的层次结构s.ios.vendored_frameworks如下

我的 podspec(使用最新版本的 cocoapods)
s.ios.source_files = 'PoCSDK/Classes/**/*','PoCSDK/Frameworks/Sinch.frameworks/Headers/*'
s.ios.vendored_frameworks = 'PoCSDK/Sinch.framework'
s.ios.public_header_files = 'PoCSDK/Frameworks/Sinch.frameworks/Headers/*'
s.resource_bundles = {
'NoddsSDK' => ['PoCSDK/Assets/*']
}
s.frameworks = 'UIKit', 'MapKit', 'AudioToolbox', 'AVFoundation'
s.ios.dependency 'Alamofire', '~> 4.5'
s.ios.dependency 'Socket.IO-Client-Swift'
s.ios.dependency 'ReachabilitySwift'
Run Code Online (Sandbox Code Playgroud) 早上好,我在更新 Firebase/Analytics 和 Firebase/Core pod 时遇到问题。
我的播客文件:
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/CocoaPods/Specs'
platform :ios, '10.0'
target 'Unity-iPhone' do
pod 'Firebase/Analytics', '5.15.0'
pod 'Firebase/Core', '5.15.0'
pod 'Firebase/Messaging', '5.1.0'
pod 'GoogleAppMeasurement', '5.3.0'
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
end
Run Code Online (Sandbox Code Playgroud)
如果我运行,pod install我会得到以下输出
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/Analytics":
In Podfile:
Firebase/Analytics (= 5.15.0)
None of your spec sources contain a spec satisfying the dependency: `Firebase/Analytics (= 5.15.0)`.
You have either:
* out-of-date source repos which you can update …Run Code Online (Sandbox Code Playgroud) 当我在 .podspec 文件的主页 url 中添加我的私人仓库名称时,我收到以下警告,
WARN | url: The URL (https://github.com/username/repo_name) is not reachable.
Run Code Online (Sandbox Code Playgroud)
我不知道如何修复它。
例如,我有项目A,它需要项目B,所以我使用pod"Project B".但是项目B需要一些dylib和静态库.所以,我写了项目B podspec,例如:
Pod::Spec.new do |s|
s.name = 'ProjectB'
s.version = '3.0.0'
s.license = 'MIT'
s.summary = 'ProjectB'
s.homepage = 'urlAddress'
s.authors = { 'Jumei' => 'app@jumei.com' }
s.source = { :git => 'gitAddress', :branch => 'develop'}
s.vendored_library = 'ProjectB_Dir/libmp3lame.a'
s.library = 'libc++.dylib'
s.requires_arc = true
s.ios.deployment_target = '5.0'
end
Run Code Online (Sandbox Code Playgroud)
但是项目B中没有libc ++.dylib.
快速摘要:如何将包含Xcode的标头的包含路径添加到.podspec.json文件中?
我正在开发一个Swift项目,我希望将AudioKit作为依赖项包含在内.对于这个项目,我必须添加'use_frameworks!' 在我的Podfile中
所以我在Podfile中添加了我的Pod(主要的repo还没有更新,这就是我直接指向github repo的原因)
pod 'AudioKit', :git => 'https://github.com/niklassaers/AudioKit.git'
Run Code Online (Sandbox Code Playgroud)
并添加我的一个Swift文件
import AudioKit
Run Code Online (Sandbox Code Playgroud)
然后我的编译器会警告我,这CsoundFile.hpp是iostream无法找到的引用.iostream.h在:
/Applications/Xcode62.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1/backward/iostream.h
与stdlib.h相比,它位于:
/Applications/Xcode62.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdlib.h
如何将此标头目录添加到AudioKit.podspec.json(我已经分叉)的搜索路径中.
我已经制作了一个示例项目来演示我在上面所写的内容:https://github.com/niklassaers/AudioKitSwiftFrameworkError - 您可以下载并编译它,您将看到错误消息.
我创建了一个Pod项目。它被推动并正常工作。然后我决定进行一些更新。我创建了一个新标签,验证了代码并再次推送。
git tag 0.1.2
git push origin 0.1.2
pod spec lint PlaybuzzSDK.podspec
pod trunk push PlaybuzzSDK.podspec
Run Code Online (Sandbox Code Playgroud)
该过程很成功。但是当我尝试做的时候
pod update
Run Code Online (Sandbox Code Playgroud)
在我的EmapleProject中,pod 的角色恢复到之前的状态。我缺少什么?
安装googleapis pod时出现错误"找不到googleapis的podspec."
我正在尝试安装pod'googleapis',:path =>'.' 但是,它得到以下错误分析依赖关系从googleapis获取podspec.[!]没有为googleapis找到podspec.
我的pod文件是
target 'appName' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for AppSpeak
pod 'MBProgressHUD'
pod 'Fabric'
pod 'Crashlytics'
pod 'googleapis', :path => '.'
end
Run Code Online (Sandbox Code Playgroud)
有人可以帮忙解决这个问题吗?
随装 yarn install react-native-unimodules
说明中的下一步要求我编辑项目Podfile。此处显示了必要的添加。
这是我生成的Podfile
platform :ios, '10.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
target 'MyProjectName' do
# Pods for MyProjectName
pod 'React', :path => '../node_modules/react-native/', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
'RCTAnimation',
'RCTImage',
]
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod …Run Code Online (Sandbox Code Playgroud)