SuperAPI AI Directory

cocos-publish

Coding & development

View repository

Updated 10-16 01:19

About this skill

Cocos Creator 3.8 Publishing Cross-Platform Games

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

  1. Select "Project" -> "Build and Publish" from the menu bar
  2. Select the target platform
  3. Configure build parameters
  4. Execute the build
  5. 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

  1. Open the built project in Xcode
  2. Configure the signing certificate
  3. Select the target device
  4. 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