AFURLConnectionOperation.m隐式转换失去整数精度:'int64_t'(又名'long long')到'NSInteger'(又名'int')

我在Xcode 5.1得到了一个警告,如下所述

 AFNetworking 2.2.0: AFURLConnectionOperation.m Implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'NSInteger' (aka 'int') 

这很重要吗?

这意味着arm64架构的int64_t范围是-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807但是int范围是-2,147,483,648 to 2,147,483,647 。 所以编译器说要损失价值。

看到这个: ConvertingYourAppto-64Bit

如果你不想要更多的警告。 您可以在Xcode 5.1中更改为体系结构 在这里输入图像说明!] [在这里输入图片说明在这里输入图像说明

您可以手动进行以下更改,直到下一个CocoaPod发行版(更改已经在GitHub中 )。

更改:

 [decoder decodeInt64ForKey:NSStringFromSelector(@selector(totalBytesRead))]; 

至:

 [decoder decodeIntegerForKey:NSStringFromSelector(@selector(totalBytesRead))]; 

AFNetworking v2.2.1修复了这个问题。

https://github.com/AFNetworking/AFNetworking/blob/master/CHANGES

你可能select模拟器:iPhone Retina(4英寸64位 )。 试试32位