Adding this as a framework (module) to your Mac or iOS project
(将此作为框架(模块)添加到Mac或iOS项目中)
Xcode 6 and iOS 8 support the use of full frameworks, as does the Mac, which simplifies the process of adding this to your application. To add this to your application, I recommend dragging the .xcodeproj project file into your application's project (as you would in the static library target).
Xcode 6和iOS 8支持全框架的使用,如MAC,从而简化了添加到您的应用程序的过程。要添加到您的应用程序,我建议拖。xcodeproj项目文件到你的应用程序的项目(你会在in the static library target)。
For your application, go to its target build settings and choose the Build Phases tab. Under the Target Dependencies grouping, add GPUImageFramework on iOS (not GPUImage, which builds the static library) or GPUImage on the Mac. Under the Link Binary With Libraries section, add GPUImage.framework.
对于你的app,去它的target build settings 并且选择 Build Phases标签。 在目标相关性分组下,添加GPUImageFramework 在iOS(不是GPUImage,建立静态库) 或者 Mac。在 Link Binary With Libraries 部分,添加GPUImage.framework
This should cause GPUImage to build as a framework. Under Xcode 6, this will also build as a module, which will allow you to use this in Swift projects. When set up as above, you should just need to use
你应该使用GPUImage 建立一个框架。在Xcode 6.0,这会建立一个模块,如上所述它会允许你使用在 Swift 项目。
import GPUImage
导入GPUImage文件
You then need to add a new Copy Files build phase, set the Destination to Frameworks, and add the GPUImage.framework build product to that. This will allow the framework to be bundled with your application (otherwise, you'll see cryptic "dyld: Library not loaded: @rpath/GPUImage.framework/GPUImage" errors on execution).
你需要添加一个新的拷贝文件在build phase。设置目标框架,并添加
GPUImage.framework在已建立的项目中。它将允许框架内被捆绑你的应用程序。(否则,你将看到"dyld: Library not loaded: @rpath/GPUImage.framework/GPUImage" 错误警告)
小伙伴们阅读后,请喜欢一下。文章更新可以提醒到你哦~~~~