1.编译警告 object file (/Users/liangchris/Library/Developer/Xcode/DerivedData/ShowTracker-frpchxkxofnchfgnttvtdgvltekp/Build/Products/Debug-iphonesimulator/libAFNetworking.a(AFHTTPRequestOperationManager.o)) was built for newer iOS version (8.0) than being linked (7.0)
通过看提示得知是版本的问题:
通过修改版本可以解决,解决方法为:
选择8.0或更高的版本号,这样就解决了版本号过低的提示。
2. 编译警告:
/Users/liangchris/zw/ios_app/ShowTracker/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h:39:60: Auto property synthesis will not synthesize property 'response'; it will be implemented by its superclass, use @dynamic to acknowledge intention
在网上搜了一下,虽然说这个警告不影响使用,但是很碍眼,解决的这个问题的方法是升级AFNetworking的版本号,可见是源码本身存在的警告,最新版的已经解决了此问题。为了验证,我看了一下我的Podfile文件,果然里面的版本号是按照网上的教程写的2.2.1,修改使用最新版后解决了这个问题。
以下是Podfile的内容:
1 source 'https://github.com/CocoaPods/Specs.git'
2 # Uncomment this line to define a global platform for your project
3 platform :ios, '8.0'
4 # Uncomment this line if you're using Swift
5 # use_frameworks!
6
7 target 'ShowTracker' do
8 pod 'AFNetworking', '~> 2.5'
9 #pod 'AFNetworking', '2.2.1'
10 end
line10 那里是原来的版本号,line9是使用最新的版本号,至少高于2.5.
然后执行 pod install
liangchris@BluezdeMacBook-Pro:~/zw/ios_app/ShowTracker$ pod install
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking 2.6.1 (was 2.2.1)
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
liangchris@BluezdeMacBook-Pro:~/zw/ios_app/ShowTracker$
再重新编译一下就没有任何警告了。