“_UIApplicationDidEnterBackgroundNotification”,引用自:链接时出错
我在应用程序中使用 Three20 库,在链接应用程序期间看到此错误:
“_UIApplicationDidEnterBackgroundNotification”,引用自: libThree20UINavigator.a(TTBaseNavigator.o) 中的 _UIApplicationDidEnterBackgroundNotification$non_lazy_ptr (也许您的意思是:_UIApplicationDidEnterBackgroundNotification$non_lazy_ptr) ld: 未找到符号
我发现当我尝试为 BASE SDK IOS 3.2 模拟器构建但不是在 IOS 4.1 模拟器上构建时会发生此问题。我已尝试以下设置但无济于事:
Architecture for my project and ALL Three20 projects set to Optimized
Project Settings/Active Target - BaseSDK for my project and ALL Three20 projects set to IOS 3.2 Simulator
Architecture for my project and ALL Three20 projects set to Standard
Project Settings/Active Target - BaseSDK for my project and ALL Three20 projects set to IOS 3.2 Simulator
Architecture for my project and ALL Three20 projects set to Standard
Active Target - BaseSDK for my project and ALL Three20 projects set to IOS 3.2 Simulator
Project Settings - BaseSDK for my project set to IOS 4.1 Simulator
以下是有效的设置:
Architecture for my project and ALL Three20 projects set to Standard (or Optimized)
Active Target/Project Settings BaseSDK for ALL Three20 projects set to IOS 3.2 Simulator
Active Target/Project Settings BaseSDK for my project set to IOS 4.1 Simulator
我厌倦了尝试这些排列。真的很想了解正在发生的事情 - 但一直无法找到任何有意义的日志。感谢您的任何评论/回答。
I'm using the Three20 library in my app, I am seeing this error during linking of the app:
"_UIApplicationDidEnterBackgroundNotification", referenced from:
_UIApplicationDidEnterBackgroundNotification$non_lazy_ptr in libThree20UINavigator.a(TTBaseNavigator.o)
(maybe you meant: _UIApplicationDidEnterBackgroundNotification$non_lazy_ptr)
ld: symbol(s) not found
I have seen that this problem happens when I try to build for BASE SDK IOS 3.2 Simulator but not on IOS 4.1 Simulator. I have tried the following settings to no avail:
Architecture for my project and ALL Three20 projects set to Optimized
Project Settings/Active Target - BaseSDK for my project and ALL Three20 projects set to IOS 3.2 Simulator
Architecture for my project and ALL Three20 projects set to Standard
Project Settings/Active Target - BaseSDK for my project and ALL Three20 projects set to IOS 3.2 Simulator
Architecture for my project and ALL Three20 projects set to Standard
Active Target - BaseSDK for my project and ALL Three20 projects set to IOS 3.2 Simulator
Project Settings - BaseSDK for my project set to IOS 4.1 Simulator
The following are the settings that work:
Architecture for my project and ALL Three20 projects set to Standard (or Optimized)
Active Target/Project Settings BaseSDK for ALL Three20 projects set to IOS 3.2 Simulator
Active Target/Project Settings BaseSDK for my project set to IOS 4.1 Simulator
I am tired of trying these permutations. Really want to understand wth is going on - but haven't been able to find any meaningful logs. Thanks for any comments/answers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
弱泄漏的 UIKit 会不必要地显着减慢你的应用程序——不要这样做。
将您的
Base SDK
设置为尽可能高的值,然后将您的部署目标
设置为您想要支持的最低操作系统。编译器将自动弱链接仅较低版本 SDK 中不可用的 API。请记住,如果您希望在旧操作系统上运行,则在使用新类之前需要检查它们。
Weak-leaking UIKit unnecessarily slows down your app considerably-- don't do it.
Set your
Base SDK
to the highest possible and then set yourDeployment Target
to be the lowest OS you want to support. The compiler will automatically weak-link only the APIs not available in the lower SDK.Remember that if you need to check for new classes before using them if you wish to run on an older OS.
该符号在 4.0 SDK 中声明。您无法在 iOS 3.x 上使用该功能。您有 2 个选择:
1) 目标 iOS 4.0 或更高版本
2) 使用 Three20 的早期版本,该版本是为与您的目标 sdk 配合使用而构建的
that symbol is declared in the 4.0 SDK. you can't use that function on iOS 3.x. you have 2 choices:
1) target iOS 4.0 or greater
2) use an earlier release of three20, which was built to work with the sdk you target
解决此问题的最佳方法是针对 UIKit 建立弱链接。您可以在常规选项卡的项目/目标设置中执行此操作。在“链接库”部分中找到 UIKit 并将类型从“必需”设置为“弱”。
The best way to work around this problem is to weak link against UIKit. You can do this in your project/target settings in the general tab. In the Linked Libraries section find UIKit and set the type from Required to Weak.