Skip to main content

SDK 1.0.0

For mini app developers

This section is for people who write mini apps that run inside the i-Catholic app. If you only use the app to study catechism, take attendance or read the liturgical calendar, you do not need this section; go back to the user guide.

Building a website for a diocese or parish?

If you are building the public website of a diocese, parish or other unit and want to read the posts, pages and menus that staff write in the i-Catholic admin site, read Websites on the CMS. That section does not use the mini app SDK.

What is a mini app​

A mini app is an ordinary web page (HTML, CSS, JavaScript). The i-Catholic app opens that page full-screen in a WebView. Before your code runs, the app injects the window.CatholicMiniApp object, called the bridge. Through the bridge, your page can read the user's profile, store data, award points, share, scan QR codes and more.

The npm package @i-catholic/mini-app-sdk provides:

  • types for every bridge method, event and error code;
  • helper functions that smooth over the rough edges of the bridge (earnPoints, scanQr, whenNativeReady, ...);
  • optional React hooks at @i-catholic/mini-app-sdk/react.

The SDK is only a thin typed layer. All behavior lives in the i-Catholic app, so when these docs and the app disagree, the app is right. Users run many different app versions, so check each feature with hasBridgeMethod instead of relying on version numbers (see Errors and feature detection).

These docs describe SDK 1.0.0.

Reading order​

  1. Quick start: install the package and run your first mini app.
  2. Page setup: viewport, safe areas, and the app's buttons overlapping the top-right corner. This is the number one cause of layout bugs.
  3. Lifecycle and permissions: when to call ready(), and how users grant permissions.
  4. API overview: one page per group of methods.
  5. Packaging and submitting a bundle: the rules for the ZIP file. Break a rule and the bundle is rejected.
  6. Troubleshooting: a table of symptoms and fixes.

Language of this section​

Function names, error codes (PERMISSION_DENIED, UNSUPPORTED) and code examples are all in English, because that is what you will search for and paste into an issue or an AI tool.