如何在macOS High Sierra上使用复杂分析编译和运行C代码。没有< complex.h>在Xcode中可用。是否有可提供此功能的下载?
答案 0 :(得分:1)
xcode-select -p
目录中。无需单独下载。
由于您已经安装了Xcode,因此需要检查是否安装了命令行工具。要检查是否已安装,请运行import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { AuthService } from '../../services/auth.service';
import { FirebaseProvider } from '../../providers/firebase/firebase';
import { LoginPage } from '../login/login';
import { Observable } from 'rxjs/Observable';
@Component({
selector: 'page-contact',
templateUrl: 'contact.html'
})
export class ContactPage {
user: Observable<any>;
constructor(
public navCtrl: NavController,
private auth: AuthService,
private firebase: FirebaseProvider
) {
this.auth.currentUserObservable.subscribe(() => {
this.user = this.firebase.getUserInfo(this.auth.currentUserId);
if (!this.auth.authenticated) {
this.navCtrl.setRoot(LoginPage);
}
});
this.pushsetup();
}
pushsetup() {
this.firebase
.getToken()
.then(token => console.log(`The token is ${token}`))
.catch(error => console.error('Error getting token', error));
this.firebase
.onTokenRefresh()
.subscribe((token: string) => console.log(`Got a new token ${token}`));
}
}
。如果安装不,则返回值为2,如果是,则返回0。