【问题标题】:Compilation IOS app under XCODE with Firebase notification使用 Firebase 通知在 XCODE 下编译 IOS 应用程序
【发布时间】:2020-04-02 23:35:08
【问题描述】:

大家早上好,

我的IOS应用程序编译过程中遇到一个问题,这是我第一次使用Xcode。

在编译过程中我遇到以下问题:ld: framework not found FBLPromises clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

我按照 firebase 的说明将其集成到我的应用程序中。我特别安装了 COCOAPOD 并使用以下说明创建了 Podfile 文件:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
# Add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'

# Add the pods for any other Firebase products you want to use in your app
# For example, to use Firebase Authentication and Cloud Firestore
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
target 'iOS Push' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for iOS Push

end

无论我在互联网上搜索多少相同的问题,我都忍不住要解决这个问题。我已经尝试重新整合锅并重做安装讲台和许多其他操作,但仍然是这个问题。

提前感谢您的帮助。

【问题讨论】:

    标签: ios swift xcode firebase


    【解决方案1】:

    检查您是否遵循了在项目中使用 Firebase 框架所必需的所有这些步骤:

    1. 在您的 Mac 上安装 Cocoapds
    2. 在您的项目文件夹中创建您的 Podfile(使用 pod init
    3. 将您要使用的 Firebase pod 添加到您的 Podfile 中
    4. 在 Firebase 控制台 (https://console.firebase.google.com/u/0/) 中创建一个 iOS 项目,并使用您的包标识符将其链接到您的应用
    5. 在创建链接时下载从 firebase 控制台提供的 GoogleService-Info.plist 并将其添加到您的 Xcode 项目中
    6. 使用 pod install 在项目文件夹中安装 pod

    如果你做的一切都正确,你应该在你的项目文件夹中看到一个.xcworkspace,你应该从现在开始使用它(而不是正常的.xcodeproj)。

    【讨论】:

    • 我现在收到此错误消息:ld: library not found for -lBoringSSL-GRPC clang: error: linker command failed with exit code 1 (use -v to see invocation)
    【解决方案2】:

    你的 pod 文件应该是这样设置的。

    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'
    
    target 'iOS Push' do
    # Comment the next line if you don't want to use dynamic frameworks
    use_frameworks!
    
    # Pods for iOS Push
    pod 'Firebase/Analytics'
    pod 'Firebase/Auth'
    pod 'Firebase/Firestore'
    
    end
    

    您在“iOS Push”目标之外添加了 pod。同样正如@Maria Fernanda Azolin 提到的,在 pod 安装后使用 .xcworkspace

    【讨论】:

    • 我仍然收到相同的错误消息。我没有指定我在windev mobile下开发这个应用程序。
    • 我现在收到此错误消息:ld: library not found for -lBoringSSL-GRPC clang: error: linker command failed with exit code 1 (use -v to see invocation) –
    • 一个解决方案?我试图重新安装所有东西,我和一开始的错误一样,我没有掌握XCode,我可能会搜索互联网我不知道如何解决这个找不到库的问题。
    • 带有firebase设置的空白项目可以吗?我可以使用在 git 上构建的 firebase pod 创建空白项目。您可以比较它们,或者如果它没有构建,那么其他问题就是问题。
    • 另外你能提供我你遵循的指令链接吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-08-01
    • 2010-11-28
    • 2023-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多