Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method getSystemNameSync() return "unknown" on Android and iOS #771

Closed
cmpayc opened this issue Sep 9, 2019 · 2 comments
Closed

Method getSystemNameSync() return "unknown" on Android and iOS #771

cmpayc opened this issue Sep 9, 2019 · 2 comments
Assignees
Labels
Projects

Comments

@cmpayc
Copy link

cmpayc commented Sep 9, 2019

Bug in deviceinfo.js:

export function getSystemNameSync() {
  if (!systemName) {
    if (OS === 'ios') {
      systemName = RNDeviceInfo.getSystemNameSync();
    } else if (OS === 'android') {
      systemName = 'Android';
    }
    if (OS === 'windows') {
      systemName = 'Windows';
    } else {
      systemName = 'unknown';
    }
  }
  alert(systemName);
  return systemName;
}

if (OS === 'windows') { must be else if (OS === 'windows') {

@mikehardy
Copy link
Collaborator

Thanks for reporting this! I'll scan the rest too - it was a great deal of fast typing to go from rc.2 to .3 and .4 - clearly an oversight here

@mikehardy mikehardy self-assigned this Sep 9, 2019
@mikehardy mikehardy added the bug label Sep 9, 2019
mikehardy added a commit to mikehardy/react-native-device-info that referenced this issue Sep 9, 2019
@mikehardy
Copy link
Collaborator

Fixed in mikehardy@ba62f88 - plus there were a few others similar that a full API pass picked up, thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v3
  
Done
Development

No branches or pull requests

2 participants