UIFileSharingEnabled仅在调试变体上 [英] UIFileSharingEnabled on debug variant only

查看:45
本文介绍了UIFileSharingEnabled仅在调试变体上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种仅对调试变量启用UIFileSharingEnabled标志的方法-因此我可以更改documents文件夹的内容-但我不希望最终用户也这样做.

I am looking for a way to enable the UIFileSharingEnabled flag for only a debug variant - so I can change the contents of the documents folder - but I don't want end users to be doing the same.

我想我可以使用运行脚本来执行此操作,尽管不确定如何将活动配置名称获取到脚本中.

I guess i could use a run script to do it, though not sure how to get the active configuration name to the script.

推荐答案

解决:

if [ ${CONFIGURATION} = "Debug" ]; then
    /usr/libexec/PlistBuddy -c "Set :UIFileSharingEnabled YES" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
else
    /usr/libexec/PlistBuddy -c "Set :UIFileSharingEnabled NO" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
fi

这篇关于UIFileSharingEnabled仅在调试变体上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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