简体   繁体   English

XCode 4 / iOS 4.3 ASI 上的构建错误 HTTP 库

[英]XCode 4 / iOS 4.3 Build Errors on ASI HTTP Library

My development machine died and I've had to rebuild it from scratch.我的开发机器死了,我不得不从头开始重建它。 I reinstalled the latest XCode which came with iOS SDK 4.3.我重新安装了 iOS SDK 4.3 随附的最新 XCode。 I reopened my project and have had to readd all my frameworks to get the code to mostly compile.我重新打开了我的项目,并且必须阅读我所有的框架才能使代码大部分编译。 I'm down to two errors, both basically this:我有两个错误,基本上都是这样:

error: expected specifier-qualifier-list before 'UIBackgroundTaskIdentifier'错误:“UIBackgroundTaskIdentifier”之前的预期说明符限定符列表

This is on the file: ASIHTTPRequest.h on these lines:这是在文件上:ASIHTTPRequest.h 在这些行上:

#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
BOOL shouldContinueWhenAppEntersBackground;
UIBackgroundTaskIdentifier backgroundTask;
#endif

which is part of the ASI HTTP library.它是 ASI HTTP 库的一部分。

I'm targeting iOS 3.2.2 and building on the latest iOS 4.3.我的目标是 iOS 3.2.2 并在最新的 iOS 4.3 上构建。 This did not happen in my old environment which was XCode 4 using iOS 4.2.这在我使用 iOS 4.2 的 XCode 4 的旧环境中没有发生。 I have tried using a bunch of different build settings but none have fixed the issue.我尝试过使用一堆不同的构建设置,但没有一个能解决这个问题。 Commenting out the lines causes a number of other issues, and that is not a good solution anyways.注释掉这些行会导致许多其他问题,无论如何这都不是一个好的解决方案。 Any ideas?有任何想法吗?

Thanks in advance!提前致谢!

OK, my "fix" for this problem was to create a new project in the new XCode version and copy my classes and resources over.好的,我对这个问题的“修复”是在新的 XCode 版本中创建一个新项目,然后复制我的类和资源。 It took about a half an hour to do so as I had about 100 files to move, but it worked on the first attempt.由于我要移动大约 100 个文件,因此花了大约半个小时,但它在第一次尝试时就成功了。

I can only guess that there was some subtle difference between XCode versions I wasn't aware of.我只能猜测 XCode 版本之间存在一些我不知道的细微差别。 XCode certainly didn't provide any kind of meaningful error message to guide me to it in any event. XCode 在任何情况下都没有提供任何有意义的错误信息来引导我。

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

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