Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Testing View Across Devices in Simulator #231

Open
alextakahashi opened this issue Jun 16, 2017 · 1 comment
Open

Testing View Across Devices in Simulator #231

alextakahashi opened this issue Jun 16, 2017 · 1 comment

Comments

@alextakahashi
Copy link

I know in the Realm UI and Snapshot Testing Video Luis mentioned that we can test views across devices (iPhone5 vs iPhone 6+ etc).

I want to know which device I am running on within simulator, but when I print out the model name

let modelName = UIDevice.current.modelName

It would just say I am running in Simulator.

I was following this Stack Overflow post How to determine the device running in the simulator?
but using FBSnapshotTestCase is not necessarily related to "functionalities available". Has anyone ran into a similar problem?

@alanzeino
Copy link
Contributor

Probably use sysctl.h, like this library does:

https://github.com/InderKumarRathore/DeviceUtil/blob/master/DeviceUtil.m

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants