Skip to content

Commit

Permalink
[Test][Intro] Fix introspection test on API changes for Xcode 9 Beta 1 (
Browse files Browse the repository at this point in the history
#2191)

* [Test][Intro] Fix introspection test on API changes for Xcode 9 Beta 1

* [introspection] Fix feedback from PR and bot tests

Removed XAMCORE_4_0 checks from our api definition, and added
a file with stubs for all of them instead. Cleaner binding file
and easier to remove in the future

Fixed introspection also for mac by moving some check into base test definition

* [CoreImage] Add CoreImage stubs so introspection test are happy

These need to be manually reviewed by whoever takes CoreImage framework
tracked in bugzilla so we do not forget

* Do the same API cleanup as in NSUnit

* [test][introspection] Enable MtouchNoSymbolStrip for device builds in order to avoid linking symbols meeded by test (#2196)

Rolf Kvinge [8:59 AM]
@dalexsoto the fix is to not strip the executable please PR that
(it should probably go into master as well). This probably started
happening when Jeff implemented support for stripping debug builds
(previously the setting was ignored)

* [foundation] Provide better messages

* [CoreImage] Fix Availability of CIEdgePreserveUpsampleFilter
  • Loading branch information
dalexsoto authored and rolfbjarne committed Jun 10, 2017
1 parent 982dca2 commit bfaf626
Show file tree
Hide file tree
Showing 18 changed files with 470 additions and 13 deletions.
126 changes: 126 additions & 0 deletions src/Foundation/NSUnit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
//
// NSUnit.cs
//
// Authors:
// Alex Soto ([email protected])
//
// Copyright 2017 Xamarin Inc.
//

using System;
using XamCore.Foundation;
using XamCore.ObjCRuntime;

namespace XamCore.Foundation {
#if !XAMCORE_4_0
public partial class NSUnit {
[Obsolete ("Use .ctor(string)")]
public NSUnit () { }
}

public partial class NSUnitAcceleration {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitAcceleration () { }
}

public partial class NSUnitAngle {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitAngle () { }
}

public partial class NSUnitArea {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitArea () { }
}

public partial class NSUnitConcentrationMass {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitConcentrationMass () { }
}

public partial class NSUnitDispersion {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitDispersion () { }
}

public partial class NSUnitDuration {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitDuration () { }
}

public partial class NSUnitElectricCharge {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitElectricCharge () { }
}

public partial class NSUnitElectricCurrent {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitElectricCurrent () { }
}

public partial class NSUnitElectricPotentialDifference {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitElectricPotentialDifference () { }
}

public partial class NSUnitElectricResistance {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitElectricResistance () { }
}

public partial class NSUnitEnergy {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitEnergy () { }
}

public partial class NSUnitFrequency {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitFrequency () { }
}

public partial class NSUnitFuelEfficiency {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitFuelEfficiency () { }
}

public partial class NSUnitLength {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitLength () { }
}

public partial class NSUnitIlluminance {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitIlluminance () { }
}

public partial class NSUnitMass {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitMass () { }
}

public partial class NSUnitPower {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitPower () { }
}

public partial class NSUnitPressure {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitPressure () { }
}

public partial class NSUnitSpeed {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitSpeed () { }
}

public partial class NSUnitVolume {
[Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")]
public NSUnitVolume () { }
}

public partial class NSDimension {
[Obsolete ("Not intended to be directly instantiated, this is an abstract class.")]
public NSDimension () { }
}
#endif
}
12 changes: 12 additions & 0 deletions src/UIKit/Compat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,16 @@ public virtual CGPoint GetLocationInCoordinateSpace (UICoordinateSpace coordinat
#endif

#endif

#if !XAMCORE_4_0 && !WATCH
public partial class UICollectionViewFocusUpdateContext {
[Obsolete ("This cannot be directly created")]
public UICollectionViewFocusUpdateContext () { }
}

public partial class UIFocusUpdateContext {
[Obsolete ("This cannot be directly created")]
public UIFocusUpdateContext () { }
}
#endif
}
3 changes: 2 additions & 1 deletion src/avfoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10370,9 +10370,10 @@ interface AVPlayerLooper
[Export ("disableLooping")]
void DisableLooping ();

#if !XAMCORE_4_0 // This API got introduced in Xcode 8.0 binding but is not currently present nor in Xcode 8.3 or Xcode 9.0 needs research
[Export ("loopingEnabled")]
bool LoopingEnabled { [Bind ("isLoopingEnabled")] get; }

#endif
[Export ("loopCount")]
nint LoopCount { get; }

Expand Down
2 changes: 1 addition & 1 deletion src/cloudkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ interface CKFetchRecordZoneChangesOperation

[iOS (10,0), Watch (3,0), TV (10,0), Mac (10,12, onlyOn64 : true)]
[BaseType (typeof(NSObject))]
interface CKFetchRecordZoneChangesOptions : NSSecureCoding
interface CKFetchRecordZoneChangesOptions : NSSecureCoding, NSCopying
{
[NullAllowed, Export ("previousServerChangeToken", ArgumentSemantic.Copy)]
CKServerChangeToken PreviousServerChangeToken { get; set; }
Expand Down
12 changes: 6 additions & 6 deletions src/coreanimation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ enum CAContentsFormat {

[BaseType (typeof (NSObject))]
[Dispose ("OnDispose ();")]
interface CALayer : CAMediaTiming, NSCoding {
interface CALayer : CAMediaTiming, NSSecureCoding {
[Export ("layer")][Static]
CALayer Create ();

Expand Down Expand Up @@ -910,7 +910,7 @@ interface CAAction {
}

[BaseType (typeof (NSObject), Delegates=new string [] {"WeakDelegate"}, Events=new Type [] { typeof (CAAnimationDelegate)})]
interface CAAnimation : CAAction, CAMediaTiming, NSCoding, NSMutableCopying {
interface CAAnimation : CAAction, CAMediaTiming, NSSecureCoding, NSMutableCopying {
[Export ("animation"), Static]
CAAnimation CreateAnimation ();

Expand Down Expand Up @@ -1307,7 +1307,7 @@ interface CAGradientLayer {

[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CAMediaTimingFunction : NSCoding {
interface CAMediaTimingFunction : NSSecureCoding {
[Export ("functionWithName:")][Static]
CAMediaTimingFunction FromName (NSString name);

Expand Down Expand Up @@ -1338,7 +1338,7 @@ interface CAMediaTimingFunction : NSCoding {
}

[BaseType (typeof (NSObject))]
interface CAValueFunction : NSCoding {
interface CAValueFunction : NSSecureCoding {
[Export ("functionWithName:"), Static]
CAValueFunction FromName (string name);

Expand Down Expand Up @@ -1412,7 +1412,7 @@ interface CAOpenGLLayer {

[Since (5,0)]
[BaseType (typeof (NSObject))]
interface CAEmitterCell : CAMediaTiming, NSCoding {
interface CAEmitterCell : CAMediaTiming, NSSecureCoding {
[NullAllowed] // by default this property is null
[Export ("name", ArgumentSemantic.Copy)]
string Name { get; set; }
Expand Down Expand Up @@ -1643,7 +1643,7 @@ interface CAEmitterLayer {

[Since(7,0), Mavericks]
[BaseType (typeof (NSObject))]
interface CAEmitterBehavior : NSCoding {
interface CAEmitterBehavior : NSSecureCoding {

[Export ("initWithType:")]
IntPtr Constructor (NSString type);
Expand Down
Loading

0 comments on commit bfaf626

Please sign in to comment.