Decimal separator in simulator

The note after figure 7.19 says

(If your keyboard has a period for the decimal separator instead of a comma, you did not do anything wrong. This seems to be a bug in Xcode. Use your hardware keyboard to enter a comma.)

Another option is to run the Settings app on the simulator, go to General → Languages & Region → Region and set the region to Spain.