Adding this as a framework (module) to your Mac or iOS project
(將此作為框架(模塊)添加到Mac或iOS項(xiàng)目中)
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,從而簡(jiǎn)化了添加到您的應(yīng)用程序的過(guò)程。要添加到您的應(yīng)用程序,我建議拖。xcodeproj項(xiàng)目文件到你的應(yīng)用程序的項(xiàng)目(你會(huì)在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.
對(duì)于你的app,去它的target build settings 并且選擇 Build Phases標(biāo)簽。 在目標(biāo)相關(guān)性分組下,添加GPUImageFramework 在iOS(不是GPUImage,建立靜態(tài)庫(kù)) 或者 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
你應(yīng)該使用GPUImage 建立一個(gè)框架。在Xcode 6.0,這會(huì)建立一個(gè)模塊,如上所述它會(huì)允許你使用在 Swift 項(xiàng)目。
import GPUImage
導(dǎo)入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).
你需要添加一個(gè)新的拷貝文件在build phase。設(shè)置目標(biāo)框架,并添加
GPUImage.framework在已建立的項(xiàng)目中。它將允許框架內(nèi)被捆綁你的應(yīng)用程序。(否則,你將看到"dyld: Library not loaded: @rpath/GPUImage.framework/GPUImage" 錯(cuò)誤警告)
小伙伴們閱讀后,請(qǐng)喜歡一下。文章更新可以提醒到你哦~~~~