Google Firebase身份验证:发送到实例的无法识别的选择器

时间:2017-03-06 06:04:25

标签: cordova firebase ionic2 firebase-authentication google-plus-signin

我正在import java.util.Scanner; public class Lab1Main { public static void main(String[] args) { System.out.println("BMI Calculator"); // Start Scanner Scanner input = new Scanner(System.in); // Declare variables String u_name; Double u_age, u_feet, u_inches, u_weight; // Create new HealthProfile HealthProfile client = new HealthProfile(); // Start do-while do { // Enter name System.out.print("Enter name or X to quit: "); u_name = input.nextLine(); // Enter age System.out.print("Enter your age: "); u_age = Double.parseDouble(input.nextLine()); // Enter height (feet) System.out.print("Enter your height(feet): "); u_feet = Double.parseDouble(input.nextLine()); // Enter height (inches) System.out.print("Enter your height(inches): "); u_inches = Double.parseDouble(input.nextLine()); // Enter weight System.out.print("Enter your weight: "); u_weight = Double.parseDouble(input.nextLine()); // Set variables from HealthProfile client.setName(u_name); client.setAge(u_age); client.setFeet(u_feet); client.setInches(u_inches); client.setWeight(u_weight); // Display results System.out.println("********** HEATLH PROFILE FOR " + client.getName() + " **********"); System.out.println("Age: " + client.getAge()); System.out.println("Weight: " + client.getWeight()); System.out.println("Height (in inches): " + client.getHeight()); System.out.println("Your BMI is : " + client.getBMI()); System.out.println("You are considered: " + client.getCategory()); System.out.println("Your max heart rate is: " + client.getMaxHR()); } while (u_name != "X"); System.out.println(); }// end main }// end class 使用Ionic2 验证 Cordova中的用户。

我可以构建应用并在FirebaseiOS Simulator)上运行它。但是,只要我尝试使用Xcode使用以下代码登录用户:

ionic-native ("ionic-native": "2.2.11",) GooglePlus

我收到以下错误:

  

2017-03-06 07:55:06.433 theWhoZoo [10489:868996] *** WebKit丢弃   一个未被捕获的例外   web视图:decidePolicyForNavigationAction:请求:帧:decisionListener:   代表: - [__ NSArrayM   objectForKeyedSubscript:]:无法识别的选择器发送到实例   0x6100002471a0

更多信息:

我可以使用 loginGoogleCordova(): void { GooglePlus.login(['public_profile', 'email']).then(googleData => { let provider = firebase.auth.GoogleAuthProvider.credential(googleData.authResponse.accessToken); firebase.auth().signInWithCredential(provider).then((data) => { this.signIn(data); }); }, error => { this.loading.dismiss(); console.error('loginGoogle: ' + error); this.doAlert('loginGoogle: ' + error.message); }); } 在浏览器中成功验证用户。

AngularFire2

任何帮助表示感谢。

0 个答案:

没有答案