GPUImage2 swift版本使用pod安装

本文档介绍了如何在Swift4项目中使用GPUImage2库,通过创建本地podspec文件并修改Podfile来完成安装。详细步骤包括保存更新后的podspec文件,将指定内容添加到Podfile,然后运行pod install命令更新Xcode工作空间。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

来源: https://github.com/BradLarson/GPUImage2/issues/1
支持swift4


For Swift 4, here’s an update to @m1entus’s local podspec:

# based on https://github.com/BradLarson/GPUImage2/issues/1#issuecomment-228542480

Pod::Spec.new do |s|
  s.name     = 'GPUImage2'
  s.version  = '0.1.0'
  s.license  = 'BSD'
  s.summary  = 'An open source iOS framework for GPU-based image and video processing.'
  s.homepage = 'https://github.com/BradLarson/GPUImage2'
  s.author   = { 'Brad Larson' => 'contact@sunsetlakesoftware.com' }

  # This commit on that fork of GPUImage should contain just upgrades needed for Swift 4 compatibility. See https://github.com/BradLarson/GPUImage2/pull/212
  # Replace with https://github.com/BradLarson/GPUImage2.git when merged
  # into BradLarson's repository.
  s.source   = { :git => 'https://github.com/andrewcampoli/GPUImage2', :commit => '148c84e6b4194daeba122e77449f5ee9c8188161' }

  s.source_files = 'framework/Source/**/*.{swift}'
  s.resources = 'framework/Source/Operations/Shaders/*.{fsh}'
  s.requires_arc = true
  s.xcconfig = { 'CLANG_MODULES_AUTOLINK' => 'YES', 'OTHER_SWIFT_FLAGS' => "$(inherited) -DGLES"}

  s.ios.deployment_target = '8.0'
  s.ios.exclude_files = 'framework/Source/Mac', 'framework/Source/Linux', 'framework/Source/Operations/Shaders/ConvertedShaders_GL.swift'
  s.frameworks   = ['OpenGLES', 'CoreMedia', 'QuartzCore', 'AVFoundation']

end

Usage

  1. Save this as GPUImage2.podspec in the directory where your Podfile is.
  2. Add the following line to your Podfile: pod 'GPUImage2', :podspec => './GPUImage2.podspec'
  3. run pod install (you may have to close and re-open your Xcode workspace.)
  4. you can now import GPUImage2
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值