Skip to content

Commit 9697d54

Browse files
committed
Initial commit.
1 parent 7e4f946 commit 9697d54

File tree

6 files changed

+2262
-2
lines changed

6 files changed

+2262
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/dist/
2+
/node_modules/
3+
.DS_Store
4+
config.gypi

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
# icloud-pc
2-
View your iCloud notes, reminders and more in a native Windows application.
1+
# iCloud for PC
2+
3+
View your iCloud notes, reminders, and anything else available on [icloud.com](https://www.icloud.com/) in a native Windows application.
4+
5+
## Setup
6+
1) [Download](https://github.com/MaxMaeder/icloud-pc/releases) and run the iCloud for PC installer
7+
2) Sign in to your iCloud account
8+
3) Enjoy!
9+
10+
## Doesn't Apple have an official iCloud client for Windows?
11+
Yes, but the official iCloud client is only meant for managing your iCloud Drive, Photos, and Bookmarks.

icon.png

3.82 KB
Loading

main.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
const electron = require('electron')
2+
3+
// Initialise application
4+
electron.app.whenReady().then(function() {
5+
6+
// Create a new window
7+
var window = new electron.BrowserWindow({
8+
width: 1000,
9+
height: 1000,
10+
webPreferences: {
11+
nativeWindowOpen: true
12+
}
13+
});
14+
15+
// Specify user agent so "download iCloud for Windows" banner doesn't appear
16+
electron.session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {
17+
details.requestHeaders['User-Agent'] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15";
18+
callback({
19+
cancel: false,
20+
requestHeaders: details.requestHeaders
21+
});
22+
});
23+
24+
// Hide default top menu
25+
window.setMenu(null);
26+
27+
// Make links set to open a new tab and window.open() open in the default browser instead of a new application window
28+
window.webContents.on("new-window", function(event, url) {
29+
event.preventDefault();
30+
31+
if (url !== "about:blank#blocked") electron.shell.openExternal(url);
32+
});
33+
34+
// Load the iCloud notes page
35+
window.loadURL("https://www.icloud.com");
36+
});
37+
38+
// Quit when all windows closed
39+
electron.app.on('window-all-closed', function() {
40+
electron.app.quit();
41+
});

0 commit comments

Comments
 (0)