diff --git a/ios/App/App/CoachWorkoutKit.swift b/ios/App/App/CoachWorkoutKit.swift index e90f6af..7f1a1a5 100644 --- a/ios/App/App/CoachWorkoutKit.swift +++ b/ios/App/App/CoachWorkoutKit.swift @@ -163,8 +163,12 @@ public class CoachWorkoutKitPlugin: CAPPlugin, CAPBridgedPlugin { if let zone = spec.hrZone { ws.alert = HeartRateZoneAlert(zone: zone) } - if let label = spec.label, !label.isEmpty { - ws.displayName = label + // displayName n'est dispo qu'à partir d'iOS 18. Sur iOS 17, on + // garde l'affichage natif Apple "Travail" / "Récupération". + if #available(iOS 18.0, *) { + if let label = spec.label, !label.isEmpty { + ws.displayName = label + } } return IntervalStep(spec.isWork ? .work : .recovery, step: ws) }