From 6e72a07ac6d06578aabd0c7955f46a068092573a Mon Sep 17 00:00:00 2001 From: luomy Date: Mon, 3 Jul 2023 17:27:36 +0800 Subject: [PATCH 1/3] chore(ios): add pod spec lint workflow file --- .github/workflows/pod_spec_lint.yml | 32 ++++++++++++++++++++++ .github/workflows/pod_spec_lint_bypass.yml | 32 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/pod_spec_lint.yml create mode 100644 .github/workflows/pod_spec_lint_bypass.yml diff --git a/.github/workflows/pod_spec_lint.yml b/.github/workflows/pod_spec_lint.yml new file mode 100644 index 00000000000..50adfe4ec78 --- /dev/null +++ b/.github/workflows/pod_spec_lint.yml @@ -0,0 +1,32 @@ +name: '[pods] pod spec lint' + +on: + pull_request: + branches: + - main + paths: + - 'framework/ios/**' + - 'framework/examples/ios-demo/**' + - 'driver/js/src/**' + - 'driver/js/include/**' + - 'dom/include/**' + - 'dom/src/**' + - 'layout/engine/**' + - 'modules/ios/**' + - 'modules/footstone/**' + - 'modules/vfs/ios/**' + - 'modules/vfs/native/**' + - 'renderer/native/ios/**' + - 'devtools/devtools-backend/**' + +jobs: + ios_build_tests: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + lfs: true + - name: Pod_Spec_Lint + run: | + pod spec lint hippy.podspec --allow-warnings --use-libraries --verbose --skip-import-validation diff --git a/.github/workflows/pod_spec_lint_bypass.yml b/.github/workflows/pod_spec_lint_bypass.yml new file mode 100644 index 00000000000..068a42c172a --- /dev/null +++ b/.github/workflows/pod_spec_lint_bypass.yml @@ -0,0 +1,32 @@ +name: '[pods] pod spec lint' + +on: + pull_request: + branches: + - main + paths-ignore: + - 'framework/ios/**' + - 'framework/examples/ios-demo/**' + - 'driver/js/src/**' + - 'driver/js/include/**' + - 'dom/include/**' + - 'dom/src/**' + - 'layout/engine/**' + - 'modules/ios/**' + - 'modules/footstone/**' + - 'modules/vfs/ios/**' + - 'modules/vfs/native/**' + - 'renderer/native/ios/**' + - 'devtools/devtools-backend/**' + +jobs: + ios_build_tests: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + lfs: true + - name: Pod_Spec_Lint_Bypass + run: | + echo "No Pod Spec Lint required" From a802e22f87806d24cc7103d0d0cb82506a14deb5 Mon Sep 17 00:00:00 2001 From: luomy Date: Mon, 3 Jul 2023 18:12:06 +0800 Subject: [PATCH 2/3] fix(ios): remove the semicolon after namespace syntax --- .github/workflows/pod_spec_lint.yml | 4 ++-- .github/workflows/pod_spec_lint_bypass.yml | 2 +- driver/js/include/driver/vm/js_vm.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pod_spec_lint.yml b/.github/workflows/pod_spec_lint.yml index 50adfe4ec78..a169f9dee17 100644 --- a/.github/workflows/pod_spec_lint.yml +++ b/.github/workflows/pod_spec_lint.yml @@ -20,13 +20,13 @@ on: - 'devtools/devtools-backend/**' jobs: - ios_build_tests: + pod_spec_lint: runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v3 with: lfs: true - - name: Pod_Spec_Lint + - name: Pod Spec Lint run: | pod spec lint hippy.podspec --allow-warnings --use-libraries --verbose --skip-import-validation diff --git a/.github/workflows/pod_spec_lint_bypass.yml b/.github/workflows/pod_spec_lint_bypass.yml index 068a42c172a..4d7b056cba8 100644 --- a/.github/workflows/pod_spec_lint_bypass.yml +++ b/.github/workflows/pod_spec_lint_bypass.yml @@ -20,7 +20,7 @@ on: - 'devtools/devtools-backend/**' jobs: - ios_build_tests: + pod_spec_lint: runs-on: macos-latest steps: - name: Checkout diff --git a/driver/js/include/driver/vm/js_vm.h b/driver/js/include/driver/vm/js_vm.h index 7a4353b605b..318b029f4ef 100644 --- a/driver/js/include/driver/vm/js_vm.h +++ b/driver/js/include/driver/vm/js_vm.h @@ -29,9 +29,9 @@ namespace hippy { #ifdef ENABLE_INSPECTOR -namespace devtools{ +namespace devtools { class DevtoolsDataSource; -}; +} #endif inline namespace driver { inline namespace vm { From f261ef0a6345f885d89f5e1b3994fdae665c37db Mon Sep 17 00:00:00 2001 From: henryjin0511 <443836568@qq.com> Date: Mon, 3 Jul 2023 19:47:16 +0800 Subject: [PATCH 3/3] feat(voltron): update workflow xcode version --- .github/workflows/voltron_build_tests.yml | 4 +++- .../voltron/core/src/bridge/ios/VoltronJSCExecutor.mm | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/voltron_build_tests.yml b/.github/workflows/voltron_build_tests.yml index 268d1650460..3a7d28fb876 100644 --- a/.github/workflows/voltron_build_tests.yml +++ b/.github/workflows/voltron_build_tests.yml @@ -91,7 +91,7 @@ jobs: working-directory: framework/voltron voltron_ios_flutter_build: - runs-on: macos-latest + runs-on: macos-13 steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 @@ -103,3 +103,5 @@ jobs: run: flutter pub get - name: Build for iOS run: flutter build ios --release --no-codesign + env: + DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer diff --git a/framework/voltron/core/src/bridge/ios/VoltronJSCExecutor.mm b/framework/voltron/core/src/bridge/ios/VoltronJSCExecutor.mm index 8109813d0a8..905d6fd8c93 100644 --- a/framework/voltron/core/src/bridge/ios/VoltronJSCExecutor.mm +++ b/framework/voltron/core/src/bridge/ios/VoltronJSCExecutor.mm @@ -199,11 +199,11 @@ - (void)setup { std::shared_ptr context = std::static_pointer_cast(scope->GetContext()); JSContext *jsContext = [JSContext contextWithJSGlobalContextRef:context->GetCtxRef()]; -// #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_16_2 -// if (@available(iOS 16.4, *)) { -// jsContext.inspectable = true; -// } -// #endif + #if defined(__IPHONE_16_4) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_16_4 + if (@available(iOS 16.4, *)) { + jsContext.inspectable = true; + } + #endif auto global_object = context->GetGlobalObject(); auto user_global_object_key = context->CreateString(kGlobalKey); context->SetProperty(global_object, user_global_object_key, global_object);