我試圖在我的應用程序中支持較舊的iOS版本。我最初認爲我只需要將這些框架設置爲舊操作系統中不存在的「弱連接」,例如, iAd框架。然後確保我不會在代碼中調用不支持的API。然而,當我嘗試運行應用程序(這是編譯與最新的架構),在舊模擬器,它的啓動與消息類似弱連接以支持以前的iOS版本
18/07/2010 11:07:29 UIKitApplication:xxxxx[0xe006][5729] dyld: Symbol not found: _OBJC_CLASS_$_NSAssertionHandler
18/07/2010 11:07:29 UIKitApplication:xxxxx[0xe006][5729] Referenced from: xxxxx/Applications/23CE4978-D25F-4DB4-A486-0730EBBB501B/xxxxx.app/xxxxx
18/07/2010 11:07:29 UIKitApplication:xxxxx[0xe006][5729] Expected in: /Xcode3.1.4/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/System/Library/Frameworks/Foundation.framework/Foundation
18/07/2010 11:07:29 UIKitApplication:xxxxx[0xe006][5729] in xxxxx/Applications/23CE4978-D25F-4DB4-A486-0730EBBB501B/xxxxx.app/xxxxx
設置所有框架,以弱聯後過程中崩潰,我還得到一個錯誤信息:
18/07/2010 11:33:32 UIKitApplication:xxxxx[0xc4a7][8204] dyld: Symbol not found: __objc_empty_vtable
18/07/2010 11:33:32 UIKitApplication:xxxxx[0xc4a7][8204] Referenced from: xxxxx/Applications/23CE4978-D25F-4DB4-A486-0730EBBB501B/xxxxx.app/xxxxx
18/07/2010 11:33:32 UIKitApplication:xxxxx[0xc4a7][8204] Expected in: /usr/lib/libobjc.A.dylib
我在做什麼錯?
Pssst ...在一個單獨的目錄中安裝舊的SDK,以便您可以使用舊的模擬器:) – iwasrobbed 2010-07-30 16:39:02