Skip to content
This repository has been archived by the owner on Sep 4, 2018. It is now read-only.

notify users when Xcode relaunch required due to Xcode upgrade #440

Open
alanhamlett opened this issue Mar 22, 2016 · 4 comments
Open

notify users when Xcode relaunch required due to Xcode upgrade #440

alanhamlett opened this issue Mar 22, 2016 · 4 comments

Comments

@alanhamlett
Copy link
Contributor

When a new version of Xcode is released with a new DVTPlugInCompatibilityUUID there is a window of time where only Alcatraz is loaded, until Alcatraz updates each plugin. Once the plugin has been updated by Alcatraz, it won't be loaded until Xcode is relaunched and the user selects Load Bundles when prompted by Xcode's Unexpected code bundle popup.

When Alcatraz updates a plugin that requires an Xcode relaunch, Alcatraz should notify the user to relaunch Xcode and select Load Bundles when prompted.

This can happen even if the plugin maintainer adds support for the new DVTPlugInCompatibilityUUID before Alcatraz does, because Alcatraz might have not updated the plugin to the latest version before the user upgrades Xcode.

@jurre
Copy link
Collaborator

jurre commented Mar 22, 2016

Yeah, this sounds like a great addition, how would we prompt the user though? Ideally we would not block Xcode with a regular popup

@alanhamlett
Copy link
Contributor Author

We can create a NSUserNotification.

Just have the Alcatraz interface conform to the NSUserNotificationCenterDelegate protocol, create a shouldPresentNotification method that returns YES, then create a new NSUserNotification and display it by passing it to deliverNotification method on the NSUserNotificationCenter.

Some examples:

  1. NSUserNotification StackOverflow example
  2. NSUserNotification from an Xcode plugin example

@jurre
Copy link
Collaborator

jurre commented Mar 23, 2016

Good idea! We used to have that in ATZ when installing a plugin: c6c9d7a

@alanhamlett
Copy link
Contributor Author

Cool! So it seems the things needed in a PR would be:

  1. Before updating a package, save it's DVTPlugInCompatibilityUUIDs.
  2. After a package is updated, check it's DVTPlugInCompatibilityUUIDs against the current Xcode UUID.
  3. If the current Xcode UUID was not found before updating, but is found after updating then add plugin to a queue.
  4. After updating all packages in ATZPluginWindowController.packages display a notification if plugins are in the queue.

Also, is reloadXcodeForPackage related?

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