如何快速用上Swift静态库详解

2020-01-09 00:06:35于丽


pod 'SQLite.swift', :git => 'https://www.easck.com//raw.githubusercontent.com/DianQK/UseStaticFramework/master/SQLiteObjc.podspec'

pod 'Apollo', :git => 'https://www.easck.com/SQLite', :git => 'https://www.easck.com/{SQLite,SQLiteObjc}/**/*.{swift}',
  :exclude_files => 'Sources/**/Cipher.swift',
  :library => 'sqlite3'
 }]
end

post_install do |installer|
 %w(Pods/Apollo/Sources/ApolloSQLite/*.swift).flat_map { |x| Dir.glob(x) }.each do |file|
 code = File.read(file)
 unless code.include? "import UIKit"
  FileUtils.chmod("+w", file)
  File.write(file, "import UIKitn" + code)
 end
 end
end

给这些没添加 import UIKit 代码补上就行了。

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流,谢谢大家对ASPKU的支持。


注:相关教程知识阅读请移步到swift教程频道。