制作过程参考:https://juejin.cn/post/7062273001319841822
问题:讯飞语音SDK ,通过gitlab建库时执行 pod lib lint --allow-warnings 报错
-> yingzi_app_xunfeisdk (0.1.0)
- WARN | summary: The summary is not meaningful.
- WARN | description: The description is shorter than the summary.
- ERROR | unknown: Encountered an unknown error (Failed to open TCP connection to gitlab.yingzi.com:443(Permission denied - connect(2) for"gitlab.yingzi.com"
port 443)) during validation.
通过在gitee创建私有库解决了!
问题:讯飞语音SDK ,在xcode上能正常运行,执行pod lib lint 时报错
error: include of non-modular header inside framework module 'yingzi_app_xunfeisdk.YZSpeechManager': '/Users/yujingzhou/Project/Gitlab/yingzi_app_xunfeisdk/yingzi_app_xunfeisdk/Framework/iflyMSC.framework/Headers/iflyMSC.h'
[-Werror,-Wnon-modular-include-in-framework-module]
命令加上 --use-libraries 后错误消失
问题:执行pod lib lint 时不支持模拟器
building for
'iOS-simulator', but linking in object file (/Users/yujingzhou/Project/Gitlab/yingzi_app_xunfeisdk/yingzi_app_xunfeisdk/Framework/iflyMSC.framework/iflyMSC[arm64][3](IFlyTTSService.o)) built for 'iOS'
设置
s.user_target_xcconfig = {
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
}
问题:修改工程后,要先提交再打tag
问题:执行 pod repo push yzpodspec yingzi_app_xunfeisdk.podspec 报错
error: include of non-modular header inside framework module
...
#import
<iflyMSC/iflyMSC.h>
^
执行 pod repo push yzpodspec yingzi_app_xunfeisdk.podspec --use-libraries
问题:没有Error,直接报
[!] The yingzi_app_xunfeisdk.podspec
specification does not validate.
有可能是警告太多,加上 --allow-warnings 参数:
pod repo push yzpodspec yingzi_app_xunfeisdk.podspec --use-libraries --allow-warnings
问题:嵌入主工程有时报错 Include of non-modular header inside framework module
参考:https://stackoverflow.com/questions/27776497/include-of-non-modular-header-inside-framework-module
主工程Build Setting已经设置 Allow Non-modular Includes in Framework Modules的情况下,确保插件也做了同样的设置;
1、可以在主工程设置:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
end
end
end
2、也可以在插件设置(推荐):
s.pod_target_xcconfig = {
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'
=> 'YES'
}
补充:在yingzi_flutter_hairender 插件以上都不设置也是可运行的,在主工程只有方1是可行的,
问题:升级私有库版本后本地无法找到对应的版本
首先 Podfile需要设置pod源:
source 'https://cdn.cocoapods.org/'
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
source 'https://gitee.com/lovenjoe/yzpodspec.git'
然后在ios工程目录下运行命令:pod update 或 pod install --repo-update