Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Reading from public effective user settings" in iOS 10

Tags:

ios

ios10

swift

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)")
}

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

like image 693
TenaciousJay Avatar asked Oct 13 '16 14:10

TenaciousJay


3 Answers

This is a bug (now we're finding out it might be a permanent message) 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.

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.

like image 93
Edison Avatar answered Oct 17 '22 07:10

Edison


  • Go to Xcode -> Product -> Scheme -> Edit Scheme
  • In the Environment Variables, add OS_ACTIVITY_MODE as name and disable as value.

screenshot

I hope this helps you.

like image 29
Vinoth Vino Avatar answered Oct 17 '22 06:10

Vinoth Vino


Xcode seems to full of these confusing and misleading warnings. this warning appears when ever I enter text in a UITextField, at first I thought there is something wrong with my codes.

like image 6
Tony Avatar answered Oct 17 '22 07:10

Tony