可以以编程方式编辑 Info.plist 吗? [英] Editing Info.plist possible programmatically?

查看:23
本文介绍了可以以编程方式编辑 Info.plist 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 Info.plist 中设置了我的 Facebook-AppId.但我希望编辑它,因为它是动态的.我应该如何以编程方式执行此操作?

I have set my Facebook-AppId in the Info.plist. But I wish to edit it because its dynamic. How shall I do it programmatically?

推荐答案

可能在 info.plist 中写入不是一个好主意,它不起作用,因为您正试图将字典写入 App 包内的 .plist 文件,这是只读的.因此,即使您以其他方式完成它,它也不会起作用,并且也会有更多的拒绝机会.

Probably write in info.plist is not good idea and it doesn't work because you are trying to write the dictionary to a .plist file inside your App bundle, which is read only. Thus it would not work and also would have more rejection chances even if you get it done other way.

顺便说一句,为什么只有 Info.Plist?我的意思是为什么你不能以其他方式拥有它,例如 nsuserdefaults 或 sql

BTW why Info.Plist only? I mean why you can not have it in other way e.g nsuserdefaults or sql

这篇关于可以以编程方式编辑 Info.plist 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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