gpt4 book ai didi

macos - Cocoa 应用程序的应用程序配置?

转载 作者:行者123 更新时间:2023-12-03 16:18:43 24 4
gpt4 key购买 nike

有谁知道 Cocoa 是否有类似于 .NET app.config 文件的东西?我正在查看 nib 文件,但我认为它有点不同?!谢谢你!

最佳答案

是的,Appname-Info.plist 由 xcode 为任何新应用程序创建。请参阅https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/PropertyLists/index.html

然后您可以使用...访问属性

NSBundle* bundle = [NSBundle mainBundle];
NSString* property = [bundle objectForInfoDictionaryKey:@"keyname"];

关于macos - Cocoa 应用程序的应用程序配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12731695/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com