iOS 中的 Crashlytics 不会继续通过 Fabric 应用程序中的“构建您的项目”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28117477/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 04:28:39  来源:igfitidea点击:

Crashlytics in iOS won't proceed past "Build Your Project" in Fabric app

iosxcodecrashlyticstwitter-fabric

提问by wanderingme

I'm installing Crashlytics for my iOS app. I downloaded it via their site link, and went through all the steps for integrating the frameworks, adding the run script, etc.

我正在为我的 iOS 应用安装 Crashlytics。我通过他们的站点链接下载了它,并完成了集成框架、添加运行脚本等的所有步骤。

I was experiencing an issue, so I removed the frameworks and decided to start over and try a fresh install. But the Fabric app updated to a newer version, and now when I try to reinstall Crashlytics into my app, it doesn't give me the option to reinstall the frameworks. It goes straight from clicking "install" to the "Build your project" screen, which I cannot pass.

我遇到了一个问题,所以我删除了框架并决定重新开始并尝试全新安装。但是 Fabric 应用程序更新到了较新的版本,现在当我尝试将 Crashlytics 重新安装到我的应用程序中时,它没有给我重新安装框架的选项。它直接从单击“安装”到“构建您的项目”屏幕,我无法通过。

To help configure your project, please build it now by pressing ?B

为了帮助配置您的项目,请按 ?B 立即构建它

I press ?B, it builds and nothing happens. I think the issue is because I removed the Crashlytics and Fabric frameworks from my project, but I can't see a way to add them back again. The Fabric app doesn't give me that option.

我按?B,它会建立,但没有任何反应。我认为问题是因为我从我的项目中删除了 Crashlytics 和 Fabric 框架,但我看不到重新添加它们的方法。Fabric 应用程序没有给我这个选项。

采纳答案by Mike Bonnell

Moving from Comment to Answer.

从评论到回答。

Mike from Fabric here. If you back up through the Mac app, then click on the arrow in the top-left, click on "+ New App", that will walk you through re-adding everything.

来自 Fabric 的 Mike。如果您通过 Mac 应用程序备份,然后单击左上角的箭头,单击“+ 新应用程序”,这将引导您重新添加所有内容。

回答by Stigblue

Go into Build settings of the your target. Find "Debug Information Format". Set this from "DWARF" in both debug and release to "DWARF with dSYM File"

进入目标的构建设置。找到“调试信息格式”。在调试和发布中将其从“DWARF”设置为“DWARF with dSYM File”

回答by Andrew Kozlik

If you check the resource navigator you may see the following message:

如果您检查资源导航器,您可能会看到以下消息:

"DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations. This could also be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved the dSYM from the location Xcode generated it. Unable to process eCreditWebWrapper.app.dSYM at path"

“对于所有配置,DEBUG_INFORMATION_FORMAT 应该设置为 dwarf-with-dsym。这也可能是时间问题,确保 Fabric 运行脚本构建阶段是最后一个构建阶段,并且没有其他脚本从 Xcode 生成它的位置移动 dSYM . 无法在路径处处理 eCreditWebWrapper.app.dSYM”

Go to Build Settings and search for "Debug Information Format". Ensure "Debug" is set to "DWARF with dSYM File".

转到构建设置并搜索“调试信息格式”。确保“调试”设置为“带有 dSYM 文件的 DWARF”。

Without the dSYM file Fabric won't work.

没有 dSYM 文件 Fabric 将无法工作。

回答by Raptor

As for Xcode 10.2.1, the automated installation via Fabric Mac app won't work anymore. New apps cannotbe added via the New App Step-by-step guide.

至于 Xcode 10.2.1,通过 Fabric Mac 应用程序的自动安装将不再起作用。新的应用程序不能经由新的应用程序步一步的指导加入。

You have to follow the manual installation instructions. Download and add the 2 frameworks into your Xcode workspace, then add the Run Build Script phase (and related Fabric codes), then build the App. Last (very important), run the appin an actual device.

您必须按照手动安装说明进行操作。下载 2 个框架并将其添加到您的 Xcode 工作区,然后添加运行构建脚本阶段(和相关的 Fabric 代码),然后构建应用程序。最后(非常重要),在实际设备中运行该应用程序

Once the App is successfully launched, the new App information will be available in the Fabric dashboard as well as the Fabric Mac App (needs to relaunch the App to see the new app).

应用程序成功启动后,新应用程序信息将在 Fabric 仪表板以及 Fabric Mac 应用程序中可用(需要重新启动应用程序才能看到新应用程序)。



Here are the steps:

以下是步骤:

  1. Download the 2 frameworks
  2. Drag to your project where your App Delegate is (make sure ticked "Copy items if needed")
  3. Compile the project / workspace in Xcode
  4. Add the "Run Script Phase" as instructed here; note that Xcode 10+ requires an extra configuration at Input Files
  5. Add the required importand initialization codes in App Delegate
  6. Add the Fabric API keys in Info.plist
  7. Compile again
  8. Run the App in a real device. You will see the line Crashlyticsin the Xcode log. If no log appears, checks if your active scheme contains OS_ACTIVITY_MODEsettings. Set it to defaultif the current setting is disabled.
  9. If the Crashlytics line appears, that means the manual installation is working; you will see your App appearing at Fabric online dashboard.
  1. 下载两个框架
  2. 拖动到您的 App Delegate 所在的项目(确保勾选“如果需要,请复制项目”)
  3. 在 Xcode 中编译项目/工作区
  4. 按照此处的说明添加“运行脚本阶段” ;请注意,Xcode 10+ 需要在以下位置进行额外配置Input Files
  5. import在 App Delegate 中添加所需和初始化代码
  6. 将 Fabric API 密钥添加到 Info.plist
  7. 再次编译
  8. 在真实设备上运行应用程序。您将Crashlytics在 Xcode 日志中看到该行。如果没有出现日志,请检查您的活动方案是否包含OS_ACTIVITY_MODE设置。default如果当前设置为,则将其设置为disabled
  9. 如果出现 Crashlytics 行,则表示手动安装正在运行;您将看到您的应用程序出现在 Fabric 在线仪表板上。

回答by Ricardo

I was stucked on Build phases too.

我也被困在构建阶段。

I have also unchecked "Run script only when installing"and press again command+B and then I passed to the next step.

我也取消选中"Run script only when installing"并再次按 command+B 然后我转到下一步。

回答by Oleg Danu

I have solved this issue by the following way. Following the advise from above, I began adding a new app to crashlytics. When I reached to adding new "Run script" build phase, I just copied that text and pasted it over the previous one(created with Crashlytics). I have also unchecked "Run script only when installing".

我已经通过以下方式解决了这个问题。按照上面的建议,我开始向 crashlytics 添加一个新应用程序。当我开始添加新的“运行脚本”构建阶段时,我只是复制了该文本并将其粘贴到前一个(使用 Crashlytics 创建)之上。我还取消选中“仅在安装时运行脚本”。

After this, I canceleed adding a new app and procedeed back to the UPGRADE. At this moment, building the app, can pass you to the next step and you don't get stuck on that screen anymore.

在此之后,我取消了添加新应用程序并继续进行升级。此时,构建应用程序可以让您进入下一步,您不再卡在该屏幕上。

回答by Picsou

If the script is not running, you may have checked the "run script only when installing" in the run script section. I hope it helps

如果脚本没有运行,您可能已经在运行脚本部分选中了“仅在安装时运行脚本”。我希望它有帮助

回答by Fyodor Volchyok

TL;DR

TL; 博士

Tap your scheme -> edit scheme -> set build configuration to "Release"

点击您的方案 -> 编辑方案 -> 将构建配置设置为“发布”

Explanation:

解释:

The most voted answersounds about right, but there are situations where you just don't need crashlytics in debug builds (who wants crashes sent when you just develop and experiment with your code?). In this case you should disable crashlytics by checking debug compilation flags (out of scope of this answer) and for the first time during installation build app for release to let crashlytics know that you built app.

投票最多的答案听起来是正确的,但在某些情况下,您只是不需要在调试版本中使用 crashlytics(谁希望在您开发和试验代码时发送崩溃?)。在这种情况下,您应该通过检查调试编译标志(超出本答案的范围)来禁用 crashlytics,并在安装期间首次构建应用程序以让 crashlytics 知道您构建了应用程序。

回答by maxwell

If you use Xcode 10.

如果您使用Xcode 10

Project Navigator -> your project -> Targets -> Build Phases -> your Run Script for Fabric -> Input Files -> "+" (add input file) -> clear field and past this line:

Project Navigator -> your project -> Targets -> Build Phases -> your Run Script for Fabric -> Input Files -> "+" (add input file) -> clear field and over this line:

$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

Be sure to removethis: $(SRCROOT)/

一定要删除这个:$(SRCROOT)/

enter image description here

在此处输入图片说明

回答by ZardozSpeaks

I was only able to get the Fabric app to continue the installation process after setting my build target to 'Generic iOS Device' and creating an archive from the Product > Archive menu.

在将构建目标设置为“通用 iOS 设备”并从“产品”>“存档”菜单创建存档后,我只能让 Fabric 应用程序继续安装过程。

Simply building the app or running it on an emulator doesn't seem to trigger the Fabric App to proceed.

简单地构建应用程序或在模拟器上运行它似乎不会触发 Fabric 应用程序继续。