[Intents] Update according to breaking changes from Apple. (#5850)

* [Intents] Update according to breaking changes from Apple.

Reference: https://trello.com/c/dtVv2a6R/131-43425168-inworkoutintentresponsecode-enum-values-changed
Reference: rdar://43425168

Working around this breaking change becomes quite complicated, so I just
exposed it instead. Customers can still work around it if needed by casting
the expected numeric value to the enum type.

* Add some advice.
This commit is contained in:
Rolf Bjarne Kvinge 2019-04-05 18:46:40 +02:00 коммит произвёл GitHub
Родитель fad23e95b2
Коммит 64d4831802
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 20 добавлений и 10 удалений

Просмотреть файл

@ -76,10 +76,12 @@ namespace Intents {
Failure,
FailureRequiringAppLaunch,
FailureNoMatchingWorkout,
[NoWatch, iOS (11,0)]
Success,
[Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 7, which is now defined as 'Success').")]
[NoWatch, iOS (11,0)]
HandleInApp,
[Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 6, which is now defined as 'HandleInApp').")]
[NoWatch, iOS (11,0)]
Success,
}
[iOS (10, 0)]
@ -158,10 +160,12 @@ namespace Intents {
Failure,
FailureRequiringAppLaunch,
FailureNoMatchingWorkout,
[NoWatch, iOS (11,0)]
Success,
[Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 7, which is now defined as 'Success').")]
[NoWatch, iOS (11,0)]
HandleInApp,
[Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 6, which is now defined as 'HandleInApp').")]
[NoWatch, iOS (11,0)]
Success,
}
[iOS (10, 0)]
@ -348,10 +352,12 @@ namespace Intents {
Failure,
FailureRequiringAppLaunch,
FailureNoMatchingWorkout,
[NoWatch, iOS (11,0)]
Success,
[Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 7, which is now defined as 'Success').")]
[NoWatch, iOS (11,0)]
HandleInApp,
[Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 6, which is now defined as 'HandleInApp').")]
[NoWatch, iOS (11,0)]
Success,
}
[iOS (10, 0)]
@ -527,10 +533,12 @@ namespace Intents {
Failure,
FailureRequiringAppLaunch,
FailureNoMatchingWorkout,
[NoWatch, iOS (11,0)]
Success,
[Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 7, which is now defined as 'Success').")]
[NoWatch, iOS (11,0)]
HandleInApp,
[Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 6, which is now defined as 'HandleInApp').")]
[NoWatch, iOS (11,0)]
Success,
}
[iOS (10, 0)]
@ -824,10 +832,12 @@ namespace Intents {
FailureRequiringAppLaunch,
FailureOngoingWorkout,
FailureNoMatchingWorkout,
[Watch (4,0), iOS (11,0)]
Success,
[Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 7, which is now defined as 'Success').")]
[Watch (4,0), iOS (11,0)]
HandleInApp,
[Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 6, which is now defined as 'HandleInApp').")]
[Watch (4,0), iOS (11,0)]
Success,
}
[iOS (10, 0)]