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

960 Коммитов

Автор SHA1 Сообщение Дата
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
Miguel de Icaza 35462f0bf7 [ios11-beta1] Initial UIKit Drag and Drop support (#2190)
* [ios11-beta1] Initial UIKit Drag and Drop support

* Updated with Feedback from Rolf

Dropped the [Model] from protocols that do not need it, as well as the [BaseType] attribute.

Inlined the constructor for NSItemProviderReading in UIColor, NSAttributedString and UIImage as
we do not have support for making interfaces require a constructor and filed a bug with the
remaining work that would have to be done to support something like this:

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

* Updated with Feedback from Tim Risi, inlined in the implementing classes the static NSItemProviderReading class method, and tracking the documentation requirements here: https://bugzilla.xamarin.com/show_bug.cgi?id=57735

* NSItemProviderReading inlined methods get availability attributes

* UIDropInteraction only has a getter Delegate method

* UIDropInteraction - without the delegate setter, we can not provide events/properties - hope Apple fixes

* Ignore what the header files say, the NSItemProviderReading methods are not actually implemented on TV or Watch

* Add 'Editability' as an acceptable word

* Address Alex Soto's feedback

* Rename some methods, fix types

* Add Emacs backup files to .gitignore
2017-07-10 18:01:46 +02:00
Vincent Dondain 9866d3aa81 [homekit] Update for Xcode 9 beta 1 & 2 (#2276) 2017-07-05 11:05:28 -04:00
Rolf Bjarne Kvinge 433a77f441 [xharness] Don't show verbose diagnostics when killing the device log capture process. (#2282)
Killing this process is normal, so no diagnostics is needed (it only ends up
confusing because it looks like something crashed or timed out).
2017-07-03 07:14:00 +02:00
Alex Soto f34b61da2b [CoreML] Add Xcode 9 Beta 1 bindings (#2275)
* [CoreML] Add Xcode 9 Beta 1 bindings

* Do not C# 7 here... :'(

* No C# 7 here either :'(

* Apply feedback

* [CoreML] Fix feedback and xtro

* [CoreML] Add more feedback

* Fix build.... What the heck was I thinking, always rebuild your stuff...
2017-06-30 17:35:30 -05:00
Alex Soto 07de341c46 Complete support for [BindAs] (#2220)
* [registrar] BindAs uses Nullable types so allow them to be registered as NSObjects

BindAsAttribute allows to bind NSValue and NSNumber into more
accurate C# types lyke bool?, int? etc. so we must teach registrar
about this.

* [tests][introspection] Teach intro about BindAs and Nullable types

Introspection will currently fail if BindAs is used, introspection
will report that the incorrect type is registered so we need to skip
this check if Nullable type is found in the signature

* [introspection] Add better type checking instead of totally skipping the type when Nullable type is encountered

Introspection will currently fail if BindAs is used. Introspection
will report that the incorrect type is registered so we need verify
if a Nullable type is found in the signature and check against of
a withelist of BindAs supported types

* Revert "[registrar] BindAs uses Nullable types so allow them to be registered as NSObjects"

This reverts commit 911eab97b7.

* [tests] Add comment about where to find BindAs types
2017-06-30 16:10:08 -05:00
Alex Soto 56af0689da [IdentityLookup] Adds Xcode 9 Beta 1 bindings 2017-06-29 21:21:53 -05:00
Alex Soto 05edc5e2be [EventKitUI] Update to Xcode 9 Beta 1 2017-06-29 09:52:37 -05:00
Alex Soto c4d6dd985d [EventKit] Update to Xcode 9 Beta 1 2017-06-29 09:51:45 -05:00
Alex Soto cb3446464b [DeviceCheck] Add Xcode 9 Beta 1 bindings 2017-06-28 23:03:18 -05:00
Timothy Risi 86d45b0787 [FinderSync, MediaLibrary] Update to xcode 9 betas 1 and 2 (#2219)
* Add 2 unbound frameworks to the xtro mac exclusions
2017-06-28 11:38:05 -08:00
Alex Soto c72ed516d0 [CoreNFC] Update to Xcode 9 Beta 2 (#2251) 2017-06-27 21:19:28 -04:00
Rolf Bjarne Kvinge 34e1d89963 [xharness] Kill any ibtoold processes when killing everything. (#2249) 2017-06-27 21:19:54 +02:00
Vincent Dondain e78a7a3291 [intro] Add availability messages checks to ApiTypoTest (#2240)
- ApiTypoTest now enforces the rules defined here: https://github.com/xamarin/xamarin-macios/wiki/BINDINGS#availability-attributes-messages.
- Update all availability messages to follow new ApiTypoTest rules.
- Fix `IsObsolete` to handle ObsoletedAttribute.
- Don't apply rule 1 on Obsolete attribute.
- Allow to skip rule 4.
- Prevent use of OSX, OS X.
2017-06-26 18:17:06 -04:00
Rolf Bjarne Kvinge 8a156eaf82 [tests] Fix missing information in test reporting on Jenkins. Fixes #51661. (#2246)
Improve test reporting using xml by adding custom information printed during
the test run into the xml, and then extract this information when reporting
test results in xharness (which is much easier than re-constructing the
information from the xml, which caused information to get lost since not
everything piece of interesting is in the xml).

https://bugzilla.xamarin.com/show_bug.cgi?id=51661
2017-06-26 17:34:32 +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
Vincent Dondain ad906427ea [arkit] Update for iOS 11 beta 1 (new framework) (#2187)
- Fixed the generator to avoid `ARKit/ARSCNViewDelegate.g.cs(189,43): error CS0432: Alias 'Iglobal' not found`.
- ARPointCloud can be tested with this [sample](https://github.com/VincentDondain/ios-testcases/tree/master/ARPointCloudTest).
  It requires deploying on devices and moving the camera around so ARKit can return some points. After 5 seconds it should print the points.
- Fixed intro tests.
- Fixed `bindings-generator.cs` for new simd types.
2017-06-22 19:02:17 -05:00
Chris Hamons 2515e9ba73 [macos] Introspection test fixes for 10.13 (#2234) 2017-06-22 12:43:43 -05: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 6c914b1413 Framework tests were still binding non-linked Simple class which errors now (#2216) (#2236)
- Improve Makefile to rebuild when projects build with errors
2017-06-21 16:41:33 +02:00
Rolf Bjarne Kvinge c1348da5f6 [tests][mtouch] Adjust tests to cope with Xcode 9. Fixes #57601. (#2231)
Fixes:

1. Failed : Xamarin.MTouch.MT0091(tvOS,"tvOS")
    The error 'MT0091: This version of Xamarin.iOS requires the tvOS 11.0 SDK (shipped with Xcode 9.0). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs).' was not found in the output:
    Message #1 did not match:
        actual:   'This version of Xamarin.iOS requires the tvOS 11.0 SDK (shipped with Xcode 9). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs).'
        expected: 'This version of Xamarin.iOS requires the tvOS 11.0 SDK (shipped with Xcode 9.0). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs).'

2. Failed : Xamarin.MTouch.MT0091(iOS,"iOS")
    The error 'MT0091: This version of Xamarin.iOS requires the iOS 11.0 SDK (shipped with Xcode 9.0). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs).' was not found in the output:
    Message #1 did not match:
        actual:   'This version of Xamarin.iOS requires the iOS 11.0 SDK (shipped with Xcode 9). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs).'
        expected: 'This version of Xamarin.iOS requires the iOS 11.0 SDK (shipped with Xcode 9.0). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs).'

3. Failed : Xamarin.Registrar.NoWarnings
    no warnings
    Expected: not String matching "warning:"
    But was:  "/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/mtouch/bin/Debug/tmp-test-dir/Xamarin.MTouchTool.CreateTemporaryDirectory298/mtouch-test-cache/registrar.m:32468:17: warning: method 'paymentAuthorizationViewController:didAuthorizePayment:handler:' in protocol 'PKPaymentAuthorizationViewControllerDelegate' not implemented [-Wprotocol]"

https://bugzilla.xamarin.com/show_bug.cgi?id=57601
2017-06-21 12:07:13 +02:00
Alex Soto 3c5221b214 [generator] Add enum support for [FieldAttribute], Fixes 57537 and 57535. (#2230)
* [ObjCRuntime] Add GetUInt32/SetUInt32/SetNInt/SetNUInt/SetNFloat to Dlfcn

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

This commit is part of the fix for the above bugs, we lacked
GetUInt32/SetUInt32/SetNInt/SetNUInt/SetNFloat in Dlfcn and we
have code inside generator that relies on the methods to be
available 0a316951a3/src/generator.cs (L6090-L6095)

* [generator] Add enum and uint support to FieldAttribute

Fixes:
* https://bugzilla.xamarin.com/show_bug.cgi?id=57535
* https://bugzilla.xamarin.com/show_bug.cgi?id=57537

New Features:
* Added Smart Enum support to [Field]
* Added [Native] enum support to [Field]
* Added enum support to [Field]
* Added uint support to [Field]

Also fixed a bug in Smart Enums support when computing the library name
taking into account third party bindings and some special cases, this is
needed because we ended up generating invalid code when Smart Enum support
was used in third party bindings.

Also added Field Enum generation test.

* Implement PR feedback and added [Get/Set]UInt64 to Dlfcn and [Field] support for it too.
2017-06-20 13:46:00 -05:00
Alex Soto 72332b4ae6 [CoreNFC] Add CoreNFC Xcode 9 Beta 1 Bindings (#2226)
* [CoreNFC] Add CoreNFC Xcode 9 Beta 1 Bindings

CoreNFC is not exposed in iOS simulator, no framework/headers are found
makes sense since there is no NFC chip on it.

CoreNFC says it is available on tvOS but headers says just 3 enums
are so not enabling tvOS in this first beta.

* [mtouch] CoreNFC not available on sim, this makes mtouch aware of it
2017-06-19 13:56:00 -05:00
Rolf Bjarne Kvinge 58fe12880b [mmptest] Don't hardcode the SDK version. Fixes test failure with macOS 10.13. (#2227) 2017-06-19 17:17:13 +02:00
Alex Soto b55ff34387 [Accounts] Update to Xcode 9 Beta 1 (#2205)
* [Accounts] Uodate to Xcode 9 Beta 1

Also added ACAccountStore.RemoveAccount, xtro caught this API
common.unclassified:!missing-selector! ACAccountStore::removeAccount:withCompletionHandler: not bound

* [Accounts] Adds a dot at the end of the sentance.
2017-06-13 18:03:36 -05:00
Rolf Bjarne Kvinge 57ca12f402 [xharness] Run sim32 tests using the 10.3 simulator. (#2203) 2017-06-10 18:44:14 -07: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 8344caf54a [xharness] Disable sim32 tests on wrench for now. (#2202) 2017-06-10 18:42:42 -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
Alex Soto bfaf62623e [Test][Intro] Fix introspection test on API changes for Xcode 9 Beta 1 (#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
2017-06-10 00:07:11 -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
Rolf Bjarne Kvinge 7c755d715b [link sdk] Fix Sqlite3 test according to updated simulators. (#2194)
The simulators now have an updated libsqlite3.dylib, so this test needs to be
updated accordingly.

This fixes a link sdk test failure:

    [FAIL] DllImportTest.Sqlite3 : sqlite3_key
2017-06-09 14:49:18 -07:00
Rolf Bjarne Kvinge fa3956cba0 [tests] Fix issues when launching watchOS apps in the simulator. (#2192)
This requires a new mlaunch as well.
2017-06-09 07:24:01 -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 40e38a1707 [xharness] Fix iterating over no simulators. (#2183)
Fixes an issue where xharness would try to run tests on a 32-bit simulator,
which does not exist on iOS 11.ñ
2017-06-07 13:49:00 -07:00
Alex Soto f433b83d0f [xtro][Tests] Fix xtro for macOS by ignoring InputMethodKit (#2180)
InputMethodKit in Xcode 9 Beta 1 ships with a broken module
so we ignore it for now, this allows xtro to work
2017-06-07 09:10:53 -05:00
Rolf Bjarne Kvinge b09c0ef45c Bump maccore to get new mlaunch. (#2179) 2017-06-07 06:47:51 -07:00
Rolf Bjarne Kvinge bc75388fbc [generator] Improve error reporting for api definition that uses the deprecated availability attributes. Fixes #57070. (#2166)
https://bugzilla.xamarin.com/show_bug.cgi?id=57070
2017-06-02 18:31:10 +02:00
Rolf Bjarne Kvinge d17cb6556a [mtouch] Improve how we make sure native symbols aren't stripped away. Fixes #51710 and #54417. (#2162)
* [mtouch] Improve how we make sure native symbols aren't stripped away. Fixes #51710 and #54417.

* Refactor required symbol collection to store more information about each
  symbol (field, function, Objective-C class), and in general make the code
  more straight forward.
* Implement support for generating source code that references these symbols,
  and do this whenever we can't ask the native linker to keep these symbols
  (when using bitcode). Additionally make it possible to do this manually, so
  that the source code can be generated for non-bitcode platforms too (which
  is useful if the number of symbols is enormous, in which case we might
  surpass the maximum command-line length).
* Also make it possible to completely ignore native symbols, or ignore them on
  a per-symbol basis. This provides a fallback for users if we get something
  right and we try to preserve something that shouldn't be preserved (for
  instance if it doesn't exist), and the user ends up with unfixable linker
  errors.
* Don't collect Objective-C classes unless they're in an assembly with
  LinkWith attributes. We don't need to preserve Objective-C classes in any
  other circumstances.
* Implement everything for both Xamarin.iOS and Xamarin.Mac, and share the
  code between them.
* Remove previous workaround for bug #51710, since it's no longer needed.
* Add tests.

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

* [mtouch] Make sure to only keep symbols from the current app when code sharing.

This fixes a build problem with the interdependent-binding-projects test when
testing in Today Extension mode.
2017-06-02 18:29:19 +02:00
Rolf Bjarne Kvinge 1fb67779f8 [registrar] Detect more invalid characters in selectors so that we can report better errors. Fixes #55568. (#2154)
* [registrar] Detect more invalid characters in selectors so that we can report better errors. Fixes #55568.

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

* [mtouch] Add a few comments about duplicated data between mtouch and tests.
2017-06-02 16:37:26 +02:00
Rolf Bjarne Kvinge 1189a5b94c [mtouch] Set the force flag again when the cache is invalid. Fixes #54973. (#2163)
In 11390f119c we stopped setting the force flag
when the cache was invalid, because we'd delete the cache anyway, and it was
determined that deleting the cache was enough.

Unfortunately it's not, because some output is not in the cache, and might not
get correctly updated.

Scenario:

* User builds app.
* User changes some build option (for instance switching off incremental
  builds).
* User does an insignificant change in a source file for the executable
  process.
* User builds app again (without cleaning). This will rebuild the exe, but
  since the change was insignificant, all the IL, except the MVID, would
  remain identical.
* mtouch would see that the command-line options changed, and invalidate the
  cache. This would delete the cache, and everything would be rebuilt,
  including AOT-compiling the assemblies again.
* When the time came for mtouch to copy assemblies to the app directory,
  mtouch would realize that the existing .exe in the app (which was not
  deleted because it's not in the cache, but the actual output directory) was
  only insignificantly different (only the MVID was different, which our cache
  logic knows to ignore when comparing assemblies), so it wouldn't copy the
  .exe to the .app.
* At runtime we'd assert, because the MVID in the aot-compiled code was
  different from the MVID in the assembly:

      error: Failed to load AOT module '(null)' while running in aot-only mode: doesn't match assembly.

* The exact assert varies depending on which build option changed. Other
  variations:

      Failed to load AOT module '(null)' while running in aot-only mode: compiled against GC (4, while the current runtime uses GC sgen)

      * Assertion at /Users/builder/data/lanes/4691/0719ced1/source/xamarin-macios/external/mono/mono/metadata/metadata.c:1118, condition `idx < t->rows' not met

Because of this I'm reverting 11390f119c, and
once again setting the force flag when the cache is invalid. It might be
overkill, but it's the safest option (cache invalidation is after all the only
hard problem in computer science), and bugs are very annoying and
timeconsuming to track down.

https://bugzilla.xamarin.com/show_bug.cgi?id=54973
2017-06-02 15:23:30 +02:00
Rolf Bjarne Kvinge f6599c4437 [tests] Reuse some code between mtouch rebuild tests and improve the output. (#2157)
* [tests] Print mtouch output if verbose output was requested, even if mtouch succeeded.

* [tests] Reuse some code between mtouch rebuild tests.
2017-06-01 17:28:56 +02:00
Rolf Bjarne Kvinge 31df2f4316 [mtouch] Handle non-ascii characters when converting assembly to bitcode assembly. Fixes #56876. (#2141)
When converting strings to a sequence of bytes, we can't just cast chars to
ints, and write that, because non-ascii characters will resulting values
outside the byte range.

Instead explicitly convert the string to a UTF8 byte array, and process that.

https://bugzilla.xamarin.com/show_bug.cgi?id=56876
2017-06-01 17:24:39 +02:00
Rolf Bjarne Kvinge 25e6a93976 [tests] Simplify the MT4164 test a bit. (#2151)
* [tests] Add support to mtouch tests for comparing file name & line number of error/warning messages.

* [tests] Simplify the MT4164 test a bit.
2017-06-01 01:10:36 +02:00