Skip to content
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
14 changes: 6 additions & 8 deletions .github/workflows/tests_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ on:

jobs:
e2e:
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle
key: gradle-android
- uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd
key: avd-android
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
- uses: android-actions/setup-android@v2
- uses: subosito/flutter-action@main
with:
Expand All @@ -38,18 +38,16 @@ jobs:
- if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
api-level: 30
avd-name: PhoneAPI30
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
api-level: 30
avd-name: PhoneAPI30
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ on:

jobs:
e2e:
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: futureware-tech/simulator-action@v1
with:
model: "iPhone 12 mini"
model: "iPhone 14 Plus"
- uses: actions/checkout@v3
- uses: subosito/flutter-action@main
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
e2e:
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@main
Expand Down
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
.DS_Store
.dart_tool/

.packages
.pub/
doc/
.vscode/

build/


.idea/
*._*
.flutter*

# Packages should not commit the "pubspec.lock" file.
#
# See https://dart.dev/guides/libraries/private-files#pubspeclock
/pubspec.lock
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 3.6.1

- Fixed macOS podspec issue when signing apps
- Updated binaries to v1.8.2

## 3.6.0

- Updated binaries to v1.8.1
Expand Down
2 changes: 1 addition & 1 deletion example/macos/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :osx, '10.11'
platform :osx, '10.14'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
8 changes: 4 additions & 4 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/openpgp/macos

SPEC CHECKSUMS:
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
openpgp: a381edf38bbb0400ff4bab189b935fed0401788f
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
openpgp: 74f1193a4edb7b732b71576beca8d5bd3783a1b8

PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7

COCOAPODS: 1.10.1
COCOAPODS: 1.12.1
13 changes: 8 additions & 5 deletions example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXAggregateTarget section */
Expand Down Expand Up @@ -203,7 +203,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Flutter Authors";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
Expand Down Expand Up @@ -261,10 +261,12 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../Flutter/ephemeral/.symlinks/plugins/openpgp/macos/libopenpgp_bridge.dylib",
"${BUILT_PRODUCTS_DIR}/openpgp/openpgp.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libopenpgp_bridge.dylib",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openpgp.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -274,6 +276,7 @@
};
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -405,7 +408,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down Expand Up @@ -488,7 +491,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -535,7 +538,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ packages:
path: ".."
relative: true
source: path
version: "3.6.0"
version: "3.6.1"
package_config:
dependency: transitive
description:
Expand Down
Binary file modified ios/libopenpgp_bridge.a
Binary file not shown.
18 changes: 15 additions & 3 deletions lib/bridge/binding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import 'package:path/path.dart' as Path;
class Binding {
static final String _callFuncName = 'OpenPGPBridgeCall';
static final String _libraryName = 'libopenpgp_bridge';
static final String _packageName = 'openpgp';
static final Binding _singleton = Binding._internal();

late ffi.DynamicLibrary _library;
Expand Down Expand Up @@ -117,13 +116,26 @@ class Binding {
}
}

Directory _findAppDirectory(Directory directory) {
try {
return directory
.listSync(recursive: false, followLinks: false)
.whereType<Directory>()
.firstWhere((dir) => dir.path.endsWith('.app'));
} catch (e) {
return directory;
}
}

ffi.DynamicLibrary openLib() {
var isFlutterTest = Platform.environment.containsKey('FLUTTER_TEST');

if (Platform.isMacOS || Platform.isIOS) {
if (isFlutterTest) {
var ffiFile =
'build/macos/Build/Products/Debug/$_packageName/$_packageName.framework/Resources/$_libraryName.dylib';
final appDirectory =
_findAppDirectory(Directory('build/macos/Build/Products/Debug'));
var ffiFile = Path.join(
appDirectory.path, "Contents", "Frameworks", "$_libraryName.dylib");
validateTestFFIFile(ffiFile);
return ffi.DynamicLibrary.open(ffiFile);
}
Expand Down
Binary file modified macos/libopenpgp_bridge.dylib
Binary file not shown.
7 changes: 3 additions & 4 deletions macos/openpgp.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ library for use OpenPGP.
s.platform = :osx, '10.11'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.swift_version = '5.0'
#s.vendored_libraries = 'libopenpgp_bridge.dylib'
s.resources = ['libopenpgp_bridge.dylib']
s.xcconfig = { 'LD_RUNPATH_SEARCH_PATHS' => '@loader_path/../Frameworks/openpgp.framework/Resources' }

s.preserve_paths = 'libopenpgp_bridge.dylib'
s.vendored_libraries = 'libopenpgp_bridge.dylib'
s.xcconfig = { 'LD_RUNPATH_SEARCH_PATHS' => '@loader_path/../Frameworks' }
end
Loading