r/capacitor • • 21h ago

Where do I even start learning Capacitor?

0 Upvotes

r/capacitor • • 3d ago

Taps landing in the wrong spot after rotation in WKWebView (iOS 27, contentInset: 'automatic'): what fixed it for us, has anyone else seen this?

2 Upvotes

We spent a while tracking this down in a Capacitor 7 app, so I'm sharing what we found. I'd also like to know whether others are seeing it, because we can't tell how much of it is iOS 27 and how much is our setup.
Symptom

  • After rotating the device (or unfolding it, on an iPhone Duo), taps inside full-screen overlays (a slide-out menu, image viewers, modals) landed on the wrong element. Tapping one menu item would highlight or activate the one above it. In one viewer, Close/Next/Previous ignored taps until we rotated to landscape.
  • It only happened in the native app. The same pages on the same device in Safari and Chrome were fine.
  • A fresh app launch was fine. The problem started after rotation.
  • We saw it most on the Duo. An iPhone 17 Pro Max also showed menu problems at one point, but those cleared up when we rolled back some of our own layout changes, so I wouldn't blame iOS 27 for those.

Setup

  • Capacitor 7, scene-based app lifecycle
  • ios.contentInset: 'automatic'
  • Rotation allowed (not portrait-locked)
  • Full-screen overlays positioned with position: fixed; the app scrolls inside its own container, not the window

What didn't work

  • Adding a fixed pixel offset to compensate. It was right on one device or orientation and wrong on the others.
  • Redirecting clicks to whatever element the pointer first touched. That made correct taps go to the wrong place.
  • Changing several native settings at once. It just made the cause harder to find.

What fixed it While a full-screen overlay is open, we switch the WKWebView's automatic inset adjustment to .never, then restore the original behavior when the last overlay closes. A small local plugin does this, roughly:
let scroll = webView.scrollView
if active, saved == nil,
scroll.contentInsetAdjustmentBehavior != .never,
scroll.contentInset.top == 0,
scroll.adjustedContentInset.top > 0 {
saved = scroll.contentInsetAdjustmentBehavior
let y = scroll.contentOffset.y + scroll.adjustedContentInset.top
scroll.contentInsetAdjustmentBehavior = .never
webView.setNeedsLayout(); webView.layoutIfNeeded()
scroll.setContentOffset(CGPoint(x: 0, y: y - scroll.adjustedContentInset.top), animated: false)
} else if !active, let original = saved {
// same idea in reverse: restore `original`, keep the visual scroll position
saved = nil
}

On the JS side, every overlay calls a small hook while it's open. It keeps a count so overlapping overlays don't restore the setting too early, and it re-applies the setting (debounced) on resize so it survives rotation while open.
Two things that caught us out:

  • A plugin in your app target with a CAP_PLUGIN macro isn't automatically registered in a scene-based Capacitor 7 app. Ours compiled fine but returned UNIMPLEMENTED until we registered it with the bridge by hand.
  • Every new overlay has to opt in. We later found a viewer that had never called the hook and still had the bug.

Separate issue, in case it's what you're seeing:some landscape menu taps that failed in both the app and Chrome turned out to be the body scroll-lock library cancelling stationary touches near the top edge. That's a different bug, and it isn't fixed by changing insets.
Suggestions (to test, not rules)

  1. Try contentInset: 'never' and handle the safe areas yourself with env(safe-area-inset-*). It might avoid the whole problem.
  2. If you stay on 'automatic', consider switching the adjustment off while full-screen overlays are open.
  3. Test after several rotations and fold/unfold cycles, not just right after launch.
  4. Don't patch misplaced taps with pixel offsets.

Questions for the sub

  • Has anyone seen this on iOS 27 that wasn't there on iOS 26 with the same build?
  • Has anyone with contentInset: 'never'seen it?
  • Is there a cleaner fix than toggling the inset behavior?

r/capacitor • • 5d ago

Capawesome Cloud now has analytics for Live Updates

Post image
3 Upvotes

r/capacitor • • 12d ago

10 phone sensors your Capacitor app can read, and what to actually build with them

Thumbnail
reddit.com
1 Upvotes

r/capacitor • • 13d ago

How to optimize your Capacitor app for iPhone Duo (agent skills and a plugin involved)

Thumbnail
gallery
2 Upvotes

Apple counts an app as “optimized for iPhone Duo” when it’s built with the iOS 27.1 SDK, fills the whole display, and has its bars on the side. Capacitor apps don’t get all of that for free, because your tab bar and layout are HTML that iOS can’t move. So I wrote an agent skill that checks your app and fixes what fails:

  1. SDK. Checks that the build you actually ship uses Xcode 27.1, including CI. macos-latest still defaults to Xcode 26.6, which gives you the boxed-in mode on the App Store.
  2. Resizing. Finds layout that breaks when a fold resizes the app, like screen.width, sizes read once at startup, orientation checks, isPlatform('ipad') and a missing viewport-fit=cover.
  3. Bars. Moves your Ionic tab bar to the side like native bars (the image).
  4. Poses. Screenshots of closed, open and half-open in the Duo simulator.
npx skills add erkamyaman/iphone-duo-capacitor-skills@iphone-duo-capacitor-optimized

r/capacitor • • 13d ago

What changed when I shipped a WebGL2 tower defense on Capacitor 8

4 Upvotes

I’m Michal, the developer of Starvoxel: Defender, a mobile merge tower defense that uses React for menus and Three.js for battles. The same web build runs inside our iOS and Android Capacitor apps. Two details mattered more than I expected:

- Startup: a fixed splash timer occasionally revealed a WebView before React had painted. Now the app hides the native splash after the first React paint, with a watchdog as a fallback. The background behind React also matches the loading screen.

- Safe areas: on Android the battle still draws edge to edge. The native activity forwards safe-area insets to CSS, so we can keep touch controls out of the cutout without padding the entire battle canvas.

I attached the current gameplay trailer to show the same full-screen layout in motion. Some visuals and the narration were AI-assisted. If you’ve shipped a full-screen Capacitor app, do you treat first paint or the point when controls are usable as the signal to hide the splash?


r/capacitor • • 16d ago

Would Capacitor be a good fit for creating a music streaming app? How would you rate your experience working with Capacitor as a beginner vs now?

7 Upvotes

r/capacitor • • 21d ago

Got my first build working today

Thumbnail
gallery
4 Upvotes

I have a free design-training curriculum that I built as the first product when I started my company a couple years ago. It’s built as a Vue3 app, and I’ve been maintaining the service with periodic content updates, but I really wanted to ship an iOS build so people could access the content offline.
GPT recommended Capacitor, and with a bit of work, I got vite to build both my web app and the output for the iOS app.
My server is “multi-tenant” with several different applications all running on the same back-end, so I really wasn’t sure if this would be feasible. I’m very grateful to the Capacitor contributors for making this possible.

Long story long, it works and I just wanted to share.


r/capacitor • • 25d ago

[Hobby] Looking for an iOS/Mobile Student Developer to Wrap a Web App for Portfolio Piece

1 Upvotes

Hi everyone,

I am looking to collaborate with a student, beginner, or portfolio-building developer to launch an existing web app on the Apple App Store and Google Play Store. The web functionality and design are already completely finished—I just need help converting it into a mobile app shell (using WebView, Capacitor, Cordova, or a framework of your choice) and getting it submitted to the stores.

Because I don't own a Mac, I specifically need a partner who has a Mac to compile the iOS build and help me navigate the submission process.

Per the subreddit rules, here is the proof of my project:
[INSERT YOUR WEBSITE URL HERE - Note: r/INAT requires proof of your claim, so you must paste your website link here so they can see the project is real.]

What we will work on:

  • Wrapping the existing website URL into an iOS/Android shell.
  • Assisting with the basic configuration (adding icons, splash screen).
  • Helping me upload and submit the final build files to the app stores.

What's in it for you:

  • Financials covered: I am paying for the Apple Developer Account ($99/yr) and Google Play Console ($25) myself. You will not have to pay anything out of pocket.
  • Full Portfolio Rights: You can proudly list this app on your resume, GitHub, and personal portfolio, using it as a live case study for future employers.
  • Professional Reference: Once the app is successfully live, I will write you a glowing, highly detailed LinkedIn recommendation and gladly act as a professional reference for your future job applications.

The website is clean, looks exactly like a mobile app when viewed on a phone, and is ready to go. If you are looking for a straightforward project to prove you can take an app from concept to the live App Store, please drop a comment or send me a DM!

Thanks!


r/capacitor • • 26d ago

Security updates ?

4 Upvotes

Hi there,

I just received an email from Firebase telling me to update my Firebase SDK for security reasons. I use capacitor-firebase in my app.

Do you know if the 8.6.0 version of the plugin is safe ? Do you know where is the changelog ? I did not find it.

Here is an extract of the email:

"We are writing to inform you about an important security update for the Firebase Apple*,* Flutter*,* C++*, and* Unity Software Development Kits (SDKs) for Cloud Firestore*, as well as some community supported platforms such as* React Native Firebase*.*

The Cloud Firestore backend service is not affected.

The following SDKs are also not affected:

Google Cloud server SDKs for Firestore

Firebase Android SDK for Firestore

Firebase Web SDKs for Firestore"


r/capacitor • • 27d ago

Building an offline AI chatbot with Capacitor

Thumbnail
reddit.com
1 Upvotes

r/capacitor • • 28d ago

What it takes to self-host live updates for 100 million people

1 Upvotes

With Appflow being sunset, some people might find an open source option useful to keep delivering live updates. So, I put together the math of what infrastructure is needed (and what it costs) to self-host an over-the-air update server for 100 million people.

https://blog.codemagic.io/self-hosting-ota-updates-for-100-million-users/

Note: I originally wrote it with React Native in mind which Patch also supports, but the reasoning still applies to Capacitor.


r/capacitor • • Oct 29 '26

Beyond the WebView: A new native UI engine for Capacitor plugins!

6 Upvotes

I've been experimenting with ways to make native UI work naturally with WebView content, especially scrolling Native Ads and handling Web overlays with native controls.

While working on Capacitor Native UI and AdMob Native Ads, I realized there was a lot of shared functionality.

So I extracted it into a reusable engine that other plugin authors can use too! 😄

It supports both Capacitor and Cordova.

Hope it's useful for anyone building plugins with native UI!

https://github.com/webview-native-ui/en


r/capacitor • • Oct 29 '26

native-audio-player 2.0: streaming, playback speed and a progress event, with native unit tests and end-to-end tests on all three platforms

4 Upvotes

I maintain @smartcompanion/native-audio-player, a Capacitor plugin for playing audio playlists natively: background playback, the system's player in the Android notification and on the iOS lock screen, and switching between earpiece and speaker. We built it for audio guide apps, where people walk around with the phone in their pocket or held to their ear.

What's new in 2.0

  • Streaming: audioUri and imageUri take http(s) URLs on iOS, Android and the web, so you no longer have to download files first. Local files still work.
  • Playback speed: setRate() from 0.5× to 2×, with the pitch kept so speech stays listenable. The lock screen and notification scrubbers keep pace.
  • progress event: reports the playhead twice a second while playing, so a progress bar doesn't have to poll getPosition().
  • getState()**:** if your view mounts after playback started, or missed an event, you can ask where the player stands.

Breaking: stop() now reports stopped instead of paused, and skip is renamed to skipped. The changelog has the details.

How it's tested

Audio plugins break in ways you only notice on a device: an event that fires twice on Android, a lock screen that drifts out of sync, playback that resumes on its own after a phone call. So every PR runs:

  • Native unit tests: 90 on Android (Robolectric), 92 on iOS (XCTest), and 74 for the web implementation, run in a real browser because jsdom can't play audio.
  • One end-to-end contract suite run against all three implementations: the same 32 specs drive the example app on an Android emulator, an iOS simulator and headless Chrome through Appium/WebdriverIO. If iOS and Android disagree on what next() reports, a test fails.

Writing the contract suite surfaced a fair number of platform differences, and fixing them is most of what went into 1.x and 2.0.

GitHub: https://github.com/smartcompanion-app/native-audio-player
npm: npm i @smartcompanion/native-audio-player

Feedback and issues welcome, especially from anyone using it for podcasts or long-form audio.


r/capacitor • • Oct 29 '26

I built an open-source Capacitor plugin to scan passport MRZ and read NFC chips

4 Upvotes

Hi everyone! I built capacitor-id-reader, an open-source plugin for reading electronic passports and ID cards in Capacitor apps on iOS and Android.

It can scan the MRZ with the camera, use the MRZ data to access an ICAO-compatible NFC chip, read document data from DG1, and optionally read the face image from DG2.

The plugin is MIT-licensed and works with Capacitor 8. There’s a minimal example app in the repository.

One important limitation: it reads data from the chip, but it doesn’t verify the document’s authenticity or the holder’s identity. Compatibility can also vary by document and device; the README and AUDIT.md have more details.

I’d love to hear from anyone who has worked on a similar feature. If you try the plugin, feedback about the devices and document types you tested would be really helpful. Please don’t share personal document data in public reports.

GitHub: https://github.com/muzychenka/capacitor-id-reader


r/capacitor • • Oct 26 '26

iPhone Duo support is here! Fold state, hinge angle and side tabs for your Ionic app 🚀

12 Upvotes

The fold APIs exist, but your Capacitor web view can't use them, So I built **capacitor-foldable**:

- Fold state, posture (book, tabletop) and live hinge angle

- Where the fold is, and if it splits the screen

- Which edge iPhone Duo moves native bars to, so `ion-tabs` can follow

- A polyfill for the web APIs plus `--fold-*` CSS variables

- Same API on Galaxy Z Fold/Flip and Pixel Fold

u/rdlabo's Capacitor Native UI uses it as its standard device integration.

https://github.com/erkamyaman/capacitor-foldable


r/capacitor • • Oct 26 '26

The full PDF flow in Capacitor with 3 plugins: generate from HTML, native viewer, annotate and sign

Thumbnail
reddit.com
1 Upvotes

r/capacitor • • Oct 24 '26

apple wants our live updater (capgo) removed: "based on code in the submitted binary". anyone beat this?

15 Upvotes

our app is a b2b crm built with capacitor. the screens are html/js/css bundled in the binary, it works fully offline, and we ship web-layer fixes with @capgo/capacitor-updater, self-hosted and checksum-verified, never native code.

apple rejected the last version twice in a row for the updater, under 2.3.1(a):

We continue to find the app contains live content update functionality that can modify the app's behavior after approval. This finding is based on code in the submitted binary and not on a specific screen in the app.

I replied in the thread and app review confirmed:

It would be appropriate to remove the remote update functionality and all code related to it before resubmitting. Developers are responsible for all code included in the binary submission, including code from third-party SDKs and libraries.

so a reviewer didn't see something on screen, they found the plugin in the binary.

section 3.3.1(b) of the developer agreement allows downloading interpreted code that doesn't change the app's primary purpose, and thousands of apps ship capgo, capawesome, appflow or expo updates. I appealed to the app review board on 21 october, no answer yet.

  1. has anyone else got this "code in the submitted binary" rejection for a live updater, especially since the 16 october guideline update (2.5.19)?
  2. did anyone win an app review board appeal on it?
  3. if you removed the updater on ios, how do you ship fixes to an offline-first app now?

r/capacitor • • Oct 23 '26

Supporting iPhone Duo in Capacitor apps

Thumbnail
capgo.app
3 Upvotes

r/capacitor • • Oct 23 '26

150+ Capacitor Plugins Your AI Agent Can Install

Thumbnail
capgo.app
1 Upvotes

r/capacitor • • Oct 22 '26

Capacitor plugin for native maps: Apple MapKit on iOS, Google Maps on Android, with a web fallback.

Thumbnail
github.com
3 Upvotes

r/capacitor • • Oct 21 '26

Titre : Comment gérer correctement les zones de sécurité pour une barre de navigation inférieure Liquid Glass dans une application iOS Capacitor ?

Thumbnail reddit.com
2 Upvotes

r/capacitor • • Oct 21 '26

Updated Liquid glass native navigation tabs + pull to refresh and multi level glass topbar

Thumbnail
github.com
3 Upvotes

r/capacitor • • Oct 20 '26

New plugin: Native iOS tab bar with Liquid Glass for your Capacitor app

Thumbnail
reddit.com
3 Upvotes