Skip to content

Commit 509ba78

Browse files
author
Eric Wu
committed
修复bug
1 parent 29ee347 commit 509ba78

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CRBoostSwift/Classes/CRMacros.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public func CRDisplayNetworkIndicator(flag: Bool) {
138138
// MARK: - system
139139

140140
public let CRAppBuild = Bundle.main.infoDictionary![kCFBundleVersionKey as String] as! String
141-
public let CRAppVersionShort = Bundle.main.infoDictionary!["CRAppVersionShort"] as! String
141+
public let CRAppVersionShort = Bundle.main.infoDictionary!["CFBundleShortVersionString"] as! String
142142
public let CRAppName = Bundle.main.infoDictionary!["CFBundleDisplayName"] as! String
143143

144144
public let CRIdfa = ASIdentifierManager.shared().advertisingIdentifier.uuidString

CRBoostSwift/Classes/CRMath.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,10 @@ public func CRPresentAlert(title: String?, msg: String, handler: AlertAction? =
371371
alert.addAction(alertAction)
372372
}
373373
action.forEach { item in
374-
let alertAction = UIAlertAction(title: item, style: .default, handler: handler)
375-
alert.addAction(alertAction)
374+
if !item.isEmpty {
375+
let alertAction = UIAlertAction(title: item, style: .default, handler: handler)
376+
alert.addAction(alertAction)
377+
}
376378
}
377379
CRTopViewController()?.present(alert, animated: true, completion: nil)
378380
return alert
@@ -567,7 +569,7 @@ public func CRIsNullOrEmpty(text: String?) -> Bool {
567569
guard !string.isEmpty && string != "(null)" && string != "<null>" else {
568570
return true
569571
}
570-
} else { return true}
572+
} else { return true }
571573
return false
572574
}
573575

0 commit comments

Comments
 (0)