Google Play Store Approval Guide

When submitting browser extensions to the Google Play Store, you may encounter specific restrictions that can lead to rejection. This guide covers common issues and their solutions.

Remote Code Loading in Manifest V3

The Issue

Google Play Store prohibits Manifest V3 extensions from loading remotely hosted code. A common violation occurs when your extension bundle includes code that loads external scripts, such as the AppleID script from https://appleid.cdn-apple.com/.

Solution: Replacing Remote Loaders

To resolve this issue, you can configure your bundler to replace remote script loaders with local dummy files. Here’s how to implement this with Vite:

  1. First, create a dummy loader file:
// src/loadAppleId.js
"use client";

const loadAppleId = () => {};
export { loadAppleId };
  1. Configure Vite to alias the remote loader to your dummy file:
// vite.config.ts
import { defineConfig } from "vite";
import path from "path";

const replaceLoadAppleIdScriptWithCustomScriptPlugin = {
  name: "replace-loadAppleId",
  enforce: "pre",
  resolveId(source) {
    if (source.includes("loadAppleId")) {
      return path.resolve(__dirname, "src/loadAppleId.js");
    }
  },
} as const;

export default defineConfig({
  plugins: [react(), replaceLoadAppleIdScriptWithCustomScriptPlugin],
  // ... other config options
});

For a complete implementation example, check out our reference implementation.