我最近开始使用配备 M1 芯片的 MacBook Pro,该芯片来自旧款 MacBook Pro,运行此应用程序没有任何问题。现在,当我尝试构建并运行我的应用程序时,我遇到以下问题:
'FirebaseCore/FirebaseCore.h' file not found
Run Code Online (Sandbox Code Playgroud)
和
Could not build Objective-C module 'Firebase'
Run Code Online (Sandbox Code Playgroud)
我尝试过的:
pod install --repo-update这是我的 pod 文件:
# Uncomment the next line to define a global platform for your project
platform :ios, '14.0'
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
end
end
end
target 'Pikit' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks! …Run Code Online (Sandbox Code Playgroud) 我试图在应用程序的右下角放置一个浮动操作按钮,但它将其放置在屏幕的左上角。
返回视图:
<View>
<View style={{flexDirection: 'row'}}>
<TouchableOpacity onPress={this.onPress} activeOpacity={.5} >
<Image
source={require('./assets/images/hamburger.png')}
style={{ width: 30, height: 25, marginLeft: 15}}
/>
</TouchableOpacity>
</View>
<FloatingAction style={styles.bottom}/>
</View>
Run Code Online (Sandbox Code Playgroud)
款式:
const styles = StyleSheet.create({
bottom: {
flex: 1,
position: 'absolute',
bottom: 10,
right:10
},
});
Run Code Online (Sandbox Code Playgroud)
我当前的视图显示标题和底部选项卡视图。我可以在每个选项卡屏幕中放置多个 FAB,但这会产生不良行为。感谢您的任何帮助。
编辑: 我有什么:

我想要的是:

我正在为我的项目使用 Firestore 并更新了我的规则,如下所示:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
Run Code Online (Sandbox Code Playgroud)
然而,每当 firestore 发生变化时,它就会变成这样:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if
request.time < timestamp.date(2020, 11, 26);
}
}
}
Run Code Online (Sandbox Code Playgroud)
我在几天内多次重置它,但它不断变回来,我做错了什么?
编辑
这是我的 package.json,它看起来没有任何对规则文件的引用。
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase emulators:start --only functions",
"shell": "firebase functions:shell",
"start": "npm run …Run Code Online (Sandbox Code Playgroud) 每次我尝试构建时都会收到错误消息“没有这样的模块 FirebaseUI”
我尝试过的事情:
arch -x86_64 pod installpod deintegrate && pod install,我注意到该命令确实提到包含 FirebaseUI 并且版本为 11.03我正在带有 M1 芯片的新 MacBook Pro 上运行这个项目。以前,我的项目在较旧的英特尔芯片上运行良好。我的 Xcode 版本是 12.5.1,我的操作系统是 11.4
这是我的 pod 文件:
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config| …Run Code Online (Sandbox Code Playgroud) firebase ×3
ios ×3
swift ×2
android ×1
apple-m1 ×1
cocoa ×1
cocoapods ×1
firebaseui ×1
javascript ×1
react-native ×1