12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Crashlyticsの便利なクラスメソッド

Last updated at Posted at 2014-10-22

Crashlyticsのクラッシュレポートが送られた時に、設定しておくと一緒に情報が送られる。

##定型


+ (void)setUserIdentifier:(NSString *)identifier; 
+ (void)setUserName:(NSString *)name; 
+ (void)setUserEmail:(NSString *)email; 

##カスタム


+ (void)setObjectValue:(id)value forKey:(NSString *)key; // calls -description on value, perfect for NSStrings! 
+ (void)setIntValue:(int)value forKey:(NSString *)key; 
+ (void)setBoolValue:(BOOL)value forKey:(NSString *)key; 
+ (void)setFloatValue:(float)value forKey:(NSString *)key; 

##意図的にクラッシュさせる


[Crashlytics sharedInstance].debugMode = YES;
[[Crashlytics sharedInstance] crash];


12
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?