美文网首页
根据bundleid修改bundlename

根据bundleid修改bundlename

作者: 学无止境吧 | 来源:发表于2017-11-01 13:42 被阅读22次

在Build Phases中添加脚本

#!/bin/bash
bundleID=${PRODUCT_BUNDLE_IDENTIFIER}
echo $bundleID
result=$(echo $bundleID | grep "knamestr")
if [[ "$result" != "" ]] ; then
    /usr/libexec/PlistBuddy -c "Set :CFBundleName 名称1" "$INFOPLIST_FILE"
else
    /usr/libexec/PlistBuddy -c "Set :CFBundleName 名称2" "$INFOPLIST_FILE"
fi

相关文章

网友评论

      本文标题:根据bundleid修改bundlename

      本文链接:https://www.haomeiwen.com/subject/pkzwpxtx.html