File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,7 @@ import SwiftUI
2121@main
2222struct CrashlyticsSwiftUIExampleApp : App {
2323 private var crashlyticsReference = Crashlytics . crashlytics ( )
24- #if !os(watchOS)
25- let reachabilityHelper = ReachabililtyHelper ( )
26- #endif
24+ let reachabilityHelper = ReachabilityHelper ( )
2725
2826 func setUserInfo( ) {
2927 let userInfo = [
@@ -46,15 +44,12 @@ struct CrashlyticsSwiftUIExampleApp: App {
4644 func setCustomValues( ) {
4745 crashlyticsReference. setCustomValue ( 42 , forKey: " MeaningOfLife " )
4846 crashlyticsReference. setCustomValue ( " Test value " , forKey: " last_UI_action " )
49- // Reachability is not compatible with watchOS
50- #if !os(watchOS)
51- let customKeysObject = [
52- " locale " : reachabilityHelper. getLocale ( ) ,
53- " network_connection " : reachabilityHelper. getNetworkStatus ( ) ,
54- ] as [ String : Any ]
55- crashlyticsReference. setCustomKeysAndValues ( customKeysObject)
56- reachabilityHelper. updateAndTrackNetworkStatus ( )
57- #endif
47+ let customKeysObject = [
48+ " locale " : reachabilityHelper. getLocale ( ) ,
49+ " network_connection " : reachabilityHelper. getNetworkStatus ( ) ,
50+ ] as [ String : Any ]
51+ crashlyticsReference. setCustomKeysAndValues ( customKeysObject)
52+ reachabilityHelper. updateAndTrackNetworkStatus ( )
5853 Crashlytics . crashlytics ( ) . setUserID ( " 123456789 " )
5954 }
6055
You can’t perform that action at this time.
0 commit comments