Skip to content

Commit b7fbe0c

Browse files
authored
macOS and iOS upload to App Store (GameTec-live#168)
1 parent 7d9a5ca commit b7fbe0c

File tree

18 files changed

+160
-43
lines changed

18 files changed

+160
-43
lines changed
File renamed without changes.

.github/workflows/publish-app.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,110 @@
7474
if: github.event_name != 'workflow_dispatch' || github.event.inputs.publish_track == ''
7575
run: fastlane production
7676
working-directory: "./chameleonultragui/"
77+
build-macos:
78+
runs-on: macos-latest
79+
env:
80+
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
81+
APP_STORE_CONNECT_KEY_IDENTIFIER: ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }}
82+
steps:
83+
- uses: actions/checkout@v3
84+
with:
85+
fetch-depth: 100
86+
- uses: subosito/flutter-action@v2
87+
with:
88+
flutter-version: '3.10.6' # https://github.com/flutter/flutter/issues/132725
89+
channel: 'any'
90+
- name: Enable macOS
91+
run: flutter config --enable-macos-desktop
92+
- name: Install tools
93+
run: brew install automake libtool create-dmg
94+
- name: Install Codemagic
95+
run: pip3 install codemagic-cli-tools
96+
- name: Export private key
97+
uses: mobiledevops/secret-to-file-action@v1
98+
with:
99+
base64-encoded-secret: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }}
100+
filename: "AuthKey.p8"
101+
working-directory: "./chameleonultragui"
102+
- name: Export certificate
103+
uses: mobiledevops/secret-to-file-action@v1
104+
with:
105+
base64-encoded-secret: ${{ secrets.APP_STORE_CERTIFICATE }}
106+
filename: "cert_key"
107+
working-directory: "./chameleonultragui"
108+
- name: Build and upload executable
109+
working-directory: "./chameleonultragui"
110+
run: |
111+
export APP_STORE_CONNECT_PRIVATE_KEY=`cat AuthKey.p8`
112+
app-store-connect fetch-signing-files run.chameleon.gui --platform MAC_OS --type MAC_APP_STORE --certificate-key=@file:cert_key --create
113+
app-store-connect list-certificates --type MAC_INSTALLER_DISTRIBUTION --certificate-key=@file:cert_key --save
114+
keychain initialize
115+
keychain add-certificates
116+
xcode-project use-profiles
117+
flutter build macos --release --build-number ${{ github.run_number }} --build-name "1.0.${{ github.run_number }}"
118+
APP_NAME=$(find $(pwd) -name "*.app")
119+
PACKAGE_NAME=$(basename "$APP_NAME" .app).pkg
120+
xcrun productbuild --component "$APP_NAME" /Applications/ unsigned.pkg
121+
INSTALLER_CERT_NAME=$(keychain list-certificates \
122+
| jq '[.[]
123+
| select(.common_name
124+
| contains("Mac Developer Installer"))
125+
| .common_name][0]' \
126+
| xargs)
127+
xcrun productsign --sign "$INSTALLER_CERT_NAME" unsigned.pkg "$PACKAGE_NAME"
128+
rm -f unsigned.pkg
129+
app-store-connect publish --path "$PACKAGE_NAME"
130+
while [[ -z "$BUILD_ID" ]]; do
131+
BUILD_ID=$(app-store-connect list-builds --build-version-number ${{ github.run_number }} --processing-state VALID | grep -B 7 "Min os version: 10.14" | awk '/^Id:/ {print $2}')
132+
if [[ -z "$BUILD_ID" ]]; then
133+
echo "Build is not ready, retrying in 5 seconds..."
134+
sleep 5
135+
fi
136+
done
137+
app-store-connect builds submit-to-app-store --cancel-previous-submissions --platform=MAC_OS --version-string="1.0.${{ github.run_number }}" --whats-new="Compiled from `git log --pretty=format:%s --oneline --ancestry-path HEAD~1..HEAD`" --version-string="1.0.${{ github.run_number }}" $BUILD_ID || true
138+
build-ios:
139+
runs-on: macos-latest
140+
env:
141+
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
142+
APP_STORE_CONNECT_KEY_IDENTIFIER: ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }}
143+
steps:
144+
- uses: actions/checkout@v3
145+
with:
146+
fetch-depth: 100
147+
- uses: subosito/flutter-action@v2
148+
with:
149+
channel: 'stable'
150+
- name: Install tools
151+
run: brew install automake libtool create-dmg
152+
- name: Install Codemagic
153+
run: pip3 install codemagic-cli-tools
154+
- name: Export private key
155+
uses: mobiledevops/secret-to-file-action@v1
156+
with:
157+
base64-encoded-secret: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }}
158+
filename: "AuthKey.p8"
159+
working-directory: "./chameleonultragui"
160+
- name: Export certificate
161+
uses: mobiledevops/secret-to-file-action@v1
162+
with:
163+
base64-encoded-secret: ${{ secrets.APP_STORE_CERTIFICATE }}
164+
filename: "cert_key"
165+
working-directory: "./chameleonultragui"
166+
- name: Build and upload executable
167+
working-directory: "./chameleonultragui"
168+
run: |
169+
export APP_STORE_CONNECT_PRIVATE_KEY=`cat AuthKey.p8`
170+
app-store-connect fetch-signing-files $(xcode-project detect-bundle-id) --platform IOS --type IOS_APP_STORE --certificate-key=@file:cert_key --create
171+
keychain initialize
172+
keychain add-certificates
173+
xcode-project use-profiles
174+
flutter build ipa --release --export-options-plist=$HOME/export_options.plist --build-number ${{ github.run_number }} --build-name "1.0.${{ github.run_number }}"
175+
app-store-connect publish --path $(find $(pwd) -name "*.ipa")
176+
while [[ -z "$BUILD_ID" ]]; do
177+
BUILD_ID=$(app-store-connect list-builds --build-version-number ${{ github.run_number }} --processing-state VALID | grep -B 7 "Min os version: 11.0" | awk '/^Id:/ {print $2}')
178+
if [[ -z "$BUILD_ID" ]]; then
179+
echo "Build is not ready, retrying in 30 seconds..."
180+
sleep 30
181+
fi
182+
done
183+
app-store-connect builds submit-to-app-store --cancel-previous-submissions --platform=IOS --version-string="1.0.${{ github.run_number }}" --whats-new="Compiled from `git log --pretty=format:%s --oneline --ancestry-path HEAD~1..HEAD`" --version-string="1.0.${{ github.run_number }}" $BUILD_ID || true

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Chameleon Ultra GUI
22
A GUI for the Chameleon Ultra/Chameleon Lite written in Flutter for cross platform operation
33

4-
[![Autobuild](https://github.com/GameTec-live/ChameleonUltraGUI/actions/workflows/buildapp.yml/badge.svg)](https://github.com/GameTec-live/ChameleonUltraGUI/actions/workflows/buildapp.yml)
4+
[![Auto build](https://github.com/GameTec-live/ChameleonUltraGUI/actions/workflows/buildapp.yml/badge.svg)](https://github.com/GameTec-live/ChameleonUltraGUI/actions/workflows/buildapp.yml)
55
[![Open collective](https://opencollective.com/chameleon-ultra-gui/tiers/badge.svg)](https://opencollective.com/chameleon-ultra-gui#support)
66

77
## Installation
@@ -10,7 +10,7 @@ You can download the latest builds from GitHub Actions [here](https://github.com
1010
App available in those stores:
1111
- Google Play: https://play.google.com/store/apps/details?id=io.chameleon.ultra
1212
- F-Store: not yet
13-
- App Store: not yet
13+
- App Store: https://apps.apple.com/app/chameleon-ultra-gui/id6462919364 (macOS only)
1414
- Arch Linux (AUR): not yet
1515
- Flathub: not yet
1616
- Chocolatey (Windows): not yet
@@ -47,15 +47,6 @@ If you want to collaborate by adding your language to the application, you can d
4747
![Read Card Page](/screenshots/7.png)
4848
![Read Card Page Mifare Classic](/screenshots/8.png)
4949

50-
<details>
51-
<summary>Mac and IOS</summary>
52-
53-
### Mac and IOS
54-
Why are there no macOS and iOS builds?
55-
56-
We are pending Proxgrid permission to use Chameleon Ultra name to complete app review in App Store. This might take ~1 week, we hope apps will be published at start of September.
57-
</details>
58-
5950
## Donate
6051
You want to support us and donate? Thank you, you make it possible for us to keep this app free and make it easier to publish this app on the Apple App Store.
6152

chameleonultragui/android/app/src/profile/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.chameleonultragui">
2+
package="io.chameleon.gui">
33
<!-- The INTERNET permission is required for development. Specifically,
44
the Flutter tool needs it to communicate with the running application
55
to allow setting breakpoints, to provide hot reload, etc.

chameleonultragui/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -356,16 +356,19 @@
356356
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
357357
buildSettings = {
358358
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
359+
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
359360
CLANG_ENABLE_MODULES = YES;
360361
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
361-
DEVELOPMENT_TEAM = P2523ZA3C9;
362+
DEVELOPMENT_TEAM = 3C55G8H34S;
362363
ENABLE_BITCODE = NO;
363364
INFOPLIST_FILE = Runner/Info.plist;
365+
INFOPLIST_KEY_CFBundleDisplayName = "CU GUI";
366+
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
364367
LD_RUNPATH_SEARCH_PATHS = (
365368
"$(inherited)",
366369
"@executable_path/Frameworks",
367370
);
368-
PRODUCT_BUNDLE_IDENTIFIER = dev.chumleon.internal.chameleonultragui;
371+
PRODUCT_BUNDLE_IDENTIFIER = run.chameleon.gui;
369372
PRODUCT_NAME = "$(TARGET_NAME)";
370373
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
371374
SWIFT_VERSION = 5.0;
@@ -485,16 +488,19 @@
485488
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
486489
buildSettings = {
487490
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
491+
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
488492
CLANG_ENABLE_MODULES = YES;
489493
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
490-
DEVELOPMENT_TEAM = P2523ZA3C9;
494+
DEVELOPMENT_TEAM = 3C55G8H34S;
491495
ENABLE_BITCODE = NO;
492496
INFOPLIST_FILE = Runner/Info.plist;
497+
INFOPLIST_KEY_CFBundleDisplayName = "CU GUI";
498+
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
493499
LD_RUNPATH_SEARCH_PATHS = (
494500
"$(inherited)",
495501
"@executable_path/Frameworks",
496502
);
497-
PRODUCT_BUNDLE_IDENTIFIER = dev.chumleon.internal.chameleonultragui;
503+
PRODUCT_BUNDLE_IDENTIFIER = run.chameleon.gui;
498504
PRODUCT_NAME = "$(TARGET_NAME)";
499505
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
500506
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -508,16 +514,19 @@
508514
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
509515
buildSettings = {
510516
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
517+
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
511518
CLANG_ENABLE_MODULES = YES;
512519
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
513-
DEVELOPMENT_TEAM = P2523ZA3C9;
520+
DEVELOPMENT_TEAM = 3C55G8H34S;
514521
ENABLE_BITCODE = NO;
515522
INFOPLIST_FILE = Runner/Info.plist;
523+
INFOPLIST_KEY_CFBundleDisplayName = "CU GUI";
524+
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
516525
LD_RUNPATH_SEARCH_PATHS = (
517526
"$(inherited)",
518527
"@executable_path/Frameworks",
519528
);
520-
PRODUCT_BUNDLE_IDENTIFIER = dev.chumleon.internal.chameleonultragui;
529+
PRODUCT_BUNDLE_IDENTIFIER = run.chameleon.gui;
521530
PRODUCT_NAME = "$(TARGET_NAME)";
522531
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
523532
SWIFT_VERSION = 5.0;
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"images" : [
33
{
4+
"filename" : "logo 2.png",
45
"idiom" : "universal",
5-
"filename" : "LaunchImage.png",
66
"scale" : "1x"
77
},
88
{
9+
"filename" : "logo.png",
910
"idiom" : "universal",
10-
"filename" : "[email protected]",
1111
"scale" : "2x"
1212
},
1313
{
14+
"filename" : "logo 1.png",
1415
"idiom" : "universal",
15-
"filename" : "[email protected]",
1616
"scale" : "3x"
1717
}
1818
],
1919
"info" : {
20-
"version" : 1,
21-
"author" : "xcode"
20+
"author" : "xcode",
21+
"version" : 1
2222
}
2323
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading
Loading

chameleonultragui/ios/Runner/Base.lproj/LaunchScreen.storyboard

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
34
<dependencies>
45
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
7+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
68
</dependencies>
79
<scenes>
810
<!--View Controller-->
@@ -14,9 +16,11 @@
1416
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
1517
</layoutGuides>
1618
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
19+
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
1720
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1821
<subviews>
19-
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
22+
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
23+
<rect key="frame" x="-380" y="-38" width="1080.333333333333" height="1080"/>
2024
</imageView>
2125
</subviews>
2226
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -28,10 +32,10 @@
2832
</viewController>
2933
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
3034
</objects>
31-
<point key="canvasLocation" x="53" y="375"/>
35+
<point key="canvasLocation" x="80.916030534351137" y="264.08450704225356"/>
3236
</scene>
3337
</scenes>
3438
<resources>
35-
<image name="LaunchImage" width="168" height="185"/>
39+
<image name="LaunchImage" width="1080" height="1080"/>
3640
</resources>
3741
</document>

chameleonultragui/ios/Runner/Info.plist

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,38 @@
2424
<string>????</string>
2525
<key>CFBundleVersion</key>
2626
<string>$(FLUTTER_BUILD_NUMBER)</string>
27+
<key>ITSAppUsesNonExemptEncryption</key>
28+
<false/>
29+
<key>LSApplicationCategoryType</key>
30+
<string>public.app-category.utilities</string>
2731
<key>LSRequiresIPhoneOS</key>
2832
<true/>
2933
<key>NSBluetoothAlwaysUsageDescription</key>
30-
<string>Need BLE permission</string>
34+
<string>Need BLE permission to connect to Chameleon</string>
3135
<key>NSBluetoothPeripheralUsageDescription</key>
32-
<string>Need BLE permission</string>
36+
<string>Need BLE permission to connect to Chameleon</string>
3337
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
3438
<string>Need Location permission</string>
3539
<key>NSLocationAlwaysUsageDescription</key>
3640
<string>Need Location permission</string>
3741
<key>NSLocationWhenInUseUsageDescription</key>
3842
<string>Need Location permission</string>
43+
<key>NSPhotoLibraryUsageDescription</key>
44+
<string>Need Photo Library access</string>
3945
<key>UIApplicationSupportsIndirectInputEvents</key>
4046
<true/>
4147
<key>UILaunchStoryboardName</key>
4248
<string>LaunchScreen</string>
4349
<key>UIMainStoryboardFile</key>
4450
<string>Main</string>
51+
<key>UIStatusBarStyle</key>
52+
<string></string>
4553
<key>UISupportedInterfaceOrientations</key>
4654
<array>
47-
<string>UIInterfaceOrientationPortrait</string>
4855
<string>UIInterfaceOrientationLandscapeLeft</string>
4956
<string>UIInterfaceOrientationLandscapeRight</string>
50-
</array>
51-
<key>UISupportedInterfaceOrientations~ipad</key>
52-
<array>
5357
<string>UIInterfaceOrientationPortrait</string>
5458
<string>UIInterfaceOrientationPortraitUpsideDown</string>
55-
<string>UIInterfaceOrientationLandscapeLeft</string>
56-
<string>UIInterfaceOrientationLandscapeRight</string>
5759
</array>
5860
<key>UIViewControllerBasedStatusBarAppearance</key>
5961
<false/>

chameleonultragui/linux/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project(runner LANGUAGES CXX)
77
set(BINARY_NAME "chameleonultragui")
88
# The unique GTK application identifier for this application. See:
99
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
10-
set(APPLICATION_ID "com.example.chameleonultragui")
10+
set(APPLICATION_ID "run.chameleon.gui")
1111

1212
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
1313
# versions of CMake.

chameleonultragui/macos/Runner/Configs/AppInfo.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
PRODUCT_NAME = Chameleon Ultra GUI
99

1010
// The application's bundle identifier
11-
PRODUCT_BUNDLE_IDENTIFIER = com.example.chameleonultragui
11+
PRODUCT_BUNDLE_IDENTIFIER = run.chameleon.gui
1212

1313
// The copyright displayed in application information
14-
PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved.
14+
PRODUCT_COPYRIGHT = Copyright © 2023 Chameleon Development. All rights reserved.

chameleonultragui/macos/Runner/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,9 @@
2828
<string>MainMenu</string>
2929
<key>NSPrincipalClass</key>
3030
<string>NSApplication</string>
31+
<key>LSApplicationCategoryType</key>
32+
<string>public.app-category.utilities</string>
33+
<key>ITSAppUsesNonExemptEncryption</key>
34+
<false/>
3135
</dict>
3236
</plist>

chameleonultragui/windows/runner/Runner.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ BEGIN
8989
BEGIN
9090
BLOCK "040904e4"
9191
BEGIN
92-
VALUE "CompanyName", "com.example" "\0"
93-
VALUE "FileDescription", "chameleonultragui" "\0"
92+
VALUE "CompanyName", "Chameleon Development" "\0"
93+
VALUE "FileDescription", "Chameleon Ultra GUI app" "\0"
9494
VALUE "FileVersion", VERSION_AS_STRING "\0"
9595
VALUE "InternalName", "chameleonultragui" "\0"
96-
VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0"
96+
VALUE "LegalCopyright", "Copyright (C) 2023 Chameleon Development. All rights reserved." "\0"
9797
VALUE "OriginalFilename", "chameleonultragui.exe" "\0"
9898
VALUE "ProductName", "chameleonultragui" "\0"
9999
VALUE "ProductVersion", VERSION_AS_STRING "\0"

0 commit comments

Comments
 (0)