Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Harware will never resolve to simulator #73

Closed
armandzwan opened this issue Apr 8, 2019 · 3 comments
Closed

Harware will never resolve to simulator #73

armandzwan opened this issue Apr 8, 2019 · 3 comments

Comments

@armandzwan
Copy link

At the beginning of
- (Hardware)hardware {
this is called:
NSString *hardware = [self hardwareString];

But since commit fa656df this will never return i386_Sim or x86_64_Sim.

Thus

if ([hardware isEqualToString:i386_Sim])     return SIMULATOR;
if ([hardware isEqualToString:x86_64_Sim])   return SIMULATOR;

will never happen.

Or am I missing something?

@InderKumarRathore
Copy link
Owner

yes ideally these statements should never run but if you check the hardwareString method in that there is a nil check and if that fails it will return the i386_Sim or x86_64_Sim
These are precautionary if checks

@armandzwan
Copy link
Author

Ok, but how do you know that you are running on a simulator then?

@armandzwan
Copy link
Author

What do you think of this?
#74

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