Skip to content

Commit 97906bd

Browse files
Merge pull request #34 from testimonialkit/develop
Develop
2 parents bc0f0a1 + 05a1c33 commit 97906bd

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Sources/TestimonialKit/DependencyInjection.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ extension Container {
1616
self {
1717
/// Resolve host app identity and environment metadata.
1818
let bundleId = Bundle.main.bundleIdentifier ?? "unknown"
19-
let countryCode = Locale.current.region?.identifier ?? "unknown"
19+
var countryCode: String = "unknown"
20+
if #available(iOS 16, *) {
21+
countryCode = Locale.current.region?.identifier ?? "unknown"
22+
} else {
23+
countryCode = Locale.current.regionCode ?? "unknown"
24+
}
2025
let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "unknown"
2126
let build = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "unknown"
2227
let appVersion = "\(version) (\(build))"

Sources/TestimonialKit/UI/Views/PromptCommentView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct PromptCommentView: View {
3131
subtitle: strings.subtitle
3232
)
3333

34-
if #available(iOS 16.0, *) {
34+
if #available(iOS 16.0, *), #available(macOS 13.0, *) {
3535
TextField(strings.placeholder, text: $comment, axis: .vertical)
3636
.applyThemeTextFieldStyle()
3737
.lineLimit(3...6)

0 commit comments

Comments
 (0)