“从公共有效用户设置中读取”在iOS 10中 [英] "Reading from public effective user settings" in iOS 10

查看:477
本文介绍了“从公共有效用户设置中读取”在iOS 10中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在启动应用时收到以下消息:

I'm getting the following messages when launching my app:

2016-10-12 14:47:23.705002 Discovery[377:147958] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2016-10-12 14:47:23.712212 Discovery[377:147958] [MC] Reading from public effective user settings.

系统组容器是否与应用程序组相关?我确实在使用应用程序组的应用程序之间共享数据,并想知道这是否导致显示此消息?

Is "system group container" related to App Groups? I do share data between apps using an App Group and was wondering if this caused this message to be displayed?

我在一个应用程序中设置数据如下:

I set the data in one app like this:

var userDefaults = NSUserDefaults(suiteName: "group.com.company.myApp")
userDefaults!.setObject("user12345", forKey: "userId")
userDefaults!.synchronize()

我检索它在另一个应用程序使用这样的东西:

And I retrieve it in another app using something like this:

var userDefaults = NSUserDefaults(suiteName: "group.com.company.myApp")
if let testUserId = userDefaults?.objectForKey("userId") as? String {
  print("User Id: \(testUserId)")
}

iOS 10中是否有任何更改会导致任何问题或导致这些消息显示?

Did something change in iOS 10 that would cause any problems or cause these messages to show up?

推荐答案

这是一个测试版中的错误(现在我们发现它可能是一个永久性的功能),似乎这个消息主要出现在单击文本字段或文本视图或其他类似的NSObject时。

This is a bug in the beta (now we're finding out it could be a permanent "feature") and it seems that this message appears primarily when clicking on a Text Field or Text View or other similar NSObject.

这只是一条日志消息,而不是消息前面的日期和时间所表示的编译错误消息。因此,如果您的代码不起作用,则不是此控制台消息的结果。

This is only a log message and not a compile error message as signified by the date and time preceding the message. Therefore if your code is not working it is not a result of this console message.

如果您在设备上运行,则消息将为 [MC ]从公共有效用户设置中读取。如果您在SIM卡上运行,则消息将为 [MC]从私人有效用户设置中读取

If you run on a device the message will be [MC] Reading from public effective user settings. If you run on the sim the message will be [MC] Reading from private effective user settings.

这篇关于“从公共有效用户设置中读取”在iOS 10中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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