Deployment target, device sleep fixes

(I should start applying my provisioning profile changes on a branch or something…)