简体   繁体   中英

App Building on Simulator not on Device: XCode

I am developing a SUP based iOS application. I went a way through running the application on simulator, and never tested it on device. There is a folder Library, this is a static library that supports debugging and running application on simulator as well as on device. I have mentioned its absolute path in "Library Search Path" as:

$(SRCROOT)/Libraries/${BUILD_STYLE}-${PLATFORM_NAME} with recursive.

When I build my application with simulator, it works fine. But when I run it with device it throws some warning and 68 similar errors given below.

ld: warning: ignoring file Libraries/Debug-iphoneos/libAfariaSLL.a, file was built for archive which is not the architecture being linked (armv7s): Libraries/Debug-iphoneos/libAfariaSLL.a ld: warning: ignoring file Libraries/Debug-iphoneos/libclientrt.a, file was built for archive which is not the architecture being linked (armv7s): Libraries/Debug-iphoneos/libclientrt.a ld: warning: ignoring file Libraries/Debug-iphoneos/libDatavault.a, file was built for archive which is not the architecture being linked (armv7s): Libraries/Debug-iphoneos/libDatavault.a ld: warning: ignoring file Libraries/Debug-iphoneos/libMo.a, file was built for archive which is not the architecture being linked (armv7s): Libraries/Debug-iphoneos/libMo.a ld: warning: ignoring file Libraries/Debug-iphoneos/libsupcore.a, file was built for archive which is not the architecture being linked (armv7s): Libraries/Debug-iphoneos/libsupcore.a ld: warning: ignoring file Libraries/Debug-iphoneos/libSUPObj.a, file was built for archive which is not the architecture being linked (armv7s): Libraries/Debug-iphoneos/libSUPObj.a ld: warning: ignoring file Libraries/Debug-iphoneos/libsupUltralite.a, file was built for archive which is not the architecture being linked (armv7s): Libraries/Debug-iphoneos/libsupUltralite.a ld: warning: ignoring file Libraries/Debug-iphoneos/libMO.a, file was built for archive which is not the architecture being linked (armv7s): Libraries/Debug-iphoneos/libMO.a Undefined symbols for architecture armv7s: "_OBJC_CLASS_$_SUPDataType", referenced from: objc-class-ref in WorkPlannerActivityMetaData.o objc-class-ref in WorkPlannerChangeLogImplMetaData.o objc-class-ref in WorkPlannerChangeLogKeyMetaData.o objc-class-ref in WorkPlannerEmployeeCraftMetaData.o objc-class-ref in WorkPlannerEmployeeMetaData.o objc-class-ref in WorkPlannerEmployeeUserMetaData.o objc-class-ref in WorkPlannerEquipmentMetaData.o ... "_OBJC_CLASS_$_SUPDatabaseMetaDataRBS", referenced from: _OBJC_CLASS_$_WorkPlanner WorkPlannerDBMetaData in WorkPlannerWorkPlannerDBMetaData.o
"_OBJC_CLASS_$_SUPAbstractStructure", referenced from: _OBJC_CLASS_$_WorkPlannerChangeLogKey in WorkPlannerChangeLogKey.o _OBJC_CLASS_$_WorkPlannerKeyGeneratorPK in WorkPlannerKeyGeneratorPK.o _OBJC_CLASS_$_WorkPlannerKeyPackageName in WorkPlannerKeyPackageName.o _OBJC_CLASS_$_WorkPlannerLocalActivityEmployeeAssociationKey in WorkPlannerLocalActivityEmployeeAssociationKey.o _OBJC_CLASS_$_WorkPlannerLocalActivityEquipmentAssociationKey in WorkPlannerLocalActivityEquipmentAssociationKey.o _OBJC_CLASS_$_WorkPlannerLocalKeyGeneratorPK in WorkPlannerLocalKeyGeneratorPK.o _OBJC_CLASS_$_WorkPlannerLocalPlanDetailKey in WorkPlannerLocalPlanDetailKey.o ... "_OBJC_CLASS_$_SUPKeyGenerator", referenced from: objc-class-ref in WorkPlannerKeyGenerator.o _OBJC_CLASS_$_WorkPlannerKeyGenerator in WorkPlannerKeyGenerator.o "_OBJC_CLASS_$_SUPDefaultCallbackHandler", referenced from: _OBJC_CLASS_$_CallbackHandler in CallbackHandler.o "_OBJC_METACLASS_$_SUPKeyGenerator", referenced from: _OBJC_METACLASS_$_ WorkPlannerKeyGenerator in WorkPlannerKeyGenerator.o "_OBJC_CLASS_$_SUPClassDelegate", referenced from: objc-class-ref in WorkPlannerChangeLogKey.o objc-class-ref in WorkPlannerKeyGeneratorPK.o objc-class-ref in WorkPlannerKeyPackageName.o objc-class-ref in WorkPlannerLocalActivityEmployeeAssociationKey.o objc-class-ref in WorkPlannerLocalActivityEquipmentAssociationKey.o objc-class-ref in WorkPlannerLocalKeyGeneratorPK.o objc-class-ref in WorkPlannerLocalPlanDetailKey.o

Please help in understanding what wrong is happening with my build setting or schema.

Thanks in advance!

You are testing on iPhone 5 or iPod 5 which has armv7s architecture( what-is-armv7s ) but your library is not build with support for armv7s. YOu need to get your library build for armv7s architecture as well to support for new devices.

If your target is SUP 2.1.3 on iPad3/iOS6 built with XCode 4.5 you should be able to do it without problems.

I'm developing an app with exactly the same specifics and I have no problem running it both with the Simulator and the device itself.

You should be able to fix it just by changing the architecture of the project from Standard to armv7 (add it using Other... if you don't see the option) and it will run on the iPad3.

的XCode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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