Reputation: 676
I am having difficulty understanding this step on installing firebase Crashlytics in my app:
Xcode 10 only: Add your app's built Info.plist location to the Build Phase's Input Files field:
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
This what I have so far (please see picture), however, I am not getting any of the crash reports on Crashlytics. Am I putting the code in the wrong place? Where should I put it?
Upvotes: 22
Views: 10711
Reputation: 1794
Replace the round brackets with curly brackets like this
${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}
You can check if the path actually exists if you call echo $(BUILT_PRODUCTS_DIR)
in the script phase. Using round brackets gave me following info in the Xcode build console "BUILT_PRODUCTS_DIR: command not found".
Replacing the round brackets with curly brackets will print the actuall path and therefore the script finally worked for me.
Upvotes: 2
Reputation: 919
Please follow below steps to implement firebase crashlytics in to project
1) Setup Firebase account and create your project.
https://firebase.google.com/docs/crashlytics/?authuser=1
Must require this file: GoogleService-Info.plist
You can generate this file from Firebase
2) Install Firebase and Crashlytics using Podfile.
3) Go to Project -> Build Phase -> Click on " + " sign
Add run script as per below image
4) Import Firebase framework in AppDelegate file.
import Firebase
FirebaseApp.configure()
Fabric.sharedSDK().debug = true
// Put this method in your viewController
@IBAction func btnCrashClick(_ sender: Any) {
Crashlytics.sharedInstance().crash()
}
Upvotes: 3
Reputation: 3245
Its xcode 10 or above only,
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
example screenshot below,
2. In the Project Navigator, right click on "Info.plist", and "Open as" → "Source Code", add the below code
<key>Fabric</key> <dict> <key>APIKey</key> <string><FABRIC-API-KEY></string> <key>Kits</key> <array> <dict> <key>KitInfo</key> <dict/> <key>KitName</key> <string>Crashlytics</string> </dict> </array> </dict>
Finally Run your xcode 10 or above, its working fine. hope its helpful
Upvotes: 0
Reputation: 1103
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"
Upvotes: 5
Reputation: 1506
Use
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
instead of
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
Upvotes: 23
Reputation: 930
Please check step here https://fabric.io/kits/ios/crashlytics/manual-install
check that you follow all step or not. https://fabric.io/kits/ios/crashlytics/install
Upvotes: 3