<1>下载DTCoreText源码
Git clone --recursive https://github.com/Cocoanetics/DTCoreText.git Externals/DTCoreText
<2>编译生成Framework
- 设置release模式
Manage Schemes
选择DTCoreText->Edit
设置build configuration为release
- 真机和模拟器进行编译
- 取得编译后的文件
点击File->Project Setting
点击DerivedData后的箭头,找到项目中的目录
- 将模拟器和真机的framework文件进行合并
将Release-iphoneos目录和Release-iphonesimulator目录copy出来合并DTCoreText.framework
执行命令lipo -create ~/xxxx/Products/Release-iphoneos/DTCoreText.framework/DTCoreText ~/xxxx/Products/Release-iphonesimulator/DTCoreText.framework/DTCoreText -output ~/xxxx/DTCoreText/DTCoreText
合并DTFoundation.framework
执行命令lipo -create ~/xxxx/Products/Release-iphoneos/DTFoundation.framework/DTFoundation ~/xxxx/Products/Release-iphonesimulator/DTFoundation.framework/DTFoundation -output ~/xxxx/DTCoreText/DTFoundation
将生成的DTCoreText和DTFoundation文件替换Release-iphoneos下 DTCoreText.framework下的DTCoreText文件,和DTFoundation.framework下的DTFoundation文件
- 在项目中使用
将生成的DTCoreText.framework和DTFoundation.framework拖入工程添加copy files