-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[menu-bar] Add auto update support (#65)
* [menu-bar] Add auto update support * Add appcast file * Update Settings window * Add changelog entry
- Loading branch information
1 parent
749f2e1
commit d69f197
Showing
11 changed files
with
185 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<channel> | ||
<title>Orbit</title> | ||
<link>https://raw.githubusercontent.com/expo/orbit/main/appcast.xml</link> | ||
<description>Most recent changes with links to updates.</description> | ||
<language>en</language> | ||
<item> | ||
<title>0.1.2</title> | ||
<description> | ||
<![CDATA[ | ||
<h3 id="newfeatures">🎉 New features</h3> | ||
<ul> | ||
<li>Added a context menu when right clicking on the menu bar icon. (<a href="https://github.com/expo/orbit/pull/36">#36</a> by <a href="https://github.com/gabrieldonadel">@gabrieldonadel</a>)</li> | ||
</ul> | ||
<h3 id="bugfixes">🐛 Bug fixes</h3> | ||
<ul> | ||
<li>Fixed listing devices on Intel machines. (<a href="https://github.com/expo/orbit/pull/39">#39</a> by <a href="https://github.com/gabrieldonadel">@gabrieldonadel</a>)</li> | ||
</ul> | ||
<h3 id="others">💡 Others</h3> | ||
<ul> | ||
<li>Refetch devices list after launching a simulator. (<a href="https://github.com/expo/orbit/pull/37">#37</a> by <a href="https://github.com/gabrieldonadel">@gabrieldonadel</a>)</li> | ||
<li>Improve Popover height estimations. (<a href="https://github.com/expo/orbit/pull/38">#38</a> by <a href="https://github.com/gabrieldonadel">@gabrieldonadel</a>)</li> | ||
<li>Add alert when trying to install build with no available device. (<a href="https://github.com/expo/orbit/pull/38">#38</a> by <a href="https://github.com/gabrieldonadel">@gabrieldonadel</a>)</li> | ||
</ul> | ||
]]> | ||
</description> | ||
<pubDate>2023-08-13</pubDate> | ||
<releaseNotesLink>https://github.com/expo/orbit/releases/tag/expo-orbit-v0.1.2</releaseNotesLink> | ||
<sparkle:minimumSystemVersion>10.15</sparkle:minimumSystemVersion> | ||
<enclosure | ||
url="https://github.com/expo/orbit/releases/download/expo-orbit-v0.1.2/expo-orbit.v0.1.2.zip" | ||
sparkle:version="6" | ||
sparkle:shortVersionString="0.1.2" | ||
length="0" | ||
type="application/octet-stream" | ||
/> | ||
</item> | ||
</channel> | ||
</rss> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#import <React/RCTBridgeModule.h> | ||
|
||
@interface SparkleModule : NSObject <RCTBridgeModule> | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#import "SparkleModule.h" | ||
#import "AppDelegate.h" | ||
|
||
#import <Sparkle/SPUStandardUpdaterController.h> | ||
#import <Sparkle/SPUUpdater.h> | ||
|
||
@implementation SparkleModule { | ||
SPUStandardUpdaterController *updateController; | ||
} | ||
|
||
RCT_EXPORT_MODULE(); | ||
|
||
- (instancetype)init { | ||
self = [super init]; | ||
if (self) { | ||
updateController = [[SPUStandardUpdaterController alloc] initWithStartingUpdater:YES updaterDelegate:nil userDriverDelegate:nil]; | ||
} | ||
return self; | ||
} | ||
|
||
|
||
+ (BOOL)requiresMainQueueSetup | ||
{ | ||
return YES; | ||
} | ||
|
||
|
||
RCT_EXPORT_METHOD(checkForUpdates) | ||
{ | ||
dispatch_async(dispatch_get_main_queue(), ^{ | ||
[[self->updateController updater] checkForUpdates]; | ||
}); | ||
} | ||
|
||
RCT_EXPORT_METHOD(getAutomaticallyChecksForUpdates:(RCTPromiseResolveBlock)resolve | ||
rejecter:(RCTPromiseRejectBlock)reject) | ||
{ | ||
resolve(@([[self->updateController updater] automaticallyChecksForUpdates])); | ||
} | ||
|
||
RCT_EXPORT_METHOD(setAutomaticallyChecksForUpdates:(BOOL)value) | ||
{ | ||
[[self->updateController updater] setAutomaticallyChecksForUpdates:value]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { NativeModule, NativeModules } from 'react-native'; | ||
|
||
type SparkleModuleType = NativeModule & { | ||
checkForUpdates: () => void; | ||
getAutomaticallyChecksForUpdates: () => Promise<boolean>; | ||
setAutomaticallyChecksForUpdates: (value: boolean) => void; | ||
}; | ||
|
||
const SparkleModule: SparkleModuleType = NativeModules.SparkleModule; | ||
|
||
export default { | ||
...SparkleModule, | ||
checkForUpdates: () => SparkleModule.checkForUpdates(), | ||
getAutomaticallyChecksForUpdates: () => SparkleModule.getAutomaticallyChecksForUpdates(), | ||
}; |
Oops, something went wrong.