2

我正在使用 Monotouch 的 RedLaser 绑定来创建一个扫描条形码的应用程序。它像 iSimulator 上的魅力一样工作得很好,但是当我尝试部署到真实设备时(切换运行环境 Debug|Simulator -> Debug|iPhone),我什至无法构建。

我正在使用 MonoTouch 6.0.8、MonoDevelop 3.0.6、XCode 4.5.2。

另外,我正在使用 iphone 3GS 设备进行部署。该设备正在运行 iOS 6.0,这就是我的应用程序的目标。我在 MonoTouch bugzilla 上发现了一个具有相同错误代码的 bug 它建议将目标从 6.0 -> 5.1 更改。我做到了,并没有改变任何事情。

我在 Xcode Organizer 上设置、验证和安装了我的配置文件,证书也是如此。我可以看到两者都很好。

构建输出如下,任何帮助将不胜感激。谢谢

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -miphoneos-version-min=5.1 -gdwarf-2 -arch armv7 -std=c99 -I/Developer/MonoTouch/ SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -c /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/ T/tmpee06e1f.tmp/main.armv7.m -o /Users/hasnainaltaiar/Dev/Leopard/SVN/trunk/LD6419/Platforms/iOS/Leopard.Delivery.iOS/Leopard.Delivery.iOS/obj/Release/mtouch-缓存/main..armv7.cache.M0wr77LlBANF6vKjGqQvyVnmWEk=.o /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -miphoneos-version-min=5.1 -gdwarf-2 - arch armv7 -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode。app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -c /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/registrar.m -o /Users/hasnainaltaiar/Dev/ Leopard/SVN/trunk/LD6419/Platforms/iOS/Leopard.Delivery.iOS/Leopard.Delivery.iOS/obj/Release/mtouch-cache/registrar.armv7.cache.Zar9bxp0AZNxwVcgrsOMEFHv0k4=.o /Applications/Xcode.app/Contents /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -Wl,-no_pie -miphoneos-version-min=5.1 -gdwarf-2 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms /iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/Mono.Security.dll.armv7.o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee .tmp/Leopard.Domain.dll.armv7。o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/RedLaser.dll.armv7.o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/System.Core.dll.armv7 folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/mscorlib.dll.armv7.o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/System.dll.armv7.o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/ T/tmpee06e1f.tmp/monotouch.dll.armv7.o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/LeopardDeliveryiOS.exe.armv7.o /Users/hasnainaltaiar/Dev/Leopard/SVN/trunk/LD6419/平台/iOS/Leopard.Delivery.iOS/Leopard.Delivery.iOS/obj/Release/mtouch-cache/main..armv7.cache.M0wr77LlBANF6vKjGqQvyVnmWEk=.o /Users/hasnainaltaiar/Dev/Leopard/SVN/trunk/LD6419/平台/iOS/Leopard.Delivery.iOS/Leopard.Delivery。iOS/obj/Release/mtouch-cache/registrar.armv7.cache.Zar9bxp0AZNxwVcgrsOMEFHv0k4=.o -o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/LeopardDeliveryiOS -framework CFNetwork -framework Foundation -framework UIKit -framework Audio -framework QuartzCore -framework CoreGraphics -framework AVFoundation -framework CoreMedia -framework CoreVideo -framework OpenGLES -framework Security -framework SystemConfiguration -lz -liconv -u _mono_pmip -u _monotouch_create_managed_ref -u _monotouch_release_managed_ref -u _monotouch_IntPtr_objc_msgSend_IntPtr -u _monotouch_IntPtr_objc_msgSendSuper_IntPtr -u _CloseZStream -u _CreateZStream - u _Flush -u _ReadZStream -u _WriteZStream -lmono-2.0 -lmonotouch -L/Developer/MonoTouch/SDKs/MonoTouch.iphoneos。sdk/usr/lib -lgcc_eh -force_load /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/libRedLaserSDK.a 进程以代码 1 退出,命令:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS。平台/开发者/usr/bin/g++ -Wl,-no_pie -miphoneos-version-min=5.1 -gdwarf-2 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/ SDKs/iPhoneOS6.0.sdk /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/Mono.Security.dll.armv7.o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.mp. dll.armv7.o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/RedLaser.dll.armv7.o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/System.Core.dllo /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/mscorlib.dll.armv7.o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/System.dll.armv7.o _l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/monotouch.dll.armv7.o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/LeopardDeliveropard/has.exe.armv7.oev/用户trunk/LD6419/Platforms/iOS/Leopard.Delivery.iOS/Leopard.Delivery.iOS/obj/Release/mtouch-cache/main..armv7.cache.M0wr77LlBANF6vKjGqQvyVnmWEk=.o/Users/hasnainaltaiar/Dev/Leopard/SVN/ trunk/LD6419/Platforms/iOS/Leopard.Delivery.iOS/Leopard.Delivery.iOS/obj/Release/mtouch-cache/registrar.armv7.cache.Zar9bxp0AZNxwVcgrsOMEFHv0k4=.o -o /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T /tmpee06e1f。tmp/LeopardDeliveryiOS -framework CFNetwork -framework Foundation -framework UIKit -framework AudioToolbox -framework QuartzCore -framework CoreGraphics -framework AVFoundation -framework CoreMedia -framework CoreVideo -framework OpenGLES -framework Security -framework SystemConfiguration -lz -liconv -u _mono_pmip -u _monotouch_create_managed_ref - u _monotouch_release_managed_ref -u _monotouch_IntPtr_objc_msgSend_IntPtr -u _monotouch_IntPtr_objc_msgSendSuper_IntPtr -u _CloseZStream -u _CreateZStream -u _Flush -u _ReadZStream -u _WriteZStream -lmono-2.0 -lmonotouch -L/lib-Developer/MonolgTouch-usr/sdk force_load /var/folders/_l/0pvrtd6x6qg83sz4_0906b5c0000gn/T/tmpee06e1f.tmp/libRedLaserSDK.a 架构 armv7 的未定义符号:
“_OBJC_CLASS_$_CLLocationManager”,引用自:libRedLaserSDK.a(StatusManager.o) 中的 objc-class-ref ld:未找到架构 armv7 collect2 的符号:ld 返回 1 个退出状态

错误 MT5202:本机链接失败。请查看构建日志。

- - - - - - - - - - - 完毕 - - - - - - - - - - -

项目未指定捆绑标识符。生成“leoparddeliveryios”以匹配配置文件。

4

2 回答 2

4

从错误消息中:

Undefined symbols for architecture armv7: "_OBJC_CLASS_$_CLLocationManager"

似乎该库已更新,现在依赖于CoreLocation.

编辑[LinkWith]绑定项目中的属性并添加CoreLocation到它的Frameworks属性,然后重建绑定(然后重建您的应用程序)。如果这解决了问题,那么请提交错误报告,以便可以在 github 存储库中修复它。

注意:作为快速测试,您还可以将以下选项添加到项目的调试发布配置中(在 MonoDevelop 中项目选项中的mtouch 附加参数中)。

-gcc_args="-framework CoreLocation"

这将导致相同的结果 - 除了您需要为您正在使用的每个项目(和配置)复制该修复程序(因此发现问题很有用,但不是修复它的真正好方法)。

于 2013-01-15T13:00:45.527 回答
2

好的,我解决了问题,但将在此处记录解决方案以分享经验教训。

首先:它无法构建解决方案,因为绑定时属性CoreLocation中缺少它。Frameworks感谢 poupou 指出这一点,我也在 GitHub(MonoTouch Binding Repo)上修复了它。

第二:MonoDevelop 无法构建应用程序,因为它找不到 Provisioning 配置文件。您需要手动设置您的配置文件和证书。您可以通过转到Main Project > Options > Build > iPhone Bundle Signing> 然后选择您的Configuration (Debug|Release)Platform (iPhone|Simulator)并为 Identity and Prov 选择您的证书和配置文件来做到这一点。轮廓。

第三:最后,每次我部署到 iPhone 时,应用程序都会崩溃。我提交了上面评论中提到的错误。然后似乎 RedLaser 框架在扫描二维码时存在错误。通过添加以下行禁用此功能,解决了问题。

overlayController.ParentPicker.ScanQRCODE = false;
于 2013-01-17T01:53:29.223 回答