DEVICE SECURITY COMPROMISED
CheckDeviceCoordinator
private func checkDevice() {
let deviceChecker = CheckDeviceCoordinator(
navigationController: navigationController,
jailbreakChecker: DeviceChecker()
)
deviceChecker.start()
addCoordinator(deviceChecker)
}
class DeviceChecker: JailbreakChecker {
var isJailbroken: Bool {
if TARGET_IPHONE_SIMULATOR == 1 {
return false
}
let list: [String] = [
"/Applications/Cydia.app",
"/Library/MobileSubstrate/MobileSubstrate.dylib",
"/bin/bash",
"/usr/sbin/sshd",
"/etc/apt",
"/private/var/lib/apt/",
]
return !list.filter { FileManager.default.fileExists(atPath: $0) }.isEmpty
}
}
emailListPromptMessage
receiveEmailSelected
@objc private func
func didFinish(in viewController: CollectUsersEmailViewController, email: String) {
if email.isEmpty {
logEmailNewsletterSubscription(isSubscribed: false)
} else {
EmailList(listSpecificKey: Constants.Credentials.mailChimpListSpecificKey).subscribe(email: email)
logEmailNewsletterSubscription(isSubscribed: true)
}
}
class EmailList {
private let listSpecificKey: String
init(listSpecificKey: String) {
self.listSpecificKey = listSpecificKey
}
///We skip email validation since MailChimp does it, and this is low volume
func subscribe(email: String) {
guard Features.isPromptForEmailListSubscriptionEnabled else { return }
do {
try Mailchimp.initialize(token: listSpecificKey, autoTagContacts: true, debugMode: false)
var contact: Contact = Contact(emailAddress: email)
contact.status = .subscribed
Mailchimp.createOrUpdate(contact: contact)
} catch {
//TODO log to remote server
//no-op
}
}
}
'C++ > 현실세계 벤치마킹 -> 가상세계' 카테고리의 다른 글
Package Dependencies (0) | 2022.04.25 |
---|---|
Xcode shortcuts for VS code (0) | 2022.03.07 |
fortify (0) | 2022.03.06 |
언리얼엔진 VFX 설명 (0) | 2022.03.06 |
TrueDepth API notice 20220306 backups (0) | 2022.03.06 |
최근댓글