What Expo is today · senior
Writing a config plugin
A config plugin is a synchronous function (config, props) => config, named with<Feature>, that changes the generated native project during prebuild through mods such as withInfoPlist or withAndroidManifest, and it must give the same result when it runs more than once.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Shape: const withMySdk = (config, { apiKey }) => withInfoPlist(config, c => { c.modResults.MySdkKey = apiKey; return c; }); listed in app.json "plugins": [["./plugins/withMySdk", { "apiKey": "…" }]]. Plugins run in order.
- Common mods: withInfoPlist, withEntitlementsPlist, withAndroidManifest, withStringsXml, withGradleProperties, withAppBuildGradle, withProjectBuildGradle, withPodfile, withAppDelegate, withMainApplication.
- "Dangerous" mods (Gradle files, MainActivity/MainApplication, AppDelegate, raw files) edit text with regular expressions and can break builds. Create, move or delete files only in dangerous mods.
- Mods run only during prebuild's sync step. Plugins must be synchronous: no network calls, no prompts.
- Idempotent: check before inserting (permissions, meta-data, Podfile lines). createRunOncePlugin(plugin, name, version) prevents double application.
- Debug with EXPO_DEBUG=1 and npx expo config --type prebuild or --type introspect.
- Values you write into Info.plist or AndroidManifest ship inside the binary: they are not secret.
The red pen
Common traps: mistake → fix
Mistake: "String-replace the whole AppDelegate"
Fix: fragile; prefer typed mods, and keep dangerous edits small and guarded.
Mistake: "Run it twice, who cares"
Fix: duplicate permissions or Podfile lines break builds.
Mistake: "Pass a secret API key as plugin props"
Fix: it ends up in the binary.
Easy to hard
Questions interviewers ask, easy to hard
- A native SDK needs an AndroidManifest meta-data tag, an Info.plist key and a Podfile tweak. Write the plugin shape.
- What is a dangerous mod?
- How do you keep a plugin idempotent?
- How do you check what prebuild produced?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.