fix(safari-view-controller): show should return an Observable

BREAKING CHANGE: `show` method now returns an Observable

closes #1619
This commit is contained in:
Ibby Hadeed 2017-07-10 09:13:24 -04:00
parent 71349655c0
commit a6f9714422
No known key found for this signature in database
GPG Key ID: 22EFE47A3DDBDB5C

View File

@ -1,5 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface SafariViewControllerOptions { export interface SafariViewControllerOptions {
animated?: boolean; animated?: boolean;
@ -74,13 +75,14 @@ export class SafariViewController extends IonicNativePlugin {
/** /**
* Shows Safari View Controller * Shows Safari View Controller
* @param options {SafariViewControllerOptions} optional * @param options {SafariViewControllerOptions} optional
* @returns {Promise<any>} * @returns {Observable<any>}
*/ */
@Cordova({ @Cordova({
successIndex: 1, successIndex: 1,
errorIndex: 2 errorIndex: 2,
observable: true
}) })
show(options?: SafariViewControllerOptions): Promise<any> { return; } show(options?: SafariViewControllerOptions): Observable<any> { return; }
/** /**
* Hides Safari View Controller * Hides Safari View Controller