Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,46 @@ name: Build & Test
on: [push]

jobs:
build_and_test:
runs-on: ubuntu-22.04
build_snap:
runs-on: ubuntu-24.04

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build
- name: Build Snap
id: snapcraft
uses: snapcore/action-build@v1

- uses: actions/upload-artifact@v4
- name: Upload Snap Artifact
uses: actions/upload-artifact@v4
with:
name: snap
path: ${{ steps.snapcraft.outputs.snap }}

build_flatpak:
runs-on: ubuntu-24.04
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-47
options: --privileged

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build Flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: icloud-for-linux.flatpak
manifest-path: flatpak/io.github.crossplatform.icloud-for-linux.yml
cache-key: flatpak-builder-${{ github.sha }}

- name: Upload Flatpak Artifact
uses: actions/upload-artifact@v4
with:
name: flatpak
path: icloud-for-linux.flatpak
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ add_executable(
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
find_package(PkgConfig REQUIRED)
pkg_check_modules (gtk3 REQUIRED gtk+-3.0 IMPORTED_TARGET)
pkg_check_modules (webkit2 REQUIRED webkit2gtk-4.0 IMPORTED_TARGET)

# Try webkit2gtk-4.1 first, then fallback to webkit2gtk-4.0
pkg_check_modules (webkit2 webkit2gtk-4.1 IMPORTED_TARGET)
if(NOT webkit2_FOUND)
pkg_check_modules (webkit2 REQUIRED webkit2gtk-4.0 IMPORTED_TARGET)
endif()

target_link_libraries (${PROJECT_NAME} PUBLIC pthread PkgConfig::gtk3 PkgConfig::webkit2)
else()
target_link_libraries(${PROJECT_NAME} "-framework WebKit")
Expand Down
78 changes: 78 additions & 0 deletions flatpak/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Flatpak Build Instructions

This directory contains the flatpak manifest for iCloud for Linux.

## Prerequisites

Install flatpak and flatpak-builder:
```bash
sudo apt install flatpak flatpak-builder # Debian/Ubuntu
sudo dnf install flatpak flatpak-builder # Fedora
```

Add Flathub repository:
```bash
flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
```

Install the required runtime and SDK:
```bash
flatpak install flathub org.gnome.Platform//49 org.gnome.Sdk//49
```

Install dependency
```bash
sudo apt install libwebkit2gtk-4.0-dev # Debian/Ubuntu 22
sudo apt install libwebkit2gtk-4.1-dev # Debian/Ubuntu 24
sudo dnf install webkit2gtk4.0-devel # Fedora prior 42
sudo dnf install webkit2gtk4.1-devel # Fedora 42
```

## Building

From the repository root, run:
```bash
flatpak-builder --force-clean build flatpak/io.github.crossplatform.icloud-for-linux.yml
```
If you are building in a development container, you may need to use `--disable-rofiles-fuse`

## Installing Locally

After building, install the flatpak locally:
```bash
flatpak-builder --user --install --force-clean build flatpak/io.github.crossplatform.icloud-for-linux.yml
```

## Running

After installation, you can launch the applications from your application menu, or via command line:
```bash
flatpak run io.github.crossplatform.icloud-for-linux
```

The flatpak installs multiple desktop entries for each iCloud service:
- iCloud Mail
- iCloud Contacts
- iCloud Calendar
- iCloud Photos
- iCloud Drive
- iCloud Notes
- iCloud Reminders
- iCloud Pages
- iCloud Numbers
- iCloud Keynote
- iCloud Find

## Uninstalling

```bash
flatpak uninstall io.github.crossplatform.icloud-for-linux
```

## Publishing to Flathub

To publish this application to Flathub:

1. Fork the [Flathub repository](https://github.com/flathub/flathub)
2. Submit the manifest as a pull request
3. Follow the [Flathub submission guidelines](https://docs.flathub.org/docs/for-app-authors/submission)
43 changes: 43 additions & 0 deletions flatpak/io.github.crossplatform.icloud-for-linux.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>io.github.crossplatform.icloud-for-linux</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>
<name>iCloud for Linux</name>
<summary>Access iCloud services on Linux</summary>
<description>
<p>
iCloud for Linux provides native access to various iCloud services including Mail,
Contacts, Calendar, Photos, Drive, Notes, Reminders, and iWork applications (Pages,
Numbers, Keynote) directly on your Linux desktop.
</p>
<p>
Each service runs as a separate application with its own window, giving you a native-like
experience for accessing your iCloud data.
</p>
</description>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.mail.desktop</launchable>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.contacts.desktop</launchable>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.calendar.desktop</launchable>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.photos.desktop</launchable>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.drive.desktop</launchable>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.notes.desktop</launchable>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.reminders.desktop</launchable>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.pages.desktop</launchable>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.numbers.desktop</launchable>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.keynote.desktop</launchable>
<launchable type="desktop-id">io.github.crossplatform.icloud-for-linux.find.desktop</launchable>
<screenshots>
<screenshot type="default">
<caption>iCloud Mail</caption>
</screenshot>
</screenshots>
<url type="homepage">https://github.com/cross-platform/icloud-for-linux</url>
<url type="bugtracker">https://github.com/cross-platform/icloud-for-linux/issues</url>
<content_rating type="oars-1.1">
<content_attribute id="social-info">intense</content_attribute>
</content_rating>
<releases>
<release version="0.26" date="2025-11-12"/>
</releases>
</component>
82 changes: 82 additions & 0 deletions flatpak/io.github.crossplatform.icloud-for-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
app-id: io.github.crossplatform.icloud-for-linux
runtime: org.gnome.Platform
runtime-version: '49'
sdk: org.gnome.Sdk
command: icloud-for-linux

finish-args:
# Network access
- --share=network
# X11 and Wayland
- --share=ipc
- --socket=x11
- --socket=wayland
# Graphics
- --device=dri
# Access to home directory
- --filesystem=home
# Pulseaudio for potential media playback
- --socket=pulseaudio
# Allow browser features
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.freedesktop.secrets
- --own-name=org.mpris.MediaPlayer2.icloud-for-linux

modules:
- name: icloud-for-linux
buildsystem: cmake
config-opts:
- -DCMAKE_BUILD_TYPE=Release
sources:
- type: dir
path: ..
post-install:
# Install metainfo
- install -Dm644 flatpak/io.github.crossplatform.icloud-for-linux.metainfo.xml /app/share/metainfo/io.github.crossplatform.icloud-for-linux.metainfo.xml
# Install desktop files
- install -Dm644 snap/gui/mail.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.mail.desktop
- install -Dm644 snap/gui/contacts.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.contacts.desktop
- install -Dm644 snap/gui/calendar.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.calendar.desktop
- install -Dm644 snap/gui/photos.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.photos.desktop
- install -Dm644 snap/gui/drive.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.drive.desktop
- install -Dm644 snap/gui/notes.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.notes.desktop
- install -Dm644 snap/gui/reminders.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.reminders.desktop
- install -Dm644 snap/gui/pages.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.pages.desktop
- install -Dm644 snap/gui/numbers.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.numbers.desktop
- install -Dm644 snap/gui/keynote.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.keynote.desktop
- install -Dm644 snap/gui/find.desktop /app/share/applications/io.github.crossplatform.icloud-for-linux.find.desktop
# Install icons
- install -Dm644 snap/gui/mail.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.mail.png
- install -Dm644 snap/gui/contacts.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.contacts.png
- install -Dm644 snap/gui/calendar.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.calendar.png
- install -Dm644 snap/gui/photos.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.photos.png
- install -Dm644 snap/gui/drive.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.drive.png
- install -Dm644 snap/gui/notes.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.notes.png
- install -Dm644 snap/gui/reminders.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.reminders.png
- install -Dm644 snap/gui/pages.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.pages.png
- install -Dm644 snap/gui/numbers.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.numbers.png
- install -Dm644 snap/gui/keynote.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.keynote.png
- install -Dm644 snap/gui/find.png /app/share/icons/hicolor/256x256/apps/io.github.crossplatform.icloud-for-linux.find.png
# Fix desktop file entries
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.mail|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.mail.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux mail Mail|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.mail.desktop
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.contacts|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.contacts.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux contacts Contacts|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.contacts.desktop
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.calendar|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.calendar.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux calendar Calendar|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.calendar.desktop
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.photos|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.photos.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux photos Photos|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.photos.desktop
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.drive|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.drive.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux iclouddrive Drive|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.drive.desktop
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.notes|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.notes.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux notes Notes|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.notes.desktop
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.reminders|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.reminders.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux reminders Reminders|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.reminders.desktop
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.pages|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.pages.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux pages Pages|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.pages.desktop
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.numbers|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.numbers.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux numbers Numbers|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.numbers.desktop
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.keynote|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.keynote.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux keynote Keynote|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.keynote.desktop
- sed -i 's|Icon=.*|Icon=io.github.crossplatform.icloud-for-linux.find|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.find.desktop
- sed -i 's|Exec=.*|Exec=icloud-for-linux find Find|g' /app/share/applications/io.github.crossplatform.icloud-for-linux.find.desktop