12

I just installed Xcode 6.0.1 (coming from Xcode 5.1.1) and tried to run my iOS app on iPhone 6 simulator for the first time. It builds and runs, but I cannot change its settings. I use NSUserDefaults for my settings. Each time I change settings, go back to the list of settings and then select my app's settings again, they are set according to the default settings.

When I tried to figure out why this could happen I noticed that changing settings of the standard iOS app Maps does not work either. I cannot change the distance setting from miles to kilometers. This happens with fresh iOS Simulator settings (I "Reset Content and Settings" several times) when simulating iPhone 6 and iPhone 6 plus.

Any ideas?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Dirk
  • 2,335
  • 24
  • 36

3 Answers3

6

This is a known bug in iOS 8.0 in the simulator. The only workaround at this time is to set the preferences from the command line using the defaults command line tool.

defaults write ˜/Library/Developer/CoreSimulator/Devices/<UDID>/data/Containers/Data/Application/<App UUID>/Library/Preferences/...

You also need to find the relevant UDID.

Willam Hill
  • 1,572
  • 1
  • 17
  • 28
Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
  • Did this work? I copied the plist file from iOS 7 device version into the relevant folder and still no change for me. – Willam Hill Sep 27 '14 at 18:21
  • This is terrible. Should be fixed as quickly as possible. You guys bit a little too much with this release of both developer tools and the OS itself. Another 3-4 months (aka "8.1") should have been allotted to have a much more stable product. Hardware sales be damned, for once! – Léo Natan Sep 28 '14 at 18:36
  • i complete with this line of code to find name devices and relevant UDID. `find . -name 'device.plist' | xargs cat` – Armanoide Oct 21 '14 at 16:49
  • 2
    There's no need for that. Just run 'xcrun simctl list' – Jeremy Huddleston Sequoia Oct 21 '14 at 16:54
2

This appears to have been fixed in Xcode 6.1 so consider updating.

Tiago
  • 3,113
  • 2
  • 31
  • 45
0

This happened to me, too. It seems that the settings file is not saved at all.

˜/Library/Developer/CoreSimulator/Devices/[GUID]/data/Containers/Data/Application/[GUID]/Library/Preferences 

is empty.

I've tried to use plist file from 7.1 simulator, but without any luck.

Downloading iOS 7.1 Simulator through XCode -> Preferences -> Download allowed me to save the settings, but that just for iOS 7.1.

Tomguta
  • 1
  • 2
  • Thanks for the info. But iPhone 6 requires iOS 8, doesn't it? So I can't test my app for iPhone 6 and/or iOS 8. – Dirk Sep 19 '14 at 18:39