简体   繁体   中英

Crashlytics Framework doesn't detect the Info plist on iOS

I am trying to add Crashlytics framework in my project, however, when I go through the process and reach the point where I add the framework to the project. The "Fabric" script plugin on the Mac doesn't detect that the frame work has been add to the project, and I think because the it doesn't detect the Info.plist in my project as I have changed the name of the Info.plist to something else. I have tried to change it back to Info.plist but still doesn't work. How can I make the framework to detect the info.plist in my project.

Thanks

I'm not sure if what I encountered was the same thing, but when trying to archive my project, I received the following error:

❌ error: Fabric: Info.plist Error

I poked through the output in XCode which mentioned it could be a timing issue and to make sure that I made the "Fabric" build phase one of the last build phases. So I updated the XCode configuration and made the Fabric step run just before the "Upload Symbols to Fabric" step, and this cleared up the issue. See the image below.

XCode构建阶段

The root cause for me was an empty Bundle Identifier (although the key was set in info.plist).

在此输入图像描述

After setting up a new XCode-project as a copy of another one i copied the info.plist with all keys into the new project. But it uses variables like $(PRODUCT_BUNDLE_IDENTIFIER), which was assigned somewhere else (maybe in the project file, that i haven't copied also)

In the screenshot the field with the round oval was empty then as a result. After applying the correct bundle identifier, everything has built fine.

Xcode 10 only:

Add your app's built Info.plist location to the Build Phase's Input Files field:

$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

Move the RunScript in Target -> Build Phase to the last and give it a try:

在此输入图像描述

Did you add the Fabric NSDictionary entry to your .plist(s)?

在此输入图像描述

Set absolute path of Info.plist in "Input Files"

  • Add/Change "Input Files" value in Run Script added for Fabric under "Build Phases"
  • From "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)" To " new path* /Info.plist"

*new path : You can also get Info.plist path from Build Settings -> Packaging -> Info.plist File

Plist文件路径

Add your app's built Info.plist location to the Build Phase's Input Files field:

$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

Note: Put exact same lines as given above to resolve this issue I am using Xcode_10.1 and this is working perfectly fine for me and on Fabric official website they specifically mention the same solution as given above Please refer this image to see attached screenshots of Xcode to get more details about where to put this line

Xcode 10 only:

Add your app's built Info.plist location to the Build Phase's Input Files field:

$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

at the same time, Move the runscript to the last row.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM