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

查看:144
本文介绍了可以通过编程方式编辑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天全站免登陆