问题
I got a warning in Xcode 5.1
as stated below
AFNetworking 2.2.0: AFURLConnectionOperation.m Implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'NSInteger' (aka 'int')
Is this important?
回答1:
This mean is arm64 architecture int64_t
range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
but int
range is -2,147,483,648 to 2,147,483,647
. so compiler say to Loss of value.
See a this: ConvertingYourAppto-64Bit
if you don't want more warning. you can must change to architecture in Xcode 5.1


回答2:
You can make the following change manually until the next CocoaPod release (the change is already in GitHub).
change:
[decoder decodeInt64ForKey:NSStringFromSelector(@selector(totalBytesRead))];
to:
[decoder decodeIntegerForKey:NSStringFromSelector(@selector(totalBytesRead))];
回答3:
AFNetworking v2.2.1 fixes this issue.
https://github.com/AFNetworking/AFNetworking/blob/master/CHANGES
回答4:
you probably select as simulator : iPhone Retina (4-inch 64-bit). Try with the 32 bits
来源:https://stackoverflow.com/questions/22350056/afurlconnectionoperation-m-implicit-conversion-loses-integer-precision-int64-t