From 4b026ab1abe907b6a4c201bee4ee07bdb3c9e6fa Mon Sep 17 00:00:00 2001 From: boyan Date: Mon, 28 Sep 2020 20:59:14 +0800 Subject: [PATCH] fix ios build error --- example/ios/Podfile.lock | 2 +- example/ios/Runner.xcodeproj/project.pbxproj | 11 ++++------- example/macos/Podfile.lock | 2 +- example/macos/Runner.xcodeproj/project.pbxproj | 4 ++-- example/pubspec.lock | 2 +- ios/Classes/include/system_clock.h | 0 macos/Classes/include/system_clock.h | 0 publish.sh | 0 pubspec.yaml | 2 +- tools/bin/publish.dart | 8 +++++++- 10 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 ios/Classes/include/system_clock.h create mode 100644 macos/Classes/include/system_clock.h mode change 100644 => 100755 publish.sh diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 1d600a8..57ab126 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -19,4 +19,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c -COCOAPODS: 1.9.3 +COCOAPODS: 1.10.0.beta.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 6f1dccd..e7194e9 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -225,15 +225,12 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_ROOT}/../Flutter/Flutter.framework", - "${BUILT_PRODUCTS_DIR}/system_clock/system_clock.framework", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/system_clock.framework", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock index 287f403..5188f60 100644 --- a/example/macos/Podfile.lock +++ b/example/macos/Podfile.lock @@ -19,4 +19,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: d8ba9b3e9e93c62c74a660b46c6fcb09f03991a7 -COCOAPODS: 1.9.3 +COCOAPODS: 1.10.0.beta.2 diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj index dcec215..24d7576 100644 --- a/example/macos/Runner.xcodeproj/project.pbxproj +++ b/example/macos/Runner.xcodeproj/project.pbxproj @@ -271,10 +271,10 @@ buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( + inputPaths = ( ); name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/example/pubspec.lock b/example/pubspec.lock index e6cf68e..e458481 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -127,7 +127,7 @@ packages: path: ".." relative: true source: path - version: "0.5.0" + version: "0.6.0" term_glyph: dependency: transitive description: diff --git a/ios/Classes/include/system_clock.h b/ios/Classes/include/system_clock.h new file mode 100644 index 0000000..e69de29 diff --git a/macos/Classes/include/system_clock.h b/macos/Classes/include/system_clock.h new file mode 100644 index 0000000..e69de29 diff --git a/publish.sh b/publish.sh old mode 100644 new mode 100755 diff --git a/pubspec.yaml b/pubspec.yaml index a51413f..039ff0c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: system_clock description: Flutter timekeeping facilities. Powered by ffi -version: 0.5.0 +version: 0.6.0 author: yangbinyhhbn@gmail.com homepage: https://github.com/boyan01/system_clock diff --git a/tools/bin/publish.dart b/tools/bin/publish.dart index 421160d..56e4258 100644 --- a/tools/bin/publish.dart +++ b/tools/bin/publish.dart @@ -65,7 +65,13 @@ extension on ProcessResult { } Future _publish(Directory dir) async { - final process = await Process.start("pwsh", ["-Command", "flutter", "pub", "publish"], workingDirectory: dir.path); + Process process; + if (Platform.isWindows) { + process = await Process.start("pwsh", ["-Command", "flutter", "pub", "publish"], workingDirectory: dir.path); + } else { + process = await Process.start("flutter", ["pub", "publish"], workingDirectory: dir.path); + } + process.stdin.addStream(stdin); stdout.addStream(process.stdout); stderr.addStream(process.stderr);