我的应用程序是在模拟器上运行,但不是设备
问题描述:
我有这个错误的问题上:我的应用程序是在模拟器上运行,但不是设备
Undefined symbols for architecture i386:
当我建停停,它成功地在模拟器上的设备上运行,但没有,我试着一个简单的新项目,我尝试在设备上运行它,它是确定的,但这个项目并没有因为这个错误的运行,完整的堆栈错误是这样的:
Ld "/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator/RM Unit Tests.app/RM Unit Tests" normal i386
cd /Users/imac/Desktop/route-me-route-me-b07b654/MapView
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator -F/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator -filelist "/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Intermediates/MapView.build/Debug-iphonesimulator/Unit Tests.build/Objects-normal/i386/RM Unit Tests.LinkFileList" -mmacosx-version-min=10.6 -framework Foundation -framework UIKit -Xlinker -objc_abi_version -Xlinker 2 /Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator/libProj4.a -framework CoreFoundation -framework CoreGraphics -framework CoreLocation -framework Foundation -lsqlite3 -framework QuartzCore -framework UIKit -o "/Users/imac/Library/Developer/Xcode/DerivedData/TopStation-cjwcuxabgkltqvdslykmwkeqvsee/Build/Products/Debug-iphonesimulator/RM Unit Tests.app/RM Unit Tests"
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_RMDBTileImage", referenced from:
objc-class-ref in RMTileImage.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
我改变构建模式,所以我选择了设备(在我的情况下,我使用的iPod 4.3.5),现在我有其他错误:
'FavoriteCities.app' was built for 'i386', but the device 'iPod (Imac)' requires 'armv7' or compatible architecture.
FavoriteCities是我的应用程序名称,请帮我弄清楚可能是什么原因造成的。
答
您需要更改设备构建的构建体系结构。它应该是默认的iOS应用程序armv6/7,但我想你或你搞砸了这些设置。
(在Xcode中4)选择你的项目,选择Build Settings选项卡,并确保它看起来是这样的:
i386架构是模拟器。看起来你还在为模拟而不是设备构建。 – progrmr
嗨,我选择了设备,第一个错误已解决,但现在我有一个新的错误,请看看我的编辑,thanx提前:) – Malloc