Merge pull request #9507 from leoetlino/device-prepareforstate IOS: Remove unnecessary and unused PrepareForState