Still doesn't work in BETA 8. After multiple developer feedback messages to Apple there is absolutely no reply from them. Like feedback goes into a black hole. Really: "Apple"???
The initial value of the slider is correct when you install the app and read it. But after first time of going into settings and changing slider position then app will forever more read some decimal of a value instead of the constrained min and max value.
I can confirm this behavior, and I think I was able to pinpoint what exactly happens and a possible workaround.
1) Like the op said, the default value is read correctly. However, it is never reflected by the slider's UI.
2) The slider's UI is hardcoded to real numbers between 0.0 and 1.0. It does not calculate anything, and it reflects your default as you specified it. If your default is bigger than 1, the slider will be at maximum from the first run of the app. If your minimum was 0.5, your maximum was 2.0 and your default was 0.6, the slider will appear at 60%.
3) Any user interaction with the slider will replace the default with the slider's position between 0.0 and 1.0.
The workaround will therefore be:
1) Translate the default values of your slider to a scale between 0.0 and 1.0. For instance, I wanted the values:
min: 0.001 min
In iOS 12 I chose 1 min, 10 default and 150 max, and multiplied them by 0.001 when reading them.
In iPadOS 13.1:
min: 0.0 (nothing we can do about that)
max: 1.0 (nothing we can do about that)
And this is not so great, because we are neither 0 nor 1 based. Therefore the formula for getting the variable would be:
let yourVariable = (UserDefaults.standard.double(forKey: "yourKey") + yourMinValue/(yourMaxValue-yourMinValue)) * (yourMaxValue-yourMinValue)
And you calculate your default like this:
defaultForPList = (yourDesiredDefaultValue-yourMinValue) / (yourMaxValue-yourMinValue)
Note that in the plist you should define the values as real, not as integer.
So in my case, for a min of 0.001, max of 0.15 and default of 0.01:
let myVar = (UserDefaults.standard.double(forKey: "myKey") + 0.001/(0.15-0.001)) * (0.15-0.001)
myDefault = (0.01-0.001)/(0.15-0.001) = 0.06040268456
Thankfully, this works for iOS 12 as well.
I filed with the feedback assistant, and made reference to the original report. The number of my feed back is FB7335083.