Changes of the linked thread are for Android.
If you've done something similar also for iOS version I suggest to remove it and use the default code.
The screenshot of the previous post has been done using the default code of Cordova plugin for iOS, and it seems to work correctly.