高通Vuforia + Unity iOS AR常见问题解决

最近Vuforia + Unity iOS总能折腾出各种问题.容易令人捉急.
下面是我遇到的很新的3个常见问题:

1. 问题: Unity (4.5.4, 4.5.5, 4.6) + Vuforia 3.0.9 iOS下闪退.
解决:
Unity生成Xcode文件后打开,设置Info.plist文件.
点击Informaition Property List,右方出现加号,点加号.
Key输入
UIInterfaceOrientationInitial interface orientation. (都一样的)
Value输入
UIInterfaceOrientationPortraitPortrait (bottom home button)

如图
Screenshot_SetInfoPlist

2. 问题: Unity 5 + Vuforia 4 黑屏,无相机画面.
解决:
点File菜单->Build Setting…->Player Setting…
在PlayerSetting的Other Setting处,把Graphics API设置为Open GL ES 2.0.
默认的Automatic可能会启用Metal,而目前还不支持的原因吧.
Screenshot_SetGraphicsAPI

3. 问题: Unity5 + Vuforia 4 无法生成ipa文件,总报错提示Codesign Failed.
打开终端,用cd命令进入Xcode项目目录.
比如
cd /user/TangoChen/Projects/DemoExports

我们将用终端一步步生成ipa:

  • Clean
    xcodebuild clean -project 项目名称.xcodeproj -configuration Release -alltargets
  • Archive
    xcodebuild archive -project 项目名称.xcodeproj -scheme 项目名称 -archivePath 项目名称.xcarchive
  • Export
    xcodebuild -exportArchive -archivePath 项目名称.xcarchive -exportPath 项目名称 -exportFormat ipa

* 项目名称通常是iPhone-Unity
这样就可以在目录下找到iPhone-Unity.ipa了.

转载请保留此原文出处链接,谢谢: http://tangochen.com/blog/?p=2045 by TangoChen

About TangoChen

VR Prototyper at Tencent, Microsoft MVP on Emerging Experiences, dropout.

This entry was posted in Augmented Reality, Tech. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.