ios - 具有 SnapKit 依赖项的情节提要中的 CocoaPods“找不到图像”错误
问题描述
我的 CocoaPods 框架有问题。我尝试在我的项目中使用 SnapKit 附加依赖项,但在 Storyboard 中出现此错误:
.../SimpleAnimatedTabBar/Example/SimpleAnimatedTabBar/Base.lproj/Main.storyboard: error: IB Designables: Failed to render and update auto layout status for ViewController (vXZ-lx-hvc): Failed to load designables from path (null)
这个项目是简单的动画自定义标签栏,带有@IBDesginable 和 SnapKit 自动布局。
这是我的 Podfile:
use_frameworks!
platform :ios, '13.0'
target 'SimpleAnimatedTabBar_Example' do
pod 'SimpleAnimatedTabBar', :path => '../'
pod 'SnapKit', '~> 5.0.0'
target 'SimpleAnimatedTabBar_Tests' do
inherit! :search_paths
end
end
这是我的 .podspec:
Pod::Spec.new do |s|
s.name = 'SimpleAnimatedTabBar'
s.version = '0.1.2'
s.summary = 'My short description of SimpleAnimatedTabBar.'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = 'My long long long description of SimpleAnimatedTabBar.'
s.homepage = 'https://github.com/michalnowak061/SimpleAnimatedTabBar'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'michalnowak061' => 'michal.nowak061@gmail.com' }
s.source = { :git => 'https://github.com/michalnowak061/SimpleAnimatedTabBar.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.swift_version = '5.0'
s.ios.deployment_target = '13.0'
s.source_files = 'SimpleAnimatedTabBar/Classes/**/*'
# s.resource_bundles = {
# 'SimpleAnimatedTabBar' => ['SimpleAnimatedTabBar/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
s.frameworks = 'UIKit'
s.dependency 'SnapKit', '~> 5.0.0'
end
解决方案
推荐阅读
- java - 将文件从 android 设备传输到 android studio
- apiconnect-test-monitor - 在 CI (Jenkins) 中运行 API 测试
- python-3.x - 从 xyz 坐标集创建距离矩阵(python)
- python - 如何获取音频文件中特定时间戳的特定频率?
- sql - Extract time points meeting some time interval criteria
- .htaccess - 带有 HTTPS 的 HTACCESS 和带有端口的子域
- html - 当鼠标悬停在按钮上时在 CSS 上翻转动画
- utf-8 - UTF-8 value of a character in ColdFusion?
- oracle - 验证通过 Oracle 发送的电子邮件
- python-3.x - xgboost 预测期间的异常:无法从 DMatrix 初始化 DMatrix