修改PRODUCT_BUNDLE_IDENTIFIER英寸x code的project.pbxproj [英] Modify PRODUCT_BUNDLE_IDENTIFIER in project.pbxproj of xCode

查看:2388
本文介绍了修改PRODUCT_BUNDLE_IDENTIFIER英寸x code的project.pbxproj的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图修改用x code项目的 project.pbxproj 文件 SED 壳在Mac终端命令替换字符串。我想,以取代场 -

I'm trying to modify the project.pbxproj file of xCode project using sed shell command on Mac Terminal to replace a string. I want to replace the field -

PRODUCT_BUNDLE_IDENTIFIER = com.example.71b9b4f2

PRODUCT_BUNDLE_IDENTIFIER = com.example.14a32d1e

使用的命令 -

SED -i'S / com.example.71b94f2 / com.example.14a32d1e / G'project.pbxproj

产生以下输出错误 -

which produces the following output error-

sed的:1:project.pbxproj:在p命令的末尾多余的字符

sed: 1: "project.pbxproj": extra characters at the end of p command

我前面使用 Plistbuddy shell命令来修改字段 CFBUNDLEIDENTIFIER 信息。的plist 但是,这并不能改变 $(PRODUCT_BUNDLE_IDENTIFIER)以x code 7构建设置了。

I was earlier using Plistbuddy shell command to modify the field CFBUNDLEIDENTIFIER in info.plist but that doesn't change $(PRODUCT_BUNDLE_IDENTIFIER) in xCode 7 build settings anymore.

我的主要目的是通过命令行或脚本修改以x code构建设置的PRODUCT_BUNDLE_IDENTIFIER领域。

My main aim is to modify the PRODUCT_BUNDLE_IDENTIFIER field of BUILD SETTINGS in xCode using command line or any script.

推荐答案

OSX要求被明确指定的扩展。解决方法是设置一个空字符串:

OSX requires the extension to be explicitly specified. The workaround is to set an empty string:

sed -i '' 's/com.example.71b94f2/com.example.14a32d1e/g' project.pbxproj

这篇关于修改PRODUCT_BUNDLE_IDENTIFIER英寸x code的project.pbxproj的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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