Граф коммитов

352 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge d601a18199 [tests] Add support to xharness for excluding tests that require permission dialogs, and update monotouch-test accordingly. (#2418)
* [monotouch-test] Optionally ignore tests that show permission dialogs.

* [xharness] Add support for excluding tests that require permission dialogs.

* [xharness] Ignore introspection tests if we don't want permission dialogs.

Ignore introspection tests for now if we don't want permission dialogs, since
figuring out which API requires permissions is a tedious process (which we'll
eventually have to do though).
2017-08-03 18:58:04 +02:00
Rolf Bjarne Kvinge cee1da96d8 [xharness] Fix project cloning to understand how to build test-libraries. (#2417)
Use a 'TestLibrariesDirectory' property in the project files, which is
rewritten correctly when a project is cloned.
2017-08-03 14:29:14 +02:00
Rolf Bjarne Kvinge 4176287d88 [monotouch-test] Don't blindly ignore a test since it's not only run on watchOS. (#2405)
Also this line is redundant, since the test is `#if !__WATCHOS__`
2017-08-02 16:15:35 -04:00
Rolf Bjarne Kvinge e2cdf61897 [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367. (#2399)
* [runtime] Make debug spew compile.

* [tests] Add test case for bug #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367

* [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367
2017-08-02 13:59:05 +02:00
Rolf Bjarne Kvinge f2d0a80699 [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367. (#2393)
* [runtime] Make debug spew compile.

* [tests] Add test case for bug #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367

* [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367
2017-08-02 08:26:29 +02:00
Sebastien Pouliot 15af3164aa [tests] Disable/tweak two tests that breaks on (almost) all Xcode updates
Those tests were not added to validate xOS so just keep the parts
that helps us (without constantly checking back the new break flavor)
2017-07-24 19:45:38 -04:00
Rolf Bjarne Kvinge 2b2006906f [monotouch-test] Make sure we don't run certain Intents tests on earlier iOS versions than when the API was introduced. (#2351) 2017-07-20 17:08:25 +02:00
Vincent Dondain 49b020e2b2 [spritekit] Update for Xcode 9 beta 1, 2 & 3 (#2331)
- Added Quaternion support to XI runtime (simd_quatf).
2017-07-19 16:19:02 -04:00
Vincent Dondain feb5b13d5f [uikit] Fix method names in UIDropSession & UIDragDropSession (#2314)
- Fixes bug #58079: UIDropSession loadObjects: is called Completion
  (https://bugzilla.xamarin.com/show_bug.cgi?id=58079)
- Fixes bug #58081: IUIDropSession.Completion first arg should be a Class
  (https://bugzilla.xamarin.com/show_bug.cgi?id=58081)
- Similar to `CanLoadObjects`, use `itemProviderReadingClass` as the param name in `LoadObjects`.
- Provide `Type` overloads so customers don't have to do `new ObjCRuntime.Class (typeof (UIImage))` but can just do `typeof (UIImage)` instead.
2017-07-13 17:55:56 -04:00
Manuel de la Pena 6ee7f5aae2 [Tests] add a work around to fix #57762 until bug #57825 is done. (#2300)
* [Tests] add a work around to fix 57762 until bug #57825 is done.

* Update comment with correct bug.

* Fix tests for watchos.

* Skip on watch.
2017-07-13 08:24:36 -04:00
Vincent Dondain 19d6d253a8 Bump to Xcode 9 beta 3 (#2306)
- Updated Visual Studio max version in Make.config.
- Fixed iOS introspection tests.
- Fix monotouch-test
   - Same issue with MPVolumeView as intro tests.

* Fix TrustTest

* Disable NSMutableCopying on HMCharacteristicEvent

* Fix HMCharacteristicEvent / HMMutableCharacteristicEvent
2017-07-10 22:43:44 -04:00
Vincent Dondain 9866d3aa81 [homekit] Update for Xcode 9 beta 1 & 2 (#2276) 2017-07-05 11:05:28 -04:00
Jeffrey Stedfast 6351aef095 [msbuild] Don't define __IOS__ for tvOS binding projects (#2274)
* [msbuild] Don't define __IOS__ for tvOS binding projects

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57764

* minor fixups

* Conditional compilation.
2017-06-30 12:35:48 -04:00
Alex Soto 05edc5e2be [EventKitUI] Update to Xcode 9 Beta 1 2017-06-29 09:52:37 -05:00
Rolf Bjarne Kvinge 2448108976 [monotouch-test] Allow more values for MACaptionAppearanceGetDisplayType.
On at least one of my devices I get MACaptionAppearanceDisplayType.AlwaysOn,
while the locale is 'en'.

So just allow all valid enum values for the return type.
2017-06-28 12:31:25 -05:00
Rolf Bjarne Kvinge b4d695a4fa [monotouch-test] Make sure we don't strip symbols in any configuration. Fixes #57811. (#2259)
https://bugzilla.xamarin.com/show_bug.cgi?id=57811
2017-06-28 14:34:26 +02:00
Vincent Dondain 900f73b2b1 Bump to Xcode 9 beta 2 (#2241)
* Bump to Xcode 9 beta 2

* [CoreImage] Stub out new CIImage filters in Xcode 9 beta 2.

* [monotouch-test] Update tests according to Xcode 9 beta 2.

* [xharness] Ask watch simulator tests to write output directly to a file.

It seems the watch simulator in Xcode 9 beta 2 has completely lost network
access (everything times out), so instead ask the tests to store results
directly in the resulting file.

This works for now since the watch simulator does not enforce the sandbox.

* [xharness] Rewrite the logic to write unit output to a file so that it works with Jenkins.

For Jenkins we ask the unit tests to produce XML, and this needs some special
treatment.

* [xharness] Protect against exceptions in the listener thread, so that it doesn't take xharness down.

* [xharness] Protect against a potential NullReferenceException, and fix one case where it would occur.

* [xharness] A few logging fixes.

* [Intents] Fix API & tests according to beta 2 changes.
2017-06-26 12:47:37 +02:00
Manuel de la Pena 4eafdb150b [CoreData] Updated bindings for xcode9. (#2210)
* Updated bindings for xcode9.
* Fixed the tests to pass in those cases that NSCoding and NSSecureCoding
is supported.

A radar has been created on Apples side:

https://trello.com/c/y87bjnr9/69-32761925-nspersistenthistorytoken-supports-nssecurecoding-yet-supportssecurecoding-returns-false
2017-06-22 11:48:03 +02:00
Rolf Bjarne Kvinge d4d141756a [monotouch-test] Fix TextFieldTest.GetCaretRectForPositiont_Null correctly for tvOS. (#2204) 2017-06-10 18:43:46 -07:00
Rolf Bjarne Kvinge 2c3690fe73 [EventKit] Fix a few issues found with iOS 11 (#2198)
* [EventKit] Obsolete the EKAlarm constructor and update tests.

Apple's documentation says "Use the alarmWithAbsoluteDate: and
alarmWithRelativeOffset: class methods to create an alarm", and additionally
calling the default constructor crashes, so obsolete the constructor and don't
call it from tests either.

* [EventKit] Make EKCalendarItem abstract according to Apple's documentation.

Since EKCalendarItem is an abstract class, tests should obviously not create
instances of it - and in fact it fails:

    [FAIL] CalendarItemTest.NullAllowedTest : Foundation.MonoTouchException : Objective-C exception thrown. Name: NSInvalidArgumentException Reason: +[EKCalendarItem frozenClass]: unrecognized selector sent to class 0x10e02bfa0

* [tests] Remove removed file from xammac tests as well.
2017-06-10 00:50:01 -07:00
Rolf Bjarne Kvinge 10fafc184f [monotouch-test] Adjust the ObjCRuntime.ExceptionsTest to work when a debugger is attached. (#2197) 2017-06-09 23:21:31 -07:00
Rolf Bjarne Kvinge 03b4d91d19 [monotouch-test] Update AddressBookUI.AddressFormattingTest according to iOS 11 behavior. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge 12e33970e4 [monotouch-test] Update MediaToolbox.FormatNamesTest according to iOS 11 behavior. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge 9e6f5210ae [monotouch-test] Update UIKit.TextFieldTest according to iOS 11 behavior. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge dc1e869c6b [monotouch-test] Ignore SceneKit.NodeTest, it crashes due to an Apple bug. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge d2102d2541 [monotouch-test] Update MDLMaterialProperty test according to new behavior in iOS 11. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge ec1745f996 [monotouch-test] Update AddressBook.SourceTest according to new behavior. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge 60f74fb0f7 [monotouch-test] Ignore parts of AddressBookTest.PersonTest due to an Apple bug.
ABMultiValueCreateMutableCopy stopped creating a mutable copy, so our tests
fails. Ignore the corresponding test in beta 1.
2017-06-09 19:27:22 -07:00
Alex Soto 9f4becd993 [tests] Allow monotouch-tests and introspection to run with Xcode 9 Beta 1 (#2185)
* [monotouch-test] Disable EmptyNib tests due to Xcode9 no longer builds nibs if deployment target < 7.0

EmptyNib.xib : ibtool error : Compiling IB documents for earlier than iOS 7 is no longer supported.

* [monotouch-test] Fixt CalendarTest.TestEnumerateDates

It seems that NSCalendar.CurrentCalendar.EnumerateDatesStartingAfterDate
won't stop enumerating unless `stop` is set to `true`.

* [Tests] Add CheckXcodeVersion support for Xcode 9

* [introspection] Avoid introspection to crash with Xcode 9 Beta 1

* [monotouch-test] bring back LogicalName removal from monotouch-test.csproj
2017-06-07 18:03:34 -07:00
Rolf Bjarne Kvinge c8bd5e3cff [Foundation] Set 'sentRequest' when sending a request in NSUrlSessionHandler. (#1806)
* [Foundation] Set 'sentRequest' when sending a request in NSUrlSessionHandler.

Fixes this compiler warning:

> [..]/external/mono/mcs/class/System.Net.Http/HttpClientEx.cs(50,8): warning CS0649: Field `Foundation.NSUrlSessionHandler.sentRequest' is never assigned to, and will always have its default value `false'

However it changes the runtime behavior, and we'll now throw an exception in
cases that we accepted before:

* `sentRequest` is only read in `EnsureModifiability ()`, which throws an
  exception if `sentRequest` is true.
* Previously `sentRequest` was never set (thus the compiler warning), which
  meant `EnsureModifiability` would never throw an exception.
* Looking at the similar `CFNetworkHandler` (which has the identical field and
  methods), it seems that the intended behavior is to set `sentRequest` in
  `SendAsync`, and then `EnsureModifiability` is called whenever a property is
  set to ensure the property isn't set too late (and any change would be
  ignored because the request was already sent).
* This means that previously setting any property after the request was sent
  would not throw any exceptions (even though the change would be ignored),
  while with this change we'd start throwing exceptions.

* Add missing tests for the setRequest var.

* Redesign tests to make sure that all handlers run the same code.

* Fix failing test.

* Add the managed handler to the HttpClient tests.

* Fix minor style issues.
2017-06-05 09:21:28 -04:00
Rolf Bjarne Kvinge b4331523f6 [tests] Don't cap return value to 32-bit on 64-bit platforms in NSArrayTest.Sort. Fixes #53298. (#2149)
https://bugzilla.xamarin.com/show_bug.cgi?id=53298
2017-05-31 17:33:00 +02:00
Alex Soto b75f8eda31 [generator] Create CVPixelBuffer using GetINativeObject so its usable from 3rd party bindings (#2111)
* [generator] Create CVPixelBuffer using GetINativeObject so its usable from 3rd party bindings

Complements https://bugzilla.xamarin.com/show_bug.cgi?id=52665
and PR #2102

CVPixelBuffer was created using the internal handle ctor, this
did not allow 3rd party bindings to bind it correctly since it
generated not compilable code.

We now use Runtime.GetINativeObject<CVPixelBuffer> (ptr, false); just
like the base ctor https://git.io/vHvLj.

* [tests] Add IntPtr.Zero check and fix link in code

* [generator] Make comment easier to find
2017-05-19 11:10:22 -05:00
Rolf Bjarne Kvinge 9466ae5080 [registrar] Support 'out' parameters from NULL pointers. Fixes #54919. (#2106)
[registrar] Support 'out' parameters from NULL pointers. Fixes #54919.

Native code doesn't have the 'out' and 'ref' distinction C# has, and passes
NULL around left and right.

So make sure the generated code from the static registrar doesn't write to such NULLs.

https://bugzilla.xamarin.com/show_bug.cgi?id=54919
2017-05-19 12:07:12 +02:00
Sebastien Pouliot 6f68ab6f79 [tests][security] Re-enable some tests inside KeyTest. Fix #51277 (#2103)
The minimum size for RSA keypairs is 1024 bits on macOS while it is
512 bits on iOS. Some tests using the minimum size (because we test the
API not the security) were disable on macOS. This re-enables them using
the platform minimum.

https://bugzilla.xamarin.com/show_bug.cgi?id=51277
2017-05-17 21:59:35 -04:00
Chris Hamons d0963e2097 [macos] Fix test failure in CertificateTest (#2036)
- SecCertificateCopyEmailAddresses behaves differently on macOS than iOS with
 macOS getting the "documented" behavior of returning an empty array and iOS
 returning null.
- Fix the test to just accept null or 0 elements
2017-04-26 13:22:19 -05:00
Alex Soto 3fe0d2010a [CoreText] CTParagraphStyle uses the incorrect float return type. Fixes bug 54148. (#1975)
* [CoreText] Fix bug 54148 - CoreText.CTParagraphStyle does not pick up settings from CTParagraphStyleSettings

https://bugzilla.xamarin.com/show_bug.cgi?id=54148

CTParagraphStyle float properties have the incorrect float return type,
the headers state this API's returns CGFloats (aka nfloat) instead of floats
this used to work ok fetching them due to there is no difference in size
for 32 bits devices but once 64 bit devices appeared the API began to fail

The actual method that fetches the values `CTParagraphStyleGetValueForSpecifier`
asks for the size of the returned data and we used to give the size of a float
which is incorrect in 64 bits devices and the API call just correctly returned
false because it could not write back the value to us.

Added tests for the full properties available on CTParagraphStyle

* Add comment about the weird Dispose method implementation in CreateFromSettings
2017-04-10 08:24:25 +02:00
Rolf Bjarne Kvinge fc28b434c2 [monotouch-test] Fix SystemSoundTest.FromFile's audio file to not take 23s. Fixes #54236. (#1942)
In a6b9c28975 I fixed SystemSoundTest.FromFile
to not crash randomly, and at the same time I added an assert to ensure that
the playback completion handler is called properly, with a 10s timeout.

Which won't work, because the audio file is 23s long.

There's no need for a 23s audio file, so the fix is simple: cut the audio file
to 0.3s instead.

https://bugzilla.xamarin.com/show_bug.cgi?id=54236
2017-03-30 14:33:36 +02:00
Sebastien Pouliot 18cee459d6 [tests][monotouch] Stop guessing values for CreateCylinder
It's different on all platforms/SDK versions so it's pointless to use
it inside tests.
2017-03-28 18:15:02 -05:00
Sebastien Pouliot 7f650d08c3 [tests] Disable INIntentResolutionResultTests.cs on XM (it's not ready) 2017-03-28 16:31:49 -05:00
Alex Soto 8ef77344bc [Intents] Updated to Xcode 8.3 Beta1 and Beta2 (#1686)
Added more types to INIntentResolutionResultTests

Partial Test log:

[Runner executing:	Run Everything]
[MonoTouch Version:	10.3.99]
[Assembly:	Xamarin.WatchOS.dll (32 bits)]
[GC:	sgen]
[Apple Watch:	watchOS v3.2]
[Device Name:	iMacAlex]
[Device Locale:	en_US]
[Device Date/Time:	2/13/2017 11:45:10 PM]
[Bundle:	com.xamarin.monotouch-test.watchkitapp.watchkitextension]

 monotouchtest.dll

INIntentResolutionResultTests
	[PASS] INIntentResolutionResultTests.INBillPayeeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INBillTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INBooleanResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCallRecordTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarAirCirculationModeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarAudioSourceResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarDefrosterResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarSeatResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarSignalOptionsResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCurrencyAmountResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INDateComponentsRangeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INDateComponentsResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INDoubleResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INIntegerResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INIntentResolutionResultIsAbstractTest
	[PASS] INIntentResolutionResultTests.INMessageAttributeOptionsResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INMessageAttributeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPaymentAccountResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPaymentAmountResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPaymentStatusResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPersonResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPlacemarkResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INRadioTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INRelativeReferenceResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INRelativeSettingResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INSpeakableStringResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INStringResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INTemperatureResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INWorkoutGoalUnitTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INWorkoutLocationTypeResolutionResultPropertyTest
INIntentResolutionResultTests : 20 ms

* [Intent] Workaround for introspection tests

Right now introspection tests fail randomly on two test targets
iOSApiCtorInitTest and iOSApiSelectorTest so we are temporary
removing them from the test suite with the hope  to have them
fixed on the next beta
2017-03-28 14:40:10 -05:00
Vincent Dondain d819d25bff [modelio] Add missing MDLMesh constructors and fix xtro (#1826)
Fixes bug #52575: Missing ModelIO API
(https://bugzilla.xamarin.com/show_bug.cgi?id=52575)

We turn the MDLMesh constructors into static ones because we don't want to lose the shape name.
Also, the signatures of these constructors differ so it would not be possible to use an enum to differentiate the shapes.
2017-03-28 10:08:12 -05:00
Sebastien Pouliot cb576d53a9 Revert "[tests] Adjust monotouch-test not to crash on an Apple bug. Fixes #52162 (#1699)"
This reverts commit b502bd71a1.
2017-03-28 09:45:24 -05:00
Vincent Dondain 13972a104b [opengles] Add version check to EAGLContext.PresentRenderBufferTest (#1706)
Fix bug #52456: [iOS]EAGLContextTest.PresentRenderBufferTest failed on lower versions of iOS
(https://bugzilla.xamarin.com/show_bug.cgi?id=52456)
2017-03-28 09:42:24 -05:00
Sebastien Pouliot f261d901b1 [tests] Adjust monotouch-test not to crash on an Apple bug. Fixes #52162 (#1699)
iOS 10.3 simulator (i386 only) will crash executing CTLineTests.
EnumerateCaretOffsets test case.

This does not happen on 64 bits (simulator) or on device builds,
including 32 bits builds. Running iOS 10.1 simulator (with Xcode 8.3)
also runs without problems.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=52162
2017-03-28 09:38:18 -05:00
Sebastien Pouliot bcf27ce090 [security] Add more SecCertificate* API from beta1. Fixes #52505 (#1695)
They were thought to be macOS only but xtro corrected me, they are
new in iOS 10.3 even if some existed previously.

references (xtro):
!missing-pinvoke! SecCertificateCopyCommonName is not bound
!missing-pinvoke! SecCertificateCopyEmailAddresses is not bound
!missing-pinvoke! SecCertificateCopyNormalizedIssuerSequence is not bound
!missing-pinvoke! SecCertificateCopyNormalizedSubjectSequence is not bound
!missing-pinvoke! SecCertificateCopyPublicKey is not bound
!missing-pinvoke! SecCertificateCopySerialNumber is not bound

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=52505
2017-03-28 09:34:52 -05:00
Alex Soto 3a1276a992 [VideoToolbox] Updated to Xcode 8.3 Beta 1
* Updated API to reflect Xcode 8.3 beta 1 changes
* This commit also fixes availability metadata to avoid duplicating it
  by moving member availability metadata into its container class where
  possible.
* Enables VideoToolbox tests for tvOS.
2017-03-28 09:29:36 -05:00
Vincent Dondain b15d2e256b [mediaplayer] Update for iOS 10.3 beta 1 (#1627)
* introspection-ios

MPMusicPlayerControllerMutableQueue and MPMusicPlayerControllerQueue's headers show no trace of NSCoding, NSSecureCoding or NSMutableCopying therefore we're skipping them.
2017-03-28 09:24:06 -05:00
Vincent Dondain b7dd01c770 [modelio] Update for iOS 10.3 beta 1 (#1601) 2017-03-28 09:22:27 -05:00
Sebastien Pouliot 2ee5201b84 [tests][monotouch] Generalize some tests to be independent of iOS version. Fixes #51801 (#1598)
The exact values are not what we need to test for and varies with
different OS versions - making tests fails for no good reason (i.e.
they are not canary used to detect changes)

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=51801
2017-03-28 09:16:08 -05:00
Alex Soto 4d9774eeb1 [CoreVideo] Update to iOS 10.3 beta 1 2017-03-28 09:13:31 -05:00
Vincent Dondain f3cd4a50d4 [opengles] Update to iOS 10.3 beta 1 (#1576) 2017-03-28 09:12:08 -05:00
Rolf Bjarne Kvinge 563f395cac Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-23 15:33:38 +01:00
Rolf Bjarne Kvinge a6b9c28975 [monotouch-test] Fix randomly crashing SystemSoundTest.FromFile to not get a callback after the sound was disposed. Fixes #52903. (#1893)
SystemSoundTest.FromFile was requesting to be called back when the sound
completed playback. This causes problems when the sound is disposed after it
has started playing, because in that case disposing it won't prevent the
callback from being called, but instead random InvalidCastExceptions / crashes
would occur.

https://bugzilla.xamarin.com/show_bug.cgi?id=52903

* SystemSound.PlaySystemSound doesn't work in the simulator.

https://stackoverflow.com/a/24973240/183422
2017-03-22 16:55:55 -05:00
Rolf Bjarne Kvinge 1e498bce22 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-03-07 07:38:30 +01:00
Sebastien Pouliot 984d4e2ab6 [generator] Allow basic support of nullable inside our trampolines. Fixes #42699 (#1820)
We cannot use generics in native signatures but, with some care (and
generator work), we can still expose nullable on our public delegate API.

AUImplementorStringFromValueCallback is presently the only case of such
an API.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=42699
2017-03-03 14:01:33 -05:00
Sebastien Pouliot bedfdd4ec1 [coregraphics] Add CGRect.Null and Infinite properties. Fixes #43628 (#1819)
Apple has both an Empty and Null constants. Our implementation is largely
done in managed code and, for historical reasons [1], match System.Drawing
behaviour. Still the constant is useful for other (e.g. 3rd party) APIs.

Also add CFRect.Infinite for the missing CGRectInfinite symbol.

[1] In the original classic we only provided RectangleF not CGRect

references:
* https://bugzilla.xamarin.com/show_bug.cgi?id=43628
* xtro
	common.unclassified:!missing-field! CGRectNull not bound
	common.unclassified:!missing-field! CGRectInfinite not bound
2017-03-03 09:04:32 -05:00
Sebastien Pouliot 95005feaf7 [coregraphics] Add missing [Flags] on CGGradientDrawingOptions. Fixes #33997 (#1800)
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=33997
2017-03-01 07:15:32 +01:00
Rolf Bjarne Kvinge 4de9a8c0d6 Merge remote-tracking branch 'origin/master' into framework-sdk 2017-02-28 10:16:18 +01:00
Sebastien Pouliot 55bd2b9f54 [uikit] Add == and != operators on UIEdgeInsets. Fixes #33504 (#1773)
https://bugzilla.xamarin.com/show_bug.cgi?id=33504
2017-02-27 08:50:31 -05:00
Rolf Bjarne Kvinge b28899d89f [tests] Explicitly state the resource name for resources.
This makes it easier for our project-file processing/duplication to get it
right.
2017-02-10 16:39:38 +01:00
Chris Hamons 2c835c5294 [XM] Add hybrid/standard AOT option and improve AOT code (#1650)
* [XM] Seperate parsing from compilation in AOT code

- Parsing command line options was too entangled with actually compiling
- Refactor test code to centralize Compile, reducing some complexity of tests
- Groundwork for hybrid vs non-hybrid AOT work

* Add hybrid/standard AOT support

* Add xammac_tests to makefile/jenkins

* Add flag to force AOT

* Disable MonoTouchFixtures.Contacts.ContactStoreTest.GetUnifiedContacts on XM due to prompts on Jenkins
2017-02-08 13:40:48 -06:00
Rolf Bjarne Kvinge 6fe1c9feab [tests] Use a different bundle id for different apps that can be installed on the same device. (#1509)
* [tests] Use a different bundle id for different apps that can be installed on the same device.

* [xharness] Add workaround for radar #29847128.
2017-01-16 18:34:57 +01:00
Sebastien Pouliot 6e31a77b8e [tests] Generalize CIImage test wrt colorspace. Fixes #51493 (#1496)
So it does not to fail on some iOS versions / devices.

https://bugzilla.xamarin.com/show_bug.cgi?id=51493
2017-01-13 13:05:32 -05:00
Sebastien Pouliot 99de1a772d [uikit] Cover null arrays in new UISegmentedControl.ctor (#1485)
Follow up to PR1477 [1] to cover case [2] for bug #33163 [3]

[1] https://github.com/xamarin/xamarin-macios/pull/1477
[2] https://github.com/xamarin/xamarin-macios/pull/1477#pullrequestreview-16295268
[3] https://bugzilla.xamarin.com/show_bug.cgi?id=33163
2017-01-12 15:33:13 -05:00
Timothy Risi 687aa6f25f Port monotouch-test suite to Xamarin.Mac (#1445)
* Port the Monotouch-test suite to run on Xamarin.Mac

Adds over 1300 new API tests for XM
2017-01-12 09:13:56 -09:00
Sebastien Pouliot aafa135c9c [uikit] Add convenience constructors for UISegmentedControl. Fixes #33163 (#1477)
* Existing `.ctor(object[])` now
    * changed to `params` (not a breaking change);
    * accept `NSString`, along with `string` and `UIImage`;
* Added `.ctor (NSArray)` (exposing the generated code to ease subclassing)
* Added `.ctor (params NSString[])`
* Added `.ctor (params string[])`
* Added `.ctor (params UIImage[])`

Also adds unit tests for all of them.

https://bugzilla.xamarin.com/show_bug.cgi?id=33163
2017-01-11 21:17:51 -05:00
Sebastien Pouliot 1dbffeb3f8 [foundation] Return an empty NSArray that is valid for both managed and native side (#1473)
The existing code was cheating and returned a managed only instance with a `nil` handle. That was fine in many cases but some API (e.g. UISegmentedControl) don't like that (i.e. don't react like a normal, empty NSArray was supplied). It's also the right thing to do since the current behaviour is not guaranteed to remain identical on future updates of the OS.

Unit tests updated.
2017-01-11 19:32:16 -05:00
Sebastien Pouliot 33b7d2e23b [tests] Fix monotouch-test to execute when Link All is used (#1464)
Code inside the category needs to be preserved, since it's not
directly used by C# code.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=51335
2017-01-10 17:28:19 -05:00
Alex Soto 368c9667a7 Merge pull request #1368 from dalexsoto/bug49978
[Tests] GraphicsRendererTest.ImageDefaultFormat test changed default on iPhone 7/7+
2016-12-16 16:38:23 -06:00
Chris Hamons 5ba09748a0 Merge pull request #1344 from xamarin/xcode82-master-hamons
Merge Xcode82 support into master
2016-12-16 13:56:37 -06:00
Alex Soto a4450d697a [Tests] GraphicsRendererTest.ImageDefaultFormat test changed default on iPhone 7/7+
https://bugzilla.xamarin.com/show_bug.cgi?id=49978

Disabled assert of PrefersExtendedRange because it changes its default
value on the iPhone 7/7+ making this test fail
2016-12-16 11:41:19 -06:00
Alex Soto df9c52914d [Tests] Avoid NRE in MediaItemTest.DefaultValues test
https://bugzilla.xamarin.com/show_bug.cgi?id=49978

MPMediaQuery.Item will be null if Media Library privacy access dialog
is not granted
2016-12-15 13:01:26 -06:00
Sebastien Pouliot b5632f9c2f merge xcode8.2 into master 2016-12-12 21:26:23 -05:00
Rolf Bjarne Kvinge 4a90e07b69 [monotouch-test] Add test to ensure config files are properly bundled in apps. (#1291) 2016-12-02 14:13:25 +01:00
Sebastien Pouliot caea761537 [avfoundation] Fix incorrect selector for AVPlayerItemVideoOutput .ctor. Fixes #48382 (#1276)
Commit ba37aa44 workaround around a signature clash incorrectly and
turned the selector to static ones (and incorrectly set the handle)

Also fix a typo in the [Advice] attribute of the old API

https://bugzilla.xamarin.com/show_bug.cgi?id=48382
2016-12-01 17:01:42 -05:00
Alex Soto feac0d2315 [Foundation] Adds single object notifications to Notifications class (#1075)
Trello: https://trello.com/c/mKsUDti8

This adds a new overload to our Notifications class

Current:

public static NSObject ObserveDidStart (EventHandler<NSNotificationEventArgs> handler)

New overload:

public static NSObject ObserveDidStart (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)

This allows our users to have single object subscription to our
easy to find notifications.

Also this commit adds an Advice attribute encouraging to use the
Notifications class instead of the NSString based notifications
2016-11-28 10:19:21 -06:00
Rolf Bjarne Kvinge 10516d3672 [CoreFoundation] Store strings in the exception data when converting CFError to CFException. Fixes #46626. (#1144)
Store strings in the exception data when converting CFError to CFException, to
make sure the data stored is serializable (which is apparently a requirement
with the reference sources).

https://bugzilla.xamarin.com/show_bug.cgi?id=46626
2016-11-09 15:31:02 +01:00
Alex Soto 6b65ce9077 [AVFoundation] Low hanging fruits and xtro of AVFoundation (#980)
This commit brings all new 10.12 api + most of the unbound
AVFoundation API that is macOS specific and was left in the limbo
2016-11-07 09:32:56 -06:00
Rolf Bjarne Kvinge 0c43ddc615 Disable managed exception marshaling when the debugger is attached. Fixes #45116. (#1055)
Managed exception marshaling interferes with the debugger, because it adds
exception handlers to executing code, which makes the Mono runtime think an
exception is handled when logically it's not (although technically it is).

The consequence is that the IDEs will only be notified when we re-throw the
exception after catching it, making it impossible for the IDEs to stop when
the exception is thrown (they will instead stop when we re-throw the
exception).

So disable managed exception marshaling (unless the user changed the default
behavior) when a debugger is attached.

This is the same behavior as Xamarin.Android.

https://bugzilla.xamarin.com/show_bug.cgi?id=45116
2016-10-28 19:07:01 +02:00
Rolf Bjarne Kvinge 4371ea4540 [static registrar] Fix registration of generic types. Fixes #44926. (#1063)
https://bugzilla.xamarin.com/show_bug.cgi?id=44926
2016-10-28 18:42:45 +02:00
Sebastien Pouliot 8c93e7758d Merge branch 'xcode8.1' 2016-10-26 15:56:34 -04:00
Rolf Bjarne Kvinge d395e8df59 [tests] Generate some trampoline and registrar tests.
Generate trampoline and registrar tests that tests if a return type requires objc_msgSend or objc_msgSend_stret.

Now it's much easier to test new return types (a single line of code), which
avoids a _lot_ of copy-pasting, and makes sure all the different variations
are tested properly.

These new tests found several bugs, which are fixed in subsequent commits.
2016-10-13 15:10:43 +02:00
Sebastien Pouliot 24b7b5be2e [passkit] API audit: remove default .ctor on PKLabeledValue, add tests for PKLabeledValue and add xtro comments (#979) 2016-10-12 11:30:11 +02:00
Rolf Bjarne Kvinge 516f764ec4 [tests] Add support for building device tests for 32-bit or 64-bit. 2016-10-11 19:52:36 +02:00
Rolf Bjarne Kvinge f7447a385c [tests] Default to fat apps for device configurations. 2016-10-11 19:52:35 +02:00
Rolf Bjarne Kvinge 5fd5b5ae8c [tests] Remove unused/deprecated variables from project files. 2016-10-11 19:52:35 +02:00
Rolf Bjarne Kvinge 432f7af3ed [tests] Set OutputPath according to Configuration instead of hardcoding it.
This makes c&p a little less error-prone.
2016-10-11 19:52:35 +02:00
Sebastien Pouliot 5504f45bb4 [coregraphics] Add managed validation to CGPath.FromRoundedRect to avoid native assertion/crash. Fixes #40230 (#966)
https://bugzilla.xamarin.com/show_bug.cgi?id=40230
2016-10-10 10:27:07 +02:00
Rolf Bjarne Kvinge bb6b8221b8 [monotouch-test] Fix CIImageColorSpaceTest on older devices. (#964) 2016-10-07 19:15:08 +02:00
Rolf Bjarne Kvinge a5fde9fbbe [monotouch-test] Remove duplicated entry in project file. (#958) 2016-10-06 19:37:27 +02:00
Rolf Bjarne Kvinge 0863e412b4 Remove XI/Classic support (#926)
* [tests] Remove Classic SDK tests.

* Remove XI/Classic support.

This also means we can remove support for the legacy registrars.

* [monotouch-test] Remove legacy registrar tests.

* [tests/mtouch] Remove Classic tests (and legacy registrar logic).

* [tests/scripted] Fix tests to reference Xamarin.iOS.dll.
2016-09-30 15:02:17 -04:00
Sebastien Pouliot d0773a9ffc [avfoundation] Add overloads to AVCaptureDevice that accept an enum. Fixes #32535 (#922)
The current API use `string`, not `NSString` is added as a step forward.
The `NSString` is more correct but it does not ease discoverability (e.g.
code completion) so an enum-based overload is added (as the preferred API).

https://bugzilla.xamarin.com/show_bug.cgi?id=32535
2016-09-30 12:49:45 -04:00
Alex Soto b8bd71c7b5 [Security] Add convenience Certificate, Key and Identity ctors to SecRecord (#905) 2016-09-28 08:17:39 -04:00
Alex Soto 5c10b87637 [CoreImage] Add missing property ColorSpace to CIImage (#906)
https://bugzilla.xamarin.com/show_bug.cgi?id=44438

The ColorSpace property is decorated with the CF_RETURNS_NOT_RETAINED
macro, this means it returns an object that follows the CoreFoundation
[Ownership Policy](1) but it does not follow the naming convention
documented in the policy.

The [CF_RETURNS_NOT_RETAINED](2) indicates that the object reference
returned is not owned by the caller, so we should definitely call
CGColorSpaceRetain when obtaining a handle.

Since CGColorSpace is considered into the [MarshalType list](3) the
generated code ends up calling the IntPtr ctor which does the right
thing, [calling CGColorSpaceRetain](4) in the given ptr.

And last but not least, we already bind another property decorated
with [CF_RETURNS_NOT_RETAINED](2) in [CIColor::ColorSpace](5).

[1]: https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html
[2]: http://clang-analyzer.llvm.org/annotations.html#attr_cf_returns_not_retained
[3]: 0bc23b379a/src/generator.cs (L2642)
[4]: https://github.com/xamarin/xamarin-macios/blob/xcode8/src/CoreGraphics/CGColorSpace.cs#L77-L80
[5]: https://github.com/xamarin/xamarin-macios/blob/xcode8/src/coreimage.cs#L112-L113
2016-09-28 12:33:51 +02:00
Alex Soto 72f6d0a232 [Foundation] NSUrlSession's Create*Task methods may return a base class of the type the headers claim. Fixes #37175.
https://bugzilla.xamarin.com/show_bug.cgi?id=37175

NSUrlSession's Create*Task methods may return an object of the wrong
type (NSUrlSessionTask instead of NSUrl[Data|Download|Upload]SessionTask),
so we need to bypass our type check when creating the managed object,
otherwise we end up throwing InvalidCastExceptions randomly. We will
return the type that is declared on the headers so if the native side
returns a cat and headers says it barks we'll we make it bark :).
2016-09-23 21:37:33 -05:00
Alex Soto 7845caa577 [AVFoundaation] Fix bug 44322 - AVAssetDownloadUrlSession.CreateSession throws a System.InvalidCastException: Specified cast is not valid.
https://bugzilla.xamarin.com/show_bug.cgi?id=44322

AVAssetDownloadUrlSession.CreateSession according to headers it
should return an AVAssetDownloadUrlSession but it is returning
an apple internal type NSURLBackgroundSession so with our
current bindings it throws an InvalidCastException, adding
ForcedTypeAttribute will create the managed type wihout
the actual typecheck. Added test verifing that the API
no longer throws.
2016-09-23 19:17:57 -05:00
Rolf Bjarne Kvinge 9000e48034 [tests] Remove Classic test projects, and make the Unified test projects the master projects. (#858) 2016-09-21 22:55:10 +02:00
Rolf Bjarne Kvinge a4920078ff [registrar] Look up the right type when getting the constrained type for a generic type. Fixes #44309. (#848)
https://bugzilla.xamarin.com/show_bug.cgi?id=44309
2016-09-21 08:36:34 -05:00
Rolf Bjarne Kvinge eb373635bd [registrar] Look up the right type when getting the constrained type for a generic type. Fixes #44309. (#848)
https://bugzilla.xamarin.com/show_bug.cgi?id=44309
2016-09-19 14:26:30 -04:00
Manuel de la Pena 85b519311a [CoreMedia] ClockOrTimebase should retain the pointer in the constructor that takes a handle. (#821)
This change fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=44154
2016-09-14 08:09:52 -04:00
Sebastien Pouliot eac032a0d6 [modelio] Add missing availability attributes on new API. Fixes #44192 (#831)
and ignore them when running tests on older devices, e.g. iOS 9.3.x

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=44192
2016-09-13 20:32:27 -04:00
Sebastien Pouliot 38148c718a Merge branch 'xcode8' 2016-09-09 15:29:37 -04:00
Vincent Dondain 9a7f86d81a [healthkit] Update for iOS 10 GM (#800) 2016-09-07 18:19:19 -04:00
Sebastien Pouliot 5db30f619e [metal] Fix MTLHeapDescriptor and test it only on devices (#782)
It turns out `MTLHeapDescriptor` does not exists on the simulator.

```Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_MTLHeapDescriptor", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64```

A `[DisableDefaultCtor]` was used (by mistake / lack of documentation)
and this was hiding the issue (on our bots).

However on device introspection was not happy:

iOSApiSelectorTest
[FAIL] Selector not found for Metal.MTLHeapDescriptor : cpuCacheMode
[FAIL] Selector not found for Metal.MTLHeapDescriptor : setCpuCacheMode:
[FAIL] Selector not found for Metal.MTLHeapDescriptor : size
[FAIL] Selector not found for Metal.MTLHeapDescriptor : setSize:
[FAIL] Selector not found for Metal.MTLHeapDescriptor : storageMode
[FAIL] Selector not found for Metal.MTLHeapDescriptor : setStorageMode:
    [FAIL] iOSApiSelectorTest.ApiSelectorTest.InstanceMethods :   6 errors found in 18339 instance selector validated

Note that these are the properties, not the `init` that's mentioned here.

So first `init` is possible, on devices, from Xcode:

	MTLHeapDescriptor *hd = [[MTLHeapDescriptor alloc] init];
	NSLog (@"%@", [hd description]);

gives

	<MTLHeapDescriptorInternal: 0x17401da50>
	{
		cpuCacheMode = MTLCPUCacheModeDefaultCache;
		size = 0;
		storageMode = MTLStorageModePrivate;
		}

so we need to remove our `[DisableDefaultCtor]`.

That does not fix the selectors above... but note the *Internal type
returned, they are forwarded and that's generally something that
respondToSelector (that introspection uses) does not cover.

But, to be sure, we add unit tests showing all the properties are
working like expected :-)
2016-09-07 08:03:14 -04:00
Sebastien Pouliot f5052c105c [healthkit] Change binding for HKDetailedCdaErrors (#757)
* [healthkit] Change binding for HKDetailedCdaErrors

* Hide [Fields]
* Easier access to the information from NSError
* Unit test (mostly to make sure of the returned type)

* [healthkit] Remove HKDetailedCDAValidationErrorKey from watchOS profile

It's used from an NSError returned from an API that is not available in
watchOS.
2016-09-03 11:36:05 -04:00
Sebastien Pouliot 4c09e91f91 [watchos] Remove several [Obsolete] API when alternatives exists (#742) 2016-09-02 10:02:29 -04:00
Sebastien Pouliot 4220714485 Merge branch 'cycle8' into xcode8 2016-09-01 14:38:23 -04:00
Sebastien Pouliot 3428fdc400 [tests] Update monotouch-test to add version checks when executing on older iOS versions. Fixes #43920 (#729)
Tested with iOS 9.3, 8.4 and 6.1.

https://bugzilla.xamarin.com/show_bug.cgi?id=43920
2016-08-31 23:08:54 -04:00
Sebastien Pouliot d9c309b85d [modelio] Fix several incorrect (headers) availability on new API (only in iOS10, not 9) (#726) 2016-08-31 17:59:53 -04:00
Alex Soto b8a2ced04b [Midi] Fix bug 43582 - MidiEndpoint throws, bad dispose of GCHandle
https://bugzilla.xamarin.com/show_bug.cgi?id=43582

- Thanks to @olegoid for the actual investigation and fix
- Added test that verifies the fix
2016-08-31 08:48:11 -04:00
Rolf Bjarne Kvinge 7de44f3253 [tests] Fix a couple of registrar tests to work on device. (#719)
Fixes the following test failures:

    [FAIL] BlockSignatureTest.WithoutUserDelegateTypeAttribute : System.ExecutionEngineException : Attempting to JIT compile method '(wrapper native-to-managed) MonoTouchFixtures.ObjCRuntime.BlockSignatureTest:<WithoutUserDelegateTypeAttribute>m__0 (intptr,intptr)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
    	  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:GetFunctionPointerForDelegateInternal (System.Delegate)
    	  at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate (System.Delegate d) [0x00011] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:1714
    	  at ObjCRuntime.BlockLiteral.SetupBlock (System.Delegate trampoline, System.Delegate userDelegate) [0x0000b] in /work/maccore/xcode8/xamarin-macios/src/ObjCRuntime/Blocks.cs:92
    	  at MonoTouchFixtures.ObjCRuntime.BlockSignatureTest.WithoutUserDelegateTypeAttribute () [0x00049] in /work/maccore/xcode8/xamarin-macios/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs:2585
    	  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    	  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:309

    [FAIL] BlockSignatureTest.WithUserDelegateTypeAttribute : System.ExecutionEngineException : Attempting to JIT compile method '(wrapper native-to-managed) MonoTouchFixtures.ObjCRuntime.BlockSignatureTest:<WithUserDelegateTypeAttribute>m__2 (intptr,intptr)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
    	  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:GetFunctionPointerForDelegateInternal (System.Delegate)
    	  at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate (System.Delegate d) [0x00011] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:1714
    	  at ObjCRuntime.BlockLiteral.SetupBlock (System.Delegate trampoline, System.Delegate userDelegate) [0x0000b] in /work/maccore/xcode8/xamarin-macios/src/ObjCRuntime/Blocks.cs:92
    	  at MonoTouchFixtures.ObjCRuntime.BlockSignatureTest.WithUserDelegateTypeAttribute () [0x00049] in /work/maccore/xcode8/xamarin-macios/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs:2596
    	  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    	  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:309
2016-08-31 13:54:47 +02:00
Alex Soto 83cfa197a9 [Midi] Fix bug 43582 - MidiEndpoint throws, bad dispose of GCHandle
https://bugzilla.xamarin.com/show_bug.cgi?id=43582

- Thanks to @olegoid for the actual investigation and fix
- Added test that verifies the fix
2016-08-31 01:48:28 -05:00
Sebastien Pouliot a2899b842c [cloudkit] Fix some missing .ctor (breaking changes) (#711)
Enabling CloudKit on watchOS required to remove some default .ctor that
watchOS does not _support_.

This commit fix this by either

* replacing the default .ctor with something that works across all
  platforms (best); or

* removing the default .ctor only on watchOS;

The commit also mark as abstract three existing types for watchOS (and
for XAMCORE_4_0) that were found reviewing the bindings.
2016-08-30 19:14:48 -04:00
Alex Soto 209f4f3709 [GameplayKit] Update from Xcode8 Beta 1 to Beta 6 (#689)
Runtime
- Added support for Vector2d, Vector3d and Vector4d SIMD types
- Added support for GKBox, GKQuad and GKTriangle SIMD types

GameplayKit
- Apple introduced GKQuadTreeNode and GKQuadTree in Xcode 7.1 and
  removed those types in a later Xcode (7.2?) but we kept them around.
  Now apple introduced again both types but renamed them to GKQuadtreeNode
  and GKQuadtree (lowercase t), this is a breaking change and since we do
  care about binary compat we are just changing the registration name and
  keeping the same managed name deprecating old methods and introducing
  the new ones.
- Added tests for new SIMD types
2016-08-30 15:32:46 -04:00
Sebastien Pouliot f74a7a7911 [messageui] Review (and add test) the enum breaking change from Apple. Fixes #42682 (#710)
Xcode8 SDK changed untyped enums (always 32 bits) into NSInteger. In this
case we can continue with the existing API (and ignore them in xtro)

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=42682
2016-08-30 14:26:49 -04:00
Manuel de la Pena d5bb9326ec [Metal] Update bindings for Xcode 8. (#663) 2016-08-29 08:21:06 -04:00
Sebastien Pouliot afd50b2bef [watchos][avfoundation] Enable AVFoundation in watchOS (#659) 2016-08-25 11:39:48 -04:00
Rolf Bjarne Kvinge d99d8c8cbe Fix ObjC encoding of block signatures. Fixes #43592. (#662)
The P/Invoke callback method that's called by native code
has a simpler function signature than what the user delegate
has.

Example P/Invoke callback signature:

    static unsafe void Invoke (IntPtr block, IntPtr obj)

which ends up calling this delegate:

    System.Action<NSDictionary>

The NSDictionary parameter has been simplifed to just IntPtr.

The problem is that we need to encode the block signature according
to the signature of the user delegate (Apple uses the signature
in some cases, and fails/aborts if the signature doesn't match
what the code expects).

So add more metadata to make it possible to find the signature
of the user delegate at runtime.

The generator generates code like this:

    block_scheduledCompletion.SetupBlock (Trampolines.SDActionArity1V2.Handler, scheduledCompletion);

where SDActionArity1V2.Handler is defined as this:

    static internal readonly DActionArity1V2 Handler = Invoke;

this means we can get the type of `Trampolines.SDActionArity1V2.Handler` at runtime
(which would be `DActionArity1V2` in this case), so put a new attribute (`UserDelegateTypeAttribute`)
at that type:

    [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
    [UserDelegateType (typeof (global::System.Action<NSDictionary>))]
    internal delegate void DActionArity1V2 (IntPtr block, IntPtr obj);

Then at runtime we check if the target delegate's type has this attribute,
and then we use the type specified by this new attribute instead when
computing the ObjC signature of the block.

https://bugzilla.xamarin.com/show_bug.cgi?id=43592
2016-08-25 11:08:22 -04:00
Alex Soto 9354e2044e [Intents] Fixes bug 43205 - SiriKit API Inconsistencies
https://bugzilla.xamarin.com/show_bug.cgi?id=43205

Per documentation[1] INIntentResolutionResult is an abstract class
and now we honor that, also we now provide the right return type
on each of the properties (NeedsValue, NotRequired and Unsupported)
in all subclasses of INIntentResolutionResult.

Unit tests added for all INIntentResolutionResult subclasses.

[1]: https://developer.apple.com/reference/intents/inintentresolutionresult?language=objc
2016-08-24 10:14:27 -05:00
Sebastien Pouliot eb8d0be0a4 [security] Add new API (up to beta 6) and unit tests (#646)
A problem, that exists with the current API, is that several constants
are hidden but many are needed in some dictionaries - and not all of
them can be turned into _classic_ StrongDictionary.

This initial PR does not solve all the (old) problems, but it does offer
some useful overloads that makes the API usable for basic usages and
expose the NSDictionary-based API.
2016-08-23 11:36:39 -04:00
Sebastien Pouliot f63ecd7a21 [uikit] Re-expose 'defaultFormat' in UIGraphicsRendererFormat subclasses since it returns a 'instancetype'. Fixes #43640 (#643)
https://bugzilla.xamarin.com/show_bug.cgi?id=43640
2016-08-23 10:53:57 -04:00
Sebastien Pouliot 4f53b7e51f [tests] Fix NetworkReachabilityTest/Loopback difference on iOS/tvOS 10+. Fixes 42542 (#638)
https://bugzilla.xamarin.com/show_bug.cgi?id=42542
2016-08-22 11:03:26 -04:00
Vincent Dondain 5999d9cc4e [modelio] Update for iOS 10 beta 1 (#606) 2016-08-19 13:55:59 -04:00
Sebastien Pouliot b611414ef0 [tests] Add NSCameraUsageDescription to monotouch-test to avoid crash in AVFoundation. Fixes bug #43517 (#634) 2016-08-19 11:18:58 -04:00
Sebastien Pouliot c7abd28f2c [foundation] Fix NSDimension.BaseUnit on subclasses. Fixes #43444 (#623)
This is a static selector that needs to be overridden, which is not the
usual pattern in C#. We re-define it using [New] on subclasses.

Unit tests added for all NSDimension subclasses.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43444
2016-08-19 08:27:23 -05:00
Sebastien Pouliot a0fd00c083 [tests] Fix monotouch-test failures when executed on iOS 9.x. Fixes bug #43520 (#632) 2016-08-18 22:59:26 -04:00
Manuel de la Pena a5f6564aaa [AVFoundation] Update bindings for Xcode 8. (#598)
[AVFoundation] Update bindings for Xcode 8.
2016-08-18 13:17:17 +02:00
Sebastien Pouliot f2f4bc8ccf [tests] Add NSMicrophoneUsageDescription to monotouch-test. Fixes #42544 (#604)
New requirement for iOS10 on devices

https://bugzilla.xamarin.com/show_bug.cgi?id=42544
2016-08-13 13:04:08 -04:00
Sebastien Pouliot c9633e3515 [coregraphics] Update up to beta 5 (#599)
Apple removed CGColorConverter even if it was publicly exposed in iOS 9.3,
not that I recall any API that consumed it...

It was replaced by a new, very close, type named CGColorConversionInfo and
the existing code and tests were updated to the new API.

So for `CGColorConverter` we're

* iOS: Obsoleted + code removal
* tvOS: Obsoleted + code removal
* watchOS: the API can be removed as it was not exposed in a stable release
* macOS: it was not enabled (did not work)

* [tests] Adjust ApiCMAttachmentTest so it knows how to create the new CGColorConversionInfo type
2016-08-12 13:45:09 +02:00
Manuel de la Pena 65ffc88aa5 [AVFoundation] Update bindings for XCode8. Focus on enums and structs. (#591) 2016-08-11 08:22:59 -04:00
Vincent Dondain c932422e9e [healthkit] Update for iOS 10 beta 1 (#572) 2016-08-09 10:23:12 -04:00
Manuel de la Pena 97bcc9fd0a [CloudKit] Update bindings for Xcode 8. (#530) 2016-08-09 08:11:44 -04:00
Vincent Dondain ddd1988f64 [spritekit] Update for iOS 10 beta 1 (#498)
* [spritekit] Update for iOS 10 beta 1

* [spritekit] Add missing MarshalDirective

* [runtime] Add missing simd function signatures

- Add matrix_float2x2 and matrix_float3x3 natives types.

* [introspection] Fix ApiSignatureTest

- We now avoid checking {?=[X]} encoded signatures.
- We now calculate the right size for matrix_float2x2, matrix_float3x3 and matrix_float4x4.
- Fix SKWarpGeometryGrid wrong bindings revealed by tests (IntPtr instead of Vector2).

* [monotouch-test] Add SKUniform and SKWarpGeometryGrid tests
2016-08-03 19:12:07 +02:00
Sebastien Pouliot 3f0d43debf [foundation] Adding new iOS 10 API (part 1) (#503)
- Split in two to ease review;

- Unit tests added for NSUrlSessionTaskMetrics and
  NSUrlSessionTaskTransactionMetrics as they don't respond to selectors
  like expected (but just like other NSUrlSession* types)
2016-08-02 08:03:35 -04:00
Rolf Bjarne Kvinge 90f56133f9 [monotouch-test] Tweak UrlSessionTest.DownloadDataAsync to not crash the process if exceptions occur. (#466) 2016-07-22 17:11:45 -04:00
Sebastien Pouliot 7637658e28 Merge branch 'cycle8' into xcode8 2016-07-21 11:40:41 -04:00
Sebastien Pouliot 72d0658344 [security][tvos] Remove SecSharedCredential API (#457)
Xcode8 SDK (for tvOS 10) marked those API with __TVOS_UNAVAILABLE making
them only available on iOS.

Since the API are not yet released in stable (C8) so we can removing
them  proactively. It will be easier to add them back later (if the
situation change) than removing/obsoleting them.
2016-07-21 11:37:28 -04:00
Sebastien Pouliot 413b5c2a88 [security][tvos] Remove SecSharedCredential API (#457)
Xcode8 SDK (for tvOS 10) marked those API with __TVOS_UNAVAILABLE making
them only available on iOS.

Since the API are not yet released in stable (C8) so we can removing
them  proactively. It will be easier to add them back later (if the
situation change) than removing/obsoleting them.
2016-07-21 11:30:19 -04:00
Sebastien Pouliot 31aa2959cd [tests][monotouch-tests] Skip UrlSessionTest.CreateDataTaskAsync as all cases fails on watchOS 3 beta 3 (#449) 2016-07-20 13:44:51 -04:00
Sebastien Pouliot 5fd99350df [tests] Fix MoviePlayerControllerTest for it's classic only test (broke on iOS 10 beta 3) (#443) 2016-07-20 08:15:09 -04:00
Vincent Dondain c87be8b279 [mediaplayer] Update for iOS 10 beta 3 (#446) 2016-07-20 08:14:50 -04:00
Sebastien Pouliot 980e71bc10 Bump Xcode requirement to 8.0 beta 3 (#418) 2016-07-18 23:16:44 -04:00
Sebastien Pouliot 52ffb2b251 Merge branch 'cycle8' into xcode8 2016-07-18 14:34:12 -04:00
Sebastien Pouliot 24b5dfbcb9 [tests] Disable PassLibraryTest.Default on watchOS as it hangs the process (#412)
Jul 15 15:44:26 castor monotouchtest[42732]: [default] [ERROR] error while getting ubiquityIdentityToken: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.bird.token was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.bird.token was invalidated.}

^ the above is printed several times after this
2016-07-18 08:35:53 -04:00
Sebastien Pouliot f38d545d31 [tests] Ensure monotouch-test runs fine down to iOS 6.1 (#411)
* Mostly missing checks

* FontTest: Apple never fixed that and the way we link now, without
  dlsym, makes the test crash

dyld: lazy symbol binding failed: Symbol not found: _CTFontCreateWithFontDescriptorAndOptions
  Referenced from: /var/mobile/Applications/6025D222-F50E-46E0-8BF5-9C45D4C7DACB/monotouchtest.app/monotouchtest
  Expected in: /System/Library/Frameworks/CoreText.framework/CoreText
2016-07-15 18:10:30 -04:00
Vincent Dondain 2dfe8fe400 [mediaplayer] Update for iOS 10 beta 1 - Part 2 (#406) 2016-07-15 13:19:25 -04:00
Sebastien Pouliot d2c1b63ec0 Fix monotouch-tests failures on older iOS versions (#401)
Tested with iOS 7.1 on an iPad 3

- Dynamic registrar needs to ignore new CBManager base class;
- CGImageMetadataTag.Value returns a mutable array on iOS10;
- MPMediaItem properties needed 9.2 / 10.0 check;
- MSMessage not available before Xcode 8;
- Metal not available before Xcode 6;
- MetalPerformanceShaders not available before Xcode 7;
2016-07-14 22:00:52 -04:00
Rolf Bjarne Kvinge 63811c85e5 [registrar] Use the correct parameters when generating category methods. Fixes #42489. (#385)
Category methods are exposed like extension methods, and the first parameter
specifies the class, which means we need to skip the first type when generating
the ObjC signature.

https://bugzilla.xamarin.com/show_bug.cgi?id=42489
2016-07-14 15:33:21 -04:00
Rolf Bjarne Kvinge 724308cb0d [registrar] Forward-declare ObjC classes. Fixes #42454. (#395)
There can be circular dependencies between Objective-C classes,
so make sure we don't fail compilation when that occurs by
forward declaring any Objective-C classes/protocols.

The test case in question does not contain a circular dependency,
but the same issue occurs due to types not being generated in the
correct order (a correct order could be constructed for the test
case, but there's no general solution since circular dependencies
can exist).

https://bugzilla.xamarin.com/show_bug.cgi?id=42454
2016-07-14 15:28:57 -04:00
Rolf Bjarne Kvinge ddfad1bc88 [registrar] Use the correct parameters when generating category methods. Fixes #42489. (#396)
Category methods are exposed like extension methods, and the first parameter
specifies the class, which means we need to skip the first type when generating
the ObjC signature.

https://bugzilla.xamarin.com/show_bug.cgi?id=42489
2016-07-14 18:42:30 +02:00
Rolf Bjarne Kvinge e6fc5a15d0 [runtime] Parse unions in objc encodings correctly. Fixes #42452. (#394)
Unions are defined as follows:

    (name=type...)

and we were not correctly parsing the 'name=' part.

https://bugzilla.xamarin.com/show_bug.cgi?id=42452
2016-07-14 18:03:02 +02:00
Vincent Dondain 23386a9217 [mediaplayer] Update for iOS 10 beta 1 - Part 1 (#386)
- Includes tests.
- Add availability flags.
- Turn new fields into properties.
- Verify bindings on iOS 9.3.
- Added protection in MPNowPlayingInfoCenter if native fields
  are not available (depending on the iOS version).
2016-07-14 08:45:30 -04:00
Sebastien Pouliot f085b17b36 [tests] Add missing version check on AUViewController tests. Fixes #42440 (#393)
Type was introduced in iOS 9, so it fails on earlier versions.

https://bugzilla.xamarin.com/show_bug.cgi?id=42440
2016-07-13 23:10:35 -04:00
Sebastien Pouliot b4ac7238b8 [tests] Add missing version check on AUViewController tests. Fixes #42440 (#393)
Type was introduced in iOS 9, so it fails on earlier versions.

https://bugzilla.xamarin.com/show_bug.cgi?id=42440
2016-07-13 23:04:18 -04:00
Sebastien Pouliot cf27c2e7a8 Merge branch 'cycle8' into xcode8 2016-07-13 16:43:00 -04:00
Vincent Dondain dd79e15f3b [monotouch-test] Fix permissions in Info.plist (#388) 2016-07-12 20:34:49 -04:00
Rolf Bjarne Kvinge a7a0bb4f05 [registrar] Forward-declare ObjC classes. Fixes #42454. (#387)
There can be circular dependencies between Objective-C classes,
so make sure we don't fail compilation when that occurs by
forward declaring any Objective-C classes/protocols.

The test case in question does not contain a circular dependency,
but the same issue occurs due to types not being generated in the
correct order (a correct order could be constructed for the test
case, but there's no general solution since circular dependencies
can exist).

https://bugzilla.xamarin.com/show_bug.cgi?id=42454
2016-07-12 20:34:18 -04:00
Rolf Bjarne Kvinge 249cf2f402 [runtime] Parse unions in objc encodings correctly. Fixes #42452. (#382)
Unions are defined as follows:

    (name=type...)

and we were not correctly parsing the 'name=' part.

https://bugzilla.xamarin.com/show_bug.cgi?id=42452
2016-07-12 20:19:06 -04:00
Sebastien Pouliot 7c6181dc66 [tests] Fix UIColor unit tests (in classic only) (#366)
Does not affect the Jenkins bots (which don't run classic tests) but
fails on wrench (who still runs them right now). There's a difference
in how equality is checked between classic and unified and that expose
a, not really important, change in iOS10.
2016-07-08 16:54:24 -04:00
Sebastien Pouliot afb3ea1e3f Bump Xcode version to beta 2 (#349)
Fix issues with monotouch-tests with beta2

* TLSMaximumSupportedProtocol returns Unknown, which also means default,
  instead of SslProtocol.Tls_1_2

* Setting NSZone.Name crash the app

* The MDLMesh tests are broken in a different way than beta1

* [callkit] Disable CTCallCenter default ctor as it breaks introspection

> [FAIL] Default constructor not allowed for CoreTelephony.CTCallCenter : SIGILL

The exception, that we catch, puts the process in an unstable state.

This cause weird results and crash later (wrong dispatch queue on main
thread) when testing MapKit.

Crashed Thread:        0  tid_a07  Dispatch queue: CTCallCenter

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000004
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x4:
-->
    __TEXT                 0000000000097000-00000000004d2000 [ 4332K] r-x/rwx SM=COW  /Users/USER/Library/Developer/CoreSimulator/Devices/9446B344-62A2-42A8-A8EE-9FE7AC6BA5C8/data/Containers/Bundle/Application/81183608-DADF-4226-B7FE-4B43759D679A/introspection.app/introspection

Application Specific Information:
BUG IN CLIENT OF LIBDISPATCH: dispatch_barrier_sync called on queue already owned by current thread
abort() called
CoreSimulator 278 - Device: iPhone 5 - Runtime: iOS 10.0 (14A5297c) - DeviceType: iPhone 5

Some beta2 adjustments (removals) to get green tests and be able to merge it so bindings of beta2 can start

* [tests] NEFlowMetaData conformance to NSSecureCoding and NSCopying is new in beta2 (and check fails on OSX 10.11)

* [uikit] Add [UIScrollView|UITableViewController].refreshControl to fix monotouch-test build

UIRefreshControlHosting was removed in beta2 but we still need the
refreshControl property on UIScrollView and UITableViewController
to build monotouch-test
2016-07-07 13:10:24 -04:00
Vincent Dondain c8c27a01b2 [coretext] Update for iOS 10 beta1 (#346) 2016-07-05 16:49:59 -04:00
Sebastien Pouliot 5388f5d02f [coregraphics] Added new CGColorSpace API from iOS 10 beta 1 (#337)
Also updated unit tests.
2016-07-04 21:57:30 -04:00
Alex Soto 42b6cf57f1 [DictionaryContainer] Add support for CGRect/CGPoint/CGSize and CMTime
* Added support in DictionaryContainer for CGRect/CGPoint/CGSize and CMTime
* Added support for [StrongDictionary] using CGRect/CGPoint/CGSize and CMTime
* Added tests using DictionaryContainers for CGRect/CGPoint/CGSize and CMTime
2016-07-03 11:11:06 -05:00
Rolf Bjarne Kvinge 81a8e7aee7 [Foundation] NSUbiquitousKeyValueStore is not available on watchOS. (#333)
* [Foundation] NSUbiquitousKeyValueStore is not available on watchOS.

Fixes an issue found by the introspection tests when running on a
watchOS device.

* [monotouch-test] Fix watchOS build with regards to NSUbiquitousKeyValueStore changes.
2016-06-30 03:47:13 -07:00
Sebastien Pouliot 8b5a06df3d [coregraphics] Re-enable CGColorConverterCreateSimple API and tests (#325)
This was added in iOS 9.3 SDK but only worked on the simulator as the
calls were not present on the device libraries.

This is fixed in iOS 10 beta 1.

https://trello.com/c/Rwko9Wef/37-24734681-cgcolorconvertercreatesimple-is-missing-for-device-builds
2016-06-29 20:03:06 -04:00
Rolf Bjarne Kvinge 1bc24751d0 [monotouch-test] Fix watchOS build. (#317) 2016-06-29 06:28:30 -07:00
Rolf Bjarne Kvinge 7e773080a9 Merge remote-tracking branch 'origin/master' into xcode8 2016-06-29 10:23:03 +02:00
Rolf Bjarne Kvinge 464aab3789 [monotouch-test] Fix ContactStoreTest.GetUnifiedContacts to not completely ignore the second half of the test. (#307) 2016-06-28 15:04:36 -07:00
Rolf Bjarne Kvinge 5b3fcd002f [monotouch-test] Fix ContactStoreTest for watchOS. (#306) 2016-06-28 15:00:53 -07:00
Sebastien Pouliot e3ac382fc7 [corevideo] Small update for iOS 10 beta 1 (#280)
* [corevideo] Small update for iOS 10 beta 1

and tests for 4CC to enums conversion
2016-06-28 16:25:24 -04:00
Rolf Bjarne Kvinge d3b8de52d6 [monotouch-test] Try to fix UrlSessionTest.CreateDataTaskAsync by uploading using POST. (#304)
Also use https instead of http to avoid a network roundtrip
(since http://www.xamarin.com just redirects to https).

This will hopefully fix this random test failure:

    [FAIL] UrlSessionTest.CreateDataTaskAsync : CreateUploadTask a
2016-06-28 13:33:59 -04:00
Rolf Bjarne Kvinge 67cf4c1ccd [monotouch-test] Update ModelIO tests to use Xcode versioning. 2016-06-28 16:34:10 +02:00
Rolf Bjarne Kvinge 1a1958f52d Merge remote-tracking branch 'origin/master' into xcode8 2016-06-28 12:44:08 +02:00
Alex Soto 2b51bf257b [NS(mutable)Dictionary] Fix bug 41343 - NSDictionary<TKey, TValue>.FromObjectsAndKeys keys and values are twisted up (#281)
https://bugzilla.xamarin.com/show_bug.cgi?id=41343

* NSDictionary<TKey, TValue>.FromObjectsAndKeys keys and values are twisted up
* Fixed it in XAMCORE_4_0
* Obsoleted the 2 existing methods
* introduced FromObjectsAndKeys (TValue [] objects, TKey [] keys, nint count)
* Added unit tests with different types for TKey and TValue
2016-06-27 20:38:14 -04:00
Rolf Bjarne Kvinge 7e78269b3c [monotouch-test] Fix a few ModelIO tests according to iOS 10 behavior. (#286) 2016-06-27 15:48:51 -04:00
Rolf Bjarne Kvinge e2c2dc1061 [monotouch-test] Move version-checking code to a shared file. 2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge d9610117a1 [monotouch-test] Ignore NSDataTest.Https on watchOS devices, the API doesn't work. 2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge 343502ef52 [monotouch-test] Disable RuntimeTest.FinalizationRaceCondition/ResurrectedObjectsDisposedTest on watchOS/device, they use too much memory for the device. 2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge d8b4fff4e3 [monotouch-test] Disable test that uses TcpClient on watchOS, since TcpClient doesn't work on watchOS. 2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge 8a4178b141 [monotouch-test] Fix registrar/trampoline tests according to watchOS ABI. 2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge 26b1c27b81 [monotouch-test] Disable NSUbiquitousKeyValueStore test, since it doesn't work on watchOS. 2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge df640e61cd [monotouch-test] Disable test that uses TcpListener, since TcpListener doesn't work on watchOS. 2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge e0e5824ce2 [monotouch-test] Set a timeout for UrlSessionTest so that the requests time out before the test itself. 2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge 43da4642f1 [monotouch-test] Implement a non-GUI version of TestRuntime.RunAsync that works on watchOS. 2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge b4bb30c13c [monotouch-test] Adjust tests according to watchOS behavior. 2016-06-27 13:07:37 +02:00
Rolf Bjarne Kvinge 0a8c6e3342 [tests] Check versions using Xcode version instead of platform version.
This is required to match API to the required platform version,
since our platforms have different version numbers.
2016-06-27 13:07:37 +02:00
Timothy Risi c94d0e7b70 Merge branch 'master' into xcode8 2016-06-23 10:45:09 -08:00
Vincent Dondain ca718991df [introspection] Fix bindings so the tests pass (#254)
- Added missing NSCopying, NSCoding and NSSecureCoding.
- Filled radar://26939747 with Apple - https://trello.com/c/6aIzLH4a
2016-06-22 17:32:00 -04:00
Sebastien Pouliot 004fe2f8d8 [tests][monotouch] More adjustments for iOS10 related failures/changes (#239)
* [tests][monotouch] More adjustments for iOS10 related failures/changes

- some might be Apple bugs and need to be reverted later

* Fix more failures on monotouch-tests wrt iOS 10

* MutableContactTest.cs: Wrong assert was changed (which is why each one
  needs it's own unique string)

* TrustTest.cs: Fixed as results vary on < iOS9, iOS9 and iOS10

* NetworkReachabilityTest.cs: Fixed as results vary on < iOS9, iOS9 and iOS10

Those

[FAIL] UserDefaultsTest.Ctor_UserName : System.NullReferenceException : Object reference not set to an instance of an object
[FAIL] UserDefaultsTest.SetString : StringForKey-2

are due to

http://stackoverflow.com/questions/37840288/ios-10-nsuserdefaults-does-not-work

and should disappear once the bots are rebooted.
2016-06-22 16:28:27 -04:00
Rolf Bjarne Kvinge c560fee268 [registrar] Managed characters are equivalent to shorts in native code. (#259)
Fixes NSCharacterSetTest.NSMutableCharacterSet_TestStaticSets when
running with the P/Invoke wrapper (for exceptions) enabled (i.e.
watchOS), since otherwise the wrapper would truncate char parameters
to byte.
2016-06-22 05:47:13 -07:00
Vincent Dondain aae5a73543 [messages] New framework in iOS 10.0 beta1 (#190) 2016-06-21 08:56:38 -04:00
Sebastien Pouliot 1659e121f0 Merge branch 'master' into xcode8 2016-06-20 20:48:14 -04:00
Sebastien Pouliot ebbc8addcc [tests] Some fix for monotouch-test needed wrt iOS 10 (#236)
* Adjust ever changing AddressFormatingTest for iOS 10, which does
  not output the country;

* Adjust Contact's ICNKeyDescriptor internal check;

* CLBeaconRegion.ProximityUuid does not return the original instance
  anymore, but a different one with the same uuid;

* Add a small delta for Vector3 comparison in ModelIO tests;

* Adjust MapKit tests for pin color change and MapRect corner case;

* SecKeyTest with corner cases now pass (they failed before);

* SecPolicyIdentifier.AppleIDValidation does not report the OID it's
  created from (migration?)

Note: some might be bugs that Apple will fix in later seeds
2016-06-19 09:32:01 -07:00
Rolf Bjarne Kvinge 1e62987a29 [CoreGraphics] Fix CGRect.Inflate to work correctly, and add tests. Fixes #41684. (#225)
https://bugzilla.xamarin.com/show_bug.cgi?id=41684
2016-06-17 10:45:58 -07:00
Manuel de la Pena f1e758c9e0 [Fix] Ensure NSExpression tests do run in the device ensuring that all members of the type are preserved.] 2016-06-17 11:19:07 +02:00
Rolf Bjarne Kvinge bdf7ca8429 [tests] Bump min deployment target to 6.0. (#208) 2016-06-15 19:12:48 -07:00
Alex Soto 69740e78ed [AudioUnit] Fix some breaking changes (#173)
commit 1f207bd3f3df363cb5a74e59b93acd8eb6e1fec2 in xamarin/maccore
introduced some breaking changes, this fixes them
2016-06-10 13:20:33 -04:00
Rolf Bjarne Kvinge bf806525f6 [monotouch-test] Simplify test case to make it compile on all platforms. (#163) 2016-06-09 20:03:18 +02:00
Rolf Bjarne Kvinge fac7270eb8 [registrar] Rewrite ctor's super call to invoke objc_msgSendSuper directly. Fixes #41319. (#159)
There's a clang bug [2] where if a selector is marked as unavailable,
it's marked as unavailable for every class, not just the class where
the unavailable selector is.

This means that we can't do `[super initWithCoder:x]` anywhere,
because `initWithCoder:` is marked as unavailable for UIActivityViewController.

So instead rewrite the call to super to call objc_msgSendSuper
directly, circumventing clang's broken availability checks.

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=41319
[2] https://llvm.org/bugs/show_bug.cgi?id=28058
2016-06-09 17:18:35 +02:00
Rolf Bjarne Kvinge 4a714f3c43 Make logic not depend on the checkout directory being named 'xamarin-macios'. (#129) 2016-06-06 12:18:52 +02:00