(iOS,XCode 4.2)使用Git post-commit hook设置包版本会导致我的项目变成Mac项目 [英] (iOS, XCode 4.2) Setting bundle version using Git post-commit hook causes my project to turn into a Mac project

查看:207
本文介绍了(iOS,XCode 4.2)使用Git post-commit hook设置包版本会导致我的项目变成Mac项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定开始使用捆绑版本字符串,简称作为营销版本(即 2.0.1 )和我的项目的Bundle版本(例如 42 )。

为此目的我添加了一个Git post-commit 钩子来调用 agvtool next-version -all 。这实际上是工作 - Info.plist 正在用一个递增的版本号正确更新。



然而,显然将我的iOS项目转换为Mac项目 - iOS设备 iPhone 5.0模拟器的不幸副作用。等等从我的 Scheme 菜单中消失,并被单个条目 My Mac 64位取代。幸运的是,这种改变似乎是暂时的,因为退出并重新启动Xcode会带回缺少的iOS方案条目。



我做错了吗?有没有更好的方式来完成我的目标?或者我遇到了一个奇怪的Xcode错误?

解决方案

我有完全相同的问题,但不是重新启动Xcode我只是在目标选项中的摘要标签中重新选择部署目标。这要快得多。


I've decided to start versioning my project "the Apple way," using "Bundle versions string, short" for the "marketing version" (i.e. 2.0.1) of my project, and "Bundle version" as a build number (e.g. 42).

To that end I've added a Git post-commit hook to call agvtool next-version -all. This does in fact work -- Info.plist is being properly updated with an incrementing version number.

However it also has the unfortunate side effect of apparently converting my iOS project into a Mac project -- iOS device, iPhone 5.0 simulator, etc. disappears from my Scheme menu to be replaced with a single entry, My Mac 64-bit. Fortunately this change appears to be temporary, as quitting and relaunching Xcode brings back the missing iOS scheme entries.

Am I doing this wrong? Is there a better way of accomplishing my goals? Or have I run up against a weird bug in Xcode?

解决方案

I'm having exactly the same problem, but instead of relaunching Xcode I'm just re-selecting Deployment Target in Summary tab in target options. This is much faster.

这篇关于(iOS,XCode 4.2)使用Git post-commit hook设置包版本会导致我的项目变成Mac项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆