{"action":"opened","issue":{"url":"https://api.github.com/repos/vector-im/riot-ios/issues/1924","repository_url":"https://api.github.com/repos/vector-im/riot-ios","labels_url":"https://api.github.com/repos/vector-im/riot-ios/issues/1924/labels{/name}","comments_url":"https://api.github.com/repos/vector-im/riot-ios/issues/1924/comments","events_url":"https://api.github.com/repos/vector-im/riot-ios/issues/1924/events","html_url":"https://github.com/vector-im/riot-ios/issues/1924","id":337747857,"node_id":"MDU6SXNzdWUzMzc3NDc4NTc=","number":1924,"title":"Remove call of [NSUserDefaults synchronize]","user":{"login":"manuroe","id":8418515,"node_id":"MDQ6VXNlcjg0MTg1MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/8418515?v=4","gravatar_id":"","url":"https://api.github.com/users/manuroe","html_url":"https://github.com/manuroe","followers_url":"https://api.github.com/users/manuroe/followers","following_url":"https://api.github.com/users/manuroe/following{/other_user}","gists_url":"https://api.github.com/users/manuroe/gists{/gist_id}","starred_url":"https://api.github.com/users/manuroe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuroe/subscriptions","organizations_url":"https://api.github.com/users/manuroe/orgs","repos_url":"https://api.github.com/users/manuroe/repos","events_url":"https://api.github.com/users/manuroe/events{/privacy}","received_events_url":"https://api.github.com/users/manuroe/received_events","type":"User","site_admin":false},"labels":[{"id":309711187,"node_id":"MDU6TGFiZWwzMDk3MTExODc=","url":"https://api.github.com/repos/vector-im/riot-ios/labels/P3","name":"P3","color":"fbca04","default":false},{"id":244865628,"node_id":"MDU6TGFiZWwyNDQ4NjU2Mjg=","url":"https://api.github.com/repos/vector-im/riot-ios/labels/help%20wanted","name":"help wanted","color":"159818","default":true},{"id":920438602,"node_id":"MDU6TGFiZWw5MjA0Mzg2MDI=","url":"https://api.github.com/repos/vector-im/riot-ios/labels/maintenance","name":"maintenance","color":"422aba","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-03T05:12:14Z","updated_at":"2018-07-03T05:12:14Z","closed_at":null,"author_association":"MEMBER","body":"as it is no more useful since iOS8.\r\n\r\nThis issue follows changes made in https://github.com/vector-im/riot-ios/pull/1920#issuecomment-401866660.\r\n\r\n```\r\n-[NSUserDefaults synchronize] Changes\r\nIn earlier releases, the various ‘set’ methods on NSUserDefaults would wait several seconds before publishing the changes to other applications unless synchronized (though it has always been instant within a program). This delay has been removed. Additionally, iOS now matches Mac OS X’s behavior of automatically picking up external changes without needing to synchronize.\r\n\r\nIf you:\r\n\r\n• Synchronized to avoid losing data if your app crashed\r\n• Synchronized to read changed values from outside your process\r\n• Synchronized because it made things work and you weren’t sure why\r\n\r\nThen please don’t do so now. It should just work, and synchronizing will unnecessarily slow down your program.\r\n\r\nIf you synchronized because you immediately send out a notification to re-read preferences in another program after setting, and you wanted to be sure it will pick it up, then it may still be worth calling synchronize. You should probably restructure your program to use a real IPC mechanism (such as NSXPCConnection) to send the data to the other process though, rather than indirecting through the preferences system.\r\n```\r\n(https://developer.apple.com/library/archive/releasenotes/Foundation/RN-FoundationOlderNotes/index.html#X10_10Notes)"}}
{"actor":{"display_login":"manuroe"}}