0Pricing
Electron Desktop App Development · 课时

通过应用商店分发

探索将 Electron 应用提交到 Microsoft Store 或 Mac App Store 等官方应用商店的流程与要求

通过应用商店分发 是 CoddyKit 上的免费 Electron Desktop App Development 课时。 这是第 3 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Electron Desktop App Development 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Electron Desktop App Development 课程共包含 4 节课。

本课时的部分内容尚未翻译,以英文显示。

Why Use App Stores?

Distributing your Electron app through official app stores like the Microsoft Store or Mac App Store offers several benefits.

These include increased discoverability, enhanced user trust, and simplified updates for your users.

Universal App Store Needs

Before submitting to any app store, your Electron application needs to meet common requirements. These often include:

  • Code Signing: Ensures your app's authenticity and integrity.
  • Sandboxing: Limits your app's access to system resources for security.
  • Specific Package Formats: Stores require particular installer formats, like MSIX for Windows or a signed pkg for macOS.

Microsoft Store for Desktop

The Microsoft Store is a digital distribution platform for Windows apps. Submitting your Electron app here can reach a vast audience of Windows users.

The key requirement for the Microsoft Store is packaging your application into an MSIX format.

Packaging with MSIX

MSIX is a Windows app package format that provides a reliable way to deploy apps. Tools like electron-builder can automate this process for your Electron app.

You'll configure electron-builder in your package.json to specify MSIX details, like publisher identity.

Here's a simplified example:

{
  "name": "my-electron-app",
  "version": "1.0.0",
  "main": "main.js",
  "build": {
    "appId": "com.yourcompany.yourapp",
    "productName": "My Electron App",
    "msix": {
      "publisher": "CN=Your Publisher Name",
      "identity": {
        "publisher": "CN=Your Publisher Name"
      }
    }
  }
}

Microsoft Store Submission Steps

Once your MSIX package is ready, you'll use the Microsoft Partner Center to submit your app:

  • Register: Enroll in the Windows Developer Program.
  • Create Submission: Start a new app submission in Partner Center.
  • Upload Package: Upload your generated MSIX file.
  • Add Details: Provide app name, description, screenshots, pricing, age ratings, and availability.
  • Publish: Submit for review and eventual publication.

Mac App Store for Desktop

The Mac App Store (MAS) is Apple's platform for macOS apps. It has stricter security and sandboxing requirements compared to the Microsoft Store.

Distributing via MAS gives your app credibility and reach within the Apple ecosystem.

MAS Sandboxing Essentials

Sandboxing is mandatory for Mac App Store apps. It restricts what your app can do, limiting access to user files, network resources, and system functions unless explicitly granted.

This is a crucial security measure that prevents malicious apps from harming user data or the system.

Understanding MAS Entitlements

Entitlements are specific permissions that your sandboxed app needs to perform certain operations. They are declared in a special file (e.g., .entitlements) and embedded in your app.

Common entitlements include network access, access to user's Downloads folder, or camera/microphone access. You must only request what your app truly needs.

Example of an entitlement file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>com.apple.security.app-sandbox</key>
  <true/>
  <key>com.apple.security.network.client</key>
  <true/>
  <key>com.apple.security.files.user-selected.read-write</key>
  <true/>
</dict>
</plist>

Mac App Store Submission Steps

Submitting to the Mac App Store involves using Apple's App Store Connect and Transporter tool:

  • Apple Developer Program: Enroll and ensure your app is notarized (covered in a previous lesson).
  • App Store Connect: Create a new app record, providing metadata, pricing, and screenshots.
  • Upload Package: Use Xcode or the Transporter app to upload your signed and sandboxed pkg file.
  • Review: Apple reviews your app for compliance with their guidelines.
  • Release: Once approved, you can release your app.

App Store Distribution Check

It's vital to understand the key requirements for distributing your Electron app through official app stores.

App Stores: Key Takeaways

In this lesson, we explored how to distribute your Electron applications via the Microsoft Store and Mac App Store.

We covered the importance of specific packaging formats (MSIX for Windows, signed pkg for macOS), mandatory security features like sandboxing, and the role of entitlements for macOS apps.

Understanding these distinct processes is key to successfully reaching users through official channels.

常见问题解答

「通过应用商店分发」课时是免费的吗?

是的 — 「通过应用商店分发」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Electron Desktop App Development 课程的其余内容,请升级到 CoddyKit PRO。 Electron Desktop App Development 课程共包含 4 节课。

「通过应用商店分发」这节课中我会学到什么?

探索将 Electron 应用提交到 Microsoft Store 或 Mac App Store 等官方应用商店的流程与要求 你通过在浏览器中直接运行的动手代码来练习 Electron Desktop App Development,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 Electron Desktop App Development 需要有经验吗?

无需任何先前经验。CoddyKit 上的 Electron Desktop App Development 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 3 节课,共 4 节。

「通过应用商店分发」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 Electron Desktop App Development 课中编写并运行代码吗?

能。每节 Electron Desktop App Development 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. 跨平台打包
  2. 代码签名与公证
  3. 通过应用商店分发
  4. 使用 CI/CD 自动化发布
← 返回 Electron Desktop App Development