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

Fix macOS can't connect because of an error 400 #1

Closed
wants to merge 1 commit into from

Conversation

glhaynes
Copy link

Return the correct value for EMBDevice.operatingSystemVersion when on macOS. Fixes an issue where macOS Embrace can't connect because of an error 400:

{
  "error": {
    "msg": "Missing required parameter: appVersion",
    "code": 1
  }
}

@atreat
Copy link
Contributor

atreat commented Mar 11, 2024

Thanks for the PR 👍. We'll be sure to include this in a future release

@atreat
Copy link
Contributor

atreat commented Mar 18, 2024

Hey @glhaynes, before we pull this in - Would you mind taking a look at our (newly added) contributing guidelines? Specifically, would you mind reading through and agreeing to the Individual Contributor License Agreement (CLA).

We really appreciate the contribution and the testing you've done for this project in its early stages!

@glhaynes
Copy link
Author

Hi, @atreat! Excited for y'all to include this little fix. I get this when I click on both of those links, though:

You need permission
This form can only be viewed by users in the owner's organization.

@atreat
Copy link
Contributor

atreat commented Mar 20, 2024

@glhaynes That's on me, I accidentally pasted the same link twice. The contributing guidelines link should be updated. It is also found in the repo at .github/CONTRIBUTING.md (on the main branch). I also had the Google form link for the CLA updated to be public.

Let me know if you have chance to look through these. Thank you!

@glhaynes
Copy link
Author

Done. Thanks!

@atreat
Copy link
Contributor

atreat commented Mar 20, 2024

We pulled this in! Going to close this as it is now on main and part of our 6.0.0-beta release!

+ (NSString *)operatingSystemVersion
{
NSOperatingSystemVersion operatingSystemVersion = [NSProcessInfo processInfo].operatingSystemVersion;
if (operatingSystemVersion.patchVersion == 0) {
return [NSString stringWithFormat: @"%i.%i", (int)operatingSystemVersion.majorVersion, (int)operatingSystemVersion.minorVersion];
} else {
return [NSString stringWithFormat: @"%i.%i.%i", (int)operatingSystemVersion.majorVersion, (int)operatingSystemVersion.minorVersion, (int)operatingSystemVersion.patchVersion];
}
}

We liked this implementation and preferred to remove the UIKIT_AVAILABLE check entirely! I made sure to add some tests around this as I realized we had not setup a proper test target for our ObjCUtils. Really appreciate the contribution! You're officially on the list of contributors! Thanks a bunch @glhaynes

@atreat atreat closed this Mar 20, 2024
@glhaynes
Copy link
Author

Oh, great point, it didn't cross my mind that those would be equally available on iOS!

Happy to help, excited to see this in beta as we're looking forward to adopting it.

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

Successfully merging this pull request may close these issues.

4 participants