mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-06-15 10:07:55 +08:00
22 lines
788 B
Swift
22 lines
788 B
Swift
//
|
|
// LogEnvironmentInformation.swift
|
|
// Freetime
|
|
//
|
|
// Created by Ryan Nystrom on 12/17/17.
|
|
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import Crashlytics
|
|
|
|
func LogEnvironmentInformation(application: UIApplication) {
|
|
// information to help understand the device+locale demographics of users
|
|
// be able to better prioritize & serve AX, RTL, and non-en languages
|
|
Answers.logCustomEvent(withName: "environment", customAttributes: [
|
|
"voice-enabled": UIAccessibilityIsVoiceOverRunning() ? "1": "0",
|
|
"lang": NSLocale.autoupdatingCurrent.languageCode ?? "n/a",
|
|
"country": NSLocale.autoupdatingCurrent.regionCode ?? "n/a",
|
|
"rtl": application.userInterfaceLayoutDirection == .rightToLeft ? "1" : "0",
|
|
])
|
|
}
|