Slide 17
Slide 17 text
७ਖ਼όοΫϙʔτ / ݹ͍OS͚ͩswiftinterfaceʹ࣮͕ల։͞ΕΔ
• ݹ͍OSͰγϯϘϧ͕ଘࡏ͍ͯ͜͠ͱʹ͢ΔͨΊͷम০: @backDeployed
• ৽OSϥΠϒϥϦͷόΠφϦΛ͍ͭͭɺݹ͍OSswiftinterfaceͷ࣮Λ͏͜ͱͱ͔
• SwiftUIʹ΄ͱΜͲݟͳ͍͕ɺStoreKitͰಛʹΑ͘ΘΕ͍ͯΔ
struct Transaction {
@backDeployed(before: iOS 17.2, macOS 14.2, tvOS 17.2, watchOS 10.2, visionOS 1.1)
public var currency: Foundation.Locale.Currency? {
get {
if #available(iOS 17.2, macOS 14.2, tvOS 17.2, watchOS 10.2, visionOS 1.1, *) {
return currencyStorage
}
else {
return backing.value(
atKeyPath: "currency",
sentinel: nil,
transform: { String($0).map({ Locale.Currency($0) }) }
)
}
}
}
}