Task Objectives
- This Skill is used to: master the Cocos Creator multi-platform publishing process
- Capabilities include: platform build configuration, Web publishing, native platform publishing
- Trigger conditions: publishing games to various platforms
Overview
Cocos Creator supports publishing to multiple platforms, including Web (HTML5), iOS, Android, WeChat Mini Games, Douyin Mini Games, etc.
Publishing Process
General Steps
- Select "Project" -> "Build and Publish" from the menu bar
- Select the target platform
- Configure build parameters
- Execute the build
- Run or upload
Web Publishing
Build Configuration
- Orientation: Landscape/Portrait/Auto
- Resolution: Design resolution
- Debug Mode: Whether to enable debugging
Build
# 命令行构建
npm run build
Output
- web-mobile directory
- Contains index.html and game assets
iOS Publishing
Build Configuration
- App ID:Apple Developer ID
- Signing Certificate: Development/Release certificate
- Target Device: iPhone/iPad/Universal
Build Steps
- Open the built project in Xcode
- Configure the signing certificate
- Select the target device
- Archive and export
Android Publishing
Build Configuration
- Package Name:Bundle Identifier
- Version Information:versionCode/versionName
- Screen Orientation: Landscape/Portrait
Build Output
- APK(Debug/Release)
- AAB(Android App Bundle)
Mini Game Platforms
WeChat Mini Games
- Configure AppID
- Enable WeChat Developer Tools
- Upload for review
Douyin Mini Games
- Configure Douyin developer parameters
- Use Douyin Developer Tools
Build Configuration
Project Settings
- Feature Cropping: select the required modules
- Group Management: collision groups
- Custom Engine: if needed
Rendering Configuration
- 2D/3D Mode
- Rendering Backend: GLES3/GLES2/WebGL2/WebGL1
Asset Index
Necessary References
Precautions
Platform Differences
- API differences across platforms
- Pay attention to permission requests
- Platform-specific features
Performance Optimization
- Optimize for the target platform
- Set the resolution appropriately
- Compress assets