I have integrated Crashlytics , here are the changes i have done.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
Fabric.with([Crashlytics.self()])
Crashlytics.sharedInstance().debugMode = true
Have you added a key like.
"${PODS_ROOT}/Fabric/run" ed9c83ee83d41dc717a07531450c480895e41264 b6cc34ec354a4f96ab160958b4s2a01cc321be62acaa6116983376a5113c9s36
Related
Implemented all steps from firebase doc :
Create App on firebase
add google plist in project
POD installed
Add FirebaseApp.configure() in didFinishLaunchingWithOptions
Added run script ${PODS_ROOT}/Fabric/run
update Debug information format
Please make sure Firebase configuration should be first line in the didFinishLaunchingWithOptions method of AppDelegate file.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
Fabric.sharedSDK().debug = true
return true
}
I want to use Braze to send in-app message notification and show customized UI to replace the UI created by Braze. But beforeInAppMessageDisplayed is never called. Below is how I done.
I added
Appboy.start(withApiKey: apiKey, in: application, withLaunchOptions: launchOptions, withAppboyOptions: [ ABKInAppMessageControllerDelegateKey: self ]) in func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
and also added
func beforeInAppMessageDisplayed(inAppMessage: ABKInAppMessage!) -> ABKInAppMessageDisplayChoice
in AppDelegate class.
I resolved this issue by putting func beforeInAppMessageDisplayed(inAppMessage: ABKInAppMessage!) -> ABKInAppMessageDisplayChoice in ABKInAppMessageControllerDelegate.
Is there a way where I can use firebase to store data on the iphone device so that even after the user turns off and then turns on the device, the data remains in the device?
Put this in your AppDelegate file
Swift 3
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
FIRApp.configure()
FIRDatabase.database().persistenceEnabled = true
return true
}
In my app I have to get some data from webmethod before app launched, so I have to call a webmethod in this function:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {}
How can I block the function until the webmethod return its result?
Recently converted a project to Swift 2.2 and running into issues that didn't exist prior. I've tried searching for a workaround but haven't found any similar posts.
Use of undeclared type 'UIApplicationLaunchOptionsKey'.
I can't tell what's wrong with this code in the AppDelegate.swift:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
//UIToolbar.appearance().tintColor = UIColor.clearColor()
return true
}
Try changing the method signature to
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
The signature is modified to func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool in swift 3
In Swift 3 the method is changed to:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}