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

Selecting scheme from popup selects incorrect scheme #193

Closed
mx-bot opened this issue Oct 27, 2015 · 4 comments · Fixed by #194
Closed

Selecting scheme from popup selects incorrect scheme #193

mx-bot opened this issue Oct 27, 2015 · 4 comments · Fixed by #194
Assignees

Comments

@mx-bot
Copy link

mx-bot commented Oct 27, 2015

On the template editor, select a scheme and then Next. Select Previous and observe the selected scheme.

Inspecting the schemes property shows the order is not consistent with the order presented in schemesPopup.

Seems this might be because there is a name sort being done on the schemesPopup's name:

        let schemeNames = self.schemes.producer
            .map { templates in templates.sort { $0.name < $1.name } }
            .map { $0.map { $0.name } }
        schemeNames.startWithNext { [weak self] in
            self?.schemesPopup.replaceItems($0)
        }
@czechboy0
Copy link
Member

Yeah you're right, that's incorrect. And in cases when you have schemes from more than one project/workspace, this will be out of sync.

A quick workaround is to remove like 210 in BuildTemplateViewController.swift, so that it doesn't perform the sort. I'll prep a proper fix later. Sorry about that! :)

Also, this is most likely a duplicate of #192.

@mx-bot
Copy link
Author

mx-bot commented Oct 27, 2015

Removing the sort corrects the mismatch and scheme is correct in the handler, but the same (incorrect) scheme is always seems to be applied. Any ideas?

@mx-bot
Copy link
Author

mx-bot commented Oct 27, 2015

hmm the correct scheme is set in the template being passed in to didSaveBuildTemplate()

@mx-bot
Copy link
Author

mx-bot commented Oct 27, 2015

@czechboy0 it seems to be a bit of a timing issue. The Next button is becoming enabled before the setting has fully updated. This is evident because the button is enabled before the device list is updated.

@czechboy0 czechboy0 self-assigned this Nov 2, 2015
czechboy0 added a commit that referenced this issue Nov 2, 2015
…e being updated - and having the next button disabled properly

- cleaned cocoapods, updated dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants