Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cocoapods version #1

Open
souzainf3 opened this issue Apr 17, 2016 · 18 comments
Open

Cocoapods version #1

souzainf3 opened this issue Apr 17, 2016 · 18 comments

Comments

@souzainf3
Copy link

souzainf3 commented Apr 17, 2016

Its generate a version for CocoaPods?

@BradLarson
Copy link
Owner

Not sure what you're asking, but I haven't done anything to support Cocoapods with this. I probably won't tag it with a version until everything is stable and at feature parity with the old GPUImage.

@mitchellporter
Copy link

@BradLarson Pretty sure he's just requesting that you create a cocoapod for this.

@souzainf3
Copy link
Author

Sorry for not having asked in English, I swear I had done it, just realized my mistake now.
That's right @mitchellporter.
But also understand the position of the @BradLarson.
Thank you, grateful for positioning.

@m1entus
Copy link

m1entus commented Jun 25, 2016

You can use local podspec this way:

  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' }
    s.source   = { :git => 'https://github.com/BradLarson/GPUImage2.git', :branch => "master" }

    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

And in Podfile

 pod 'GPUImage2', :podspec => './GPUImage2.podspec'

@waltermvp
Copy link

@m1entus where do you add this podspec?

@m1entus
Copy link

m1entus commented Oct 10, 2016

In local directory with project

@brizzly
Copy link

brizzly commented Nov 24, 2016

Thanks for the tips!

@evermeer
Copy link

evermeer commented Jan 4, 2017

I published the GPUImage2 podspec from above as EVGPUImage2 (so that GPUImage2 remains available)

You can just add
pod "EVGPUImage2"
in your pod file

I'm currently using this in https://github.com/evermeer/PassportScanner

@schetty
Copy link

schetty commented Apr 19, 2017

@evermeer when I use your cocoapod I get an apple-match-o-link error saying it cannot find the EVGPUImage2 framework.

@SuperTango
Copy link

@evermeer Are there any other steps other than adding EVGPUImage2 to the podfile and then doing import GPUImage in the code? I'm doing that, but getting "no such module 'GPUImage'" when trying to compile.

@evermeer
Copy link

evermeer commented Aug 21, 2017 via email

@SuperTango
Copy link

@evermeer I looked but can 't find anything ATM. I just tried with a brand new repo with nothing in it, and it also failed.

https://github.com/SuperTango/EVGPUTest

Any other hints?

@evermeer
Copy link

Sorry for the late response... I was on a holiday.
Thanks for the demo project. That helped.

You should use
import EVGPUImage2
instead of
import GPUImage

@SuperTango
Copy link

Great. Thanks!

@arielelkin
Copy link

arielelkin commented Feb 21, 2018

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 😀

@alkanyunus
Copy link

alkanyunus commented Feb 23, 2018

Save this as GPUImage2.podspec in the directory where your Podfile is.
Add the following line to your Podfile: pod 'GPUImage2', :podspec => './GPUImage2.podspec'
run pod install (you may have to close and re-open your Xcode workspace.)
you can now import GPUImage 😀

Thank you for your local podspec, but It specifies as 'GPUImage2' in PodFile, so that

'import GPUImage' cannot be resolved it should be 'import GPUImage2'

@arielelkin
Copy link

thanks @saxahan, I modified my code above accordingly.

rhx pushed a commit to rhx/GPUImage that referenced this issue Oct 13, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
corrected Copy Files phase in README
@jifang
Copy link

jifang commented Mar 16, 2021

For anyone who wants to run on macOS, here is the podspec file

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

Pod::Spec.new do |s|
  s.name     = 'EVGPUImage2'
  s.version  = '0.2.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' }
  s.swift_version = '4.0'

  s.source   = { :git => 'https://github.com/BradLarson/GPUImage2.git', :branch => "master" }
  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.osx.deployment_target = '10.9'
  
  s.ios.exclude_files = 'framework/Source/Mac', 'framework/Source/Linux', 'framework/Source/Operations/Shaders/ConvertedShaders_GL.swift'
  s.osx.exclude_files = 'framework/Source/iOS', 'framework/Source/Linux'
  s.ios.frameworks   = ['OpenGLES', 'CoreMedia', 'QuartzCore', 'AVFoundation']
  s.osx.frameworks   = ['OpenGL', 'CoreMedia', 'QuartzCore', 'AVFoundation']
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests