我用pyinstaller创建了一个mac应用程序。我已将“NSCalendarsUsageDescription”、“NSContactsUsageDescription”添加到
Info.plist
这对于默认的英语语言很好。
Infoplist.string
要本地化以上字符串的文件。我试着模仿
fr.lproj/Infoplist.string
在里面
build app/Contents/Resources
我需要在中添加此引用吗
.spec
在什么地方存档?或者其他我缺少的东西。
我在xcode10中创建了一个测试应用程序。在中添加了“NSCalendarsUsageDescription”信息列表
添加了以下代码
NSArray* dirs = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Library/Calendars"] error:&error];
Error Domain=NSCocoaErrorDomain Code=257 "The file âCalendarsâ couldnât be opened because you donât have permission to view it." UserInfo={NSUserStringVariant=(
Folder
), NSURL=file:///Users/insync/Library/Calendars, NSFilePath=/Users/insync/Library/Calendars, NSUnderlyingError=0x600000c5c870 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
根据
https://developer.apple.com/videos/play/wwdc2018/718/
,Mac Mojave应该给出一个用户同意提示,要求用户授予使用日历的权限。
我已签署此应用程序并尝试。还是一样的错误。