1.第三方库的使用swift
用到的文件中须要:import Alamofire.net
不考虑blog
用到的文件中须要:import AFNetworkingget
用到的文件中须要:#import "AFNetworking.h"it
可是在swift使用OC第三方时用Pod引入时曾碰见过一个问题,报错找不到该文件。io
通常网上的步骤都是:编译
1,建立桥接文件,import
2,配置文件路径配置
可是编译时报错:file
出现问题的缘由是podfile文件中少了一句:use_frameworks!
完整的代码为:
target 'DaiChaoHeZi' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for DaichaoSwift
pod 'SAMKeychain', '~> 1.5.3'
pod 'BMKLocationKit'
pod 'MJRefresh'
end
参考连接:https://blog.csdn.net/kangpengpeng1/article/details/79164155