(Xcode) 制作 Framework,推送至Cocoapod

2023-06-12  本文已影响0人  布呐呐u
注意事项

校验podspec 文件

.podspec 文件,常用键值对及相关规则
Pod::Spec.new do |spec|

  spec.name         = "ScanHelper"
  spec.version      = "0.0.6"
  spec.license      = "MIT"

  spec.summary      = "A lightweight scanning component based on system API in Swift5"
  spec.description  = <<-DESC
             No memory leaks, Support scaling, Support light sense to automatically turn on the flash, Support auto zoom, Support custom UI.
                      DESC

  spec.author       = { "Charlie" => "a51095@hotmail.com" }
  spec.homepage     = "https://github.com/a51095/ScanHelper"
  spec.source       = { :git => "https://github.com/a51095/ScanHelper.git", :tag => spec.version }

  spec.requires_arc = true

  spec.swift_version = "5.0"
  spec.platform      = :ios, "11.0"
  spec.ios.deployment_target = "11.0"

  spec.static_framework = true
  spec.ios.vendored_frameworks  = 'lib/ScanHelperSDK.framework'
  spec.source_files  = "lib/ScanHelperSDK.framework/**/*"
  spec.public_header_files = 'lib/ScanHelperSDK.framework/Headers/ScanHelperSDK-Swift.h'


  # ======================================================
  # spec.ios.exclude_files = 'lib/xxxx.dec' (忽略的文件)
  # spec.source_files  = 'lib/ScanHelperSDK.framework/**/*'(资源文件)
  # spec.public_header_files = 'lib/ScanHelperSDK.framework/Headers/ScanHelperSDK-Swift.h'(Objective-C暴露头文件)
  # ======================================================

  #💡💡💡😈💡💡💡
  # * 匹配所有类型文件
  # *.{h,m} 匹配所有以 .h 和 .m 结尾的文件
  # ** 匹配所有子目录
  #💡💡💡😈💡💡💡

end

常用指令
cd xxxx.framework
file xxxx
xcodebuild -create-xcframework -framework a.framework -framework b.framework -output xxxx.xcframework
上一篇 下一篇

猜你喜欢

热点阅读