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

modelCode, modelName and modelUTI made optional in Device server entity #137

Merged
merged 2 commits into from Jul 20, 2016

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Jul 4, 2016

This is a fix for buildasaurs/Buildasaur#283. As far as I understood, the Xcode Server instance had a few devices that were disconnected, but still in the list not having these properties, which was triggering JSON parsing issues.

@voidrender
Copy link

It looks like proxied devices can be missing a deviceType as well, so it will need the same treatment as the others. With that change, your PR works perfectly for me (at least in Buildasaur).

Here's a snippet from the getDevices call that shows my  Watch as missing the deviceType field:

{
        "_id" = dc092852df88fd1856281afea400598d;
        "_rev" = "646-2e7eb79be31cac5e72283aab895305bf";
        activeProxiedDevice =         {
            architecture = armv7k;
            connected = 1;
            deviceUDID = <redacted>;
            "doc_type" = device;
            enabledForDevelopment = 1;
            identifier = <redacted>;
            isServer = 0;
            modelCode = "Watch1,2";
            modelName = "Apple Watch 42mm";
            modelUTI = "com.apple.watch-42mm-1";
            name = "Isaac's Apple\U00a0Watch";
            osVersion = "2.2";
            platformIdentifier = "com.apple.platform.watchos";
            retina = 0;
            simulator = 0;
            supported = 1;
            tinyID = 941EB95;
            trusted = 1;
        };

@czechboy0
Copy link
Member

Thanks for taking a look @ioveracker, that sounds reasonable - @explicitcall could you please also make deviceType optional, like you did with the other properties? Then I'll be happy to merge, thanks! 👍

also fixed compiler warnings induced by redundant `try`s used for non-throwing functions
@MaxDesiatov
Copy link
Contributor Author

@czechboy0 done. Cheers!

@czechboy0 czechboy0 merged commit 10db19b into buildasaurs:master Jul 20, 2016
@czechboy0
Copy link
Member

Thanks @explicitcall!

@valeriomazzeo
Copy link

is it possible to release an hotfix?

@czechboy0
Copy link
Member

@valeriomazzeo
Copy link

I am sorry, I meant an hotfix of buildasaur using this new version of xcodeserversdk

@czechboy0
Copy link
Member

Sure, let's sync up on Slack. Can I invite you? What's your email address?

@czechboy0
Copy link
Member

Invited. Feel free to delete the email above.

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.

None yet

4 participants