Programmatically detect if app is being run on device or simulator Programmatically detect if app is being run on device or simulator ios ios