繁体   English   中英

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

[英]AFURLConnectionOperation.m Implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'NSInteger' (aka 'int')

我在Xcode 5.1收到警告,如下所述

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

这很重要吗?

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

更改:

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

至:

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

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

请参阅: ConvertingYourAppto-64Bit

如果你不想要更多的警告。 您必须在Xcode 5.1中更改为体系结构 在此处输入图像描述]![在此处输入图像描述在此输入图像描述

AFNetworking v2.2.1解决了这个问题。

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM