diff --git a/Make.config b/Make.config index 45c16694846a..ce091e058c81 100644 --- a/Make.config +++ b/Make.config @@ -29,7 +29,7 @@ PACKAGE_HEAD_REV=$(shell git rev-parse HEAD) # on wrench, because wrench technically builds hashes, not branches) # # -PACKAGE_HEAD_BRANCH=xcode8.1 +PACKAGE_HEAD_BRANCH=cycle8-xi ifeq ($(BUILD_REVISION),) CURRENT_BRANCH:=$(shell git rev-parse --abbrev-ref HEAD) else @@ -40,21 +40,21 @@ IOS_PRODUCT=Xamarin.iOS IOS_PACKAGE_NAME=Xamarin.iOS IOS_PACKAGE_NAME_LOWER=$(shell echo $(IOS_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]") # NEVER customize IOS_PACKAGE_VERSION itself, other parts (mtouch, web updater) are using the IOS_PACKAGE_VERSION_* variables -IOS_PACKAGE_VERSION=10.2.1.$(IOS_COMMIT_DISTANCE) +IOS_PACKAGE_VERSION=10.3.1.$(IOS_COMMIT_DISTANCE) IOS_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_PACKAGE_VERSION))) IOS_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(IOS_PACKAGE_VERSION))) IOS_PACKAGE_VERSION_REV=$(word 3, $(subst ., ,$(IOS_PACKAGE_VERSION))) IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE) IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD)) -# Xcode 8.1 -XCODE_VERSION=8.1 -XCODE_URL=http://xamarin-storage/bot-provisioning/Xcode_8.1.xip -XCODE_DEVELOPER_ROOT=/Applications/Xcode81.app/Contents/Developer +# Xcode 8.2 +XCODE_VERSION=8.2 +XCODE_URL=http://xamarin-storage/bot-provisioning/Xcode_8.2.xip +XCODE_DEVELOPER_ROOT=/Applications/Xcode82.app/Contents/Developer # Minimum Mono version MIN_MONO_VERSION=4.6.1.5 -MAX_MONO_VERSION=4.6.99 +MAX_MONO_VERSION=4.8.0.269 MIN_MONO_URL=http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-4.6.1.5.macos10.xamarin.universal.pkg # Minimum Xamarin Studio version @@ -67,10 +67,10 @@ MIN_OSX_BUILD_VERSION=10.11 MIN_OSX_VERSION_FOR_IOS=10.10 MIN_OSX_VERSION_FOR_MAC=10.10 -IOS_SDK_VERSION=10.1 +IOS_SDK_VERSION=10.2 OSX_SDK_VERSION=10.12 WATCH_SDK_VERSION=3.1 -TVOS_SDK_VERSION=10.0 +TVOS_SDK_VERSION=10.1 MIN_IOS_SDK_VERSION=6.0 MIN_OSX_SDK_VERSION=10.7 diff --git a/runtime/bindings-generator.cs b/runtime/bindings-generator.cs index ef3fa09f2fa2..7e12d5957a80 100644 --- a/runtime/bindings-generator.cs +++ b/runtime/bindings-generator.cs @@ -512,6 +512,44 @@ static IEnumerable GetFunctionData () } ); + data.Add ( + new FunctionData { + Comment = " // IntPtr func (float, Vector2, nuint, nuint, nuint, int, bool, IntPtr)", + Prefix = "simd__", + Variants = Variants.NonStret, + ReturnType = Types.IntPtr, + Parameters = new ParameterData[] { + new ParameterData { TypeData = Types.Float }, + new ParameterData { TypeData = Types.Vector2 }, + new ParameterData { TypeData = Types.NUInt }, + new ParameterData { TypeData = Types.NUInt }, + new ParameterData { TypeData = Types.NUInt }, + new ParameterData { TypeData = Types.Int32 }, + new ParameterData { TypeData = Types.Bool }, + new ParameterData { TypeData = Types.IntPtr }, + }, + } + ); + + data.Add ( + new FunctionData { + Comment = " // IntPtr func (float, Vector2, nuint, nuint, nuint, Int64, bool, IntPtr)", + Prefix = "simd__", + Variants = Variants.NonStret, + ReturnType = Types.IntPtr, + Parameters = new ParameterData[] { + new ParameterData { TypeData = Types.Float }, + new ParameterData { TypeData = Types.Vector2 }, + new ParameterData { TypeData = Types.NUInt }, + new ParameterData { TypeData = Types.NUInt }, + new ParameterData { TypeData = Types.NUInt }, + new ParameterData { TypeData = Types.Int64 }, + new ParameterData { TypeData = Types.Bool }, + new ParameterData { TypeData = Types.IntPtr }, + }, + } + ); + data.Add ( new FunctionData { Comment = " // bool func (Vector2i, IntPtr, IntPtr, IntPtr, IntPtr)", diff --git a/src/AVKit/Enums.cs b/src/AVKit/Enums.cs index 068d92beb825..bb99b7419123 100644 --- a/src/AVKit/Enums.cs +++ b/src/AVKit/Enums.cs @@ -1,4 +1,5 @@ using XamCore.ObjCRuntime; +using XamCore.Foundation; namespace XamCore.AVKit { @@ -24,4 +25,5 @@ public enum AVKitError : nint { PictureInPictureStartFailed = -1001 } #endif + } diff --git a/src/Constants.mac.cs.in b/src/Constants.mac.cs.in index 8d771cda48ec..8fec4e481d2d 100644 --- a/src/Constants.mac.cs.in +++ b/src/Constants.mac.cs.in @@ -123,5 +123,6 @@ namespace MonoMac { // macOS 10.12 public const string PhotosLibrary = "/System/Library/Frameworks/Photos.framework/Photos"; public const string IntentsLibrary = "/System/Library/Frameworks/Intents.framework/Intents"; + public const string MediaPlayerLibrary = "/System/Library/Frameworks/MediaPlayer.framework/MediaPlayer"; } } diff --git a/src/HomeKit/HMAccessoryCategory.cs b/src/HomeKit/HMAccessoryCategory.cs deleted file mode 100644 index 5ef012aa046b..000000000000 --- a/src/HomeKit/HMAccessoryCategory.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using XamCore.ObjCRuntime; -using XamCore.Foundation; - -namespace XamCore.HomeKit { - - partial class HMAccessoryCategory { - - [iOS (9,0)] - [TV (10,0)] - public HMAccessoryCategoryType CategoryType { - get { - var s = _CategoryType; - // safety in case the field does not exists / cannot be loaded / new in future iOS versions... - if (s == null) - return HMAccessoryCategoryType.Other; - if (s == HMAccessoryCategoryTypesInternal.SecuritySystem) - return HMAccessoryCategoryType.SecuritySystem; - if (s == HMAccessoryCategoryTypesInternal.Bridge) - return HMAccessoryCategoryType.Bridge; - if (s == HMAccessoryCategoryTypesInternal.Door) - return HMAccessoryCategoryType.Door; - if (s == HMAccessoryCategoryTypesInternal.DoorLock) - return HMAccessoryCategoryType.DoorLock; - if (s == HMAccessoryCategoryTypesInternal.Fan) - return HMAccessoryCategoryType.Fan; - if (s == HMAccessoryCategoryTypesInternal.GarageDoorOpener) - return HMAccessoryCategoryType.GarageDoorOpener; - if (s == HMAccessoryCategoryTypesInternal.Lightbulb) - return HMAccessoryCategoryType.Lightbulb; - if (s == HMAccessoryCategoryTypesInternal.Outlet) - return HMAccessoryCategoryType.Outlet; - if (s == HMAccessoryCategoryTypesInternal.ProgrammableSwitch) - return HMAccessoryCategoryType.ProgrammableSwitch; - if (s == HMAccessoryCategoryTypesInternal.Sensor) - return HMAccessoryCategoryType.Sensor; - if (s == HMAccessoryCategoryTypesInternal.Switch) - return HMAccessoryCategoryType.Switch; - if (s == HMAccessoryCategoryTypesInternal.Thermostat) - return HMAccessoryCategoryType.Thermostat; - if (s == HMAccessoryCategoryTypesInternal.Window) - return HMAccessoryCategoryType.Window; - if (s == HMAccessoryCategoryTypesInternal.WindowCovering) - return HMAccessoryCategoryType.WindowCovering; - // iOS 9.3 - if (s == HMAccessoryCategoryTypesInternal.RangeExtender) - return HMAccessoryCategoryType.RangeExtender; - // iOS 10.0 - if (s == HMAccessoryCategoryTypesInternal.IPCamera) - return HMAccessoryCategoryType.IPCamera; - if (s == HMAccessoryCategoryTypesInternal.VideoDoorbell) - return HMAccessoryCategoryType.VideoDoorbell; - return HMAccessoryCategoryType.Other; - } - } - } -} diff --git a/src/HomeKit/HMCharacteristic.cs b/src/HomeKit/HMCharacteristic.cs index bda49e8c69ef..a7cac5060625 100644 --- a/src/HomeKit/HMCharacteristic.cs +++ b/src/HomeKit/HMCharacteristic.cs @@ -8,185 +8,6 @@ namespace XamCore.HomeKit { [TV (10,0)] partial class HMCharacteristic { - public HMCharacteristicType CharacteristicType { - get { - var s = _CharacteristicType; - // safety in case the field does not exists / cannot be loaded / new in future iOS versions... - if (s == null) - return HMCharacteristicType.None; - if (s == HMCharacteristicTypeInternal.PowerState) - return HMCharacteristicType.PowerState; - if (s == HMCharacteristicTypeInternal.Hue) - return HMCharacteristicType.Hue; - if (s == HMCharacteristicTypeInternal.Saturation) - return HMCharacteristicType.Saturation; - if (s == HMCharacteristicTypeInternal.Brightness) - return HMCharacteristicType.Brightness; - if (s == HMCharacteristicTypeInternal.TemperatureUnits) - return HMCharacteristicType.TemperatureUnits; - if (s == HMCharacteristicTypeInternal.CurrentTemperature) - return HMCharacteristicType.CurrentTemperature; - if (s == HMCharacteristicTypeInternal.TargetTemperature) - return HMCharacteristicType.TargetTemperature; - if (s == HMCharacteristicTypeInternal.CurrentHeatingCooling) - return HMCharacteristicType.CurrentHeatingCooling; - if (s == HMCharacteristicTypeInternal.TargetHeatingCooling) - return HMCharacteristicType.TargetHeatingCooling; - if (s == HMCharacteristicTypeInternal.CoolingThreshold) - return HMCharacteristicType.CoolingThreshold; - if (s == HMCharacteristicTypeInternal.HeatingThreshold) - return HMCharacteristicType.HeatingThreshold; - if (s == HMCharacteristicTypeInternal.CurrentRelativeHumidity) - return HMCharacteristicType.CurrentRelativeHumidity; - if (s == HMCharacteristicTypeInternal.TargetRelativeHumidity) - return HMCharacteristicType.TargetRelativeHumidity; - if (s == HMCharacteristicTypeInternal.CurrentDoorState) - return HMCharacteristicType.CurrentDoorState; - if (s == HMCharacteristicTypeInternal.TargetDoorState) - return HMCharacteristicType.TargetDoorState; - if (s == HMCharacteristicTypeInternal.ObstructionDetected) - return HMCharacteristicType.ObstructionDetected; - if (s == HMCharacteristicTypeInternal.Name) - return HMCharacteristicType.Name; - if (s == HMCharacteristicTypeInternal.Manufacturer) - return HMCharacteristicType.Manufacturer; - if (s == HMCharacteristicTypeInternal.Model) - return HMCharacteristicType.Model; - if (s == HMCharacteristicTypeInternal.SerialNumber) - return HMCharacteristicType.SerialNumber; - if (s == HMCharacteristicTypeInternal.Identify) - return HMCharacteristicType.Identify; - if (s == HMCharacteristicTypeInternal.RotationDirection) - return HMCharacteristicType.RotationDirection; - if (s == HMCharacteristicTypeInternal.RotationSpeed) - return HMCharacteristicType.RotationSpeed; - if (s == HMCharacteristicTypeInternal.OutletInUse) - return HMCharacteristicType.OutletInUse; - if (s == HMCharacteristicTypeInternal.Version) - return HMCharacteristicType.Version; - if (s == HMCharacteristicTypeInternal.Logs) - return HMCharacteristicType.Logs; - if (s == HMCharacteristicTypeInternal.AudioFeedback) - return HMCharacteristicType.AudioFeedback; - if (s == HMCharacteristicTypeInternal.AdminOnlyAccess) - return HMCharacteristicType.AdminOnlyAccess; - if (s == HMCharacteristicTypeInternal.MotionDetected) - return HMCharacteristicType.MotionDetected; - if (s == HMCharacteristicTypeInternal.CurrentLockMechanismState) - return HMCharacteristicType.CurrentLockMechanismState; - if (s == HMCharacteristicTypeInternal.TargetLockMechanismState) - return HMCharacteristicType.TargetLockMechanismState; - if (s == HMCharacteristicTypeInternal.LockMechanismLastKnownAction) - return HMCharacteristicType.LockMechanismLastKnownAction; - if (s == HMCharacteristicTypeInternal.LockManagementControlPoint) - return HMCharacteristicType.LockManagementControlPoint; - if (s == HMCharacteristicTypeInternal.LockManagementAutoSecureTimeout) - return HMCharacteristicType.LockManagementAutoSecureTimeout; - // iOS 9 - if (s == HMCharacteristicTypeInternal.AirParticulateDensity) - return HMCharacteristicType.AirParticulateDensity; - if (s == HMCharacteristicTypeInternal.AirParticulateSize) - return HMCharacteristicType.AirParticulateSize; - if (s == HMCharacteristicTypeInternal.AirQuality) - return HMCharacteristicType.AirQuality; - if (s == HMCharacteristicTypeInternal.BatteryLevel) - return HMCharacteristicType.BatteryLevel; - if (s == HMCharacteristicTypeInternal.CarbonDioxideDetected) - return HMCharacteristicType.CarbonDioxideDetected; - if (s == HMCharacteristicTypeInternal.CarbonDioxideLevel) - return HMCharacteristicType.CarbonDioxideLevel; - if (s == HMCharacteristicTypeInternal.CarbonDioxidePeakLevel) - return HMCharacteristicType.CarbonDioxidePeakLevel; - if (s == HMCharacteristicTypeInternal.CarbonMonoxideDetected) - return HMCharacteristicType.CarbonMonoxideDetected; - if (s == HMCharacteristicTypeInternal.CarbonMonoxideLevel) - return HMCharacteristicType.CarbonMonoxideLevel; - if (s == HMCharacteristicTypeInternal.CarbonMonoxidePeakLevel) - return HMCharacteristicType.CarbonMonoxidePeakLevel; - if (s == HMCharacteristicTypeInternal.ChargingState) - return HMCharacteristicType.ChargingState; - if (s == HMCharacteristicTypeInternal.ContactState) - return HMCharacteristicType.ContactState; - if (s == HMCharacteristicTypeInternal.CurrentSecuritySystemState) - return HMCharacteristicType.CurrentSecuritySystemState; - if (s == HMCharacteristicTypeInternal.CurrentHorizontalTilt) - return HMCharacteristicType.CurrentHorizontalTilt; - if (s == HMCharacteristicTypeInternal.CurrentLightLevel) - return HMCharacteristicType.CurrentLightLevel; - if (s == HMCharacteristicTypeInternal.CurrentPosition) - return HMCharacteristicType.CurrentPosition; - if (s == HMCharacteristicTypeInternal.CurrentVerticalTilt) - return HMCharacteristicType.CurrentVerticalTilt; - if (s == HMCharacteristicTypeInternal.FirmwareVersion) - return HMCharacteristicType.FirmwareVersion; - if (s == HMCharacteristicTypeInternal.HardwareVersion) - return HMCharacteristicType.HardwareVersion; - if (s == HMCharacteristicTypeInternal.HoldPosition) - return HMCharacteristicType.HoldPosition; - if (s == HMCharacteristicTypeInternal.InputEvent) - return HMCharacteristicType.InputEvent; - if (s == HMCharacteristicTypeInternal.LeakDetected) - return HMCharacteristicType.LeakDetected; - if (s == HMCharacteristicTypeInternal.OccupancyDetected) - return HMCharacteristicType.OccupancyDetected; - if (s == HMCharacteristicTypeInternal.OutputState) - return HMCharacteristicType.OutputState; - if (s == HMCharacteristicTypeInternal.PositionState) - return HMCharacteristicType.PositionState; - if (s == HMCharacteristicTypeInternal.SmokeDetected) - return HMCharacteristicType.SmokeDetected; - if (s == HMCharacteristicTypeInternal.SoftwareVersion) - return HMCharacteristicType.SoftwareVersion; - if (s == HMCharacteristicTypeInternal.StatusActive) - return HMCharacteristicType.StatusActive; - if (s == HMCharacteristicTypeInternal.StatusFault) - return HMCharacteristicType.StatusFault; - if (s == HMCharacteristicTypeInternal.StatusJammed) - return HMCharacteristicType.StatusJammed; - if (s == HMCharacteristicTypeInternal.StatusLowBattery) - return HMCharacteristicType.StatusLowBattery; - if (s == HMCharacteristicTypeInternal.StatusTampered) - return HMCharacteristicType.StatusTampered; - if (s == HMCharacteristicTypeInternal.TargetSecuritySystemState) - return HMCharacteristicType.TargetSecuritySystemState; - if (s == HMCharacteristicTypeInternal.TargetHorizontalTilt) - return HMCharacteristicType.TargetHorizontalTilt; - if (s == HMCharacteristicTypeInternal.TargetPosition) - return HMCharacteristicType.TargetPosition; - if (s == HMCharacteristicTypeInternal.TargetVerticalTilt) - return HMCharacteristicType.TargetVerticalTilt; - // iOS 10.0 - if (s == HMCharacteristicTypeInternal.StreamingStatus) - return HMCharacteristicType.StreamingStatus; - if (s == HMCharacteristicTypeInternal.SetupStreamEndpoint) - return HMCharacteristicType.SetupStreamEndpoint; - if (s == HMCharacteristicTypeInternal.SupportedVideoStreamConfiguration) - return HMCharacteristicType.SupportedVideoStreamConfiguration; - if (s == HMCharacteristicTypeInternal.SupportedAudioStreamConfiguration) - return HMCharacteristicType.SupportedAudioStreamConfiguration; - if (s == HMCharacteristicTypeInternal.SupportedRtpConfiguration) - return HMCharacteristicType.SupportedRtpConfiguration; - if (s == HMCharacteristicTypeInternal.SelectedStreamConfiguration) - return HMCharacteristicType.SelectedStreamConfiguration; - if (s == HMCharacteristicTypeInternal.Volume) - return HMCharacteristicType.Volume; - if (s == HMCharacteristicTypeInternal.Mute) - return HMCharacteristicType.Mute; - if (s == HMCharacteristicTypeInternal.NightVision) - return HMCharacteristicType.NightVision; - if (s == HMCharacteristicTypeInternal.OpticalZoom) - return HMCharacteristicType.OpticalZoom; - if (s == HMCharacteristicTypeInternal.DigitalZoom) - return HMCharacteristicType.DigitalZoom; - if (s == HMCharacteristicTypeInternal.ImageRotation) - return HMCharacteristicType.ImageRotation; - if (s == HMCharacteristicTypeInternal.ImageMirroring) - return HMCharacteristicType.ImageMirroring; - - return HMCharacteristicType.None; - } - } - public bool SupportsEventNotification { get { foreach (var p in Properties){ diff --git a/src/HomeKit/HMEnums.cs b/src/HomeKit/HMEnums.cs index 105d11d665f2..fdaa2a33d3b6 100644 --- a/src/HomeKit/HMEnums.cs +++ b/src/HomeKit/HMEnums.cs @@ -99,6 +99,8 @@ public enum HMError : nint { InvalidOrMissingAuthorizationData = 87, BridgedAccessoryNotReachable = 88, NotAuthorizedForMicrophoneAccess = 89, + // iOS 10.2 + IncompatibleNetwork = 90, } @@ -107,139 +109,446 @@ public enum HMError : nint { [TV (10,0)] public enum HMCharacteristicType { None, + + [Field ("HMCharacteristicTypePowerState")] PowerState, + + [Field ("HMCharacteristicTypeHue")] Hue, + + [Field ("HMCharacteristicTypeSaturation")] Saturation, + + [Field ("HMCharacteristicTypeBrightness")] Brightness, + + [Field ("HMCharacteristicTypeTemperatureUnits")] TemperatureUnits, + + [Field ("HMCharacteristicTypeCurrentTemperature")] CurrentTemperature, + + [Field ("HMCharacteristicTypeTargetTemperature")] TargetTemperature, + + [Field ("HMCharacteristicTypeCurrentHeatingCooling")] CurrentHeatingCooling, + + [Field ("HMCharacteristicTypeTargetHeatingCooling")] TargetHeatingCooling, + + [Field ("HMCharacteristicTypeCoolingThreshold")] CoolingThreshold, + + [Field ("HMCharacteristicTypeHeatingThreshold")] HeatingThreshold, + + [Obsolete ("This value does not exist anymore and will always return null")] HeatingCoolingStatus, + + [Field ("HMCharacteristicTypeCurrentRelativeHumidity")] CurrentRelativeHumidity, + + [Field ("HMCharacteristicTypeTargetRelativeHumidity")] TargetRelativeHumidity, + + [Field ("HMCharacteristicTypeCurrentDoorState")] CurrentDoorState, + + [Field ("HMCharacteristicTypeTargetDoorState")] TargetDoorState, + + [Field ("HMCharacteristicTypeObstructionDetected")] ObstructionDetected, + + [Field ("HMCharacteristicTypeName")] Name, + + [Field ("HMCharacteristicTypeManufacturer")] Manufacturer, + + [Field ("HMCharacteristicTypeModel")] Model, + + [Field ("HMCharacteristicTypeSerialNumber")] SerialNumber, + + [Field ("HMCharacteristicTypeIdentify")] Identify, + + [Field ("HMCharacteristicTypeRotationDirection")] RotationDirection, + + [Field ("HMCharacteristicTypeRotationSpeed")] RotationSpeed, + + [Field ("HMCharacteristicTypeOutletInUse")] OutletInUse, + + [Field ("HMCharacteristicTypeVersion")] Version, + + [Field ("HMCharacteristicTypeLogs")] Logs, + + [Field ("HMCharacteristicTypeAudioFeedback")] AudioFeedback, + + [Field ("HMCharacteristicTypeAdminOnlyAccess")] AdminOnlyAccess, + + [Field ("HMCharacteristicTypeMotionDetected")] MotionDetected, + + [Field ("HMCharacteristicTypeCurrentLockMechanismState")] CurrentLockMechanismState, + + [Field ("HMCharacteristicTypeTargetLockMechanismState")] TargetLockMechanismState, + + [Field ("HMCharacteristicTypeLockMechanismLastKnownAction")] LockMechanismLastKnownAction, + + [Field ("HMCharacteristicTypeLockManagementControlPoint")] LockManagementControlPoint, + + [Field ("HMCharacteristicTypeLockManagementAutoSecureTimeout")] LockManagementAutoSecureTimeout, + [iOS (9,0)] + [Field ("HMCharacteristicTypeAirParticulateDensity")] AirParticulateDensity, + [iOS (9,0)] + [Field ("HMCharacteristicTypeAirParticulateSize")] AirParticulateSize, + [iOS (9,0)] + [Field ("HMCharacteristicTypeAirQuality")] AirQuality, + [iOS (9,0)] + [Field ("HMCharacteristicTypeBatteryLevel")] BatteryLevel, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCarbonDioxideDetected")] CarbonDioxideDetected, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCarbonDioxideLevel")] CarbonDioxideLevel, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCarbonDioxidePeakLevel")] CarbonDioxidePeakLevel, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCarbonMonoxideDetected")] CarbonMonoxideDetected, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCarbonMonoxideLevel")] CarbonMonoxideLevel, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCarbonMonoxidePeakLevel")] CarbonMonoxidePeakLevel, + [iOS (9,0)] + [Field ("HMCharacteristicTypeChargingState")] ChargingState, + [iOS (9,0)] + [Field ("HMCharacteristicTypeContactState")] ContactState, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCurrentSecuritySystemState")] CurrentSecuritySystemState, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCurrentHorizontalTilt")] CurrentHorizontalTilt, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCurrentLightLevel")] CurrentLightLevel, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCurrentPosition")] CurrentPosition, + [iOS (9,0)] + [Field ("HMCharacteristicTypeCurrentVerticalTilt")] CurrentVerticalTilt, + [iOS (9,0)] + [Field ("HMCharacteristicTypeFirmwareVersion")] FirmwareVersion, + [iOS (9,0)] + [Field ("HMCharacteristicTypeHardwareVersion")] HardwareVersion, + [iOS (9,0)] + [Field ("HMCharacteristicTypeHoldPosition")] HoldPosition, + [iOS (9,0)] + [Field ("HMCharacteristicTypeInputEvent")] InputEvent, + [iOS (9,0)] + [Field ("HMCharacteristicTypeLeakDetected")] LeakDetected, + [iOS (9,0)] + [Field ("HMCharacteristicTypeOccupancyDetected")] OccupancyDetected, + [iOS (9,0)] + [Field ("HMCharacteristicTypeOutputState")] OutputState, + [iOS (9,0)] + [Field ("HMCharacteristicTypePositionState")] PositionState, + [iOS (9,0)] + [Field ("HMCharacteristicTypeSmokeDetected")] SmokeDetected, + [iOS (9,0)] + [Field ("HMCharacteristicTypeSoftwareVersion")] SoftwareVersion, + [iOS (9,0)] + [Field ("HMCharacteristicTypeStatusActive")] StatusActive, + [iOS (9,0)] + [Field ("HMCharacteristicTypeStatusFault")] StatusFault, + [iOS (9,0)] + [Field ("HMCharacteristicTypeStatusJammed")] StatusJammed, + [iOS (9,0)] + [Field ("HMCharacteristicTypeStatusLowBattery")] StatusLowBattery, + [iOS (9,0)] + [Field ("HMCharacteristicTypeStatusTampered")] StatusTampered, + [iOS (9,0)] + [Field ("HMCharacteristicTypeTargetSecuritySystemState")] TargetSecuritySystemState, + [iOS (9,0)] + [Field ("HMCharacteristicTypeTargetHorizontalTilt")] TargetHorizontalTilt, + [iOS (9,0)] + [Field ("HMCharacteristicTypeTargetPosition")] TargetPosition, + [iOS (9,0)] + [Field ("HMCharacteristicTypeTargetVerticalTilt")] TargetVerticalTilt, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeStreamingStatus")] StreamingStatus, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeSetupStreamEndpoint")] SetupStreamEndpoint, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeSupportedVideoStreamConfiguration")] SupportedVideoStreamConfiguration, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeSupportedAudioStreamConfiguration")] SupportedAudioStreamConfiguration, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeSupportedRTPConfiguration")] SupportedRtpConfiguration, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeSelectedStreamConfiguration")] SelectedStreamConfiguration, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeVolume")] Volume, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeMute")] Mute, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeNightVision")] NightVision, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeOpticalZoom")] OpticalZoom, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeDigitalZoom")] DigitalZoom, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeImageRotation")] ImageRotation, + [iOS (10,0), Watch (3,0)] + [Field ("HMCharacteristicTypeImageMirroring")] ImageMirroring, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeActive")] + Active, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeCurrentAirPurifierState")] + CurrentAirPurifierState, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeTargetAirPurifierState")] + TargetAirPurifierState, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeCurrentFanState")] + CurrentFanState, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeCurrentHeaterCoolerState")] + CurrentHeaterCoolerState, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeCurrentHumidifierDehumidifierState")] + CurrentHumidifierDehumidifierState, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeCurrentSlatState")] + CurrentSlatState, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeWaterLevel")] + WaterLevel, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeFilterChangeIndication")] + FilterChangeIndication, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeFilterLifeLevel")] + FilterLifeLevel, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeFilterResetChangeIndication")] + FilterResetChangeIndication, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeLockPhysicalControls")] + LockPhysicalControls, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeSwingMode")] + SwingMode, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeTargetHeaterCoolerState")] + TargetHeaterCoolerState, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeTargetHumidifierDehumidifierState")] + TargetHumidifierDehumidifierState, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeTargetFanState")] + TargetFanState, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeSlatType")] + SlatType, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeCurrentTilt")] + CurrentTilt, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeTargetTilt")] + TargetTilt, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeOzoneDensity")] + OzoneDensity, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeNitrogenDioxideDensity")] + NitrogenDioxideDensity, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeSulphurDioxideDensity")] + SulphurDioxideDensity, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypePM2_5Density")] + PM2_5Density, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypePM10Density")] + PM10Density, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeVolatileOrganicCompoundDensity")] + VolatileOrganicCompoundDensity, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeDehumidifierThreshold")] + DehumidifierThreshold, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMCharacteristicTypeHumidifierThreshold")] + HumidifierThreshold, + + [iOS (9,0), Watch (2,0), TV (10,0)] + [Field ("HMCharacteristicTypeSecuritySystemAlarmType")] + SecuritySystemAlarmType, } // conveniance enum (ObjC uses NSString) @@ -267,61 +576,155 @@ public enum HMCharacteristicMetadataUnits { [Flags] public enum HMServiceType { None, + + [Field ("HMServiceTypeLightbulb")] LightBulb, + + [Field ("HMServiceTypeSwitch")] Switch, + + [Field ("HMServiceTypeThermostat")] Thermostat, + + [Field ("HMServiceTypeGarageDoorOpener")] GarageDoorOpener, + + [Field ("HMServiceTypeAccessoryInformation")] AccessoryInformation, + + [Field ("HMServiceTypeFan")] Fan, + + [Field ("HMServiceTypeOutlet")] Outlet, + + [Field ("HMServiceTypeLockMechanism")] LockMechanism, + + [Field ("HMServiceTypeLockManagement")] LockManagement, + [iOS (9,0)] + [Field ("HMServiceTypeAirQualitySensor")] AirQualitySensor, + [iOS (9,0)] + [Field ("HMServiceTypeBattery")] Battery, + [iOS (9,0)] + [Field ("HMServiceTypeCarbonDioxideSensor")] CarbonDioxideSensor, + [iOS (9,0)] + [Field ("HMServiceTypeCarbonMonoxideSensor")] CarbonMonoxideSensor, + [iOS (9,0)] + [Field ("HMServiceTypeContactSensor")] ContactSensor, + [iOS (9,0)] + [Field ("HMServiceTypeDoor")] Door, + [iOS (9,0)] + [Field ("HMServiceTypeHumiditySensor")] HumiditySensor, + [iOS (9,0)] + [Field ("HMServiceTypeLeakSensor")] LeakSensor, + [iOS (9,0)] + [Field ("HMServiceTypeLightSensor")] LightSensor, + [iOS (9,0)] + [Field ("HMServiceTypeMotionSensor")] MotionSensor, + [iOS (9,0)] + [Field ("HMServiceTypeOccupancySensor")] OccupancySensor, + [iOS (9,0)] + [Field ("HMServiceTypeSecuritySystem")] SecuritySystem, + [iOS (9,0)] + [Field ("HMServiceTypeStatefulProgrammableSwitch")] StatefulProgrammableSwitch, + [iOS (9,0)] + [Field ("HMServiceTypeStatelessProgrammableSwitch")] StatelessProgrammableSwitch, + [iOS (9,0)] + [Field ("HMServiceTypeSmokeSensor")] SmokeSensor, + [iOS (9,0)] + [Field ("HMServiceTypeTemperatureSensor")] TemperatureSensor, + [iOS (9,0)] + [Field ("HMServiceTypeWindow")] Window, + [iOS (9,0)] + [Field ("HMServiceTypeWindowCovering")] WindowCovering, + [iOS (10,0), Watch (3,0)] + [Field ("HMServiceTypeCameraRTPStreamManagement")] CameraRtpStreamManagement, + [iOS (10,0), Watch (3,0)] + [Field ("HMServiceTypeCameraControl")] CameraControl, + [iOS (10,0), Watch (3,0)] + [Field ("HMServiceTypeMicrophone")] Microphone, + [iOS (10,0), Watch (3,0)] + [Field ("HMServiceTypeSpeaker")] Speaker, + [iOS (10,0), Watch (3,0)] + [Field ("HMServiceTypeDoorbell")] Doorbell, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMServiceTypeAirPurifier")] + AirPurifier, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMServiceTypeVentilationFan")] + VentilationFan, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMServiceTypeFilterMaintenance")] + FilterMaintenance, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMServiceTypeHeaterCooler")] + HeaterCooler, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMServiceTypeHumidifierDehumidifier")] + HumidifierDehumidifier, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMServiceTypeSlats")] + Slats, } // conveniance enum (ObjC uses NSString) @@ -485,7 +888,9 @@ public enum HMCharacteristicValueSmokeDetectionStatus : nint { [Native] public enum HMCharacteristicValueChargingState : nint { None = 0, - InProgress + InProgress, + [iOS (10,2), Watch (3,1,1), TV (10,1)] + NotChargeable, } [Watch (3,0), TV (10,0), iOS (10,0)] @@ -548,33 +953,95 @@ public enum HMActionSetType { [TV (10,0)] // conveniance enum (ObjC uses NSString) public enum HMAccessoryCategoryType { + [Field ("HMAccessoryCategoryTypeOther")] Other = 0, + + [Field ("HMAccessoryCategoryTypeSecuritySystem")] SecuritySystem, + + [Field ("HMAccessoryCategoryTypeBridge")] Bridge, + + [Field ("HMAccessoryCategoryTypeDoor")] Door, + + [Field ("HMAccessoryCategoryTypeDoorLock")] DoorLock, + + [Field ("HMAccessoryCategoryTypeFan")] Fan, + #if !WATCH && !TVOS [Obsolete ("Use GarageDoorOpener instead")] DoorOpener, + + [Field ("HMAccessoryCategoryTypeGarageDoorOpener")] GarageDoorOpener = DoorOpener, #else + [Field ("HMAccessoryCategoryTypeGarageDoorOpener")] GarageDoorOpener, #endif + + [Field ("HMAccessoryCategoryTypeLightbulb")] Lightbulb, + + [Field ("HMAccessoryCategoryTypeOutlet")] Outlet, + + [Field ("HMAccessoryCategoryTypeProgrammableSwitch")] ProgrammableSwitch, + + [Field ("HMAccessoryCategoryTypeSensor")] Sensor, + + [Field ("HMAccessoryCategoryTypeSwitch")] Switch, + + [Field ("HMAccessoryCategoryTypeThermostat")] Thermostat, + + [Field ("HMAccessoryCategoryTypeWindow")] Window, + + [Field ("HMAccessoryCategoryTypeWindowCovering")] WindowCovering, + [iOS (10,0), Watch (3,0)] + [Field ("HMAccessoryCategoryTypeRangeExtender")] RangeExtender, + [iOS (10,0), Watch (3,0)] + [Field ("HMAccessoryCategoryTypeIPCamera")] IPCamera, + [iOS (10,0), Watch (3,0)] + [Field ("HMAccessoryCategoryTypeVideoDoorbell")] VideoDoorbell, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMAccessoryCategoryTypeAirPurifier")] + AirPurifier, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMAccessoryCategoryTypeAirHeater")] + AirHeater, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMAccessoryCategoryTypeAirConditioner")] + AirConditioner, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMAccessoryCategoryTypeAirHumidifier")] + AirHumidifier, + + [NoWatch] + [iOS (10,2), TV (10,1)] + [Field ("HMAccessoryCategoryTypeAirDehumidifier")] + AirDehumidifier, } [iOS (9,0)] @@ -617,4 +1084,125 @@ public enum HMCameraAudioStreamSetting : nuint IncomingAudioAllowed = 2, BidirectionalAudioAllowed = 3 } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueLockPhysicalControlsState : nint { + NotLocked = 0, + Locked, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueCurrentAirPurifierState : nint { + Inactive = 0, + Idle, + Active, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueTargetAirPurifierState : nint { + Manual = 0, + Automatic, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueCurrentSlatState : nint { + Stationary = 0, + Jammed, + Oscillating, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueSlatType : nint { + Horizontal = 0, + Vertical, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueFilterChange : nint { + NotNeeded = 0, + Needed, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueCurrentFanState : nint { + Inactive = 0, + Idle, + Active, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueTargetFanState : nint { + Manual = 0, + Automatic, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueCurrentHeaterCoolerState : nint { + Inactive = 0, + Idle, + Heating, + Cooling, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueTargetHeaterCoolerState : nint { + Automatic = 0, + Heat, + Cool, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueCurrentHumidifierDehumidifierState : nint { + Inactive = 0, + Idle, + Humidifying, + Dehumidifying, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueTargetHumidifierDehumidifierState : nint { + Automatic = 0, + Humidify, + Dehumidify, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueSwingMode : nint { + Disabled = 0, + Enabled, + } + + [NoWatch] + [TV (10,1), iOS (10,2)] + [Native] + public enum HMCharacteristicValueActivationState : nint { + Inactive = 0, + Active, + } } diff --git a/src/HomeKit/HMHome.cs b/src/HomeKit/HMHome.cs index c1b2ed58cb49..16cf2b291662 100644 --- a/src/HomeKit/HMHome.cs +++ b/src/HomeKit/HMHome.cs @@ -14,56 +14,69 @@ public HMService [] GetServices (HMServiceType serviceTypes) var arr = new List (); if ((serviceTypes & HMServiceType.LightBulb) == HMServiceType.LightBulb) - arr.Add (HMServiceTypeInternal.LightBulb); + arr.Add (HMServiceType.LightBulb.GetConstant ()); if ((serviceTypes & HMServiceType.Switch) == HMServiceType.Switch) - arr.Add (HMServiceTypeInternal.Switch); + arr.Add (HMServiceType.Switch.GetConstant ()); if ((serviceTypes & HMServiceType.Thermostat) == HMServiceType.Thermostat) - arr.Add (HMServiceTypeInternal.Thermostat); + arr.Add (HMServiceType.Thermostat.GetConstant ()); if ((serviceTypes & HMServiceType.GarageDoorOpener) == HMServiceType.GarageDoorOpener) - arr.Add (HMServiceTypeInternal.GarageDoorOpener); + arr.Add (HMServiceType.GarageDoorOpener.GetConstant ()); if ((serviceTypes & HMServiceType.AccessoryInformation) == HMServiceType.AccessoryInformation) - arr.Add (HMServiceTypeInternal.AccessoryInformation); + arr.Add (HMServiceType.AccessoryInformation.GetConstant ()); if ((serviceTypes & HMServiceType.Fan) == HMServiceType.Fan) - arr.Add (HMServiceTypeInternal.Fan); + arr.Add (HMServiceType.Fan.GetConstant ()); if ((serviceTypes & HMServiceType.Outlet) == HMServiceType.Outlet) - arr.Add (HMServiceTypeInternal.Outlet); + arr.Add (HMServiceType.Outlet.GetConstant ()); if ((serviceTypes & HMServiceType.LockMechanism) == HMServiceType.LockMechanism) - arr.Add (HMServiceTypeInternal.LockMechanism); + arr.Add (HMServiceType.LockMechanism.GetConstant ()); if ((serviceTypes & HMServiceType.LockManagement) == HMServiceType.LockManagement) - arr.Add (HMServiceTypeInternal.LockManagement); + arr.Add (HMServiceType.LockManagement.GetConstant ()); // iOS 9 if ((serviceTypes & HMServiceType.AirQualitySensor) == HMServiceType.AirQualitySensor) - arr.Add (HMServiceTypeInternal.AirQualitySensor); + arr.Add (HMServiceType.AirQualitySensor.GetConstant ()); if ((serviceTypes & HMServiceType.SecuritySystem) == HMServiceType.SecuritySystem) - arr.Add (HMServiceTypeInternal.SecuritySystem); + arr.Add (HMServiceType.SecuritySystem.GetConstant ()); if ((serviceTypes & HMServiceType.CarbonMonoxideSensor) == HMServiceType.CarbonMonoxideSensor) - arr.Add (HMServiceTypeInternal.CarbonMonoxideSensor); + arr.Add (HMServiceType.CarbonMonoxideSensor.GetConstant ()); if ((serviceTypes & HMServiceType.ContactSensor) == HMServiceType.ContactSensor) - arr.Add (HMServiceTypeInternal.ContactSensor); + arr.Add (HMServiceType.ContactSensor.GetConstant ()); if ((serviceTypes & HMServiceType.Door) == HMServiceType.Door) - arr.Add (HMServiceTypeInternal.Door); + arr.Add (HMServiceType.Door.GetConstant ()); if ((serviceTypes & HMServiceType.HumiditySensor) == HMServiceType.HumiditySensor) - arr.Add (HMServiceTypeInternal.HumiditySensor); + arr.Add (HMServiceType.HumiditySensor.GetConstant ()); if ((serviceTypes & HMServiceType.LeakSensor) == HMServiceType.LeakSensor) - arr.Add (HMServiceTypeInternal.LeakSensor); + arr.Add (HMServiceType.LeakSensor.GetConstant ()); if ((serviceTypes & HMServiceType.LightSensor) == HMServiceType.LightSensor) - arr.Add (HMServiceTypeInternal.LightSensor); + arr.Add (HMServiceType.LightSensor.GetConstant ()); if ((serviceTypes & HMServiceType.MotionSensor) == HMServiceType.MotionSensor) - arr.Add (HMServiceTypeInternal.MotionSensor); + arr.Add (HMServiceType.MotionSensor.GetConstant ()); if ((serviceTypes & HMServiceType.OccupancySensor) == HMServiceType.OccupancySensor) - arr.Add (HMServiceTypeInternal.OccupancySensor); + arr.Add (HMServiceType.OccupancySensor.GetConstant ()); if ((serviceTypes & HMServiceType.StatefulProgrammableSwitch) == HMServiceType.StatefulProgrammableSwitch) - arr.Add (HMServiceTypeInternal.StatefulProgrammableSwitch); + arr.Add (HMServiceType.StatefulProgrammableSwitch.GetConstant ()); if ((serviceTypes & HMServiceType.StatelessProgrammableSwitch) == HMServiceType.StatelessProgrammableSwitch) - arr.Add (HMServiceTypeInternal.StatelessProgrammableSwitch); + arr.Add (HMServiceType.StatelessProgrammableSwitch.GetConstant ()); if ((serviceTypes & HMServiceType.SmokeSensor) == HMServiceType.SmokeSensor) - arr.Add (HMServiceTypeInternal.SmokeSensor); + arr.Add (HMServiceType.SmokeSensor.GetConstant ()); if ((serviceTypes & HMServiceType.TemperatureSensor) == HMServiceType.TemperatureSensor) - arr.Add (HMServiceTypeInternal.TemperatureSensor); + arr.Add (HMServiceType.TemperatureSensor.GetConstant ()); if ((serviceTypes & HMServiceType.Window) == HMServiceType.Window) - arr.Add (HMServiceTypeInternal.Window); + arr.Add (HMServiceType.Window.GetConstant ()); if ((serviceTypes & HMServiceType.WindowCovering) == HMServiceType.WindowCovering) - arr.Add (HMServiceTypeInternal.WindowCovering); + arr.Add (HMServiceType.WindowCovering.GetConstant ()); + // iOS 10.2 + if ((serviceTypes & HMServiceType.AirPurifier) == HMServiceType.AirPurifier) + arr.Add (HMServiceType.AirPurifier.GetConstant ()); + if ((serviceTypes & HMServiceType.VentilationFan) == HMServiceType.VentilationFan) + arr.Add (HMServiceType.VentilationFan.GetConstant ()); + if ((serviceTypes & HMServiceType.FilterMaintenance) == HMServiceType.FilterMaintenance) + arr.Add (HMServiceType.FilterMaintenance.GetConstant ()); + if ((serviceTypes & HMServiceType.HeaterCooler) == HMServiceType.HeaterCooler) + arr.Add (HMServiceType.HeaterCooler.GetConstant ()); + if ((serviceTypes & HMServiceType.HumidifierDehumidifier) == HMServiceType.HumidifierDehumidifier) + arr.Add (HMServiceType.HumidifierDehumidifier.GetConstant ()); + if ((serviceTypes & HMServiceType.Slats) == HMServiceType.Slats) + arr.Add (HMServiceType.Slats.GetConstant ()); return _ServicesWithTypes (arr.ToArray ()); } diff --git a/src/HomeKit/HMService.cs b/src/HomeKit/HMService.cs index 3fdb1ac24716..7d1c7797c644 100644 --- a/src/HomeKit/HMService.cs +++ b/src/HomeKit/HMService.cs @@ -9,163 +9,22 @@ namespace XamCore.HomeKit { [iOS (8,0)] public partial class HMService { - public HMServiceType ServiceType { - get { - var s = _ServiceType; - // safety in case the field does not exists / cannot be loaded / new in future iOS versions... - if (s == null) - return HMServiceType.None; - - if (s == HMServiceTypeInternal.LightBulb) - return HMServiceType.LightBulb; - if (s == HMServiceTypeInternal.Switch) - return HMServiceType.Switch; - if (s == HMServiceTypeInternal.Thermostat) - return HMServiceType.Thermostat; - if (s == HMServiceTypeInternal.GarageDoorOpener) - return HMServiceType.GarageDoorOpener; - if (s == HMServiceTypeInternal.AccessoryInformation) - return HMServiceType.AccessoryInformation; - if (s == HMServiceTypeInternal.Fan) - return HMServiceType.Fan; - if (s == HMServiceTypeInternal.Outlet) - return HMServiceType.Outlet; - if (s == HMServiceTypeInternal.LockMechanism) - return HMServiceType.LockMechanism; - if (s == HMServiceTypeInternal.LockManagement) - return HMServiceType.LockManagement; - // iOS 9 - if (s == HMServiceTypeInternal.AirQualitySensor) - return HMServiceType.AirQualitySensor; - if (s == HMServiceTypeInternal.Battery) - return HMServiceType.Battery; - if (s == HMServiceTypeInternal.CarbonDioxideSensor) - return HMServiceType.CarbonDioxideSensor; - if (s == HMServiceTypeInternal.CarbonMonoxideSensor) - return HMServiceType.CarbonMonoxideSensor; - if (s == HMServiceTypeInternal.ContactSensor) - return HMServiceType.ContactSensor; - if (s == HMServiceTypeInternal.Door) - return HMServiceType.Door; - if (s == HMServiceTypeInternal.Doorbell) - return HMServiceType.Doorbell; - if (s == HMServiceTypeInternal.HumiditySensor) - return HMServiceType.HumiditySensor; - if (s == HMServiceTypeInternal.LeakSensor) - return HMServiceType.LeakSensor; - if (s == HMServiceTypeInternal.LightSensor) - return HMServiceType.LightSensor; - if (s == HMServiceTypeInternal.MotionSensor) - return HMServiceType.MotionSensor; - if (s == HMServiceTypeInternal.OccupancySensor) - return HMServiceType.OccupancySensor; - if (s == HMServiceTypeInternal.SecuritySystem) - return HMServiceType.SecuritySystem; - if (s == HMServiceTypeInternal.StatefulProgrammableSwitch) - return HMServiceType.StatefulProgrammableSwitch; - if (s == HMServiceTypeInternal.StatelessProgrammableSwitch) - return HMServiceType.StatelessProgrammableSwitch; - if (s == HMServiceTypeInternal.SmokeSensor) - return HMServiceType.SmokeSensor; - if (s == HMServiceTypeInternal.TemperatureSensor) - return HMServiceType.TemperatureSensor; - if (s == HMServiceTypeInternal.Window) - return HMServiceType.Window; - if (s == HMServiceTypeInternal.WindowCovering) - return HMServiceType.WindowCovering; - // iOS 10 - if (s == HMServiceTypeInternal.CameraRtpStreamManagement) - return HMServiceType.CameraRtpStreamManagement; - if (s == HMServiceTypeInternal.CameraControl) - return HMServiceType.CameraControl; - if (s == HMServiceTypeInternal.Microphone) - return HMServiceType.Microphone; - if (s == HMServiceTypeInternal.Speaker) - return HMServiceType.Speaker; - - return HMServiceType.None; - } - } - - NSString GetName (HMServiceType serviceType) - { - switch (serviceType) { - case HMServiceType.LightBulb: - return HMServiceTypeInternal.LightBulb; - case HMServiceType.Switch: - return HMServiceTypeInternal.Switch; - case HMServiceType.Thermostat: - return HMServiceTypeInternal.Thermostat; - case HMServiceType.GarageDoorOpener: - return HMServiceTypeInternal.GarageDoorOpener; - case HMServiceType.AccessoryInformation: - return HMServiceTypeInternal.AccessoryInformation; - case HMServiceType.Fan: - return HMServiceTypeInternal.Fan; - case HMServiceType.Outlet: - return HMServiceTypeInternal.Outlet; - case HMServiceType.LockMechanism: - return HMServiceTypeInternal.LockMechanism; - case HMServiceType.LockManagement: - return HMServiceTypeInternal.LockManagement; - // iOS 9 - case HMServiceType.AirQualitySensor: - return HMServiceTypeInternal.AirQualitySensor; - case HMServiceType.Battery: - return HMServiceTypeInternal.Battery; - case HMServiceType.CarbonDioxideSensor: - return HMServiceTypeInternal.CarbonDioxideSensor; - case HMServiceType.CarbonMonoxideSensor: - return HMServiceTypeInternal.CarbonMonoxideSensor; - case HMServiceType.ContactSensor: - return HMServiceTypeInternal.ContactSensor; - case HMServiceType.Door: - return HMServiceTypeInternal.Door; - case HMServiceType.HumiditySensor: - return HMServiceTypeInternal.HumiditySensor; - case HMServiceType.LeakSensor: - return HMServiceTypeInternal.LeakSensor; - case HMServiceType.LightSensor: - return HMServiceTypeInternal.LightSensor; - case HMServiceType.MotionSensor: - return HMServiceTypeInternal.MotionSensor; - case HMServiceType.OccupancySensor: - return HMServiceTypeInternal.OccupancySensor; - case HMServiceType.SecuritySystem: - return HMServiceTypeInternal.SecuritySystem; - case HMServiceType.StatefulProgrammableSwitch: - return HMServiceTypeInternal.StatefulProgrammableSwitch; - case HMServiceType.StatelessProgrammableSwitch: - return HMServiceTypeInternal.StatelessProgrammableSwitch; - case HMServiceType.SmokeSensor: - return HMServiceTypeInternal.SmokeSensor; - case HMServiceType.TemperatureSensor: - return HMServiceTypeInternal.TemperatureSensor; - case HMServiceType.Window: - return HMServiceTypeInternal.Window; - case HMServiceType.WindowCovering: - return HMServiceTypeInternal.WindowCovering; - default: - return null; - } - } - #if !WATCH && !TVOS public void UpdateAssociatedServiceType (HMServiceType serviceType, Action completion) { - UpdateAssociatedServiceType (GetName (serviceType), completion); + UpdateAssociatedServiceType (serviceType.GetConstant (), completion); } public Task UpdateAssociatedServiceTypeAsync (HMServiceType serviceType) { - return UpdateAssociatedServiceTypeAsync (GetName (serviceType)); + return UpdateAssociatedServiceTypeAsync (serviceType.GetConstant ()); } #if !XAMCORE_3_0 [Obsolete] public Task UpdateNameAsync (HMServiceType serviceType) { - return UpdateNameAsync (GetName (serviceType)); + return UpdateNameAsync (serviceType.GetConstant ()); } #endif #endif diff --git a/src/Intents/INCompat.cs b/src/Intents/INCompat.cs new file mode 100644 index 000000000000..f025cf4438fe --- /dev/null +++ b/src/Intents/INCompat.cs @@ -0,0 +1,29 @@ +// Compatibility stubs + +#if XAMCORE_2_0 && IOS + +using System; +using XamCore.Foundation; +using XamCore.ObjCRuntime; + +namespace XamCore.Intents { + +#if !XAMCORE_4_0 + public partial class INRideDriver { + + [Obsolete ("This constructor does not create a valid instance of the type")] + public INRideDriver () : base (NSObjectFlag.Empty) + { + } + } + + public partial class INRideStatus { + + [Obsolete ("This constructor does not create a valid instance of the type")] + public INRideStatus () + { + } + } +#endif +} +#endif \ No newline at end of file diff --git a/src/Intents/INSaveProfileInCarIntent.cs b/src/Intents/INSaveProfileInCarIntent.cs new file mode 100644 index 000000000000..4cb4d0372f41 --- /dev/null +++ b/src/Intents/INSaveProfileInCarIntent.cs @@ -0,0 +1,30 @@ +// +// INSaveProfileInCarIntent Extensions +// +// Authors: +// Alex Soto +// +// Copyright 2016 Xamarin Inc. All rights reserved. +// + +#if XAMCORE_2_0 && IOS + +using XamCore.Foundation; +using XamCore.Intents; +using XamCore.ObjCRuntime; +using XamCore.UIKit; + +namespace XamCore.Intents { + public partial class INSaveProfileInCarIntent { + + public INSaveProfileInCarIntent (NSNumber profileNumber, string profileLabel) + { + // Apple created this change in 10,2 + if (UIDevice.CurrentDevice.CheckSystemVersion (10, 2)) + InitializeHandle (InitWithProfileNumberName (profileNumber, profileLabel)); + else + InitializeHandle (InitWithProfileNumberLabel (profileNumber, profileLabel)); + } + } +} +#endif diff --git a/src/Intents/INSetProfileInCarIntent.cs b/src/Intents/INSetProfileInCarIntent.cs index 179c2329162a..5817e2e5a51d 100644 --- a/src/Intents/INSetProfileInCarIntent.cs +++ b/src/Intents/INSetProfileInCarIntent.cs @@ -3,16 +3,27 @@ using XamCore.Foundation; using XamCore.Intents; using XamCore.ObjCRuntime; +using XamCore.UIKit; namespace XamCore.Intents { public partial class INSetProfileInCarIntent { + [DesignatedInitializer] public INSetProfileInCarIntent (NSNumber profileNumber, string profileLabel, bool? defaultProfile) : this (profileNumber, profileLabel, defaultProfile.HasValue ? new NSNumber (defaultProfile.Value) : null) { } + protected INSetProfileInCarIntent (NSNumber profileNumber, string profileLabel, NSNumber defaultProfile) + { + // Apple created this change in 10,2 + if (UIDevice.CurrentDevice.CheckSystemVersion (10, 2)) + InitializeHandle (InitWithProfileNumberName (profileNumber, profileLabel, defaultProfile)); + else + InitializeHandle (InitWithProfileNumberLabel (profileNumber, profileLabel, defaultProfile)); + } + // if/when we update the generator to allow this pattern we can move this back // into bindings and making them virtual (not a breaking change) diff --git a/src/MediaPlayer/MPMediaItem.cs b/src/MediaPlayer/MPMediaItem.cs index 880c8bee0495..15f4234ef2b6 100644 --- a/src/MediaPlayer/MPMediaItem.cs +++ b/src/MediaPlayer/MPMediaItem.cs @@ -9,7 +9,7 @@ // Copyright 2011-2012 Xamarin, Inc // -#if !TVOS +#if !TVOS && !MONOMAC using System; using System.Collections; diff --git a/src/MediaPlayer/MPMediaQuery.cs b/src/MediaPlayer/MPMediaQuery.cs index 34776cbda053..65293652116a 100644 --- a/src/MediaPlayer/MPMediaQuery.cs +++ b/src/MediaPlayer/MPMediaQuery.cs @@ -9,7 +9,7 @@ // Copyright 2011-2012, 2014-2015 Xamarin, Inc // -#if !TVOS +#if !TVOS && !MONOMAC using System; using XamCore.Foundation; diff --git a/src/MediaPlayer/MPNowPlayingInfoCenter.cs b/src/MediaPlayer/MPNowPlayingInfoCenter.cs index f60b35672e7e..9e0a96dbcd02 100644 --- a/src/MediaPlayer/MPNowPlayingInfoCenter.cs +++ b/src/MediaPlayer/MPNowPlayingInfoCenter.cs @@ -7,7 +7,7 @@ // Copyright 2011, Xamarin Inc // -#if !TVOS +#if !TVOS && !MONOMAC using XamCore.Foundation; using XamCore.ObjCRuntime; diff --git a/src/MediaPlayer/MPPlayableContentDelegate.cs b/src/MediaPlayer/MPPlayableContentDelegate.cs index 4741d215d64d..6866a73ebfd1 100644 --- a/src/MediaPlayer/MPPlayableContentDelegate.cs +++ b/src/MediaPlayer/MPPlayableContentDelegate.cs @@ -1,4 +1,4 @@ -#if !XAMCORE_3_0 +#if !XAMCORE_3_0 && !MONOMAC using System; using XamCore.Foundation; diff --git a/src/MediaPlayer/MPVolumeSettings.cs b/src/MediaPlayer/MPVolumeSettings.cs index 8e75410811ef..211d5879008e 100644 --- a/src/MediaPlayer/MPVolumeSettings.cs +++ b/src/MediaPlayer/MPVolumeSettings.cs @@ -6,7 +6,7 @@ // Copyright 2011-2015 Xamarin, Inc. // -#if !TVOS +#if !TVOS && !MONOMAC using System; using System.Runtime.InteropServices; diff --git a/src/MediaPlayer/MediaPlayer.cs b/src/MediaPlayer/MediaPlayer.cs index d4496a9a3bb6..9d0cd0fd91bd 100644 --- a/src/MediaPlayer/MediaPlayer.cs +++ b/src/MediaPlayer/MediaPlayer.cs @@ -16,6 +16,7 @@ namespace XamCore.MediaPlayer { // NSInteger -> MPMoviePlayerController.h [Native] + [NoMac] [NoTV] public enum MPMoviePlaybackState : nint { Stopped, @@ -28,6 +29,7 @@ public enum MPMoviePlaybackState : nint { // NSInteger -> MPMoviePlayerController.h [Native] + [NoMac] [NoTV] public enum MPMovieLoadState : nint { Unknown = 0, @@ -37,6 +39,7 @@ public enum MPMovieLoadState : nint { } // NSInteger -> MPMoviePlayerController.h + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [Native] @@ -46,6 +49,7 @@ public enum MPMovieRepeatMode : nint { // NSInteger -> MPMoviePlayerController.h [Native] + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] public enum MPMovieControlStyle : nint { @@ -53,6 +57,7 @@ public enum MPMovieControlStyle : nint { } // NSInteger -> MPMoviePlayerController.h + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [Native] @@ -61,6 +66,7 @@ public enum MPMovieFinishReason : nint { } // NSInteger -> MPMoviePlayerController.h + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [Native] @@ -72,6 +78,7 @@ public enum MPMovieMediaType : nint { } // NSInteger -> MPMoviePlayerController.h + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [Native] @@ -80,6 +87,7 @@ public enum MPMovieSourceType : nint { } // NSInteger -> MPMoviePlayerController.h + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [Native] @@ -89,6 +97,7 @@ public enum MPMovieTimeOption : nint { } // NSUInteger -> MPMediaItem.h + [NoMac] [Native] [Flags] [NoTV] @@ -131,6 +140,7 @@ public enum MPMediaType : nuint_compat_int { } // NSInteger -> MPMediaPlaylist.h + [NoMac] [Native] [Flags] [NoTV] @@ -143,6 +153,7 @@ public enum MPMediaPlaylistAttribute : nint { // NSInteger -> MPMediaQuery.h [Native] + [NoMac] [NoTV] public enum MPMediaGrouping : nint { Title, @@ -157,6 +168,7 @@ public enum MPMediaGrouping : nint { // NSInteger -> MPMediaQuery.h [Native] + [NoMac] [NoTV] public enum MPMediaPredicateComparison : nint { EqualsTo, @@ -164,6 +176,7 @@ public enum MPMediaPredicateComparison : nint { } // NSInteger -> MPMoviePlayerController.h + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [Native] @@ -175,6 +188,7 @@ public enum MPMovieScalingMode : nint { } // untyped enum -> MPMoviePlayerController.h + [NoMac] public enum MPMovieControlMode { Default, VolumeOnly, @@ -182,6 +196,7 @@ public enum MPMovieControlMode { } // NSInteger -> /MPMusicPlayerController.h + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [Native] @@ -196,6 +211,7 @@ public enum MPMusicPlaybackState : nint { // NSInteger -> /MPMusicPlayerController.h [Native] + [NoMac] [NoTV] public enum MPMusicRepeatMode : nint { Default, @@ -206,6 +222,7 @@ public enum MPMusicRepeatMode : nint { // NSInteger -> /MPMusicPlayerController.h [Native] + [NoMac] [NoTV] public enum MPMusicShuffleMode : nint { Default, @@ -216,6 +233,7 @@ public enum MPMusicShuffleMode : nint { public delegate void MPMediaItemEnumerator (string property, NSObject value, ref bool stop); + [Mac (10,12,2)] [Native] public enum MPShuffleType : nint { @@ -224,6 +242,7 @@ public enum MPShuffleType : nint Collections } + [Mac (10,12,2)] [Native] public enum MPRepeatType : nint { @@ -232,6 +251,7 @@ public enum MPRepeatType : nint All } + [Mac (10,12,2)] [iOS (10,0)] [Native] public enum MPChangeLanguageOptionSetting : nint @@ -243,6 +263,7 @@ public enum MPChangeLanguageOptionSetting : nint // NSInteger -> MPRemoteCommand.h [Native] + [Mac (10,12,2)] [iOS (7,1)] public enum MPRemoteCommandHandlerStatus : nint { Success = 0, @@ -254,12 +275,14 @@ public enum MPRemoteCommandHandlerStatus : nint { // NSUInteger -> MPRemoteCommandEvent.h [Native] + [Mac (10,12,2)] [iOS (7,1)] public enum MPSeekCommandEventType : nuint_compat_int { BeginSeeking, EndSeeking } + [Mac (10,12,2)] [iOS (9,0)] [Native] public enum MPNowPlayingInfoLanguageOptionType : nuint { @@ -267,6 +290,7 @@ public enum MPNowPlayingInfoLanguageOptionType : nuint { Legible } + [NoMac] [iOS (9,3)] [Native] [ErrorDomain ("MPErrorDomain")] @@ -281,6 +305,7 @@ public enum MPErrorCode : nint { Cancelled, } + [NoMac] [NoTV] [iOS (9,3)] [Native] @@ -291,6 +316,7 @@ public enum MPMediaLibraryAuthorizationStatus : nint { Authorized } + [Mac (10,12,2)] [iOS (10,0)] [Native] public enum MPNowPlayingInfoMediaType : nuint @@ -300,4 +326,17 @@ public enum MPNowPlayingInfoMediaType : nuint Video } + [Mac (10,12,2)] + [NoiOS] + [NoTV] + [Native] + public enum MPNowPlayingPlaybackState : nuint + { + Unknown = 0, + Playing, + Paused, + Stopped, + Interrupted, + } + } diff --git a/src/ModelIO/MDLNoiseTexture.cs b/src/ModelIO/MDLNoiseTexture.cs new file mode 100644 index 000000000000..ac04ed81953e --- /dev/null +++ b/src/ModelIO/MDLNoiseTexture.cs @@ -0,0 +1,37 @@ +#if XAMCORE_2_0 || !MONOMAC +using System; +using XamCore.ObjCRuntime; +using Vector2i = global::OpenTK.Vector2i; + +namespace XamCore.ModelIO { + + [iOS (9,0), Mac (10,11, onlyOn64 : true)] + public enum MDLNoiseTextureType { + Vector, + Cellular, + } + + public partial class MDLNoiseTexture { + [iOS (9,0), Mac (10,11, onlyOn64 : true)] + public MDLNoiseTexture (float input, string name, Vector2i textureDimensions, MDLTextureChannelEncoding channelEncoding) : this (input, name, textureDimensions, channelEncoding, MDLNoiseTextureType.Vector) + { + } + + [iOS (10,2), Mac (10,12, onlyOn64 : true)] + public MDLNoiseTexture (float input, string name, Vector2i textureDimensions, MDLTextureChannelEncoding channelEncoding, MDLNoiseTextureType type) + { + // two different `init*` would share the same C# signature + switch (type) { + case MDLNoiseTextureType.Vector: + Handle = InitVectorNoiseWithSmoothness (input, name, textureDimensions, channelEncoding); + break; + case MDLNoiseTextureType.Cellular: + Handle = InitCellularNoiseWithFrequency (input, name, textureDimensions, channelEncoding); + break; + default: + throw new ArgumentException ("type"); + } + } + } +} +#endif \ No newline at end of file diff --git a/src/NetworkExtension/NECompat.cs b/src/NetworkExtension/NECompat.cs new file mode 100644 index 000000000000..dd676e725eed --- /dev/null +++ b/src/NetworkExtension/NECompat.cs @@ -0,0 +1,19 @@ +#if XAMCORE_2_0 || !MONOMAC + +using System; +using XamCore.Foundation; + +namespace XamCore.NetworkExtension { + +#if !XAMCORE_4_0 + public partial class NEPacketTunnelNetworkSettings { + + [Obsolete ("This constructor does not create a valid instance of the type")] + public NEPacketTunnelNetworkSettings () : base (NSObjectFlag.Empty) + { + } + } +#endif +} + +#endif diff --git a/src/PassKit/PKEnums.cs b/src/PassKit/PKEnums.cs index 76716423ad56..d43d084767d6 100644 --- a/src/PassKit/PKEnums.cs +++ b/src/PassKit/PKEnums.cs @@ -113,6 +113,8 @@ public enum PKPaymentButtonType : nint { SetUp, [iOS (10,0)] InStore, + [iOS (10,2)] + Donate, } [Watch (3,0)] diff --git a/src/Photos/Enums.cs b/src/Photos/Enums.cs index d29217fe29f8..0b60f49863a9 100644 --- a/src/Photos/Enums.cs +++ b/src/Photos/Enums.cs @@ -162,6 +162,8 @@ public enum PHAssetCollectionSubtype : nint { SmartAlbumSelfPortraits = 210, [iOS (9,0)] SmartAlbumScreenshots = 211, + [iOS (10,2), TV (10,1)] + SmartAlbumDepthEffect = 212, #if XAMCORE_2_0 Any = Int64.MaxValue #else @@ -205,6 +207,8 @@ public enum PHAssetMediaSubtype : nuint { PhotoHDR = (1 << 1), Screenshot = (1 << 2), PhotoLive = (1 << 3), + [iOS (10,2), TV (10,1)] + PhotoDepthEffect = (1 << 4), VideoStreamed = (1 << 16), VideoHighFrameRate = (1 << 17), VideoTimelapse = (1 << 18), diff --git a/src/UIKit/UIEnums.cs b/src/UIKit/UIEnums.cs index 7498d1eaf52b..d2cde8242f0a 100644 --- a/src/UIKit/UIEnums.cs +++ b/src/UIKit/UIEnums.cs @@ -1949,7 +1949,13 @@ public enum UIAccessibilityCustomRotorDirection : nint Next } - [iOS (10,0), TV (10,0), NoWatch] +#if XAMCORE_4_0 + [NoTV] +#else + // Xcode 8.2 beta 1 added __TVOS_PROHIBITED but we need to keep it for binary compatibility + [TV (10,0)] +#endif + [iOS (10,0)][NoWatch] [Native] [Flags] public enum UICloudSharingPermissionOptions : nuint { diff --git a/src/VideoSubscriberAccount/VSAccountMetadataRequest.cs b/src/VideoSubscriberAccount/VSAccountMetadataRequest.cs new file mode 100644 index 000000000000..1a41cbdf661b --- /dev/null +++ b/src/VideoSubscriberAccount/VSAccountMetadataRequest.cs @@ -0,0 +1,19 @@ +using System; +using System.Threading.Tasks; +using XamCore.ObjCRuntime; + +namespace XamCore.VideoSubscriberAccount { + + public partial class VSAccountMetadataRequest { + + [TV (10,1)][iOS (10,2)] + public VSAccountProviderAuthenticationScheme[] SupportedAuthenticationSchemes { + get { + return VSAccountProviderAuthenticationSchemeExtensions.GetValues (SupportedAuthenticationSchemesString); + } + set { + SupportedAuthenticationSchemesString = value?.GetConstants (); + } + } + } +} diff --git a/src/VideoSubscriberAccount/VSAccountProviderAuthenticationScheme.cs b/src/VideoSubscriberAccount/VSAccountProviderAuthenticationScheme.cs new file mode 100644 index 000000000000..f06a3a8a7a4a --- /dev/null +++ b/src/VideoSubscriberAccount/VSAccountProviderAuthenticationScheme.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using XamCore.Foundation; + +namespace XamCore.VideoSubscriberAccount { + + public static partial class VSAccountProviderAuthenticationSchemeExtensions { + + // these are less common pattern so it's not automatically generated + + public static NSString[] GetConstants (this VSAccountProviderAuthenticationScheme[] self) + { + if (self == null) + throw new ArgumentNullException (nameof (self)); + + var array = new NSString [self.Length]; + for (int n = 0; n < self.Length; n++) + array [n] = self [n].GetConstant (); + return array; + } + + public static VSAccountProviderAuthenticationScheme[] GetValues (NSString[] constants) + { + if (constants == null) + throw new ArgumentNullException (nameof (constants)); + + var array = new VSAccountProviderAuthenticationScheme [constants.Length]; + for (int n = 0; n < constants.Length; n++) + array [n] = GetValue (constants [n]); + return array; + } + } +} diff --git a/src/avfoundation.cs b/src/avfoundation.cs index bf6c7f3c2279..2a043b66d2b6 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -2573,6 +2573,9 @@ interface AVAsset : NSCopying { NSString WasDefragmentedNotification { get; } #endif + [iOS (10, 3), Mac (10,12,3), TV (10, 3)] + [Export ("overallDurationHint")] + CMTime OverallDurationHint { get; } } #if MONOMAC @@ -7954,6 +7957,10 @@ interface AVCapturePhotoSettings : NSCopying [NullAllowed, Export ("previewPhotoFormat", ArgumentSemantic.Copy)] NSDictionary PreviewPhotoFormat { get; set; } + + [iOS (10, 2)] + [Export ("autoDualCameraFusionEnabled")] + bool AutoDualCameraFusionEnabled { [Bind ("isAutoDualCameraFusionEnabled")] get; set; } } #if !MONOMAC @@ -8001,6 +8008,10 @@ interface AVCaptureResolvedPhotoSettings [Export ("stillImageStabilizationEnabled")] bool IsStillImageStabilizationEnabled { [Bind ("isStillImageStabilizationEnabled")] get; } + + [iOS (10, 2)] + [Export ("dualCameraFusionEnabled")] + bool DualCameraFusionEnabled { [Bind ("isDualCameraFusionEnabled")] get; } } #if !MONOMAC @@ -8107,6 +8118,11 @@ interface AVCapturePhotoOutput [Export ("setPreparedPhotoSettingsArray:completionHandler:")] [Async] void SetPreparedPhotoSettings (AVCapturePhotoSettings[] preparedPhotoSettingsArray, [NullAllowed] Action completionHandler); + + [iOS (10, 2)] + [Export ("dualCameraFusionSupported")] + bool DualCameraFusionSupported { [Bind ("isDualCameraFusionSupported")] get; } + } #endif @@ -8242,8 +8258,14 @@ enum AVCaptureDeviceType { [Field ("AVCaptureDeviceTypeBuiltInTelephotoCamera")] BuiltInTelephotoCamera, + [Introduced (PlatformName.iOS, 10, 0, message: "Use BuiltInDualCamera instead")] + [Deprecated (PlatformName.iOS, 10, 2, message: "Use BuiltInDualCamera instead")] [Field ("AVCaptureDeviceTypeBuiltInDuoCamera")] BuiltInDuoCamera, + + [iOS (10, 2)] + [Field ("AVCaptureDeviceTypeBuiltInDualCamera")] + BuiltInDualCamera, } [NoWatch] diff --git a/src/avkit.cs b/src/avkit.cs index fd61384d4351..b189fc9d4096 100644 --- a/src/avkit.cs +++ b/src/avkit.cs @@ -349,5 +349,18 @@ interface AVContentProposalViewController [Export ("dismissContentProposalForAction:animated:completion:")] void DismissContentProposal (AVContentProposalAction action, bool animated, [NullAllowed] Action block); } + + [Static] + [NoiOS, TV (10,1), NoWatch, NoMac] + interface AVKitMetadataIdentifier { + + [Field ("AVKitMetadataIdentifierExternalContentIdentifier")] + NSString ExternalContentIdentifier { get; } + [Field ("AVKitMetadataIdentifierExternalUserProfileIdentifier")] + NSString ExternalUserProfileIdentifier { get; } + [Field ("AVKitMetadataIdentifierPlaybackProgress")] + NSString PlaybackProgress { get; } + } + #endif } diff --git a/src/cloudkit.cs b/src/cloudkit.cs index 418c04942b32..5c120effa47b 100644 --- a/src/cloudkit.cs +++ b/src/cloudkit.cs @@ -119,6 +119,7 @@ interface CKShare [Export ("publicPermission", ArgumentSemantic.Assign)] CKShareParticipantPermission PublicPermission { get; set; } + [NullAllowed] [Export ("URL", ArgumentSemantic.Copy)] NSUrl Url { get; } @@ -205,6 +206,7 @@ interface CKContainer { [Export ("publicCloudDatabase")] CKDatabase PublicCloudDatabase { get; } + [iOS (10, 0)][Mac (10,12)] [Export ("sharedCloudDatabase")] CKDatabase SharedCloudDatabase { get; } @@ -593,6 +595,7 @@ interface CKFetchRecordZoneChangesOperation [Export ("initWithRecordZoneIDs:optionsByRecordZoneID:")] IntPtr Constructor (CKRecordZoneID[] recordZoneIDs, [NullAllowed] NSDictionary optionsByRecordZoneID); + [NullAllowed] [Export ("recordZoneIDs", ArgumentSemantic.Copy)] CKRecordZoneID[] RecordZoneIDs { get; set; } @@ -762,6 +765,7 @@ interface CKMarkNotificationsReadOperation { [Export ("initWithNotificationIDsToMarkRead:")] IntPtr Constructor (CKNotificationID [] notificationIds); + [NullAllowed] [Export ("notificationIDs", ArgumentSemantic.Copy)] CKNotificationID [] NotificationIds { get; set; } @@ -878,7 +882,6 @@ CKModifyRecordZonesHandler Completed { [BaseType (typeof (CKDatabaseOperation))] interface CKModifySubscriptionsOperation { - [DesignatedInitializer] [Export ("initWithSubscriptionsToSave:subscriptionIDsToDelete:")] IntPtr Constructor ([NullAllowed] CKSubscription [] subscriptionsToSave, [NullAllowed] string [] subscriptionIdsToDelete); @@ -956,11 +959,7 @@ interface CKNotification : NSSecureCoding { [Static] [Export ("notificationFromRemoteNotificationDictionary:")] -#if XAMCORE_4_0 - CKNotification FromRemoteNotificationDictionary (NSDictionary notificationDictionary); -#else CKNotification FromRemoteNotificationDictionary (NSDictionary notificationDictionary); -#endif [iOS (9,0)][Mac (10,11)] [NullAllowed, Export ("subscriptionID")] @@ -1069,6 +1068,7 @@ interface CKOperation { [iOS (9,3)][Mac (10,11,4)] [TV (9,2)] + [NullAllowed] [Export ("longLivedOperationWasPersistedBlock", ArgumentSemantic.Strong)] Action LongLivedOperationWasPersistedCallback { get; set; } } @@ -1519,13 +1519,16 @@ interface CKQueryCursor : NSCopying, NSSecureCoding { [iOS (9,2), Mac (10,11,2, onlyOn64 : true)] [TV (9,1)] [Watch (3,0)] -#if XAMCORE_4_0 || WATCH // does not work on watchOS - existiong init* does not allow null to be used to fake it +#if WATCH // does not work on watchOS - existiong init* does not allow null to be used to fake it [DisableDefaultCtor] #endif [BaseType (typeof (CKDatabaseOperation))] interface CKFetchWebAuthTokenOperation { +#if WATCH + // it might be because Xcode 8.2 headers were not updated for watchOS *or* because `init` does not work [DesignatedInitializer] +#endif [Export ("initWithAPIToken:")] IntPtr Constructor (string token); @@ -1573,6 +1576,7 @@ interface CKFetchShareParticipantsOperation [Export ("initWithUserIdentityLookupInfos:")] IntPtr Constructor (CKUserIdentityLookupInfo[] userIdentityLookupInfos); + [NullAllowed] [Export ("userIdentityLookupInfos", ArgumentSemantic.Copy)] CKUserIdentityLookupInfo[] UserIdentityLookupInfos { get; set; } @@ -1594,6 +1598,7 @@ interface CKAcceptSharesOperation IntPtr Constructor (CKShareMetadata[] shareMetadatas); [Export ("shareMetadatas", ArgumentSemantic.Copy)] + [NullAllowed] CKShareMetadata[] ShareMetadatas { get; set; } [NullAllowed, Export ("perShareCompletionBlock", ArgumentSemantic.Copy)] @@ -1613,6 +1618,7 @@ interface CKFetchShareMetadataOperation [Export ("initWithShareURLs:")] IntPtr Constructor (NSUrl[] shareUrls); + [NullAllowed] [Export ("shareURLs", ArgumentSemantic.Copy)] NSUrl[] ShareUrls { get; set; } diff --git a/src/error.cs b/src/error.cs index c6bd9cfe404b..d2e845b9f783 100644 --- a/src/error.cs +++ b/src/error.cs @@ -57,6 +57,10 @@ // BI1040 The selector {0} on type {1} is found multiple times with different argument out states on argument {2}. // BI1041 The selector {0} on type {1} is found multiple times with different argument types on argument {2} - {3} : {4}. // BI1042 Missing '[Field (LibraryName=value)]' for {field_pi.Name} (e.g."__Internal") +// BI1043 Repeated overload {mi.Name} and no [DelegateApiNameAttribute] provided to generate property name on host class. +// BI1044 Repeated name '{apiName.Name}' provided in [DelegateApiNameAttribute]. +// BI1045 Only a single [DefaultEnumValue] attribute can be used inside enum {type.Name}. +// BI1046 The [Field] constant {fa.SymbolName} cannot only be used once inside enum {type.Name}. // BI11xx warnings // BI1101 Trying to use a string as a [Target] // BI1102 Using the deprecated EventArgs for a delegate signature in {0}.{1}, please use DelegateName instead diff --git a/src/frameworks.sources b/src/frameworks.sources index 59c6b878fcb0..db63ecca96bc 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -781,11 +781,10 @@ HEALTHKIT_SOURCES = \ # HomeKit -HOMEKIT_CORE_SOURCES = \ +HOMEKIT_API_SOURCES = \ HomeKit/HMEnums.cs \ HOMEKIT_SOURCES = \ - HomeKit/HMAccessoryCategory.cs \ HomeKit/HMActionSet.cs \ HomeKit/HMCharacteristic.cs \ HomeKit/HMCharacteristicMetadata.cs \ @@ -820,6 +819,7 @@ IMAGEKIT_CORE_SOURCES = \ # Intents INTENTS_SOURCES = \ + Intents/INCompat.cs \ Intents/INIntentResolutionResult.cs \ Intents/INPriceRange.cs \ Intents/INRideOption.cs \ @@ -828,6 +828,7 @@ INTENTS_SOURCES = \ Intents/INSetProfileInCarIntent.cs \ Intents/INSetSeatSettingsInCarIntent.cs \ Intents/INStartWorkoutIntent.cs \ + Intents/INSaveProfileInCarIntent.cs \ # JavaScriptCore @@ -946,6 +947,7 @@ MODELIO_CORE_SOURCES = \ MODELIO_SOURCES = \ ModelIO/MDLAsset.cs \ + ModelIO/MDLNoiseTexture.cs \ ModelIO/MDLVertexDescriptor.cs \ ModelIO/MDLMesh.cs \ @@ -968,6 +970,7 @@ NETWORKEXTENSION_CORE_SOURCES = \ NetworkExtension/NEVpnConnectionStartOptions.cs \ NETWORKEXTENSION_SOURCES = \ + NetworkExtension/NECompat.cs \ NetworkExtension/NEFilterFlow.cs \ NetworkExtension/NEFilterProvider.cs \ @@ -1338,6 +1341,8 @@ USERNOTIFICATIONS_SOURCES = \ VIDEOSUBSCRIBERACCOUNT_SOURCES = \ VideoSubscriberAccount/VSAccountManager.cs \ + VideoSubscriberAccount/VSAccountMetadataRequest.cs \ + VideoSubscriberAccount/VSAccountProviderAuthenticationScheme.cs \ # VideoToolbox @@ -1536,6 +1541,7 @@ MAC_FRAMEWORKS = \ MapKit \ MediaAccessibility \ MediaLibrary \ + MediaPlayer \ MediaToolbox \ Metal \ MetalKit \ diff --git a/src/generator-enums.cs b/src/generator-enums.cs index 39cee8f3dde0..92d92f5211d5 100644 --- a/src/generator-enums.cs +++ b/src/generator-enums.cs @@ -21,6 +21,14 @@ public ErrorDomainAttribute (string domain) public string ErrorDomain { get; set; } } +[AttributeUsage (AttributeTargets.Field)] +public class DefaultEnumValueAttribute : Attribute { + + public DefaultEnumValueAttribute () + { + } +} + public partial class Generator { static string GetCSharpTypeName (Type type) @@ -47,6 +55,12 @@ static string GetCSharpTypeName (Type type) } } + void CopyObsolete (ICustomAttributeProvider provider) + { + foreach (ObsoleteAttribute oa in provider.GetCustomAttributes (typeof (ObsoleteAttribute), false)) + print ("[Obsolete (\"{0}\", {1})]", oa.Message, oa.IsError ? "true" : "false"); + } + // caller already: // - setup the header and namespace // - call/emit PrintPlatformAttributes on the type @@ -62,25 +76,44 @@ void GenerateEnum (Type type) else print ("[Native (\"{0}\")]", native.NativeName); } + CopyObsolete (type); + var unique_constants = new HashSet (); var fields = new Dictionary (); - print ("public enum {0} : {1} {{", type.Name, GetCSharpTypeName (Enum.GetUnderlyingType (type))); + Tuple null_field = null; + Tuple default_symbol = null; + var underlying_type = GetCSharpTypeName (Enum.GetUnderlyingType (type)); + print ("public enum {0} : {1} {{", type.Name, underlying_type); indent++; foreach (var f in type.GetFields ()) { // skip value__ field if (f.IsSpecialName) continue; PrintPlatformAttributes (f); + CopyObsolete (f); print ("{0} = {1},", f.Name, f.GetRawConstantValue ()); var fa = GetAttribute (f); if (fa == null) continue; if (f.IsUnavailable ()) continue; - fields.Add (f, fa); + if (fa.SymbolName == null) + null_field = new Tuple (f, fa); + else if (unique_constants.Contains (fa.SymbolName)) + throw new BindingException (1046, true, $"The [Field] constant {fa.SymbolName} cannot only be used once inside enum {type.Name}."); + else { + fields.Add (f, fa); + unique_constants.Add (fa.SymbolName); + } + if (GetAttribute (f) != null) { + if (default_symbol != null) + throw new BindingException (1045, true, $"Only a single [DefaultEnumValue] attribute can be used inside enum {type.Name}."); + default_symbol = new Tuple (f, fa); + } } indent--; print ("}"); + unique_constants.Clear (); var library_name = type.Namespace; var error = GetAttribute (type); @@ -89,7 +122,7 @@ void GenerateEnum (Type type) // the *Extensions has the same version requirement as the enum itself PrintPlatformAttributes (type); print ("[CompilerGenerated]"); - print ("static public class {0}Extensions {{", type.Name); + print ("static public partial class {0}Extensions {{", type.Name); indent++; // note: not every binding namespace will start with ns.Prefix (e.g. MonoTouch.) @@ -146,13 +179,23 @@ void GenerateEnum (Type type) print ("public static NSString GetConstant (this {0} self)", type.Name); print ("{"); indent++; + print ("switch (({0}) self) {{", underlying_type); + var default_symbol_name = default_symbol?.Item2.SymbolName; + // more than one enum member can share the same numeric value - ref: #46285 foreach (var kvp in fields) { - print ("if (self == {0}.{1})", type.Name, kvp.Key.Name); + print ("case {0}: // {1}.{2}", Convert.ToInt64 (kvp.Key.GetValue (null)), type.Name, kvp.Key.Name); + var sn = kvp.Value.SymbolName; + if (sn == default_symbol_name) + print ("default:"); indent++; - print ("return {0};", kvp.Value.SymbolName); + print ("return {0};", sn); indent--; } - print ("return null;"); + print ("}"); + if (default_symbol_name == null) { + // note: a `[Field (null)]` does not need extra code + print ("return null;"); + } indent--; print ("}"); @@ -163,7 +206,11 @@ void GenerateEnum (Type type) indent++; print ("if (constant == null)"); indent++; - print ("throw new ArgumentNullException (nameof (constant));"); + // if we do not have a enum value that maps to a null field then we throw + if (null_field == null) + print ("throw new ArgumentNullException (nameof (constant));"); + else + print ("return {0}.{1};", type.Name, null_field.Item1.Name); indent--; foreach (var kvp in fields) { print ("else if (constant == {0})", kvp.Value.SymbolName); @@ -171,7 +218,11 @@ void GenerateEnum (Type type) print ("return {0}.{1};", type.Name, kvp.Key.Name); indent--; } - print ("throw new NotSupportedException (constant + \" has no associated enum value in \" + nameof ({0}) + \" on this platform.\");", type.Name); + // if there's no default then we throw on unknown constants + if (default_symbol == null) + print ("throw new NotSupportedException (constant + \" has no associated enum value in \" + nameof ({0}) + \" on this platform.\");", type.Name); + else + print ("return {0}.{1};", type.Name, default_symbol.Item1.Name); indent--; print ("}"); } diff --git a/src/homekit.cs b/src/homekit.cs index d134f8c9bf39..a2ae064498bd 100644 --- a/src/homekit.cs +++ b/src/homekit.cs @@ -319,6 +319,9 @@ partial interface HMCharacteristic { [Export ("characteristicType", ArgumentSemantic.Copy)] NSString _CharacteristicType { get; } + [Wrap ("HMCharacteristicTypeExtensions.GetValue (_CharacteristicType)")] + HMCharacteristicType CharacteristicType { get; } + [Export ("service", ArgumentSemantic.Weak)] HMService Service { get; } @@ -389,314 +392,6 @@ interface HMCharacteristicPropertyInternal { NSString SupportsEventNotification { get; } } - [TV (10,0)] - [iOS(8,0)] - [Static] - [Internal] - interface HMCharacteristicTypeInternal { - [Field ("HMCharacteristicTypePowerState")] - NSString PowerState { get; } - - [Field ("HMCharacteristicTypeHue")] - NSString Hue { get; } - - [Field ("HMCharacteristicTypeSaturation")] - NSString Saturation { get; } - - [Field ("HMCharacteristicTypeBrightness")] - NSString Brightness { get; } - - [Field ("HMCharacteristicTypeTemperatureUnits")] - NSString TemperatureUnits { get; } - - [Field ("HMCharacteristicTypeCurrentTemperature")] - NSString CurrentTemperature { get; } - - [Field ("HMCharacteristicTypeTargetTemperature")] - NSString TargetTemperature { get; } - - [Field ("HMCharacteristicTypeCurrentHeatingCooling")] - NSString CurrentHeatingCooling { get; } - - [Field ("HMCharacteristicTypeTargetHeatingCooling")] - NSString TargetHeatingCooling { get; } - - [Field ("HMCharacteristicTypeCoolingThreshold")] - NSString CoolingThreshold { get; } - - [Field ("HMCharacteristicTypeHeatingThreshold")] - NSString HeatingThreshold { get; } - - [Field ("HMCharacteristicTypeCurrentRelativeHumidity")] - NSString CurrentRelativeHumidity { get; } - - [Field ("HMCharacteristicTypeTargetRelativeHumidity")] - NSString TargetRelativeHumidity { get; } - - [Field ("HMCharacteristicTypeCurrentDoorState")] - NSString CurrentDoorState { get; } - - [Field ("HMCharacteristicTypeTargetDoorState")] - NSString TargetDoorState { get; } - - [Field ("HMCharacteristicTypeObstructionDetected")] - NSString ObstructionDetected { get; } - - [Field ("HMCharacteristicTypeName")] - NSString Name { get; } - - [Field ("HMCharacteristicTypeManufacturer")] - NSString Manufacturer { get; } - - [Field ("HMCharacteristicTypeModel")] - NSString Model { get; } - - [Field ("HMCharacteristicTypeSerialNumber")] - NSString SerialNumber { get; } - - [Field ("HMCharacteristicTypeIdentify")] - NSString Identify { get; } - - [Field ("HMCharacteristicTypeRotationDirection")] - NSString RotationDirection { get; } - - [Field ("HMCharacteristicTypeRotationSpeed")] - NSString RotationSpeed { get; } - - [Field ("HMCharacteristicTypeOutletInUse")] - NSString OutletInUse { get; } - - [Field ("HMCharacteristicTypeVersion")] - NSString Version { get; } - - [Field ("HMCharacteristicTypeLogs")] - NSString Logs { get; } - - [Field ("HMCharacteristicTypeAudioFeedback")] - NSString AudioFeedback { get; } - - [Field ("HMCharacteristicTypeAdminOnlyAccess")] - NSString AdminOnlyAccess { get; } - - [Field ("HMCharacteristicTypeMotionDetected")] - NSString MotionDetected { get; } - - [Field ("HMCharacteristicTypeCurrentLockMechanismState")] - NSString CurrentLockMechanismState { get; } - - [Field ("HMCharacteristicTypeTargetLockMechanismState")] - NSString TargetLockMechanismState { get; } - - [Field ("HMCharacteristicTypeLockMechanismLastKnownAction")] - NSString LockMechanismLastKnownAction { get; } - - [Field ("HMCharacteristicTypeLockManagementControlPoint")] - NSString LockManagementControlPoint { get; } - - [Field ("HMCharacteristicTypeLockManagementAutoSecureTimeout")] - NSString LockManagementAutoSecureTimeout { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeAirParticulateDensity")] - NSString AirParticulateDensity { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeAirParticulateSize")] - NSString AirParticulateSize { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeBatteryLevel")] - NSString BatteryLevel { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCarbonMonoxideDetected")] - NSString CarbonMonoxideDetected { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeContactState")] - NSString ContactState { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCurrentHorizontalTilt")] - NSString CurrentHorizontalTilt { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCurrentLightLevel")] - NSString CurrentLightLevel { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCurrentPosition")] - NSString CurrentPosition { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCurrentVerticalTilt")] - NSString CurrentVerticalTilt { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeFirmwareVersion")] - NSString FirmwareVersion { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeHardwareVersion")] - NSString HardwareVersion { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeHoldPosition")] - NSString HoldPosition { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeInputEvent")] - NSString InputEvent { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeLeakDetected")] - NSString LeakDetected { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeOccupancyDetected")] - NSString OccupancyDetected { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeOutputState")] - NSString OutputState { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypePositionState")] - NSString PositionState { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeSmokeDetected")] - NSString SmokeDetected { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeSoftwareVersion")] - NSString SoftwareVersion { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeStatusActive")] - NSString StatusActive { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeStatusFault")] - NSString StatusFault { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeStatusJammed")] - NSString StatusJammed { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeStatusLowBattery")] - NSString StatusLowBattery { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeStatusTampered")] - NSString StatusTampered { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeTargetHorizontalTilt")] - NSString TargetHorizontalTilt { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeTargetPosition")] - NSString TargetPosition { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeTargetVerticalTilt")] - NSString TargetVerticalTilt { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeSecuritySystemAlarmType")] - NSString SecuritySystemAlarmType { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeAirQuality")] - NSString AirQuality { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCarbonDioxideDetected")] - NSString CarbonDioxideDetected { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCarbonDioxideLevel")] - NSString CarbonDioxideLevel { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCarbonDioxidePeakLevel")] - NSString CarbonDioxidePeakLevel { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCarbonMonoxideLevel")] - NSString CarbonMonoxideLevel { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCarbonMonoxidePeakLevel")] - NSString CarbonMonoxidePeakLevel { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeChargingState")] - NSString ChargingState { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeCurrentSecuritySystemState")] - NSString CurrentSecuritySystemState { get; } - - [iOS (9,0)] - [Field ("HMCharacteristicTypeTargetSecuritySystemState")] - NSString TargetSecuritySystemState { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeStreamingStatus")] - NSString StreamingStatus { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeSetupStreamEndpoint")] - NSString SetupStreamEndpoint { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeSupportedVideoStreamConfiguration")] - NSString SupportedVideoStreamConfiguration { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeSupportedAudioStreamConfiguration")] - NSString SupportedAudioStreamConfiguration { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeSupportedRTPConfiguration")] - NSString SupportedRtpConfiguration { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeSelectedStreamConfiguration")] - NSString SelectedStreamConfiguration { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeVolume")] - NSString Volume { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeMute")] - NSString Mute { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeNightVision")] - NSString NightVision { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeOpticalZoom")] - NSString OpticalZoom { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeDigitalZoom")] - NSString DigitalZoom { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeImageRotation")] - NSString ImageRotation { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMCharacteristicTypeImageMirroring")] - NSString ImageMirroring { get; } - } - [TV (10,0)] [iOS (8,0)] [Static] @@ -1125,131 +820,6 @@ partial interface HMRoom { NSUuid UniqueIdentifier { get; } } - [TV (10,0)] - [iOS (8,0)] - [Static] - [Internal] - interface HMServiceTypeInternal { - [Field ("HMServiceTypeLightbulb")] - NSString LightBulb { get; } - - [Field ("HMServiceTypeSwitch")] - NSString Switch { get; } - - [Field ("HMServiceTypeThermostat")] - NSString Thermostat { get; } - - [Field ("HMServiceTypeGarageDoorOpener")] - NSString GarageDoorOpener { get; } - - [Field ("HMServiceTypeAccessoryInformation")] - NSString AccessoryInformation { get; } - - [Field ("HMServiceTypeFan")] - NSString Fan { get; } - - [Field ("HMServiceTypeOutlet")] - NSString Outlet { get; } - - [Field ("HMServiceTypeLockMechanism")] - NSString LockMechanism { get; } - - [Field ("HMServiceTypeLockManagement")] - NSString LockManagement { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeAirQualitySensor")] - NSString AirQualitySensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeCarbonMonoxideSensor")] - NSString CarbonMonoxideSensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeContactSensor")] - NSString ContactSensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeDoor")] - NSString Door { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMServiceTypeDoorbell")] - NSString Doorbell { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeHumiditySensor")] - NSString HumiditySensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeLeakSensor")] - NSString LeakSensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeLightSensor")] - NSString LightSensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeMotionSensor")] - NSString MotionSensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeOccupancySensor")] - NSString OccupancySensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeStatefulProgrammableSwitch")] - NSString StatefulProgrammableSwitch { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeStatelessProgrammableSwitch")] - NSString StatelessProgrammableSwitch { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeSmokeSensor")] - NSString SmokeSensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeTemperatureSensor")] - NSString TemperatureSensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeWindow")] - NSString Window { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeWindowCovering")] - NSString WindowCovering { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeBattery")] - NSString Battery { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeCarbonDioxideSensor")] - NSString CarbonDioxideSensor { get; } - - [iOS (9,0)] - [Field ("HMServiceTypeSecuritySystem")] - NSString SecuritySystem { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMServiceTypeCameraRTPStreamManagement")] - NSString CameraRtpStreamManagement { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMServiceTypeCameraControl")] - NSString CameraControl { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMServiceTypeMicrophone")] - NSString Microphone { get; } - - [Watch (3,0), iOS (10,0)] - [Field ("HMServiceTypeSpeaker")] - NSString Speaker { get; } - } - [TV (10,0)] [iOS (8,0)] [BaseType (typeof (NSObject))] @@ -1262,6 +832,9 @@ partial interface HMService { [Export ("serviceType", ArgumentSemantic.Copy)] NSString _ServiceType { get; } + [Wrap ("HMServiceTypeExtensions.GetValue (_ServiceType)")] + HMServiceType ServiceType { get; } + [Export ("name")] string Name { get; } @@ -1528,73 +1101,13 @@ interface HMAccessoryCategory { [Export ("categoryType")] NSString _CategoryType { get; } + [Wrap ("HMAccessoryCategoryTypeExtensions.GetValue (_CategoryType)")] + HMAccessoryCategoryType CategoryType { get; } + [Export ("localizedDescription")] string LocalizedDescription { get; } } - [TV (10,0)] - [iOS (9,0)] - [Static] - [Internal] - interface HMAccessoryCategoryTypesInternal { - [Field ("HMAccessoryCategoryTypeOther")] - NSString Other { get; } - - [Field ("HMAccessoryCategoryTypeSecuritySystem")] - NSString SecuritySystem { get; } - - [Field ("HMAccessoryCategoryTypeBridge")] - NSString Bridge { get; } - - [Field ("HMAccessoryCategoryTypeDoor")] - NSString Door { get; } - - [Field ("HMAccessoryCategoryTypeDoorLock")] - NSString DoorLock { get; } - - [Field ("HMAccessoryCategoryTypeFan")] - NSString Fan { get; } - - [Field ("HMAccessoryCategoryTypeGarageDoorOpener")] - NSString GarageDoorOpener { get; } - - [iOS (10,0), Watch (3,0)] - [Field ("HMAccessoryCategoryTypeIPCamera")] - NSString IPCamera { get; } - - [Field ("HMAccessoryCategoryTypeLightbulb")] - NSString Lightbulb { get; } - - [Field ("HMAccessoryCategoryTypeOutlet")] - NSString Outlet { get; } - - [Field ("HMAccessoryCategoryTypeProgrammableSwitch")] - NSString ProgrammableSwitch { get; } - - [Field ("HMAccessoryCategoryTypeSensor")] - NSString Sensor { get; } - - [Field ("HMAccessoryCategoryTypeSwitch")] - NSString Switch { get; } - - [Field ("HMAccessoryCategoryTypeThermostat")] - NSString Thermostat { get; } - - [iOS (10,0), Watch (3,0), TV (10,0)] - [Field ("HMAccessoryCategoryTypeVideoDoorbell")] - NSString VideoDoorbell { get; } - - [Field ("HMAccessoryCategoryTypeWindow")] - NSString Window { get; } - - [Field ("HMAccessoryCategoryTypeWindowCovering")] - NSString WindowCovering { get; } - - [iOS (9,3), Watch (2,2)] - [Field ("HMAccessoryCategoryTypeRangeExtender")] - NSString RangeExtender { get; } - } - [TV (10,0)] [iOS (9,0)] [BaseType (typeof (HMEvent))] @@ -1839,7 +1352,7 @@ interface HMCameraSnapshotControlDelegate [Export ("cameraSnapshotControl:didTakeSnapshot:error:")] void DidTakeSnapshot (HMCameraSnapshotControl cameraSnapshotControl, [NullAllowed] HMCameraSnapshot snapshot, [NullAllowed] NSError error); - [iOS (10,1)][Watch (3,1)][NoTV] + [iOS (10,1)][Watch (3,1)][TV (10,1)] [Export ("cameraSnapshotControlDidUpdateMostRecentSnapshot:")] void DidUpdateMostRecentSnapshot (HMCameraSnapshotControl cameraSnapshotControl); } diff --git a/src/intents.cs b/src/intents.cs index af536fbe6f0e..73695014bff5 100644 --- a/src/intents.cs +++ b/src/intents.cs @@ -36,6 +36,8 @@ public enum INBookRestaurantReservationIntentCode : nint { FailureRequiringAppLaunchServiceTemporarilyUnavailable } + [Introduced (PlatformName.iOS, 10, 0)] + [Introduced (PlatformName.MacOSX, 10, 12, PlatformArchitecture.Arch64)] [Native] [Flags] public enum INCallCapabilityOptions : nuint { @@ -43,6 +45,8 @@ public enum INCallCapabilityOptions : nuint { VideoCall = (1 << 1) } + [Introduced (PlatformName.iOS, 10, 0)] + [Introduced (PlatformName.MacOSX, 10, 12, PlatformArchitecture.Arch64)] [Native] public enum INCallRecordType : nint { Unknown = 0, @@ -242,6 +246,8 @@ public enum INListRideOptionsIntentResponseCode : nint { FailureRequiringAppLaunchPreviousRideNeedsCompletion } + [Introduced (PlatformName.iOS, 10, 0)] + [Introduced (PlatformName.MacOSX, 10, 12, PlatformArchitecture.Arch64)] [Native] public enum INMessageAttribute : nint { Unknown = 0, @@ -251,6 +257,8 @@ public enum INMessageAttribute : nint { Unflagged } + [Introduced (PlatformName.iOS, 10, 0)] + [Introduced (PlatformName.MacOSX, 10, 12, PlatformArchitecture.Arch64)] [Native] [Flags] public enum INMessageAttributeOptions : nuint { @@ -347,6 +355,8 @@ public enum INRadioType : nint { Dab } + [Introduced (PlatformName.iOS, 10, 0)] + [Unavailable (PlatformName.MacOSX)] [Native] public enum INRelativeReference : nint { Unknown = 0, @@ -354,6 +364,8 @@ public enum INRelativeReference : nint { Previous } + [Introduced (PlatformName.iOS, 10, 0)] + [Unavailable (PlatformName.MacOSX)] [Native] public enum INRelativeSetting : nint { Unknown = 0, @@ -450,7 +462,10 @@ public enum INSearchCallHistoryIntentResponseCode : nint { Ready, ContinueInApp, Failure, - FailureRequiringAppLaunch + FailureRequiringAppLaunch, + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + FailureAppConfigurationRequired, } [Introduced (PlatformName.iOS, 10, 0)] @@ -474,7 +489,10 @@ public enum INSearchForPhotosIntentResponseCode : nint { Ready, ContinueInApp, Failure, - FailureRequiringAppLaunch + FailureRequiringAppLaunch, + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + FailureAppConfigurationRequired, } [Introduced (PlatformName.iOS, 10, 0)] @@ -613,7 +631,13 @@ public enum INStartAudioCallIntentResponseCode : nint { Ready, ContinueInApp, Failure, - FailureRequiringAppLaunch + FailureRequiringAppLaunch, + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + FailureAppConfigurationRequired, + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + FailureCallingServiceNotAvailable, } [Introduced (PlatformName.iOS, 10, 0)] @@ -624,7 +648,9 @@ public enum INStartPhotoPlaybackIntentResponseCode : nint { Ready, ContinueInApp, Failure, - FailureRequiringAppLaunch + FailureRequiringAppLaunch, + [Introduced (PlatformName.iOS, 10, 2)] + FailureAppConfigurationRequired, } [Introduced (PlatformName.iOS, 10, 0)] @@ -635,7 +661,13 @@ public enum INStartVideoCallIntentResponseCode : nint { Ready, ContinueInApp, Failure, - FailureRequiringAppLaunch + FailureRequiringAppLaunch, + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + FailureAppConfigurationRequired, + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + FailureCallingServiceNotAvailable, } [Introduced (PlatformName.iOS, 10, 0)] @@ -802,6 +834,138 @@ public enum INIntentIdentifier { GetRideStatus } + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + enum INPersonHandleLabel { + [Field (null)] + None, + + [Field ("INPersonHandleLabelHome")] + Home, + + [Field ("INPersonHandleLabelWork")] + Work, + + [Field ("INPersonHandleLabeliPhone")] + iPhone, + + [Field ("INPersonHandleLabelMobile")] + Mobile, + + [Field ("INPersonHandleLabelMain")] + Main, + + [Field ("INPersonHandleLabelHomeFax")] + HomeFax, + + [Field ("INPersonHandleLabelWorkFax")] + WorkFax, + + [Field ("INPersonHandleLabelPager")] + Pager, + + [Field ("INPersonHandleLabelOther")] + Other, + } + + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + enum INPersonRelationship { + [Field (null)] + None, + + [Field ("INPersonRelationshipFather")] + Father, + + [Field ("INPersonRelationshipMother")] + Mother, + + [Field ("INPersonRelationshipParent")] + Parent, + + [Field ("INPersonRelationshipBrother")] + Brother, + + [Field ("INPersonRelationshipSister")] + Sister, + + [Field ("INPersonRelationshipChild")] + Child, + + [Field ("INPersonRelationshipFriend")] + Friend, + + [Field ("INPersonRelationshipSpouse")] + Spouse, + + [Field ("INPersonRelationshipPartner")] + Partner, + + [Field ("INPersonRelationshipAssistant")] + Assistant, + + [Field ("INPersonRelationshipManager")] + Manager, + } + + [Introduced (PlatformName.iOS, 10, 2)] + [Unavailable (PlatformName.MacOSX)] + enum INWorkoutNameIdentifier { + [Field ("INWorkoutNameIdentifierRun")] + Run, + + [Field ("INWorkoutNameIdentifierSit")] + Sit, + + [Field ("INWorkoutNameIdentifierSteps")] + Steps, + + [Field ("INWorkoutNameIdentifierStand")] + Stand, + + [Field ("INWorkoutNameIdentifierMove")] + Move, + + [Field ("INWorkoutNameIdentifierWalk")] + Walk, + + [Field ("INWorkoutNameIdentifierYoga")] + Yoga, + + [Field ("INWorkoutNameIdentifierDance")] + Dance, + + [Field ("INWorkoutNameIdentifierCrosstraining")] + Crosstraining, + + [Field ("INWorkoutNameIdentifierElliptical")] + Elliptical, + + [Field ("INWorkoutNameIdentifierRower")] + Rower, + + [Field ("INWorkoutNameIdentifierCycle")] + Cycle, + + [Field ("INWorkoutNameIdentifierStairs")] + Stairs, + + [Field ("INWorkoutNameIdentifierOther")] + Other, + + [Field ("INWorkoutNameIdentifierIndoorrun")] + Indoorrun, + + [Field ("INWorkoutNameIdentifierIndoorcycle")] + Indoorcycle, + + [Field ("INWorkoutNameIdentifierIndoorwalk")] + Indoorwalk, + + [Field ("INWorkoutNameIdentifierExercise")] + Exercise, + } + // End of enums [Introduced (PlatformName.iOS, 10, 0)] @@ -2133,6 +2297,16 @@ interface INPerson : NSCopying, NSSecureCoding, INSpeakable { [NullAllowed, Export ("customIdentifier")] string CustomIdentifier { get; } + [Introduced (PlatformName.iOS, 10, 0)] + [Introduced (PlatformName.MacOSX, 10, 12, PlatformArchitecture.Arch64)] + [NullAllowed, Export ("relationship"), Protected] + NSString WeakRelationship { get; } + + [Introduced (PlatformName.iOS, 10, 0)] + [Introduced (PlatformName.MacOSX, 10, 12, PlatformArchitecture.Arch64)] + [Wrap ("INPersonRelationshipExtensions.GetValue (WeakRelationship)")] + INPersonRelationship Relationship { get; } + // Inlined from INInteraction (INPerson) Category [NullAllowed, Export ("aliases", ArgumentSemantic.Copy)] @@ -2157,6 +2331,28 @@ interface INPersonHandle : NSCopying, NSSecureCoding { [Export ("type")] INPersonHandleType Type { get; } + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + [Export ("label"), NullAllowed, Protected] + NSString WeakLabel { get; } + + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + [Wrap ("INPersonHandleLabelExtensions.GetValue (WeakLabel)")] + INPersonHandleLabel Label { get; } + + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + [Wrap ("this (value, type, label.GetConstant ())")] + [DesignatedInitializer] + IntPtr Constructor (string value, INPersonHandleType type, INPersonHandleLabel label); + + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + [Export ("initWithValue:type:label:"), Protected] + [DesignatedInitializer] + IntPtr Constructor (string value, INPersonHandleType type, [NullAllowed] NSString stringLabel); + [Export ("initWithValue:type:")] [DesignatedInitializer] IntPtr Constructor (string value, INPersonHandleType type); @@ -2836,12 +3032,18 @@ interface INRideCompletionStatus : NSCopying, NSSecureCoding { [Introduced (PlatformName.iOS, 10, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INRideDriver bound [BaseType (typeof (INPerson))] + [DisableDefaultCtor] // xcode 8.2 beta 1 -> NSInvalidArgumentException Reason: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1] interface INRideDriver : NSCopying, NSSecureCoding { [Export ("initWithPersonHandle:nameComponents:displayName:image:rating:phoneNumber:")] - [DesignatedInitializer] + [Deprecated (PlatformName.iOS, 10,2, message:"Use the overload signature instead")] IntPtr Constructor (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string rating, [NullAllowed] string phoneNumber); + [Export ("initWithPhoneNumber:nameComponents:displayName:image:rating:")] + [Introduced (PlatformName.iOS, 10,2)] + [DesignatedInitializer] + IntPtr Constructor (string phoneNumber, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string rating); + [NullAllowed, Export ("rating")] string Rating { get; } @@ -2941,6 +3143,7 @@ interface INRidePartySizeOption : NSCopying, NSSecureCoding { [Introduced (PlatformName.WatchOS, 3, 0)] [Unavailable (PlatformName.MacOSX)] [BaseType (typeof (NSObject))] + [DisableDefaultCtor] // xcode 8.2 beta 1 -> NSInvalidArgumentException Reason: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1] interface INRideStatus : NSCopying, NSSecureCoding { [NullAllowed, Export ("rideIdentifier")] @@ -3013,15 +3216,24 @@ interface INRideVehicle : NSCopying, NSSecureCoding { [BaseType (typeof (INIntent))] interface INSaveProfileInCarIntent { - [Export ("initWithProfileNumber:profileLabel:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] NSNumber profileNumber, [NullAllowed] string profileLabel); + [Deprecated (PlatformName.iOS, 10, 2)] + [Export ("initWithProfileNumber:profileLabel:"), Internal] + IntPtr InitWithProfileNumberLabel ([NullAllowed] NSNumber profileNumber, [NullAllowed] string profileLabel); + + [Introduced (PlatformName.iOS, 10, 2)] + [Export ("initWithProfileNumber:profileName:"), Internal] + IntPtr InitWithProfileNumberName ([NullAllowed] NSNumber profileNumber, [NullAllowed] string profileName); [NullAllowed, Export ("profileNumber", ArgumentSemantic.Copy)] NSNumber ProfileNumber { get; } + [Deprecated (PlatformName.iOS, 10,2, message:"Use ProfileName instead")] [NullAllowed, Export ("profileLabel")] string ProfileLabel { get; } + + [Introduced (PlatformName.iOS, 10, 2)] + [NullAllowed, Export ("profileName")] + string ProfileName { get; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -3038,6 +3250,10 @@ interface INSaveProfileInCarIntentHandling { [Export ("resolveProfileNumberForSaveProfileInCar:withCompletion:")] void ResolveProfileNumber (INSaveProfileInCarIntent intent, Action completion); + + [Introduced (PlatformName.iOS, 10, 2)] + [Export ("resolveProfileNameForSaveProfileInCar:withCompletion:")] + void ResolveProfileName (INSaveProfileInCarIntent intent, Action completion); } [Introduced (PlatformName.iOS, 10, 0)] @@ -3670,17 +3886,25 @@ interface INSetMessageAttributeIntentResponse { [BaseType (typeof (INIntent))] interface INSetProfileInCarIntent { - [Protected] - [Export ("initWithProfileNumber:profileLabel:defaultProfile:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] NSNumber profileNumber, [NullAllowed] string profileLabel, [NullAllowed] NSNumber defaultProfile); + [Deprecated (PlatformName.iOS, 10, 2)] + [Export ("initWithProfileNumber:profileLabel:defaultProfile:"), Internal] + IntPtr InitWithProfileNumberLabel ([NullAllowed] NSNumber profileNumber, [NullAllowed] string profileLabel, [NullAllowed] NSNumber defaultProfile); + + [Introduced (PlatformName.iOS, 10, 2)] + [Export ("initWithProfileNumber:profileName:defaultProfile:"), Internal] + IntPtr InitWithProfileNumberName ([NullAllowed] NSNumber profileNumber, [NullAllowed] string profileName, [NullAllowed] NSNumber defaultProfile); [NullAllowed, Export ("profileNumber", ArgumentSemantic.Copy)] NSNumber ProfileNumber { get; } + [Deprecated (PlatformName.iOS, 10, 2, message: "Use ProfileName instead")] [NullAllowed, Export ("profileLabel")] string ProfileLabel { get; } + [Introduced (PlatformName.iOS, 10, 2)] + [NullAllowed, Export ("profileName")] + string ProfileName { get; } + [Internal] [NullAllowed, Export ("defaultProfile", ArgumentSemantic.Copy)] NSNumber _DefaultProfile { get; } @@ -3703,6 +3927,10 @@ interface INSetProfileInCarIntentHandling { [Export ("resolveDefaultProfileForSetProfileInCar:withCompletion:")] void ResolveDefaultProfile (INSetProfileInCarIntent intent, Action completion); + + [Introduced (PlatformName.iOS, 10, 2)] + [Export ("resolveProfileNameForSetProfileInCar:withCompletion:")] + void ResolveProfileName (INSetProfileInCarIntent intent, Action completion); } [Introduced (PlatformName.iOS, 10, 0)] @@ -3890,6 +4118,11 @@ interface INSpeakableString : INSpeakable { [Export ("initWithIdentifier:spokenPhrase:pronunciationHint:")] [DesignatedInitializer] IntPtr Constructor (string identifier, string spokenPhrase, [NullAllowed] string pronunciationHint); + + [Introduced (PlatformName.iOS, 10, 2)] + [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] + [Export ("initWithSpokenPhrase:")] + IntPtr Constructor (string spokenPhrase); } [Introduced (PlatformName.iOS, 10, 0)] diff --git a/src/mediaplayer.cs b/src/mediaplayer.cs index 96660060f74e..b6e9f90b3754 100644 --- a/src/mediaplayer.cs +++ b/src/mediaplayer.cs @@ -13,11 +13,16 @@ using XamCore.CoreFoundation; using XamCore.CoreGraphics; using XamCore.CoreLocation; +#if MONOMAC +using XamCore.AppKit; +#else using XamCore.UIKit; +#endif using System; namespace XamCore.MediaPlayer { + [NoMac] [NoTV] [BaseType (typeof (NSObject))] #if XAMCORE_2_0 @@ -47,6 +52,7 @@ interface MPMediaItem : NSSecureCoding { #if XAMCORE_2_0 } + [NoMac] [NoTV] [BaseType (typeof (MPMediaEntity))] interface MPMediaItem { @@ -245,9 +251,11 @@ interface MPMediaItem { NSString DateAddedProperty { get; } } + [Mac (10,12,2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MPMediaItemArtwork { +#if !MONOMAC [iOS (10,0)] [TV (10,0)] [Export ("initWithBoundsSize:requestHandler:")] @@ -261,15 +269,26 @@ interface MPMediaItemArtwork { [Export ("imageWithSize:")] [return: NullAllowed] UIImage ImageWithSize (CGSize size); +#else + [Export ("initWithBoundsSize:requestHandler:")] + [DesignatedInitializer] + IntPtr Constructor (CGSize boundsSize, Func requestHandler); + + [Export ("imageWithSize:")] + [return: NullAllowed] + NSImage ImageWithSize (CGSize size); +#endif [Export ("bounds")] CGRect Bounds { get; } + [NoMac] [Deprecated (PlatformName.iOS, 10, 0)] [Export ("imageCropRect")] CGRect ImageCropRectangle { get; } } + [NoMac] [NoTV] // Objective-C exception thrown. Name: MPMediaItemCollectionInitException Reason: -init is not supported, use -initWithItems: [DisableDefaultCtor] @@ -306,6 +325,7 @@ interface MPMediaItemCollection : MPMediaEntity, NSSecureCoding { MPMediaType MediaTypes { get; } } + [NoMac] [NoTV] [BaseType (typeof (NSObject))] interface MPMediaLibrary : NSSecureCoding { @@ -352,6 +372,7 @@ interface MPMediaLibrary : NSSecureCoding { void GetPlaylist (NSUuid uuid, [NullAllowed] MPMediaPlaylistCreationMetadata creationMetadata, Action completionHandler); } +#if !MONOMAC [NoTV] [BaseType (typeof (UIViewController), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(MPMediaPickerControllerDelegate)})] interface MPMediaPickerController { @@ -396,7 +417,9 @@ interface MPMediaPickerControllerDelegate { [Export ("mediaPickerDidCancel:"), EventArgs ("MPMediaPickerController"), EventName ("DidCancel")] void MediaPickerDidCancel (MPMediaPickerController sender); } +#endif + [NoMac] [NoTV] [BaseType (typeof (MPMediaItemCollection))] // Objective-C exception thrown. Name: MPMediaItemCollectionInitException Reason: -init is not supported, use -initWithItems: @@ -427,6 +450,14 @@ interface MPMediaPlaylist : NSSecureCoding { [Export ("seedItems")] MPMediaItem [] SeedItems { get; } + [iOS (9,3)] + [NullAllowed, Export ("descriptionText")] + string DescriptionText { get; } + + [iOS (9,3)] + [NullAllowed, Export ("authorDisplayName")] + string AuthorDisplayName { get; } + [iOS (9,3)] [Async] [Export ("addItemWithProductID:completionHandler:")] @@ -438,6 +469,7 @@ interface MPMediaPlaylist : NSSecureCoding { void AddMediaItems (MPMediaItem[] mediaItems, [NullAllowed] Action completionHandler); } + [NoMac] [Static] interface MPMediaPlaylistProperty { [Field ("MPMediaPlaylistPropertyPersistentID")] @@ -463,6 +495,7 @@ interface MPMediaPlaylistProperty { NSString AuthorDisplayName { get; } } + [NoMac] [NoTV] [BaseType (typeof (NSObject))] interface MPMediaQuery : NSSecureCoding, NSCopying { @@ -552,11 +585,13 @@ interface MPMediaQuery : NSSecureCoding, NSCopying { MPMediaQuerySection [] ItemSections { get; } } + [NoMac] [NoTV] [BaseType (typeof (NSObject))] interface MPMediaPredicate : NSSecureCoding { } + [NoMac] [NoTV] [BaseType (typeof (MPMediaPredicate))] interface MPMediaPropertyPredicate { @@ -576,6 +611,7 @@ interface MPMediaPropertyPredicate { MPMediaPredicateComparison ComparisonType { get; } } + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [BaseType (typeof (NSObject))] @@ -590,6 +626,7 @@ interface MPMovieAccessLog : NSCopying { NSData ExtendedLogData { get; } } + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [BaseType (typeof (NSObject))] @@ -604,6 +641,7 @@ interface MPMovieErrorLog : NSCopying { NSData ExtendedLogData { get; } } + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [BaseType (typeof (NSObject))] @@ -651,6 +689,7 @@ interface MPMovieAccessLogEvent : NSCopying { nint DroppedVideoFrameCount { get; } } + [NoMac] [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [BaseType (typeof (NSObject))] @@ -677,12 +716,14 @@ interface MPMovieErrorLogEvent : NSCopying { string ErrorComment { get; } } + [NoMac] [Availability (Deprecated = Platform.iOS_9_0)] interface MPMoviePlayerFinishedEventArgs { [Export ("MPMoviePlayerPlaybackDidFinishReasonUserInfoKey")] MPMovieFinishReason FinishReason { get; } } +#if !MONOMAC [Availability (Deprecated = Platform.iOS_9_0)] interface MPMoviePlayerFullScreenEventArgs { [Export ("MPMoviePlayerFullscreenAnimationDurationUserInfoKey")] @@ -703,7 +744,9 @@ interface MPMoviePlayerThumbnailEventArgs { [Export ("MPMoviePlayerThumbnailErrorKey")] NSError Error { get; } } +#endif + [NoMac] [Availability (Deprecated = Platform.iOS_9_0)] interface MPMoviePlayerTimedMetadataEventArgs { [Export ("MPMoviePlayerTimedMetadataUserInfoKey")] @@ -711,6 +754,7 @@ interface MPMoviePlayerTimedMetadataEventArgs { } // no [Model] yet... it can be easily created in user code (all abstract) if needed + [NoMac] [Protocol] interface MPMediaPlayback { [Abstract] @@ -762,6 +806,7 @@ interface MPMediaPlayback { void EndSeeking (); } +#if !MONOMAC [NoTV] [Availability (Deprecated = Platform.iOS_9_0)] [BaseType (typeof (NSObject))] @@ -1032,7 +1077,9 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification { get; } } +#endif + [NoMac] [NoTV] [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_9_0)] [BaseType (typeof (NSObject))] @@ -1059,6 +1106,7 @@ interface MPTimedMetadata { NSDictionary AllMetadata { get; } } +#if !MONOMAC [NoTV] [BaseType (typeof (UIViewController))] [Availability (Introduced = Platform.iOS_3_2, Deprecated = Platform.iOS_9_0)] @@ -1075,7 +1123,9 @@ interface MPMoviePlayerViewController { [Export ("shouldAutorotateToInterfaceOrientation:")] bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation orientation); } +#endif + [NoMac] [NoTV] [BaseType (typeof (NSObject))] interface MPMusicPlayerController : MPMediaPlayback { @@ -1157,6 +1207,7 @@ interface MPMusicPlayerController : MPMediaPlayback { NSString VolumeDidChangeNotification { get; } } +#if !MONOMAC [NoTV] [BaseType (typeof (UIView))] interface MPVolumeView { @@ -1234,7 +1285,9 @@ interface MPVolumeView { [Field ("MPVolumeViewWirelessRouteActiveDidChangeNotification")] NSString WirelessRouteActiveDidChangeNotification { get; } } +#endif + [NoMac] [NoTV] [Since (4,2)] [BaseType (typeof (NSObject))] @@ -1248,6 +1301,7 @@ interface MPMediaQuerySection : NSSecureCoding, NSCopying { string Title { get; } } + [Mac (10,12,2)] [Since (5,0)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -init is not supported, use +defaultCenter @@ -1260,6 +1314,11 @@ interface MPNowPlayingInfoCenter { [Export ("defaultCenter")] MPNowPlayingInfoCenter DefaultCenter { get; } + [NoiOS] + [NoTV] + [Export ("playbackState", ArgumentSemantic.Assign)] + MPNowPlayingPlaybackState PlaybackState { get; set; } + [Internal] [Field ("MPNowPlayingInfoPropertyElapsedPlaybackTime")] NSString PropertyElapsedPlaybackTime { get; } @@ -1330,6 +1389,7 @@ interface MPNowPlayingInfoCenter { NSString PropertyIsLiveStream { get; } } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // crash if used @@ -1354,11 +1414,13 @@ interface MPContentItem { [Export ("title")] string Title { get; set; } + [NoMac] [iOS (10,0)] [TV (10,0)] [Export ("streamingContent")] bool StreamingContent { [Bind ("isStreamingContent")] get; set; } + [NoMac] [iOS (10,0)] [TV (10,0)] [Export ("explicitContent")] @@ -1371,6 +1433,7 @@ interface MPContentItem { bool Playable { [Bind ("isPlayable")] get; set; } } + [NoMac] [NoTV] [Since (7,1)] [BaseType (typeof (NSObject))] @@ -1400,6 +1463,7 @@ interface MPPlayableContentDataSource { [Export ("numberOfChildItemsAtIndexPath:")] nint NumberOfChildItems (NSIndexPath indexPath); + [NoMac] [iOS (10,0)] [Async] [Export ("contentItemForIdentifier:completionHandler:")] @@ -1409,6 +1473,7 @@ interface MPPlayableContentDataSource { interface IMPPlayableContentDataSource { } + [NoMac] [NoTV] [Since (7,1)] [BaseType (typeof (NSObject))] @@ -1432,6 +1497,7 @@ interface MPPlayableContentDelegate { void InitializePlaybackQueue (MPPlayableContentManager contentManager, [NullAllowed] MPContentItem[] contentItems, Action completionHandler); } + [NoMac] [NoTV] [Since (7,1)] [BaseType (typeof (NSObject))] @@ -1474,6 +1540,7 @@ interface MPPlayableContentManager { string[] NowPlayingIdentifiers { get; set; } } + [NoMac] [NoTV] [iOS (8,4)] [BaseType (typeof(NSObject))] @@ -1497,6 +1564,7 @@ interface MPPlayableContentManagerContext { bool EndpointAvailable { get; } } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSGenericException Reason: MPRemoteCommands cannot be initialized externally. @@ -1518,6 +1586,7 @@ interface MPRemoteCommand { void RemoveTarget ([NullAllowed] NSObject target, Selector action); } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPChangePlaybackRateCommands cannot be initialized externally. @@ -1527,6 +1596,7 @@ interface MPChangePlaybackRateCommand { NSNumber[] SupportedPlaybackRates { get; set; } } + [Mac (10,12,2)] [iOS (8,0)] [BaseType (typeof(MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPChangeShuffleModeCommand cannot be initialized externally. @@ -1536,6 +1606,7 @@ interface MPChangeShuffleModeCommand MPShuffleType CurrentShuffleType { get; set; } } + [Mac (10,12,2)] [iOS (8,0)] [BaseType (typeof(MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPChangeRepeatModeCommand cannot be initialized externally. @@ -1545,6 +1616,7 @@ interface MPChangeRepeatModeCommand MPRepeatType CurrentRepeatType { get; set; } } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPFeedbackCommands cannot be initialized externally. @@ -1556,11 +1628,13 @@ interface MPFeedbackCommand { [Export ("localizedTitle")] string LocalizedTitle { get; set; } + [NoMac] [iOS (8,2)] // added in 8.2, shown as NS_AVAILABLE_IOS(8_0) [Export ("localizedShortTitle")] string LocalizedShortTitle { get; set; } } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPRatingCommands cannot be initialized externally. @@ -1573,6 +1647,7 @@ interface MPRatingCommand { float MinimumRating { get; set; } /* float, not CGFloat */ } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPSkipIntervalCommands cannot be initialized externally. @@ -1585,6 +1660,7 @@ interface MPSkipIntervalCommand { NSArray _PreferredIntervals { get; set; } } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1660,6 +1736,7 @@ interface MPRemoteCommandCenter { MPChangePlaybackPositionCommand ChangePlaybackPositionCommand { get; } } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSGenericException Reason: MPRemoteCommandEvents cannot be initialized externally. @@ -1672,6 +1749,7 @@ interface MPRemoteCommandEvent { double /* NSTimeInterval */ Timestamp { get; } } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPChangePlaybackRateCommandEvents cannot be initialized externally. @@ -1681,6 +1759,7 @@ interface MPChangePlaybackRateCommandEvent { float PlaybackRate { get; } // float, not CGFloat } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPRatingCommandEvents cannot be initialized externally. @@ -1690,6 +1769,7 @@ interface MPRatingCommandEvent { float Rating { get; } // float, not CGFloat } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // Name: NSGenericException Reason: MPSeekCommandEvents cannot be initialized externally. @@ -1699,6 +1779,7 @@ interface MPSeekCommandEvent { MPSeekCommandEventType Type { get; } } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPSkipIntervalCommandEvents cannot be initialized externally. @@ -1708,6 +1789,7 @@ interface MPSkipIntervalCommandEvent { double /* NSTimeInterval */ Interval { get; } } + [Mac (10,12,2)] [Since (7,1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] @@ -1717,6 +1799,7 @@ interface MPFeedbackCommandEvent { bool Negative { [Bind ("isNegative")] get; } } + [Mac (10,12,2)] [iOS (9,0)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPChangeLanguageOptionCommandEvents cannot be initialized externally. @@ -1730,6 +1813,7 @@ interface MPChangeLanguageOptionCommandEvent { MPChangeLanguageOptionSetting Setting { get; } } + [Mac (10,12,2)] [iOS (8,0)] [BaseType (typeof(MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPChangeShuffleModeCommandEvent cannot be initialized externally. @@ -1744,6 +1828,7 @@ interface MPChangeShuffleModeCommandEvent bool PreservesShuffleMode { get; } } + [Mac (10,12,2)] [iOS (8,0)] [BaseType (typeof(MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPChangeRepeatModeCommandEvent cannot be initialized externally. @@ -1758,6 +1843,7 @@ interface MPChangeRepeatModeCommandEvent bool PreservesRepeatMode { get; } } + [Mac (10,12,2)] [iOS (9,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // pre-emptive @@ -1790,6 +1876,7 @@ interface MPNowPlayingInfoLanguageOption { bool IsAutomaticAudibleLanguageOption { get; } } + [Mac (10,12,2)] [iOS (9,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // pre-emptive @@ -1807,6 +1894,7 @@ interface MPNowPlayingInfoLanguageOptionGroup { bool AllowEmptySelection { get; } } + [Mac (10,12,2)] [iOS (9,0)] [Static] // not [Internal] since they are exposed as an NSString[] property in MPNowPlayingInfoLanguageOption @@ -1842,12 +1930,14 @@ interface MPLanguageOptionCharacteristics { NSString VoiceOverTranslation { get; } } + [Mac (10,12,2)] [iOS (9,1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // Objective-C exception thrown. Name: NSGenericException Reason: MPChangePlaybackPositionCommands cannot be initialized externally. interface MPChangePlaybackPositionCommand { } + [Mac (10,12,2)] [iOS (9,1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // Objective-C exception thrown. Name: NSGenericException Reason: MPChangePlaybackPositionCommandEvents cannot be initialized externally. @@ -1856,6 +1946,7 @@ interface MPChangePlaybackPositionCommandEvent { double PositionTime { get; } } + [NoMac] [NoTV][iOS (9,3)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1875,11 +1966,13 @@ interface MPMediaPlaylistCreationMetadata { string DescriptionText { get; set; } } + [NoMac] [NoTV] [iOS (10,1)] [BaseType (typeof (NSObject))] interface MPMusicPlayerQueueDescriptor : NSSecureCoding {} + [NoMac] [NoTV] [iOS (10,1)] [BaseType (typeof(MPMusicPlayerQueueDescriptor))] @@ -1907,6 +2000,7 @@ interface MPMusicPlayerMediaItemQueueDescriptor void SetEndTime (double endTime, MPMediaItem mediaItem); } + [NoMac] [NoTV] [iOS (10,1)] [BaseType (typeof(MPMusicPlayerQueueDescriptor))] diff --git a/src/messages.cs b/src/messages.cs index 111f431081fd..1f2c10b9bf1f 100644 --- a/src/messages.cs +++ b/src/messages.cs @@ -203,7 +203,7 @@ interface MSMessageTemplateLayout [iOS (10,0)] [BaseType (typeof(NSObject))] - interface MSSession {} + interface MSSession : NSSecureCoding {} [iOS (10,0)] [BaseType (typeof(NSObject))] diff --git a/src/modelio.cs b/src/modelio.cs index 6b4b0ee4ed3e..e1bc9153cb37 100644 --- a/src/modelio.cs +++ b/src/modelio.cs @@ -37,6 +37,8 @@ namespace XamCore.ModelIO { + delegate void MDLObjectHandler (MDLObject mdlObject, ref bool stop); + [iOS (9,0)][Mac(10,11, onlyOn64 : true)] [BaseType (typeof(MDLPhysicallyPlausibleLight))] [DisableDefaultCtor] @@ -415,6 +417,10 @@ interface MDLMaterial : MDLNamed, INSFastEnumeration [return: NullAllowed] MDLMaterialProperty GetProperty (MDLMaterialSemantic semantic); + [iOS (10,2), Mac (10,12,1)] + [Export ("propertiesWithSemantic:")] + MDLMaterialProperty[] GetProperties (MDLMaterialSemantic semantic); + [Export ("removeAllProperties")] void RemoveAllProperties (); @@ -645,7 +651,11 @@ nuint VertexCount { } [Export ("vertexBuffers", ArgumentSemantic.Retain)] - IMDLMeshBuffer[] VertexBuffers { get; } + IMDLMeshBuffer[] VertexBuffers { + get; + [iOS (10,2), Mac (10,12,1), TV (10,1)] + set; + } [NullAllowed] [Export ("submeshes", ArgumentSemantic.Copy)] @@ -763,6 +773,12 @@ NSMutableArray Submeshes { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] MDLMesh CreateCylindroid (float height, Vector2 radii, nuint radialSegments, nuint verticalSegments, MDLGeometryType geometryType, bool inwardNormals, [NullAllowed] IMDLMeshBufferAllocator allocator); + [Static] + [iOS (10,2), Mac (12,1,1), TV (10,1)] + [Export ("newCapsuleWithHeight:radii:radialSegments:verticalSegments:hemisphereSegments:geometryType:inwardNormals:allocator:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + MDLMesh CreateCapsule (float height, Vector2 radii, nuint radialSegments, nuint verticalSegments, nuint hemisphereSegments, MDLGeometryType geometryType, bool inwardNormals, [NullAllowed] IMDLMeshBufferAllocator allocator); + [Static] [Export ("newEllipticalConeWithHeight:radii:radialSegments:verticalSegments:geometryType:inwardNormals:allocator:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] @@ -772,6 +788,11 @@ NSMutableArray Submeshes { [Export ("newIcosahedronWithRadius:inwardNormals:allocator:")] MDLMesh CreateIcosahedron (float radius, bool inwardNormals, [NullAllowed] IMDLMeshBufferAllocator allocator); + [Static] + [iOS (10,2), Mac (12,1,1), TV (10,1)] + [Export ("newIcosahedronWithRadius:inwardNormals:geometryType:allocator:")] + MDLMesh CreateIcosahedron (float radius, bool inwardNormals, MDLGeometryType geometryType, [NullAllowed] IMDLMeshBufferAllocator allocator); + [Static] [Export ("newSubdividedMesh:submeshIndex:subdivisionLevels:")] MDLMesh CreateSubdividedMesh (MDLMesh mesh, nuint submeshIndex, nuint subdivisionLevels); @@ -932,13 +953,20 @@ interface MDLNoiseTexture [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] IntPtr Constructor ([NullAllowed] NSData pixelData, bool topLeftOrigin, [NullAllowed] string name, Vector2i dimensions, nint rowStride, nuint channelCount, MDLTextureChannelEncoding channelEncoding, bool isCube); + [Internal] [Export ("initVectorNoiseWithSmoothness:name:textureDimensions:channelEncoding:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - IntPtr Constructor (float smoothness, [NullAllowed] string name, Vector2i textureDimensions, MDLTextureChannelEncoding channelEncoding); + IntPtr InitVectorNoiseWithSmoothness (float smoothness, [NullAllowed] string name, Vector2i textureDimensions, MDLTextureChannelEncoding channelEncoding); [Export ("initScalarNoiseWithSmoothness:name:textureDimensions:channelCount:channelEncoding:grayscale:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] IntPtr Constructor (float smoothness, [NullAllowed] string name, Vector2i textureDimensions, int channelCount, MDLTextureChannelEncoding channelEncoding, bool grayscale); + + [Internal] + [iOS (10,2), Mac (12,1,1)] + [Export ("initCellularNoiseWithFrequency:name:textureDimensions:channelEncoding:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + IntPtr InitCellularNoiseWithFrequency (float frequency, [NullAllowed] string name, Vector2i textureDimensions, MDLTextureChannelEncoding channelEncoding); } [iOS (9,0), Mac(10,11, onlyOn64 : true)] @@ -986,6 +1014,10 @@ interface MDLObject : MDLNamed [Export ("objectAtPath:")] MDLObject GetObject (string path); + [iOS (10,2), Mac (12,1,1), TV (10,1)] + [Export ("enumerateChildObjectsOfClass:root:usingBlock:stopPointer:")] + void EnumerateChildObjects (Class objectClass, MDLObject root, MDLObjectHandler handler, ref bool stop); + [NullAllowed, Export ("transform", ArgumentSemantic.Retain)] IMDLTransformComponent Transform { get; set; } @@ -1304,7 +1336,11 @@ interface MDLSubmesh : MDLNamed MDLMaterial Material { get; set; } [NullAllowed, Export ("topology", ArgumentSemantic.Retain)] - MDLSubmeshTopology Topology { get; } + MDLSubmeshTopology Topology { + get; + [iOS (10,2), Mac (12,1,1), TV (10,1)] + set; + } [Static] [Export ("submeshWithSCNGeometryElement:")] @@ -1739,8 +1775,6 @@ interface MDLVertexDescriptor : NSCopying interface MDLVoxelArray { - [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use new MDLVoxelArray (MDLAsset, int, float)")] - [Obsoleted (PlatformName.iOS, 10, 0, message: "Use new MDLVoxelArray (MDLAsset, int, float)")] [Export ("initWithAsset:divisions:interiorShells:exteriorShells:patchRadius:")] IntPtr Constructor (MDLAsset asset, int divisions, int interiorShells, int exteriorShells, float patchRadius); @@ -1929,6 +1963,10 @@ interface MDLVertexBufferLayout : NSCopying [iOS (9,0)][Mac(10,11, onlyOn64 : true)] [BaseType (typeof (NSObject))] interface MDLSubmeshTopology { + [iOS (10,2), Mac (10,12)] + [Export ("initWithSubmesh:")] + IntPtr Constructor (MDLSubmesh submesh); + [NullAllowed, Export ("faceTopology", ArgumentSemantic.Retain)] IMDLMeshBuffer FaceTopology { get; set; } diff --git a/src/networkextension.cs b/src/networkextension.cs index 9d1ad8000bd5..e4c61e5442c6 100644 --- a/src/networkextension.cs +++ b/src/networkextension.cs @@ -735,7 +735,6 @@ interface NETunnelProvider [iOS (9,0)][Mac (10,11, onlyOn64 : true)] [BaseType (typeof(NEVpnManager))] - [DisableDefaultCtor] // init returns nil interface NETunnelProviderManager { [Static] @@ -1294,7 +1293,11 @@ interface NEFilterSocketFlow { [iOS (9,0)][Mac (10,11, onlyOn64 : true)] [BaseType (typeof (NETunnelNetworkSettings))] + [DisableDefaultCtor] interface NEPacketTunnelNetworkSettings { + [Export ("initWithTunnelRemoteAddress:")] + IntPtr Constructor (string address); + [Export ("IPv4Settings", ArgumentSemantic.Copy)] [NullAllowed] NEIPv4Settings IPv4Settings { get; set; } @@ -1333,7 +1336,6 @@ interface NEPacketTunnelFlow { [iOS (9,0)][Mac (10,11, onlyOn64 : true)] [BaseType (typeof (NETunnelProvider))] - [DisableDefaultCtor] // no valid handle when `init` is called interface NEPacketTunnelProvider { [Export ("startTunnelWithOptions:completionHandler:")] [Async] diff --git a/src/passkit.cs b/src/passkit.cs index df61b67fc30d..ac71305221fd 100644 --- a/src/passkit.cs +++ b/src/passkit.cs @@ -113,7 +113,7 @@ interface PKPassLibrary { bool CanAddPaymentPass (string primaryAccountIdentifier); [iOS (10,1)] - [NoWatch] // Radar: https://trello.com/c/MvaHEZlc + [Watch (3,1)] [Export ("canAddFelicaPass")] bool CanAddFelicaPass { get; } diff --git a/src/photos.cs b/src/photos.cs index b4df256a4622..2d6b23e93c95 100644 --- a/src/photos.cs +++ b/src/photos.cs @@ -979,6 +979,8 @@ interface PHPhotoLibraryChangeObserver { void PhotoLibraryDidChange (PHChange changeInstance); } + delegate void PHPhotoLibraryCancellableChangeHandler (out bool cancel); + [iOS (8,0)] [TV (10,0)] [NoMac] diff --git a/src/replaykit.cs b/src/replaykit.cs index a25a50d2b343..978a01039180 100644 --- a/src/replaykit.cs +++ b/src/replaykit.cs @@ -259,5 +259,9 @@ interface RPBroadcastSampleHandler { [Export ("processSampleBuffer:withType:")] void ProcessSampleBuffer (CMSampleBuffer sampleBuffer, RPSampleBufferType sampleBufferType); + + [iOS (10,2)][TV (10,1)] + [Export ("finishBroadcastWithError:")] + void FinishBroadcast (NSError error); } } diff --git a/src/security.cs b/src/security.cs index 3f5091f17120..baedb78584d4 100644 --- a/src/security.cs +++ b/src/security.cs @@ -851,6 +851,14 @@ enum SslSessionConfig { [Field ("kSSLSessionConfig_anonymous")] Anonymous, + + [iOS (10,2)][TV (10,1)][NoWatch][Mac (10,12,2)] + [Field ("kSSLSessionConfig_3DES_fallback")] + ThreeDesFallback, + + [iOS (10,2)][TV (10,1)][NoWatch][Mac (10,12,2)] + [Field ("kSSLSessionConfig_TLSv1_3DES_fallback")] + Tls1ThreeDesFallback, } [iOS (10,0)][TV (10,0)][Watch (3,0)][Mac (10,12)] diff --git a/src/spritekit.cs b/src/spritekit.cs index 4331609fd4e7..062b85aeff56 100644 --- a/src/spritekit.cs +++ b/src/spritekit.cs @@ -299,14 +299,18 @@ partial interface SKNode : NSCoding, NSCopying { [Export ("attributeValues", ArgumentSemantic.Copy)] NSDictionary AttributeValues { get; set; } +#if !XAMCORE_4_0 + // [Obsolete ("Please use the subtype's method")] [iOS (9,0),Mac(10,11)] [Export ("valueForAttributeNamed:")] [return: NullAllowed] SKAttributeValue GetValue (string key); + // [Obsolete ("Please use the subtype's method")] [iOS (9,0),Mac(10,11)] [Export ("setValue:forAttributeNamed:")] void SetValue (SKAttributeValue value, string key); +#endif #if !WATCH // Extensions from GameplayKit, inlined to avoid ugly static extension syntax @@ -376,6 +380,17 @@ partial interface SKEffectNode : SKWarpable { [NullAllowed] // by default this property is null [Export ("shader", ArgumentSemantic.Retain)] SKShader Shader { get; set; } + +#if XAMCORE_4_0 + [iOS (9,0), Mac(10,11)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); + + [iOS (9,0), Mac(10,11)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +#endif } delegate Vector3 SKFieldForceEvaluator (/* vector_float3 */ Vector4 position, /* vector_float3 */ Vector4 velocity, float /* float, not CGFloat */ mass, float /* float, not CGFloat */ charge, double time); @@ -712,6 +727,17 @@ partial interface SKSpriteNode : SKWarpable { [TV (10,0)] [Export ("scaleToSize:")] void ScaleTo (CGSize size); + +#if XAMCORE_4_0 + [iOS (9,0), Mac(10,11)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); + + [iOS (9,0), Mac(10,11)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +#endif } [Watch (3,0)] @@ -935,6 +961,17 @@ partial interface SKEmitterNode { [iOS (9,0)][Mac (10,11, onlyOn64 : true)] [Export ("particleRenderOrder", ArgumentSemantic.Assign)] SKParticleRenderOrder ParticleRenderOrder { get; set; } + +#if XAMCORE_4_0 + [iOS (9,0), Mac(10,11)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); + + [iOS (9,0), Mac(10,11)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +#endif } [Watch (3,0)] @@ -1053,6 +1090,17 @@ partial interface SKShapeNode { [iOS (8,0), Mac (10,10)] [Export ("lineLength")] nfloat LineLength { get; } + +#if XAMCORE_4_0 + [iOS (9,0), Mac(10,11)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); + + [iOS (9,0), Mac(10,11)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +#endif } [Watch (3,0)] @@ -2981,6 +3029,17 @@ interface SKTileMapNode : NSCopying, NSCoding [Export ("tileMapNodesWithTileSet:columns:rows:tileSize:fromNoiseMap:tileTypeNoiseMapThresholds:")] SKTileMapNode[] FromTileSet (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, GKNoiseMap noiseMap, NSNumber[] thresholds); #endif + +#if XAMCORE_4_0 + [iOS (9,0), Mac(10,11)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); + + [iOS (9,0), Mac(10,11)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +#endif } [Watch (3,0)] diff --git a/src/storekit.cs b/src/storekit.cs index 20db11f51abe..092ffb2353fd 100644 --- a/src/storekit.cs +++ b/src/storekit.cs @@ -473,7 +473,8 @@ interface SKCloudServiceController { NSString CloudServiceCapabilitiesDidChangeNotification { get; } } - [NoTV, iOS (10,1)] + [iOS (10,1)] + [NoTV] // __TVOS_PROHIBITED [BaseType (typeof(UIViewController))] interface SKCloudServiceSetupViewController { @@ -491,7 +492,8 @@ interface SKCloudServiceSetupViewController interface ISKCloudServiceSetupViewControllerDelegate {} - [NoTV, iOS (10,1)] + [iOS (10,1)] + [NoTV] // __TVOS_PROHIBITED on the only member + SKCloudServiceSetupViewController is not in tvOS [Protocol, Model] [BaseType (typeof(NSObject))] interface SKCloudServiceSetupViewControllerDelegate diff --git a/src/uikit.cs b/src/uikit.cs index b396a867b549..4e004ec45be2 100644 --- a/src/uikit.cs +++ b/src/uikit.cs @@ -217,7 +217,7 @@ interface UICloudSharingControllerDelegate { [iOS (10,0), NoTV, NoWatch] delegate void UICloudSharingControllerPreparationCompletionHandler ([NullAllowed] CKShare share, [NullAllowed] CKContainer container, [NullAllowed] NSError error); - [iOS (10,0), NoTV, NoWatch] //TODO: This is marked as available on tvOS 10 but it isn't radar: 27929711 + [iOS (10,0), NoTV, NoWatch] [BaseType (typeof (UIViewController))] interface UICloudSharingController { @@ -13108,11 +13108,13 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer UIModalPresentationStyle ModalPresentationStyle { get; set; } // 3.2 extensions from MoviePlayer + [NoMac] [NoTV] [Availability (Introduced = Platform.iOS_3_2, Deprecated = Platform.iOS_9_0)] [Export ("presentMoviePlayerViewControllerAnimated:")] void PresentMoviePlayerViewController (MPMoviePlayerViewController moviePlayerViewController); + [NoMac] [NoTV] [Availability (Introduced = Platform.iOS_3_2, Deprecated = Platform.iOS_9_0)] [Export ("dismissMoviePlayerViewControllerAnimated")] diff --git a/src/videosubscriberaccount.cs b/src/videosubscriberaccount.cs index 47b8f4d1ad9a..ec6f425ed46f 100644 --- a/src/videosubscriberaccount.cs +++ b/src/videosubscriberaccount.cs @@ -54,6 +54,10 @@ interface VSErrorInfoKeys { [Field ("VSErrorInfoKeyUnsupportedProviderIdentifier")] NSString UnsupportedProviderIdentifierKey { get; } + + [TV (10,1)][iOS (10,2)] + [Field ("VSErrorInfoKeyAccountProviderResponse")] + NSString AccountProviderResponseKey { get; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -67,6 +71,9 @@ interface VSErrorInfo { string SamlResponseStatus { get; } string UnsupportedProviderIdentifier { get; } + + [TV (10,1)][iOS (10,2)] + string AccountProviderResponse { get; } } interface IVSAccountManagerDelegate { } @@ -154,6 +161,10 @@ interface VSAccountMetadata { [NullAllowed, Export ("SAMLAttributeQueryResponse")] string SamlAttributeQueryResponse { get; } + + [TV (10,1)][iOS (10,2)] + [NullAllowed, Export ("accountProviderResponse", ArgumentSemantic.Strong)] + VSAccountProviderResponse AccountProviderResponse { get; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -188,6 +199,38 @@ interface VSAccountMetadataRequest { [Export ("attributeNames", ArgumentSemantic.Copy)] string [] AttributeNames { get; set; } + + [Protected] + [TV (10,1)][iOS (10,2)] + [Export ("supportedAuthenticationSchemes", ArgumentSemantic.Copy)] + NSString[] SupportedAuthenticationSchemesString { get; set; } + } + + [iOS (10,2)] + [TV (10,1)] + [BaseType (typeof (NSObject))] + interface VSAccountProviderResponse { + + [Protected] + [Export ("authenticationScheme")] + NSString AuthenticationSchemeString { get; } + + [Wrap ("VSAccountProviderAuthenticationSchemeExtensions.GetValue (AuthenticationSchemeString)")] + VSAccountProviderAuthenticationScheme AuthenticationScheme { get; } + + [NullAllowed, Export ("status")] + string Status { get; } + + [NullAllowed, Export ("body")] + string Body { get; } } + + [iOS (10,2)] + [TV (10,1)] + enum VSAccountProviderAuthenticationScheme { + [Field ("VSAccountProviderAuthenticationSchemeSAML")] + Saml, + } + } diff --git a/src/watchconnectivity.cs b/src/watchconnectivity.cs index a0a6d9e934de..ca5f7e73ee74 100644 --- a/src/watchconnectivity.cs +++ b/src/watchconnectivity.cs @@ -174,6 +174,7 @@ interface WCSessionDelegate { [DisableDefaultCtor] // no handle, doc: You do not create instances of this class directly. interface WCSessionFile { + [NullAllowed] [Export ("fileURL")] NSUrl FileUrl { get; } diff --git a/src/watchkit.cs b/src/watchkit.cs index 15784d738c4f..3737160bb12d 100644 --- a/src/watchkit.cs +++ b/src/watchkit.cs @@ -66,7 +66,8 @@ interface WKInterfaceController { [Export ("handleActionWithIdentifier:forLocalNotification:")] void HandleLocalNotificationAction ([NullAllowed] string identifier, UILocalNotification localNotification); - [Watch (3,0)][iOS (10,0)] + [iOS (10,0)] + [NoWatch] [Export ("handleActionWithIdentifier:forNotification:")] void HandleAction ([NullAllowed] string identifier, UNNotification notification); @@ -1020,7 +1021,7 @@ interface WKSnapshotRefreshBackgroundTask { bool ReturnToDefaultState { get; } [Export ("setTaskCompletedWithDefaultStateRestored:estimatedSnapshotExpiration:userInfo:")] - void SetTaskCompleted (bool restoredDefaultState, NSDate estimatedSnapshotExpiration, [NullAllowed] INSSecureCoding userInfo); + void SetTaskCompleted (bool restoredDefaultState, [NullAllowed] NSDate estimatedSnapshotExpiration, [NullAllowed] INSSecureCoding userInfo); } [Watch (3,0)][NoiOS] diff --git a/tests/common/TestRuntime.cs b/tests/common/TestRuntime.cs index 504a2c6e9b05..1938b0700f09 100644 --- a/tests/common/TestRuntime.cs +++ b/tests/common/TestRuntime.cs @@ -114,6 +114,18 @@ public static bool CheckXcodeVersion (int major, int minor, int build = 0) return CheckMacSystemVersion (10, 12, 1); #else throw new NotImplementedException (); +#endif + case 2: +#if __WATCHOS__ + return CheckWatchOSSystemVersion (3, 1); +#elif __TVOS__ + return ChecktvOSSystemVersion (10, 1); +#elif __IOS__ + return CheckiOSSystemVersion (10, 2); +#elif MONOMAC + return CheckMacSystemVersion (10, 12, 2); +#else + throw new NotImplementedException (); #endif default: throw new NotImplementedException (); diff --git a/tests/generator/Makefile b/tests/generator/Makefile index 96ae45c6c0e8..4b75a66389e2 100644 --- a/tests/generator/Makefile +++ b/tests/generator/Makefile @@ -14,7 +14,7 @@ include $(TOP)/Make.config IOS_CURRENT_DIR=$(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current IOS_GENERATOR = $(IOS_CURRENT_DIR)/bin/btouch /baselib:$(IOS_CURRENT_DIR)/lib/mono/2.1/monotouch.dll /unsafe /compiler:$(IOS_CURRENT_DIR)/bin/smcs IOS_TESTS = bug15283 bug15307 bug15799 bug16036 sof20696157 bug23041 bug27430 bug27428 bug34042 btouch-with-hyphen-in-name property-redefination-ios arrayfromhandlebug bug36457 bug39614 bug40282 bug17232 bug24078-ignore-methods-events strong-dict-support-templated-dicts -IOS_CUSTOM_TESTS = forum54078 desk63279 desk79124 multiple-api-definitions1 multiple-api-definitions2 bug29493 classNameCollision bi1036 bug37527 bug27986 bug35176 +IOS_CUSTOM_TESTS = forum54078 desk63279 desk79124 multiple-api-definitions1 multiple-api-definitions2 bug29493 classNameCollision bi1036 bug37527 bug27986 bug35176 bi1046 MAC_CURRENT_DIR=$(MAC_DESTDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current MAC_GENERATOR = $(MAC_CURRENT_DIR)/bin/bmac @@ -121,9 +121,23 @@ bug35176: echo "Error: Expected 4 Introduced attributes in generated code."; exit 1; \ fi +bug46292: + @rm -Rf $@.tmpdir + @mkdir -p $@.tmpdir + $(if $(V),,@echo "$@";) $(IOS_GENERATOR) --sourceonly:$@.source -tmpdir=$@.tmpdir $@.cs --process-enums + @if ! grep -r Obsolete bug46292.tmpdir/BindingTests > /dev/null; then \ + echo "error: Could not find Obsolete attribute in generated code."; exit 1; \ + fi + @if [ `grep -r Obsolete bug46292.tmpdir/BindingTests | wc -l` -ne 2 ]; then \ + echo "Error: Expected 2 Obsolete attributes in generated code."; exit 1; \ + fi + bi1036: $(if $(V),,@echo "$@";) $(IOS_GENERATOR) $@.cs | grep BI1036 >/dev/null 2>&1 +bi1046: + $(if $(V),,@echo "$@";) $(IOS_GENERATOR) $@.cs --process-enums | grep BI1046 >/dev/null 2>&1 + clean-local:: rm -f *.dll *.source rm -Rf *.tmpdir diff --git a/tests/generator/bi1046.cs b/tests/generator/bi1046.cs new file mode 100644 index 000000000000..9482bf2dc370 --- /dev/null +++ b/tests/generator/bi1046.cs @@ -0,0 +1,13 @@ +using System; +using MonoTouch.Foundation; + +namespace BindingTests +{ + public enum HMAccessoryCategoryType { + [Field ("HMAccessoryCategoryTypeGarageDoorOpener")] + DoorOpener, + + [Field ("HMAccessoryCategoryTypeGarageDoorOpener")] + GarageDoorOpener = DoorOpener, + } +} diff --git a/tests/generator/bug46292.cs b/tests/generator/bug46292.cs new file mode 100644 index 000000000000..57b59a46f65e --- /dev/null +++ b/tests/generator/bug46292.cs @@ -0,0 +1,13 @@ +using System; +using MonoTouch.Foundation; + +namespace BindingTests { + [Obsolete ("Type level obsolete must also be copied")] + public enum HMAccessoryCategoryType : int { + [Field ("HMAccessoryCategoryTypeGarageDoorOpener")] + GarageDoorOpener = 0, + + [Obsolete ("Use GarageDoorOpener")] + DoorOpener = GarageDoorOpener, + } +} \ No newline at end of file diff --git a/tests/introspection/ApiCtorInitTest.cs b/tests/introspection/ApiCtorInitTest.cs index 0264c6ff14c6..0cc27e714f15 100644 --- a/tests/introspection/ApiCtorInitTest.cs +++ b/tests/introspection/ApiCtorInitTest.cs @@ -74,7 +74,10 @@ protected virtual bool Skip (Type type) // even if we specify an NSUserActivityTypes in the Info.plist - might be a bug or there's a new (undocumented) requirement case "NSUserActivity": return true; + case "NEPacketTunnelProvider": + return true; } + return SkipDueToAttribute (type); } diff --git a/tests/introspection/ApiSelectorTest.cs b/tests/introspection/ApiSelectorTest.cs index 5fa3219ce0da..09ef6a1b7f98 100644 --- a/tests/introspection/ApiSelectorTest.cs +++ b/tests/introspection/ApiSelectorTest.cs @@ -176,6 +176,13 @@ protected virtual bool Skip (Type type, string selectorName) return true; } break; + case "MDLNoiseTexture": + switch (selectorName) { + case "initCellularNoiseWithFrequency:name:textureDimensions:channelEncoding:": + case "initVectorNoiseWithSmoothness:name:textureDimensions:channelEncoding:": + return true; + } + break; case "NSImage": switch (selectorName) { case "initByReferencingFile:": @@ -507,6 +514,11 @@ protected virtual bool SkipInit (string selector, MethodBase m) case "initWithLeaderboardIdentifier:": // MCSession case "initWithPeer:securityIdentity:encryptionPreference:": + // INSetProfileInCarIntent and INSaveProfileInCarIntent + case "initWithProfileNumber:profileName:defaultProfile:": + case "initWithProfileNumber:profileLabel:defaultProfile:": + case "initWithProfileNumber:profileName:": + case "initWithProfileNumber:profileLabel:": // UISegmentedControl case "initWithItems:": var mi = m as MethodInfo; diff --git a/tests/introspection/ApiTypoTest.cs b/tests/introspection/ApiTypoTest.cs index 999d57a650cc..c20ef68b916a 100644 --- a/tests/introspection/ApiTypoTest.cs +++ b/tests/introspection/ApiTypoTest.cs @@ -115,6 +115,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Connnect", "Counterclock", "Craete", + "Crosstraining", "Cubemap", "Cmyk", // acronym: Cyan, magenta, yellow and key "Daap", @@ -190,6 +191,9 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Imap", "Imaps", "Img", + "Indoorrun", + "Indoorcycle", + "Indoorwalk", "Inser", "Interac", "Interframe", diff --git a/tests/introspection/iOS/iOSApiProtocolTest.cs b/tests/introspection/iOS/iOSApiProtocolTest.cs index 677b270d7b1e..1ddc34f845a6 100644 --- a/tests/introspection/iOS/iOSApiProtocolTest.cs +++ b/tests/introspection/iOS/iOSApiProtocolTest.cs @@ -177,6 +177,8 @@ protected override bool Skip (Type type, string protocolName) case "SFSafariViewControllerConfiguration": case "VSAccountMetadata": case "VSAccountMetadataRequest": + // iOS 10.2 + case "VSAccountProviderResponse": return true; #if __WATCHOS__ case "CLKComplicationTemplate": @@ -274,6 +276,8 @@ protected override bool Skip (Type type, string protocolName) case "SFSafariViewControllerConfiguration": case "VSAccountMetadata": case "VSAccountMetadataRequest": + // iOS 10.2 + case "VSAccountProviderResponse": return true; #if __WATCHOS__ case "CLKComplicationTemplate": @@ -350,6 +354,8 @@ protected override bool Skip (Type type, string protocolName) case "SFSafariViewControllerConfiguration": case "VSAccountMetadata": case "VSAccountMetadataRequest": + // iOS 10.2 + case "VSAccountProviderResponse": return true; #if __WATCHOS__ case "CLKComplicationTimelineEntry": diff --git a/tests/monotouch-test/ModelIO/MDLMesh.cs b/tests/monotouch-test/ModelIO/MDLMesh.cs index e861021e2a72..a2181b4d9be5 100644 --- a/tests/monotouch-test/ModelIO/MDLMesh.cs +++ b/tests/monotouch-test/ModelIO/MDLMesh.cs @@ -115,7 +115,11 @@ public void CreatePlaneTest () Assert.IsNotNull (obj, "obj"); Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (1.5f, 0, 1.5f), MinBounds = new Vector3 (-1.5f, 0, -1.5f) }, obj.BoundingBox, "BoundingBox"); Assert.AreEqual (1, obj.Submeshes.Count, "Submeshes Count"); - var vb = TestRuntime.CheckXcodeVersion (8,0) ? 3 : 1; + int vb = 1; + if (TestRuntime.CheckXcodeVersion (8, 2)) + vb = 31; + else if (TestRuntime.CheckXcodeVersion (8, 0)) + vb = 1; Assert.AreEqual (vb, obj.VertexBuffers.Length, "VertexBuffers Count"); Assert.AreEqual (16, obj.VertexCount, "VertexCount"); Assert.AreEqual (31, obj.VertexDescriptor.Attributes.Count, "VertexDescriptor Attributes Count"); @@ -146,7 +150,10 @@ public void CreateCylindroidTest () using (var obj = MDLMesh.CreateCylindroid (1, V2, 3, 1, MDLGeometryType.Triangles, true, null)) { Assert.IsNotNull (obj, "obj"); - if (TestRuntime.CheckXcodeVersion (8, 0)) { + if (TestRuntime.CheckXcodeVersion (8, 2)) { + Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (0.866025448f, 0.5f, 1f), MinBounds = new Vector3 (-0.866025388f, -0.5f, -0.5f) }, obj.BoundingBox, "BoundingBox"); + Assert.AreEqual (31, obj.VertexBuffers.Length, "VertexBuffers Count"); + } else if (TestRuntime.CheckXcodeVersion (8, 0)) { Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (0.866025448f, 1.0f, 1f), MinBounds = new Vector3 (-0.866025388f, -1.0f, -0.5f) }, obj.BoundingBox, "BoundingBox"); Assert.AreEqual (3, obj.VertexBuffers.Length, "VertexBuffers Count"); } else { @@ -167,7 +174,10 @@ public void CreateEllipticalConeTest () using (var obj = MDLMesh.CreateEllipticalCone (5, V2, 3, 1, MDLGeometryType.Triangles, true, null)) { Assert.IsNotNull (obj, "obj"); - if (TestRuntime.CheckXcodeVersion (8, 0)) { + if (TestRuntime.CheckXcodeVersion (8, 2)) { + Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (0.433012783f, 4.5f, 0.5f), MinBounds = new Vector3 (-0.433012783f, -0.5f, -0.25f) }, obj.BoundingBox, "BoundingBox"); + Assert.AreEqual (31, obj.VertexBuffers.Length, "VertexBuffers Count"); + } else if (TestRuntime.CheckXcodeVersion (8, 0)) { Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (0.433012783f, 4.5f, 0.5f), MinBounds = new Vector3 (-0.433012783f, -0.5f, -0.25f) }, obj.BoundingBox, "BoundingBox"); Assert.AreEqual (3, obj.VertexBuffers.Length, "VertexBuffers Count"); } else { @@ -223,10 +233,15 @@ public void CreateCapsuleTest () using (var obj = MDLMesh.CreateCapsule (V3, V2i, MDLGeometryType.Triangles, true, 10, null)) { Assert.IsNotNull (obj, "obj"); - Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (0.6f, 1.333333f, 1.8f), MinBounds = new Vector3 (-0.6f, -1, -1.8f) }, obj.BoundingBox, "BoundingBox"); + if (TestRuntime.CheckXcodeVersion (8, 2)) { + Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (0.6f, 1.166666f, 1.8f), MinBounds = new Vector3 (-0.6f, -0.83333f, -1.8f) }, obj.BoundingBox, "BoundingBox"); + Assert.AreEqual (122, obj.VertexCount, "VertexCount"); + } else { + Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (0.6f, 1.333333f, 1.8f), MinBounds = new Vector3 (-0.6f, -1, -1.8f) }, obj.BoundingBox, "BoundingBox"); + Assert.AreEqual (152, obj.VertexCount, "VertexCount"); + } Assert.AreEqual (1, obj.Submeshes.Count, "Submeshes Count"); Assert.AreEqual (3, obj.VertexBuffers.Length, "VertexBuffers Count"); - Assert.AreEqual (152, obj.VertexCount, "VertexCount"); Assert.AreEqual (31, obj.VertexDescriptor.Attributes.Count, "VertexDescriptor Attributes Count"); Assert.AreEqual (31, obj.VertexDescriptor.Layouts.Count, "VertexDescriptor Layouts Count"); } diff --git a/tests/monotouch-test/ModelIO/MDLNoiseTexture.cs b/tests/monotouch-test/ModelIO/MDLNoiseTexture.cs new file mode 100644 index 000000000000..e9339aba0b3e --- /dev/null +++ b/tests/monotouch-test/ModelIO/MDLNoiseTexture.cs @@ -0,0 +1,77 @@ +// +// MDLNoiseTexture Unit Tests +// +// Authors: +// Vincent Dondain +// +// Copyright 2016 Microsoft +// + +#if !__WATCHOS__ + +using System; +#if XAMCORE_2_0 +using Foundation; +using ModelIO; +using ObjCRuntime; +#else +using MonoTouch.Foundation; +using MonoTouch.ModelIO; +using MonoTouch.ObjCRuntime; +#endif +using OpenTK; +using NUnit.Framework; + +namespace MonoTouchFixtures.ModelIO +{ + + [TestFixture] + // we want the test to be available if we use the linker + [Preserve (AllMembers = true)] + public class MDLNoiseTextureTest + { + [TestFixtureSetUp] + public void Setup () + { + TestRuntime.AssertXcodeVersion (8, 2); + + if (Runtime.Arch == Arch.SIMULATOR && IntPtr.Size == 4) { + // There's a bug in the i386 version of objc_msgSend where it doesn't preserve SIMD arguments + // when resizing the cache of method selectors for a type. So here we call all selectors we can + // find, so that the subsequent tests don't end up producing any cache resize (radar #21630410). + object dummy; + using (var obj = new MDLNoiseTexture (1.0f, "texture", Vector2i.Zero, MDLTextureChannelEncoding.Float16)) { + dummy = obj.ChannelCount; + dummy = obj.ChannelEncoding; + dummy = obj.Dimensions; + dummy = obj.IsCube; + dummy = obj.MipLevelCount; + dummy = obj.Name; + dummy = obj.RowStride; + obj.GetTexelDataWithBottomLeftOrigin (); + obj.GetTexelDataWithBottomLeftOrigin (1, false); + obj.GetTexelDataWithTopLeftOrigin (); + obj.GetTexelDataWithTopLeftOrigin (1, false); + } + using (var obj = new MDLTexture ()) { + } + } + } + + [Test] + public void Ctor () + { + var V2 = new Vector2i (123, 456); + + using (var obj = new MDLNoiseTexture (1.0f, "texture", V2, MDLTextureChannelEncoding.Float16, MDLNoiseTextureType.Cellular)) { + Asserts.AreEqual (V2, obj.Dimensions, "dimensions"); + } + + using (var obj = new MDLNoiseTexture (1.0f, "texture", V2, MDLTextureChannelEncoding.Float16, MDLNoiseTextureType.Vector)) { + Asserts.AreEqual (V2, obj.Dimensions, "dimensions"); + } + } + } +} + +#endif // !__WATCHOS__ diff --git a/tests/mtouch/RegistrarTest.cs b/tests/mtouch/RegistrarTest.cs index 32afdc6d0f39..74f287fd344d 100644 --- a/tests/mtouch/RegistrarTest.cs +++ b/tests/mtouch/RegistrarTest.cs @@ -1376,6 +1376,8 @@ static void Compile (string filename, MTouch.Profile profile = MTouch.Profile.Cl }; p.WaitForExit (); + GC.Collect (); // Workaround for: https://bugzilla.xamarin.com/show_bug.cgi?id=43462#c14 + Console.WriteLine (output); if (p.ExitCode != 0) diff --git a/tests/xtro-sharpie/Helpers.cs b/tests/xtro-sharpie/Helpers.cs index 6e3b6116ed1a..3a6906c00361 100644 --- a/tests/xtro-sharpie/Helpers.cs +++ b/tests/xtro-sharpie/Helpers.cs @@ -63,6 +63,8 @@ public static class Helpers { { "UITableViewCellAccessoryType", "UITableViewCellAccessory" }, { "UITableViewCellStateMask", "UITableViewCellState" }, { "WatchKitErrorCode", "WKErrorCode" }, // WebKit already had that name + // not enums + { "NSMutableURLRequest", "NSMutableUrlRequest" }, }; public static string GetManagedName (string nativeName) diff --git a/tests/xtro-sharpie/SelectorCheck.cs b/tests/xtro-sharpie/SelectorCheck.cs index 5372a5904d1b..9456b0806bf8 100644 --- a/tests/xtro-sharpie/SelectorCheck.cs +++ b/tests/xtro-sharpie/SelectorCheck.cs @@ -118,7 +118,7 @@ static string GetCategoryBase (ObjCCategoryDecl category) // we inlined this protocol in UIResponder but Apple has it on NSObject return "UIResponder"; default: - return category.ClassInterface.Name; + return Helpers.GetManagedName (category.ClassInterface.Name); } } } diff --git a/tests/xtro-sharpie/ios.ignore b/tests/xtro-sharpie/ios.ignore index ec2f4727b6d1..1ebb8053dee5 100644 --- a/tests/xtro-sharpie/ios.ignore +++ b/tests/xtro-sharpie/ios.ignore @@ -15,6 +15,38 @@ !missing-field! ALErrorInvalidProperty not bound +# AudioUnit + +## all kAudioSession[In|Out]putRoute* were deprecated in iOS 7 - not worth binding +!missing-field! kAudioSessionInputRoute_BluetoothHFP not bound +!missing-field! kAudioSessionInputRoute_BuiltInMic not bound +!missing-field! kAudioSessionInputRoute_HeadsetMic not bound +!missing-field! kAudioSessionInputRoute_LineIn not bound +!missing-field! kAudioSessionInputRoute_USBAudio not bound +!missing-field! kAudioSessionOutputRoute_AirPlay not bound +!missing-field! kAudioSessionOutputRoute_BluetoothA2DP not bound +!missing-field! kAudioSessionOutputRoute_BluetoothHFP not bound +!missing-field! kAudioSessionOutputRoute_BuiltInReceiver not bound +!missing-field! kAudioSessionOutputRoute_BuiltInSpeaker not bound +!missing-field! kAudioSessionOutputRoute_HDMI not bound +!missing-field! kAudioSessionOutputRoute_Headphones not bound +!missing-field! kAudioSessionOutputRoute_LineOut not bound +!missing-field! kAudioSessionOutputRoute_USBAudio not bound +# more deprecated (iOS 7) constants +!missing-field! kAudioSession_AudioRouteChangeKey_CurrentRouteDescription not bound +!missing-field! kAudioSession_AudioRouteChangeKey_PreviousRouteDescription not bound +!missing-field! kAudioSession_AudioRouteKey_Inputs not bound +!missing-field! kAudioSession_AudioRouteKey_Outputs not bound +!missing-field! kAudioSession_AudioRouteKey_Type not bound +!missing-field! kAudioSession_InputSourceKey_Description not bound +!missing-field! kAudioSession_InputSourceKey_ID not bound +!missing-field! kAudioSession_OutputDestinationKey_Description not bound +!missing-field! kAudioSession_OutputDestinationKey_ID not bound +!missing-field! kAudioSession_RouteChangeKey_Reason not bound +# deprecated in iOS 7 +!missing-pinvoke! AudioSessionRemovePropertyListenerWithUserData is not bound + + # CoreBluetooth ## obsoleted (removed from headers) in iOS 8.4 diff --git a/tests/xtro-sharpie/osx.pending b/tests/xtro-sharpie/osx.pending index f931e4e15572..923b812a6d58 100644 --- a/tests/xtro-sharpie/osx.pending +++ b/tests/xtro-sharpie/osx.pending @@ -203,3 +203,59 @@ !missing-type! SFSafariExtensionManager not bound !missing-selector! SFSafariExtensionState::isEnabled not bound !missing-type! SFSafariExtensionState not bound + +# MediaPlayer API macOS 10.12.2 + +# These are not available on macOS even if xtro says so. +!missing-type! MPMediaEntity not bound +!missing-type! MPMediaItem not bound + +!missing-enum! MPErrorCode not bound +!missing-enum! MPMediaType not bound + +!missing-field! MPErrorDomain not bound +!missing-field! MPMediaEntityPropertyPersistentID not bound + +!missing-field! MPMediaItemPropertyAlbumArtist not bound +!missing-field! MPMediaItemPropertyAlbumArtistPersistentID not bound +!missing-field! MPMediaItemPropertyAlbumPersistentID not bound +!missing-field! MPMediaItemPropertyAlbumTitle not bound +!missing-field! MPMediaItemPropertyAlbumTrackCount not bound +!missing-field! MPMediaItemPropertyAlbumTrackNumber not bound +!missing-field! MPMediaItemPropertyArtist not bound +!missing-field! MPMediaItemPropertyArtistPersistentID not bound +!missing-field! MPMediaItemPropertyArtwork not bound +!missing-field! MPMediaItemPropertyAssetURL not bound +!missing-field! MPMediaItemPropertyBeatsPerMinute not bound +!missing-field! MPMediaItemPropertyBookmarkTime not bound +!missing-field! MPMediaItemPropertyComments not bound +!missing-field! MPMediaItemPropertyComposer not bound +!missing-field! MPMediaItemPropertyComposerPersistentID not bound +!missing-field! MPMediaItemPropertyDateAdded not bound +!missing-field! MPMediaItemPropertyDiscCount not bound +!missing-field! MPMediaItemPropertyDiscNumber not bound +!missing-field! MPMediaItemPropertyGenre not bound +!missing-field! MPMediaItemPropertyGenrePersistentID not bound +!missing-field! MPMediaItemPropertyHasProtectedAsset not bound +!missing-field! MPMediaItemPropertyIsCloudItem not bound +!missing-field! MPMediaItemPropertyIsCompilation not bound +!missing-field! MPMediaItemPropertyIsExplicit not bound +!missing-field! MPMediaItemPropertyLastPlayedDate not bound +!missing-field! MPMediaItemPropertyLyrics not bound +!missing-field! MPMediaItemPropertyMediaType not bound +!missing-field! MPMediaItemPropertyPersistentID not bound +!missing-field! MPMediaItemPropertyPlayCount not bound +!missing-field! MPMediaItemPropertyPlaybackDuration not bound +!missing-field! MPMediaItemPropertyPodcastPersistentID not bound +!missing-field! MPMediaItemPropertyPodcastTitle not bound +!missing-field! MPMediaItemPropertyRating not bound +!missing-field! MPMediaItemPropertyReleaseDate not bound +!missing-field! MPMediaItemPropertySkipCount not bound +!missing-field! MPMediaItemPropertyTitle not bound +!missing-field! MPMediaItemPropertyUserGrouping not bound + +!missing-selector! +MPMediaEntity::canFilterByProperty: not bound +!missing-selector! MPMediaEntity::enumerateValuesForProperties:usingBlock: not bound +!missing-selector! MPMediaEntity::objectForKeyedSubscript: not bound +!missing-selector! MPMediaEntity::valueForProperty: not bound +!missing-selector! MPMediaItemArtwork::imageCropRect not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/tvos.ignore b/tests/xtro-sharpie/tvos.ignore index 652cf1e44628..4692336c3ad3 100644 --- a/tests/xtro-sharpie/tvos.ignore +++ b/tests/xtro-sharpie/tvos.ignore @@ -272,6 +272,8 @@ !missing-selector! MPMusicPlayerController::setQueueWithStoreIDs: not bound !missing-selector! MPMusicPlayerController::setVolume: not bound !missing-selector! MPMusicPlayerController::volume not bound +!missing-selector! MPMusicPlayerController::prepareToPlayWithCompletionHandler: not bound +!missing-selector! MPMusicPlayerController::setQueueWithDescriptor: not bound ## from (unmarked) MPMediaItem_MPMediaQueryAdditions but MPMediaItem is not in tvOS !missing-selector! +MPMediaItem::persistentIDPropertyForGroupingType: not bound @@ -284,6 +286,13 @@ ## but the delegate itself is not marked (so it's reported as missing) !missing-protocol! SKStoreProductViewControllerDelegate not bound +## SKCloudServiceSetupViewController is not in tvOS and the only member of the delegate is not either +## but the delegate itself is not marked (so it's reported as missing) +!missing-field! SKCloudServiceSetupActionSubscribe not bound +!missing-field! SKCloudServiceSetupOptionsActionKey not bound +!missing-field! SKCloudServiceSetupOptionsITunesItemIdentifierKey not bound +!missing-protocol! SKCloudServiceSetupViewControllerDelegate not bound + # UIKit diff --git a/tests/xtro-sharpie/tvos.pending b/tests/xtro-sharpie/tvos.pending index e10d7645f130..461a0c2cbb72 100644 --- a/tests/xtro-sharpie/tvos.pending +++ b/tests/xtro-sharpie/tvos.pending @@ -164,3 +164,6 @@ ## enums only exposed from properties marked with UIKIT_CLASS_AVAILABLE_IOS_ONLY(10_0) !missing-enum! UIImpactFeedbackStyle not bound !missing-enum! UINotificationFeedbackType not bound + +## Marked as not in tvOS in Xcode 8.2 beta 1 but it's a breaking change and it's fixed only in XAMCORE_4_0 +!unknown-native-enum! UICloudSharingPermissionOptions bound diff --git a/tests/xtro-sharpie/watchos.pending b/tests/xtro-sharpie/watchos.pending index 41fb5b7e5706..ca137c961f53 100644 --- a/tests/xtro-sharpie/watchos.pending +++ b/tests/xtro-sharpie/watchos.pending @@ -140,6 +140,12 @@ !missing-selector! UIColor::initWithDisplayP3Red:green:blue:alpha: not bound +# WatchKit + +## Xcode 8.2 beta 1 iOS headers marked it as not available on watchOS, OTOH watchOS headers were not updated (fix in C9) +!missing-selector! WKInterfaceController::handleActionWithIdentifier:forNotification: not bound + + # others ## might not be usable unless our ToString output is parsable as an input (includes locale issues) diff --git a/tools/apidiff/references/xi/Xamarin.TVOS/Xamarin.TVOS.xml b/tools/apidiff/references/xi/Xamarin.TVOS/Xamarin.TVOS.xml index 07c14d7ac97b..2c426d1345da 100644 --- a/tools/apidiff/references/xi/Xamarin.TVOS/Xamarin.TVOS.xml +++ b/tools/apidiff/references/xi/Xamarin.TVOS/Xamarin.TVOS.xml @@ -16,7 +16,7 @@ - + @@ -118442,6 +118442,7 @@ + @@ -118456,6 +118457,7 @@ + @@ -125589,6 +125591,7 @@ + @@ -125730,6 +125733,7 @@ + @@ -125744,6 +125748,7 @@ + @@ -126747,6 +126752,7 @@ + @@ -131723,6 +131729,7 @@ + @@ -135530,6 +135537,7 @@ + @@ -136875,6 +136883,7 @@ + @@ -136885,6 +136894,7 @@ + @@ -136916,6 +136926,7 @@ + @@ -136926,6 +136937,7 @@ + @@ -136933,6 +136945,7 @@ + @@ -136943,6 +136956,7 @@ + @@ -289910,6 +289924,11 @@ + + + + + @@ -335689,7 +335708,7 @@ - + @@ -414202,6 +414221,12 @@ + + + + + + diff --git a/tools/apidiff/references/xi/Xamarin.WatchOS/Xamarin.WatchOS.xml b/tools/apidiff/references/xi/Xamarin.WatchOS/Xamarin.WatchOS.xml index 88d28a99b410..addf069c6b85 100644 --- a/tools/apidiff/references/xi/Xamarin.WatchOS/Xamarin.WatchOS.xml +++ b/tools/apidiff/references/xi/Xamarin.WatchOS/Xamarin.WatchOS.xml @@ -16,7 +16,7 @@ - + @@ -167011,6 +167011,22 @@ + + + + + + + + + + + + + + + + @@ -167030,6 +167046,19 @@ + + + + + + + + + + + + + @@ -172858,6 +172887,17 @@ + + + + + + + + + + + @@ -182778,12 +182818,12 @@ - + - + @@ -194246,6 +194286,22 @@ + + + + + + + + + + + + + + + + @@ -194270,6 +194326,22 @@ + + + + + + + + + + + + + + + + @@ -195460,6 +195532,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/apidiff/references/xi/Xamarin.iOS/Xamarin.iOS.xml b/tools/apidiff/references/xi/Xamarin.iOS/Xamarin.iOS.xml index 1c9de715c037..5b99c3535f0d 100644 --- a/tools/apidiff/references/xi/Xamarin.iOS/Xamarin.iOS.xml +++ b/tools/apidiff/references/xi/Xamarin.iOS/Xamarin.iOS.xml @@ -16,7 +16,7 @@ - + @@ -153790,6 +153790,7 @@ + @@ -153804,6 +153805,7 @@ + @@ -160955,6 +160957,7 @@ + @@ -161096,6 +161099,7 @@ + @@ -161110,6 +161114,7 @@ + @@ -162113,6 +162118,7 @@ + @@ -167089,6 +167095,7 @@ + @@ -170911,6 +170918,7 @@ + @@ -172256,6 +172264,7 @@ + @@ -172266,6 +172275,7 @@ + @@ -172297,6 +172307,7 @@ + @@ -172307,6 +172318,7 @@ + @@ -172314,6 +172326,7 @@ + @@ -172324,6 +172337,7 @@ + @@ -344137,226 +344151,61 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + - - - - - - - - - - - + + - + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - + + + + - + + + + - + + - + - + @@ -344371,7 +344220,7 @@ - + @@ -344415,24 +344264,6 @@ - - - - - - - - - - - - - - - - - - @@ -344440,97 +344271,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + @@ -344539,7 +344287,302 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -351709,6 +351752,17 @@ + + + + + + + + + + + @@ -402152,6 +402206,11 @@ + + + + + @@ -409484,6 +409543,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -409510,6 +409594,20 @@ + + + + + + + + + + + + + + @@ -409591,247 +409689,764 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -474195,7 +474810,7 @@ - + @@ -474206,7 +474821,7 @@ - + @@ -485342,6 +485957,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -485511,6 +486163,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -486154,6 +486841,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -486810,6 +487601,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -488999,6 +489811,22 @@ + + + + + + + + + + + + + + + + @@ -489023,6 +489851,22 @@ + + + + + + + + + + + + + + + + @@ -490546,6 +491390,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -565758,6 +566791,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -565979,6 +567039,12 @@ + + + + + + @@ -566177,6 +567243,368 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/apidiff/references/xm/4.5/Xamarin.Mac.xml b/tools/apidiff/references/xm/4.5/Xamarin.Mac.xml index e5df1c46044c..d0d327b0b51a 100644 --- a/tools/apidiff/references/xm/4.5/Xamarin.Mac.xml +++ b/tools/apidiff/references/xm/4.5/Xamarin.Mac.xml @@ -16,7 +16,7 @@ - + @@ -61586,6 +61586,17 @@ + + + + + + + + + + + @@ -62026,6 +62037,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -85057,6 +85090,7 @@ + @@ -86948,6 +86982,21 @@ + + + + + + + + + + + + + + + @@ -87449,6 +87498,18 @@ + + + + + + + + + + + + @@ -88166,6 +88227,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104500,6 +104590,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104530,6 +104648,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -344011,6 +344151,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -348595,6 +348767,7 @@ + @@ -348844,6 +349017,20 @@ + + + + + + + + + + + + + + @@ -351524,6 +351711,20 @@ + + + + + + + + + + + + + + @@ -351666,6 +351867,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -352662,6 +352888,22 @@ + + + + + + + + + + + + + + + + @@ -357770,6 +358012,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -361425,6 +361845,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -362605,6 +363198,25 @@ + + + + + + + + + + + + + + + + + + + @@ -362629,6 +363241,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -390268,6 +390918,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -421926,6 +422613,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -590586,7 +591313,7 @@ - + @@ -685925,6 +686652,12 @@ + + + + + + diff --git a/tools/apidiff/references/xm/XamMac.xml b/tools/apidiff/references/xm/XamMac.xml index 29791f0bbf67..e8b0e03644c3 100644 --- a/tools/apidiff/references/xm/XamMac.xml +++ b/tools/apidiff/references/xm/XamMac.xml @@ -16,7 +16,7 @@ - + @@ -117,7 +117,7 @@ - + @@ -324410,6 +324410,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -328989,6 +329021,7 @@ + @@ -329224,6 +329257,20 @@ + + + + + + + + + + + + + + @@ -331900,6 +331947,20 @@ + + + + + + + + + + + + + + @@ -332042,6 +332103,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -333021,6 +333107,22 @@ + + + + + + + + + + + + + + + + @@ -338203,6 +338305,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -341864,6 +342162,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -343033,6 +343522,25 @@ + + + + + + + + + + + + + + + + + + + @@ -343057,6 +343565,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -608476,6 +609022,12 @@ + + + + + + diff --git a/tools/apidiff/references/xm/Xamarin.Mac/Xamarin.Mac.xml b/tools/apidiff/references/xm/Xamarin.Mac/Xamarin.Mac.xml index 22b97b64bb90..e698f2c299ad 100644 --- a/tools/apidiff/references/xm/Xamarin.Mac/Xamarin.Mac.xml +++ b/tools/apidiff/references/xm/Xamarin.Mac/Xamarin.Mac.xml @@ -16,7 +16,7 @@ - + @@ -61585,6 +61585,17 @@ + + + + + + + + + + + @@ -62025,6 +62036,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -85056,6 +85089,7 @@ + @@ -86947,6 +86981,21 @@ + + + + + + + + + + + + + + + @@ -87448,6 +87497,18 @@ + + + + + + + + + + + + @@ -88165,6 +88226,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104499,6 +104589,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104529,6 +104647,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -344078,6 +344218,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -348662,6 +348834,7 @@ + @@ -348911,6 +349084,20 @@ + + + + + + + + + + + + + + @@ -351591,6 +351778,20 @@ + + + + + + + + + + + + + + @@ -351733,6 +351934,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -352729,6 +352955,22 @@ + + + + + + + + + + + + + + + + @@ -357837,6 +358079,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -361492,6 +361912,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -362672,6 +363265,25 @@ + + + + + + + + + + + + + + + + + + + @@ -362696,6 +363308,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -390328,6 +390978,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -421969,6 +422656,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -590633,7 +591360,7 @@ - + @@ -685928,6 +686655,12 @@ + + + + + + diff --git a/tools/common/Driver.cs b/tools/common/Driver.cs index ec9dbf27d6e6..45c6df39718d 100644 --- a/tools/common/Driver.cs +++ b/tools/common/Driver.cs @@ -172,6 +172,8 @@ public static int RunCommand (string path, string args, string[] env = null, Str stderr_completed.WaitOne (TimeSpan.FromSeconds (1)); stdout_completed.WaitOne (TimeSpan.FromSeconds (1)); + GC.Collect (); // Workaround for: https://bugzilla.xamarin.com/show_bug.cgi?id=43462#c14 + if (p.ExitCode != 0) { // note: this repeat the failing command line. However we can't avoid this since we're often // running commands in parallel (so the last one printed might not be the one failing) diff --git a/tools/common/Frameworks.cs b/tools/common/Frameworks.cs index a66974e15dad..fbfa8a5f284c 100644 --- a/tools/common/Frameworks.cs +++ b/tools/common/Frameworks.cs @@ -17,25 +17,30 @@ public class Frameworks : Dictionary { public void Add (string @namespace, int major_version) { - Add (@namespace, @namespace, major_version, 0); + Add (@namespace, @namespace, major_version, 0, 0); } public void Add (string @namespace, string framework, int major_version) { - Add (@namespace, framework, major_version, 0); + Add (@namespace, framework, major_version, 0, 0); } public void Add (string @namespace, int major_version, int minor_version) { - Add (@namespace, @namespace, major_version, minor_version); + Add (@namespace, @namespace, major_version, minor_version, 0); } public void Add (string @namespace, string framework, int major_version, int minor_version) + { + Add(@namespace, framework, major_version, minor_version, 0); + } + + public void Add (string @namespace, string framework, int major_version, int minor_version, int build_version) { var fr = new Framework () { Namespace = Driver.IsUnified ? @namespace : XamCore.Registrar.Registrar.CompatNamespace + "." + @namespace, Name = framework, - Version = new Version (major_version, minor_version) + Version = new Version (major_version, minor_version, build_version) }; base.Add (fr.Namespace, fr); } @@ -127,6 +132,7 @@ public static Frameworks MacFrameworks { { "Intents", 10, 12 }, { "SafariServices", "SafariServices", 10, 12 }, + { "MediaPlayer", "MediaPlayer", 10, 12, 1 }, }; } return mac_frameworks; diff --git a/tools/mtouch/Application.cs b/tools/mtouch/Application.cs index 6bd797c63080..54ad93db77f7 100644 --- a/tools/mtouch/Application.cs +++ b/tools/mtouch/Application.cs @@ -1741,6 +1741,8 @@ protected int Start () stderr_completed.WaitOne (TimeSpan.FromSeconds (1)); stdout_completed.WaitOne (TimeSpan.FromSeconds (1)); + GC.Collect (); // Workaround for: https://bugzilla.xamarin.com/show_bug.cgi?id=43462#c14 + if (p.ExitCode != 0) return p.ExitCode; diff --git a/tools/mtouch/mtouch.cs b/tools/mtouch/mtouch.cs index 0a79c68a8dfe..bb2be71e91a8 100644 --- a/tools/mtouch/mtouch.cs +++ b/tools/mtouch/mtouch.cs @@ -1590,6 +1590,9 @@ static int CallMlaunch () RedirectStream (p.StandardError, new StreamWriter (Console.OpenStandardError ())); p.WaitForExit (); + + GC.Collect (); // Workaround for: https://bugzilla.xamarin.com/show_bug.cgi?id=43462#c14 + return p.ExitCode; } }