import { Geolocation } from '@capacitor/geolocation';
// get the users current position
const position = await Geolocation.getCurrentPosition();
// grab latitude & longitude
const latitude = position.coords.latitude;
const longitude = position.coords.longitude;
import { Camera, CameraResultType } from '@capacitor/camera';
// Take a picture or video, or load from the library
const picture = await Camera.getPicture({
resultType: CameraResultType.Uri
});
import Foundation
import Capacitor
// Custom platform code, easily exposed to your web app
// through Capacitor plugin APIs. Build APIs that work
// across iOS, Android, and the web!
@objc(MyAwesomePlugin)
public class MyAwesomePlugin: CAPPlugin {
@objc public func doNative(_ call: CAPPluginCall) {
let alert = UIAlertController(title: "Title", message: "Please Select an Option", preferredStyle: .actionSheet)
// ....
}
}
Building Cross-platform Apps with Capacitor
Ship cross-platform mobile apps 10X faster. We wrote a free guide on when and why to use Capacitor to build cross-platform apps.
Webアプリをネイティブ機能に接続
ユニバーサルアプリ
iOS、Android、およびProgressive Web Appsで同じように動作する Webベースのアプリケーションを構築します。
Did you know @capacitorjs shows how to give your
#Angular app access to mobile APIs and a presence in app stores?
scriptkitty
@thr0wsException
I'm pretty hyped to be honest, from what I've seen so far this will be another major step for establishing web technology as the go-to method for developing cross platform apps ♥
Adeniyi Tolulope
@tolutronics
@capacitorjs has been a great companion this year... with realtime updates.
Yes, It works 😱 deep linking and google native authentication in iOS
@capacitorjs
Greg Marine
@gregmarine
One of the nice things about Capacitor is that you don’t have to use Ionic. I personally love Ionic and use it for UI components. But it isn’t required for Capacitor 😊
Jacob Clark
@imjacobclark
We blogged about how we use Capacitor to build our 4 Children’s apps at the
@BBC
Supercharge your app with enterprise-grade solutions.
Ready for enterprise. With an Ionic platform subscription, access powerful security, authentication, deployment, and CI/CD features focused on teams building critical apps.
Ready to start building?
Dive in and create your first Capacitor project today