Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove Permissions plugin #3386

Merged
merged 2 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions android/capacitor/src/main/java/com/getcapacitor/Bridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.getcapacitor.plugin.LocalNotifications;
import com.getcapacitor.plugin.Modals;
import com.getcapacitor.plugin.Network;
import com.getcapacitor.plugin.Permissions;
import com.getcapacitor.plugin.PushNotifications;
import com.getcapacitor.plugin.Share;
import com.getcapacitor.plugin.SplashScreen;
Expand Down Expand Up @@ -409,7 +408,6 @@ private void registerAllPlugins() {
this.registerPlugin(Keyboard.class);
this.registerPlugin(Modals.class);
this.registerPlugin(Network.class);
this.registerPlugin(Permissions.class);
this.registerPlugin(PushNotifications.class);
this.registerPlugin(Share.class);
this.registerPlugin(SplashScreen.class);
Expand Down

This file was deleted.

25 changes: 0 additions & 25 deletions core/src/core-plugin-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export interface PluginRegistry {
Modals: ModalsPlugin;
Motion: MotionPlugin;
Network: NetworkPlugin;
Permissions: PermissionsPlugin;
PushNotifications: PushNotificationsPlugin;
Share: SharePlugin;
SplashScreen: SplashScreenPlugin;
Expand Down Expand Up @@ -1452,30 +1451,6 @@ export type NetworkStatusChangeCallback = (status: NetworkStatus) => void;

//

export enum PermissionType {
Camera = 'camera',
Photos = 'photos',
Geolocation = 'geolocation',
Notifications = 'notifications',
ClipboardRead = 'clipboard-read',
ClipboardWrite = 'clipboard-write',
Microphone = 'microphone',
}

export interface PermissionsOptions {
name: PermissionType;
}

export interface PermissionResult {
state: 'granted' | 'denied' | 'prompt';
}

export interface PermissionsPlugin extends Plugin {
query(options: PermissionsOptions): Promise<PermissionResult>;
}

//

export interface PushNotification {
title?: string;
subtitle?: string;
Expand Down
3 changes: 0 additions & 3 deletions core/src/web-plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { LocalNotifications } from './web/local-notifications';
import { Modals } from './web/modals';
import { Motion } from './web/motion';
import { Network } from './web/network';
import { Permissions } from './web/permissions';
import { Share } from './web/share';
import { SplashScreen } from './web/splash-screen';
import { Storage } from './web/storage';
Expand All @@ -30,7 +29,6 @@ export * from './web/local-notifications';
export * from './web/modals';
export * from './web/motion';
export * from './web/network';
export * from './web/permissions';
export * from './web/share';
export * from './web/splash-screen';
export * from './web/storage';
Expand All @@ -48,7 +46,6 @@ mergeWebPlugin(LocalNotifications);
mergeWebPlugin(Modals);
mergeWebPlugin(Motion);
mergeWebPlugin(Network);
mergeWebPlugin(Permissions);
mergeWebPlugin(Share);
mergeWebPlugin(SplashScreen);
mergeWebPlugin(Storage);
Expand Down
42 changes: 0 additions & 42 deletions core/src/web/permissions.ts

This file was deleted.

4 changes: 0 additions & 4 deletions ios/Capacitor/Capacitor/Plugins/DefaultPlugins.m
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@
CAP_PLUGIN_METHOD(removeAllListeners, CAPPluginReturnNone);
)

CAP_PLUGIN(CAPPermissionsPlugin, "Permissions",
CAP_PLUGIN_METHOD(query, CAPPluginReturnPromise);
)

CAP_PLUGIN(CAPPushNotificationsPlugin, "PushNotifications",
CAP_PLUGIN_METHOD(register, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(requestPermission, CAPPluginReturnPromise);
Expand Down
158 changes: 0 additions & 158 deletions ios/Capacitor/Capacitor/Plugins/Permissions.swift

This file was deleted.