目前有什么方法可以在 macOS 菜单栏中创建一个在后台运行的 React Native 应用程序吗?
我正在按照Firebase在其官方文档中指定的电子邮件/密码注册设置进行操作;但是,在继续进行身份验证时,我一直收到“发生网络错误”错误。
验证码:
window.onload = function() {
const config = {
apiKey: "",
authDomain: "",
databaseURL: "",
storageBucket: "",
messagingSenderId: ""
};
firebase.initializeApp(config);
const btnSignUp = document.getElementById('btnSignUp');
btnSignUp.addEventListener('click', function() {
const inputEmail = document.getElementById('username-input');
const inputPassword = document.getElementById('password-input');
const email = inputEmail.value;
const password = inputPassword.value;
firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
console.log(error);
});
});
};
Run Code Online (Sandbox Code Playgroud)
控制台错误:
A network error (such as timeout, interrupted connection or unreachable host) has occurred.
Run Code Online (Sandbox Code Playgroud) 我为什么要"回归自我"; 在课程结束而不是"返回0;"?这两个陈述有什么区别?
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
//Call the init method implemented by the superclass
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
//Create two arrays and make the pointers point to them
questions = [[NSMutableArray alloc] init];
answers = [[NSMutableArray alloc] init];
//Add questions and answers to the arrays
[questions addObject:@"What is 7 + 7?"];
[answers addObject:@"14"];
[questions addObject:@"What is the capital of Vermont?"];
[answers addObject:@"Montpelier"];
[questions addObject:@"From what is cognac made?"];
[answers addObject:@"Grapes"];
}
// Return the …Run Code Online (Sandbox Code Playgroud) firebase ×1
ios ×1
javascript ×1
macos ×1
native ×1
oauth ×1
objective-c ×1
react-native ×1
reactjs ×1