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

iOS workflow support #587

Merged
merged 25 commits into from
Feb 10, 2024
Merged
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
49 changes: 48 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ jobs:
path: |
app/linwood-butterfly-linux.AppImage
build-flatpak:
name: Build flatpak
name: build-flatpak
runs-on: ubuntu-20.04
defaults:
run:
Expand Down Expand Up @@ -361,6 +361,48 @@ jobs:
name: macos-dmg
path: |
app/linwood-butterfly-macos.dmg

build-ipa:
fritzlb marked this conversation as resolved.
Show resolved Hide resolved
name: build-ipa (iOS)
runs-on: macos-latest
defaults:
run:
working-directory: app
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v4
- name: Get flutter version
run: |
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'master'
- name: 📦 Get dependencies
run: |
flutter clean
flutter pub get
flutter doctor -v
- name: 🏭 Build
run: |
flutter build ios --release --no-codesign -v
- name: Packing IPA
run: |
cd build/ios/iphoneos/
rm -rf Payload
mkdir Payload
cp -R Runner.app Payload/
rm -f linwood-butterfly-ios.ipa
zip -vr linwood-butterfly-ios.ipa Payload/
# ls -l linwood-butterfly-ios.ipa
- name: Archive
uses: actions/upload-artifact@v4
with:
name: ipa-build
path: app/build/ios/iphoneos/linwood-butterfly-ios.ipa
compression-level: 0 #ipa is already compressed

# build-snap:
# name: Build Snap
# runs-on: ubuntu-latest
Expand Down Expand Up @@ -393,6 +435,7 @@ jobs:
- build-linux
- build-flatpak
- build-macos
- build-ipa
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -446,6 +489,9 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: macos-dmg
- uses: actions/download-artifact@v4
with:
name: ipa-build
- name: 📦 Zip artifacts
run: |
zip -r linwood-butterfly-windows.zip windows-build/*
Expand Down Expand Up @@ -496,6 +542,7 @@ jobs:
linwood-butterfly-linux.AppImage
linwood-butterfly-macos.zip
linwood-butterfly-macos.dmg
linwood-butterfly-ios.ipa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
Expand Down
Binary file added app/images/logo1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 6 additions & 114 deletions app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,122 +1,14 @@
{
"images" : [
CodeDoctorDE marked this conversation as resolved.
Show resolved Hide resolved
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "[email protected]",
"scale" : "1x"
"filename" : "logo1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions app/ios/Runner/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
2 changes: 2 additions & 0 deletions docs/community/downloads/build-your-own.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ sidebar_position: 1
* `flutter build web`
* `flutter build linux`
* `flutter build windows`
* `flutter build ios --release --no-codesign`\
after that, create a folder named "Payload", copy Runner.app into it and zip the payload folder. Then rename ".zip" to ".ipa".
5. The compiled files are in the build directory
40 changes: 40 additions & 0 deletions docs/community/downloads/ios.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: "iOS"
sidebar_position: 6
---

![Nightly release version](https://img.shields.io/badge/dynamic/yaml?color=f7d28c&label=Nightly&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2FLinwoodDev%2Fbutterfly%2Fnightly%2Fapp%2Fpubspec.yaml&style=for-the-badge)

## Links
<div className="dropdown dropdown--hoverable margin--sm">
<button className="button button--outline button--danger button--lg">Nightly</button>
<ul className="dropdown__menu">
<li>
<DownloadButton className="dropdown__link" href="https://github.com/LinwoodDev/butterfly/releases/download/nightly/linwood-butterfly-ios.ipa">
IPA
</DownloadButton>
</li>
</ul>
</div>

Read more about the nightly version of Butterfly [here](/nightly).

## Installing

The IPA file we distribute is unsigned. This means you'll have to sign it yourself before being able to install it onto your iOS device. \
Fortunately, there are projects like [AltStore](https://altstore.io) (open source) or [sideloadly](https://sideloadly.io) (closed source). \
\
You do need an Apple ID for sideloading Butterfly. We recommend creating a new one especially for this purpose. Please log into [Apple Developer](https://developer.apple.com) at least once and accept their terms.
\
If your device is running iOS 16.0 or newer, enable developer mode in Settings/Privacy/Developer Mode.

## Installing (AltStore)
1. Set up AltStore using the instructions provided on the AltStore website.
2. Get a copy of the IPA file onto your device. The best way is to download it using a web browser or sending a zip file containing the IPA to yourself. Do not use Airdrop. Also, do not send the file directly to yourself. You might not be able to open it.
3. Open the IPA file, use the "share" menu and tap "AltStore". If your device is connected to your PC running AltServer (wired or wirelessly) it'll install automatically.

## Installing (Sideloadly)
1. Set up Sideloadly using the guides provided on sideloadly.io.
2. Open sideloadly on your PC.
3. Add the IPA in the top right corner, select your device and Apple ID. Click Start. The app will be installed onto your device.
If you get a popup saying a developer isn't trusted go to Settings/General/VPN and Device Management and change that.