QT 5.7 for iOS Xcode 8 Project ERROR: Xcode not set up properly. You may need to confirm the license

手机升级到了ios10,然后想着懒得折腾直接升级到xcode 8好直接真机调试,嗯,想法是对的,然后xcode 8上也可以直接在ios 10上调试了。

但是当换到Qt creator 4.0.1 / Qt 5.7 上时编译iOS程序时却是各种问题啊,搞得整个人都不好了,一种入坑的感觉。


首先第一个问题:Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.

解决这个问题的时候,请尽量别选择如下这个建立符号链接的办法,这样后的确会解决如上的问题,但是接下来不出意外的话你会碰到其他问题的。

cd /Applications/Xcode.app/Contents/Developer/usr/bin/
sudo ln -s xcodebuild xcrun

然后应该这样做:

打开Qt安装目录下的这个文件:Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf  (mac,Qt_install_folder为你Qt的安装目录,下同)

然后替换:

isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))

isEmpty(##list(##system("/usr/bin/xcrun -find xcrun 2>/dev/null")))     //两个#替换为两个$

为:

isEmpty(##list(##system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))      //两个#替换为两个$

继续打开Qt安装目录下的这个文件:Qt_install_folder/5.7/ios/mkspecs/features/mac/default_pre.prf  (iOS
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值