我有用插件开发的项目。因此,为了添加任何新功能,我们创建了新的插件,在开发和测试之后将其添加到主项目中。每个插件都有自己的podfile和podspec。因此,我想在我的一个名为i GraphIntegrationPlugin.的插件中添加量子图荚。
下面是我的GraphIntegrationPlugin播客
Pod::Spec.new do |s|
s.name = "GraphIntegrationPlugin"
s.version = '0.1.1'
s.summary = "GraphIntegrationPlugin plugin.
DESC
s.homepage = "https://abc:8fqTzT2v7UXAwu6RE6CV@bitbucket.org/GraphIntegrationPlugin-ios.git"
s.license = 'MIT'
s.author = { "Aabc dd” => “abc@gmail.com" }
s.source = { :git => "https://abc:8fqTzT2v7UXAwu6RE6CV@bitbucket.org/GraphIntegrationPlugin-ios.git", :tag => s.version.to_s }
s.ios.deployment_target = "10.0"
s.platform = :ios, '10.0'
s.requires_arc = true
s.swift_version = '5.1'
s.frameworks = 'UserNotifications', 'UIKit', 'Foundation', 'UserNotificationsUI'
s.source_files = 'PluginClasses/**/*.{swift,h,m}'
s.resources = 'Resources/**/*.{storyboard,xib,xcassets,png,plist}'
s.public_header_files = 'Pods/**/**/*.h'
# Public frameworks
s.dependency 'quantumgraph'
s.xcconfig = {
'OTHER_LDFLAGS' => '-objc -ObjC',
'OTHER_CFLAGS' => '-fembed-bitcode',
'ENABLE_BITCODE' => 'YES',
'SWIFT_VERSION' => '5.1',
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_ROOT}"/**',
'LIBRARY_SEARCH_PATHS' => '$(inherited) "${PODS_ROOT}"/**',
'HEADER_SEARCH_PATHS' => '$(inherited) "${PODS_ROOT}"/Headers/Public'
}
end编译完主项目(包括此GraphIntegrationPlugin )后,生成以下项目目录结构:
MainProject:
- support files
- Resources
- Classes, etc.
Pod:
- Pods
--quantumgraph
- iOS-sdk
- QGSdk.h
- QGInbox.h
- Frameworks
- libQGSdk.a
- Support Files
- quantumgraph.xcconfig
--GraphIntegrationPlugin
-xyz.swift
-support files
- GraphIntegrationPlugin.modulempa
- GraphIntegrationPlugin.xcconfig
- GraphIntegrationPlugin.dummy.m
- GraphIntegrationPlugin-Info.plist
- GraphIntegrationPlugin.prefix.pch
- GraphIntegrationPlugin.umbrella.h在成功生成项目之后,当我尝试将导入QGSdk添加到xyz.swift时,它会抛出错误模块,找不到。为了解决这个问题,我执行了手动更改,以构建GraphIntegrationPlugin的设置。
在此之后,错误消失,我能够访问QGSdk的所有方法和变量到我的xyz.swift。
但不幸的是,我不能将构建设置的手动更改推到Git,或者我们的体系结构不支持这一点。因此,我想通过podspec进行上述三种手动构建设置更改。我尝试了每一种可能的解决方案来编写podspec,使其能够按照我所期望的方式配置GraphIntegrationPlugin的构建设置,但无法做到这一点。
我需要对podspec做什么更改,以便使QGSdk.h头在我的Swift类GraphIntegrationPlugin?中可用我和我的比荷马有这个链接,但是它没有满足我创建podspec的要求。
发布于 2020-03-14 08:52:55
在Podspecs中尝试过将静态框架设置为true吗?
s.static_framework = true我在相同的情况下使用此设置:
s.public_header_files = [
"MVVMRools/MVVMRools.h",
"MVVMRools/MVVMRools-Briging-Header.h",
"MVVMRools/Another.h"]https://stackoverflow.com/questions/60680613
复制相似问题