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

MacOS entitlements #318

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
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
99 changes: 50 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,55 +121,56 @@ jobs:
# .exe
# token: ${{ secrets.GITHUB_TOKEN }}

build_macOS:
name: Bluecherry Client macOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: recursive
- uses: subosito/flutter-action@v2.8.0
with:
channel: "stable"
architecture: x64
# cache: true

- name: Update Pods
working-directory: ./macos/
run: |
pod repo update
pod cache clean mdk
rm -rf /Pods
rm -rf /Podfile.lock

- run: flutter gen-l10n
- run: flutter pub get

- run: flutter build macos --verbose
- run: 7z a bluecherry-macos.7z build/macos/Build/Products/Release/unity.app
- name: Release
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-contexts
if: ${{ github.event_name == 'push' }}
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: false
body: ""
tag_name: "bleeding_edge"
files: |
bluecherry-macos.7z
token: ${{ secrets.GITHUB_TOKEN }}

- name: Release
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-contexts
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
bluecherry-macos.7z
token: ${{ secrets.GITHUB_TOKEN }}
# macOS build is now only available on the mac app store.
# build_macOS:
# name: Bluecherry Client macOS
# runs-on: macos-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# submodules: recursive
# - uses: subosito/flutter-action@v2.8.0
# with:
# channel: "stable"
# architecture: x64
# # cache: true

# - name: Update Pods
# working-directory: ./macos/
# run: |
# pod repo update
# pod cache clean mdk
# rm -rf /Pods
# rm -rf /Podfile.lock

# - run: flutter gen-l10n
# - run: flutter pub get

# - run: flutter build macos --verbose
# - run: 7z a bluecherry-macos.7z build/macos/Build/Products/Release/unity.app
# - name: Release
# # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-contexts
# if: ${{ github.event_name == 'push' }}
# uses: softprops/action-gh-release@v1
# with:
# draft: true
# prerelease: false
# body: ""
# tag_name: "bleeding_edge"
# files: |
# bluecherry-macos.7z
# token: ${{ secrets.GITHUB_TOKEN }}

# - name: Release
# # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-contexts
# if: startsWith(github.ref, 'refs/tags/')
# uses: softprops/action-gh-release@v1
# with:
# files: |
# bluecherry-macos.7z
# token: ${{ secrets.GITHUB_TOKEN }}

build_windows:
name: Bluecherry Client Windows
Expand Down
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,27 @@
<br /> $~~~~~$📱 For smaller screens, see multiple cameras in 2x3, 2x2, 2x1 or 1x1 view
<br /> $~~~~~$👆 Re-orgderable drag-and-drop camera viewer
<br /> $~~~~~$🛞 Cycle through different layout views automatically
- 🔎 Pinch-to-zoom fullscreen camera viewer.
- 🔎 Pinch-to-zoom fullscreen camera viewer
- 📹 Multicast streams support
- 🏃 Events List Viewer
- 🚡 Events Timeline Viewer
- 📸 Direct camera viewer.
- 🎮 **P**an-**T**ilt-**Z**oom controls for supported cameras.
- 🌓 Light & dark app theme.
- 📰 System camera event notifications.
- 🌓 Light & dark app theme
- 📰 System camera event notifications
- 📺 Adaptive and responsive design for larger screens
- 📱 Cross-platform
<br /> $~~~~$📱 Mobile: Android & iOS
<br /> $~~~~$🖥️ Desktop: Windows, Linux & MacOS
- 📦 Automatic updates

## Download

| Android | iOS | Windows | GNU/Linux | MacOS |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [arm64 `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-arm64-v8a-release.apk) | [App Store](https://apps.apple.com/us/app/bluecherry-mobile/id1555805139) | [Windows Setup](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-windows-setup.exe) | [SnapStore](https://snapcraft.io/bluecherry-client) | [Executable `.app`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-macos.7z) |
| [armabi `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-armeabi-v7a-release.apk) | | 🚧 **SOON** ~~`winget install bluecherry`~~ | [Ubuntu/Debian `.deb`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.deb) | 🚧 **SOON** ~~[App Store](https://github.com/bluecherrydvr/unity/issues/112)~~ |
| [x86_64 `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-x86_64-release.apk) | | 🚧 **SOON** ~~Microsoft Store~~ | [Raw Executable `.tar.gz`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.tar.gz) | |
| 🚧 **SOON** ~~Play Store~~ | | | [Fedora/Red Hat Linux `.rpm`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.rpm) | |
| Android | iOS | Windows | GNU/Linux | MacOS |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [arm64 `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-arm64-v8a-release.apk) | [App Store](https://apps.apple.com/us/app/bluecherry-mobile/id1555805139) | [Windows Setup](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-windows-setup.exe) | [SnapStore](https://snapcraft.io/bluecherry-client) | [App Store](https://apps.apple.com/us/app/bluecherry-mobile/id6474160553) |
| [armabi `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-armeabi-v7a-release.apk) | | 🚧 **SOON** ~~`winget install bluecherry`~~ | [Ubuntu/Debian `.deb`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.deb) | |
| [x86_64 `.apk`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-android-x86_64-release.apk) | | 🚧 **SOON** ~~Microsoft Store~~ | [Raw Executable `.tar.gz`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.tar.gz) | |
| 🚧 **SOON** ~~Play Store~~ | | | [Fedora/Red Hat Linux `.rpm`](https://github.com/bluecherrydvr/unity/releases/download/v3.0.0-beta22/bluecherry-linux-x86_64.rpm) | |

Or download the latest release [here](https://github.com/bluecherrydvr/unity/releases).
Or download the latest release [here](https://github.com/bluecherrydvr/unity/releases/tag/bleeding_edge)*.

### Installation

Expand Down
27 changes: 27 additions & 0 deletions ios/ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

# https://docs.flutter.dev/deployment/cd#post-clone-script
# Fail this script if any subcommand fails.
set -e

# The default execution directory of this script is the ci_scripts directory.
cd $CI_PRIMARY_REPOSITORY_PATH # change working directory to the root of your cloned repo.

# Install Flutter using git.
git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter
export PATH="$PATH:$HOME/flutter/bin"

# Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms.
flutter precache --ios

# Install Flutter dependencies.
flutter pub get

# Install CocoaPods using Homebrew.
HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates.
brew install cocoapods

# Install CocoaPods dependencies.
cd ios && pod install # run `pod install` in the `ios` directory.

exit 0
3 changes: 2 additions & 1 deletion lib/providers/layouts_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ class LayoutsProvider extends UnityProvider {
kStorageDesktopLockedLayouts: jsonEncode(
lockedLayouts.map((l) => l.name).toList(),
),
kStorageDesktopLayoutManagerHeight: layoutManagerHeight,
if (layoutManagerHeight != null)
kStorageDesktopLayoutManagerHeight: layoutManagerHeight,
});
super.save(notifyListeners: notifyListeners);
}
Expand Down
16 changes: 14 additions & 2 deletions lib/widgets/desktop_buttons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class _WindowButtonsState extends State<WindowButtons>
@override
void dispose() {
_animationController.dispose();
dismissOverlayEntry();
super.dispose();
}

Expand Down Expand Up @@ -405,9 +406,19 @@ class _WindowButtonsState extends State<WindowButtons>
width: double.infinity,
),
);
} else {
/// If not in immersive mode, return the bar directly.
///
/// The overlay is dismissed here because, if the overlay was not dismissed
/// when the immersive mode was enabled, the overlay would be shown on top
/// of the bar. It does nothing if the overlay is already dismissed.
return MouseRegion(
onExit: (_) {
dismissOverlayEntry();
},
child: bar,
);
}

return bar;
}

OverlayEntry? _overlayEntry;
Expand Down Expand Up @@ -452,6 +463,7 @@ class _WindowButtonsState extends State<WindowButtons>
}

Future<void> dismissOverlayEntry() async {
Tooltip.dismissAllToolTips();
await _animationController.reverse();
_overlayEntry?.remove();
_overlayEntry = null;
Expand Down
2 changes: 0 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import FlutterMacOS
import Foundation

import app_links

Check failure on line 8 in macos/Flutter/GeneratedPluginRegistrant.swift

View check run for this annotation

Xcode Cloud / unity | macOS | Build - macOS

macos/Flutter/GeneratedPluginRegistrant.swift#L8

No such module 'app_links'

Check failure on line 8 in macos/Flutter/GeneratedPluginRegistrant.swift

View check run for this annotation

Xcode Cloud / unity | macOS | Archive - macOS

macos/Flutter/GeneratedPluginRegistrant.swift#L8

No such module 'app_links'
import awesome_notifications
import connectivity_plus
import device_info_plus
Expand All @@ -14,7 +14,6 @@
import flutter_secure_storage_macos
import fvp
import local_auth_darwin
import media_kit_libs_macos_video
import media_kit_video
import package_info_plus
import path_provider_foundation
Expand All @@ -35,7 +34,6 @@
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
FvpPlugin.register(with: registry.registrar(forPlugin: "FvpPlugin"))
FLALocalAuthPlugin.register(with: registry.registrar(forPlugin: "FLALocalAuthPlugin"))
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
Expand Down
4 changes: 2 additions & 2 deletions macos/Flutter/ephemeral/Flutter-Generated.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
FLUTTER_ROOT=/Users/user249455/Documents/development/flutter
FLUTTER_APPLICATION_PATH=/Users/user249455/Documents/GitHub/unity
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib/main.dart
FLUTTER_TARGET=/Users/user249455/Documents/GitHub/unity/lib/main.dart
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=3.0.022
FLUTTER_BUILD_NUMBER=3.0.022
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=/Users/user249455/Documents/GitHub/unity/.dart_tool/package_config.json
4 changes: 2 additions & 2 deletions macos/Flutter/ephemeral/flutter_export_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
export "FLUTTER_ROOT=/Users/user249455/Documents/development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/user249455/Documents/GitHub/unity"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_TARGET=/Users/user249455/Documents/GitHub/unity/lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=3.0.022"
export "FLUTTER_BUILD_NUMBER=3.0.022"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=/Users/user249455/Documents/GitHub/unity/.dart_tool/package_config.json"
15 changes: 12 additions & 3 deletions macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -598,14 +598,17 @@
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 21;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Bluecherry;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bluecherrydvr;
MARKETING_VERSION = 3.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bluecherry.bluecherry;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
Expand Down Expand Up @@ -734,14 +737,17 @@
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 21;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Bluecherry;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bluecherrydvr;
MARKETING_VERSION = 3.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bluecherry.bluecherry;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand All @@ -757,14 +763,17 @@
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 21;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Bluecherry;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bluecherrydvr;
MARKETING_VERSION = 3.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bluecherry.bluecherry;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
Expand Down
2 changes: 1 addition & 1 deletion macos/Runner/DebugProfile.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<false/>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.network.client</key>
Expand Down
2 changes: 2 additions & 0 deletions macos/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.video</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion macos/Runner/Release.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<false/>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>keychain-access-groups</key>
Expand Down
30 changes: 30 additions & 0 deletions macos/ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

# https://docs.flutter.dev/deployment/cd#post-clone-script
# Fail this script if any subcommand fails.
set -e

# The default execution directory of this script is the ci_scripts directory.
cd $CI_PRIMARY_REPOSITORY_PATH # change working directory to the root of your cloned repo.

# Install Flutter using git.
git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter
export PATH="$PATH:$HOME/flutter/bin"

# Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms.
flutter precache --macos

# Install Flutter dependencies.
flutter pub get

# Install CocoaPods using Homebrew.
HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates.
brew install cocoapods

# Build for macos
flutter build macos

# Install CocoaPods dependencies.
cd macos && pod install # run `pod install` in the `macos` directory.

exit 0
Loading