小编Dav*_*vid的帖子

为什么我在尝试运行 iOS 应用程序时收到错误“FirebaseCore/FirebaseCore.h”文件未找到”

我最近开始使用配备 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
  • 当我将方案更改为 FirebaseCore 时,错误确实消失了,但随后我无法在模拟器上运行该应用程序。

这是我的 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)

cocoa ios firebase swift apple-m1

9
推荐指数
1
解决办法
1万
查看次数

如何在 React Native 中将浮动操作按钮放置在右下角

我试图在应用程序的右下角放置一个浮动操作按钮,但它将其放置在屏幕的左上角。

返回视图:

<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,但这会产生不良行为。感谢您的任何帮助。

编辑: 我有什么:

我想要的是:

javascript android ios react-native

4
推荐指数
1
解决办法
1万
查看次数

Firestore 规则不断变化

我正在为我的项目使用 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)

firebase firebase-security google-cloud-firestore

3
推荐指数
1
解决办法
868
查看次数

为什么我会在 swift 中收到错误“没有这样的模块 FirebaseUI”?

每次我尝试构建时都会收到错误消息“没有这样的模块 FirebaseUI”

我尝试过的事情:

  • 清除派生数据
  • 运行“pod update”以确保所有依赖项都是最新的
  • 运行我的安装 arch -x86_64 pod install
  • 确保我通过打开 .xcworkspace 而不是 .xcodeproj 来运行应用程序
  • 清理我的构建文件夹(Command+Shift+K)
  • 删除我的项目并从 Git 重新下载
  • 将 FirebaseUI 框架直接添加到我的项目中
  • 将 Scheme 更改为 FirebaseCore 允许构建项目,但模拟器不会打开进行测试,也不会在物理设备上运行。
  • 运行时pod deintegrate && pod install,我注意到该命令确实提到包含 FirebaseUI 并且版本为 11.03
  • 在 Rosetta 中运行 xcode

我正在带有 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)

ios cocoapods firebase swift firebaseui

3
推荐指数
1
解决办法
415
查看次数