簡體   English   中英

如何從我的iPhone應用程序的config.xml文件中的info.plist中讀取密鑰的值

[英]How to read the value for a key from the info.plist in an config.xml file in my iPhone app

我正在為iOS和Android平台開發Cordova應用程序。 在iOS應用中,使用此<content src="abc.xyz.com"/>將服務器URL加載到config.xml文件中。 但是我想從info.plist動態獲取服務器的url。

<key>url</key>
    <string>http://abc.xyz.com</string>

因此,我如何以編程方式從info.plist中讀取值到config.xml文件中。

謝謝

嘗試這個 :

[[[NSBundle mainBundle] infoDictionary] objectForKey:@"url"]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM