在遵循react-native-firebase教程后,我的应用程序在成功构建后挂起.我在Xcode中遇到的错误是:Thread 1: signal SIGABRT.我从其他问题中了解到这与连接有关,但我不知道为什么会出现这种错误.
这是我的第一个React Native项目,第一次使用Xcode.
react-native-firebase和firebase.react-native link react-native-firebase.pod init.将podfile调整为以下内容:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Enso' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for Enso
pod 'Firebase/Core'
end
Run Code Online (Sandbox Code Playgroud)pod install#import <Firebase.h> …最近出于某种原因,我无法从 Xcode 甚至从命令行在物理设备上运行我的 React Native 应用程序。我收到以下错误:
duplicate symbol '_md5_block_data_order' in:
/XXX/Library/Developer/Xcode/DerivedData/XXXX-bdrylwsxpcqgzvgkcljteyttcdmr/Build/Products/Debug-iphoneos/BoringSSL-GRPC/libBoringSSL-GRPC.a(md5.o)
/XXX/project/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(md5_dgst.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)
但是它在模拟器上运行良好。我可以毫无问题地将应用程序上传到 AppStoreConnect。
据我了解,2 个库中似乎存在相同的符号。不知道为什么,很可能是移动应用程序依赖项之一。
在安装的 Pod 列表中,我同时拥有BoringSSL-GRPC (0.0.3)和OpenSSL-Universal (1.0.2.19)
Firebase 使用 BoringSSL,Flipper 使用 OpenSSL。
这是我使用的第三方依赖项列表:
pod 'Firebase/Core', '~> 6.3.0'
pod 'Firebase/Messaging', '~> 6.3.0'
pod 'Firebase/Firestore', '~> 6.3.0'
pod 'Firebase/Auth', '~> 6.3.0'
pod 'TrustKit'
pod 'Stripe', '16.0.0'
pod 'Amplitude-iOS', '~> 4.5'
pod 'Intercom', '~> 5.5.1' …Run Code Online (Sandbox Code Playgroud) 我最近将我的应用程序从 firebase 更新到了 firestore,但一直停留在离线持久化状态。我正在使用 react-native-firebase 集成 firestore 并禁用其持久性,但在没有互联网的情况下仍然没有收到任何捕获错误。这是我删除数据的代码,但当没有互联网时,catch 永远不会出错。
firebase.firestore().collection('d').doc(deviceid).delete().then(function () {
console.log("Device Deleted");
that.setState({
loading: false
});
Toast.show('Device Deleted Succesfully', {
duration: Toast.durations.SHORT,
position: Toast.positions.TOP,
shadow: true,
animation: true,
hideOnPress: true,
delay: 0,
});
}).catch(function (err) {
console.log(err);
that.setState({
loading: false
});
})
Run Code Online (Sandbox Code Playgroud) javascript firebase google-cloud-firestore react-native-firebase
我正在使用react-native-firebase与我们的Firebase帐户一起使用身份验证,防火墙和存储.尝试将照片上传到存储失败,出现未知错误.这是尝试的代码:
_pickImage = async () => {
await this.getCameraRollPermission()
let result = await ImagePicker.launchImageLibraryAsync({
allowsEditing: true,
aspect: [4, 3],
});
console.log(result);
if (!result.cancelled) {
// this.setState({ photoURL: result.uri });
this._handlePhotoChoice(result)
}
};
_handlePhotoChoice = async pickerResult => {
let userId = this.state.userId
firebase
.storage()
.ref('photos/profile_' + userId + '.jpg')
.putFile(pickerResult.uri)
.then(uploadedFile => {
console.log("Firebase profile photo uploaded successfully")
})
.catch(error => {
console.log("Firebase profile upload failed: " + error)
})
}
Run Code Online (Sandbox Code Playgroud)
在iOS模拟器中测试并使用调试器来检测错误我刚刚收到此错误:
"Error: An unknown error has occurred. …Run Code Online (Sandbox Code Playgroud) ios firebase react-native firebase-storage react-native-firebase
如果我在单击动态链接时安装应用程序.当我第一次打开应用程序时,所有来自动态的信息仍然可用.如何获取该信息?当我使用它时,它无法正常工作: getInitialLink() returns Promise<string|null>;
android firebase react-native firebase-dynamic-links react-native-firebase
我们的项目是一个Objective-c项目。
由于我们正在使用,react-native-firebase我们不能再 use_frameworks!在 cocoapods 中使用。
问题是我们有一个swift pod 依赖项(PromiseKit),要使用 swift 依赖项use_frameworks!,据我所知,我们必须使用。
我想要做的是两全其美,也就是:
use_frameworks!以便react-native-firebase工作和PromiseKit快速依赖。当前 Podfile:
platform :ios, '10.0'
target 'TestApp' do
use_frameworks!
# swift pod
pod 'PromiseKit'
# react-native-firebase
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/DynamicLinks', '~> 5.3.0'
pod 'Firebase/Messaging', '~> 5.3.0'
end
Run Code Online (Sandbox Code Playgroud)
我注意到自Cocoapods 1.5以来,有此命令:modular_headers => true或use_modular_headers我感觉可能与我正在寻找的解决方案相关或不相关,但我似乎无法将这些点联系起来。
如果我删除use_frameworks!(即使我用 替换它use_modular_headers!),我会收到此错误:
我已经安装了react-native-firebase和react-native-camera.当play-services -vision被卡住时相机很好12.0.1,但是我遇到了这个错误(错误更新属性googleVisionBarcodeDetectorEnable) https://github.com/react-native-community/react-native-camera/issues/1844这需要升级到15.0.2.
它看起来像有谷歌播放服务,并在火力地堡冲突play-services-vision被撞可达15.0.2来自12.0.1:
Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-messaging@17.3.4
-- Project 'app' depends onto com.google.android.gms:play-services-base@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-core@16.0.6
-- Project 'app' depends onto com.google.android.gms:play-services-vision@15.0.2
Run Code Online (Sandbox Code Playgroud)
我试过com.google.android.gms:play-services-vision@16.2.0但它给了我exceed 64k methods …
是否可以将自定义字段添加到 Firebase 中的用户配置文件表?
现在看起来我只能将数据添加到:
我希望能够将自定义对象添加到 JSON 字符串以包含所有用户数据。
javascript firebase firebase-authentication react-native-firebase
我的问题(后台通知):
我正在使用React Native Firebase。一切都很好,直到最近我更新到了该库的 6.7.1 版本。更新后后台通知(应用程序关闭时)停止工作。前台正在工作。
我在这里找到了一个建议,可以转到FirebaseAppDelegateProxyEnabledinfo.plistYES中。
它确实有效!我现在可以正常接收通知了。
但什么是调酒呢?
我真的不明白这种 swizzling 方法是什么,设置它YES或NOdo 之间有什么区别?我在 firebase 文档中读到了它:Method swizzling in Firebase Cloud Messaging。我真的无法理解。有人可以以更清楚的方式解释一下,这有什么区别?
我正在将react-native-device-info从v2迁移到v3,并且我有一个重大变化。在更新包之前,一切正常。该错误出现在所有模拟器和真实设备上。
\n\n我得到的错误是:
\n\nNativeFirebaseError: [messaging/unregistered] You must be registered for remote notifications before calling get token, see messaging().registerForRemoteNotifications() or requestPermission().\nRun Code Online (Sandbox Code Playgroud)\n\n环境信息:
\n\n System:\n OS: macOS 10.15.4\n CPU: (8) x64 Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz\n Memory: 6.44 GB / 16.00 GB\n Shell: 5.7.1 - /bin/zsh\n Binaries:\n Node: 12.14.0 - ~/.nvm/versions/node/v12.14.0/bin/node\n Yarn: 1.22.4 - /usr/local/bin/yarn\n npm: 6.13.4 - ~/.nvm/versions/node/v12.14.0/bin/npm\n SDKs:\n iOS SDK:\n Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2\n Android SDK:\n API Levels: 28, 29\n …Run Code Online (Sandbox Code Playgroud) javascript typescript react-native react-native-firebase react-native-device-info
firebase ×7
react-native ×6
ios ×4
javascript ×3
android ×2
cocoapods ×1
gradle ×1
sigabrt ×1
swift ×1
typescript ×1
xcode ×1