Preflight checklist
Component
packages/sparkling-sdk
Problem statement
With the official release and rapid adoption of HarmonyOS NEXT (pure HarmonyOS), Huawei devices are experiencing significant market growth in China. Currently, Sparkling only supports iOS and Android platforms, which prevents coverage of HarmonyOS users and limits the market reach of cross-platform applications built with Sparkling.
Why this feature is important:
- Market Demand: HarmonyOS NEXT has removed Android compatibility layer and adopted a completely new HarmonyOS kernel with ArkTS technology stack, making it impossible to run Android apps directly
- User Coverage: Huawei devices hold a significant market share in China, especially in enterprise and government sectors
- Ecosystem Completeness: Supporting three major mobile platforms (iOS/Android/HarmonyOS) as a cross-platform framework will significantly enhance competitiveness
- First-Mover Advantage: Cross-platform frameworks' support for HarmonyOS is still in early stages; timely positioning helps establish technical barriers
Proposed solution
Add HarmonyOS platform support to packages/sparkling-sdk, following the same architecture pattern as iOS and Android:
Key Changes:
-
New HarmonyOS SDK module (packages/sparkling-sdk/harmonyos/)
- Implement
SPKRouter for navigation management using HarmonyOS Navigation component
- Create
SPKContainerView to host Lynx runtime
- Port scheme parameter parsing and configuration system
-
Navigation API (consistent with existing platforms)
// TypeScript layer - no changes needed
import { navigate, close } from 'sparkling-navigation'
navigate({
path: 'pages/detail.lynx.bundle',
options: { params: { title: 'Detail', itemId: '123' } }
})
close()
-
CLI Support
npx create-sparkling-app my-app --platforms ios,android,harmonyos
npx sparkling build --platform harmonyos
-
Lynx Integration
- Integrate Lynx HarmonyOS SDK (if available)
- Use XComponent or custom ArkUI component for rendering
- Implement JS Bridge for native communication
The implementation would mirror the existing iOS/Android structure, reusing the TypeScript layer and adapting only the platform-specific native code.
Alternatives considered
No response
Additional context
No response
Contribution
Preflight checklist
Component
packages/sparkling-sdk
Problem statement
With the official release and rapid adoption of HarmonyOS NEXT (pure HarmonyOS), Huawei devices are experiencing significant market growth in China. Currently, Sparkling only supports iOS and Android platforms, which prevents coverage of HarmonyOS users and limits the market reach of cross-platform applications built with Sparkling.
Why this feature is important:
Proposed solution
Add HarmonyOS platform support to
packages/sparkling-sdk, following the same architecture pattern as iOS and Android:Key Changes:
New HarmonyOS SDK module (
packages/sparkling-sdk/harmonyos/)SPKRouterfor navigation management using HarmonyOS Navigation componentSPKContainerViewto host Lynx runtimeNavigation API (consistent with existing platforms)
CLI Support
Lynx Integration
The implementation would mirror the existing iOS/Android structure, reusing the TypeScript layer and adapting only the platform-specific native code.
Alternatives considered
No response
Additional context
No response
Contribution