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

1296 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena 30bd2ad5b3 [mtouch] Fix NRE when we try to copy aot files. (#701) 2016-08-29 13:38:59 -04:00
Rolf Bjarne Kvinge 923ff95d0d [CoreAnimation] Remove [Protocol] from CAAnimationDelegate. Fixes #43825. (#698)
See cd96e255 for a detailed description, it's the same issue with
a different type.

https://bugzilla.xamarin.com/show_bug.cgi?id=43825
2016-08-29 11:14:42 -04:00
Sebastien Pouliot c358c2efe6 [metal] Fix API based on api-diff and xtro (#699)
It turns out `setDepthClipMode` was removed in Xcode 8, so this needs
some manual code to maintain binary compatibility

references:
!extra-protocol-member! unexpected selector MTLRenderCommandEncoder::setDepthClipMode: found
!unknown-native-enum! MTLPrimitiveTopologyClass bound
2016-08-29 11:04:42 -04:00
Manuel de la Pena d5bb9326ec [Metal] Update bindings for Xcode 8. (#663) 2016-08-29 08:21:06 -04:00
Sebastien Pouliot 65ea856d33 [corelocation] Fix CLHeading/CLLocation Description method API for exiting profiles (#693) 2016-08-29 08:18:43 -04:00
Rolf Bjarne Kvinge 5528ba069b Take target type into account when caching delegates for blocks. Fixes #34513. (#696)
Native code can provide the same native method for blocks
with different managed signatures, so it's not enough
to hash by method address, we need to take the target type
of the delegate into account as well.

https://bugzilla.xamarin.com/show_bug.cgi?id=34513
2016-08-29 08:18:27 -04:00
Rolf Bjarne Kvinge 80c88e9ce4 [linker] Add temporary workaround for bug #43658. (#697)
The real fix for bug #43658 is in mono master, but the current
version of mono master doesn't build for us, so implement this
workaround instead.

The problem is that the linker doesn't preserve fields of nested types marked
in xml descriptions unless the declaring type is marked. So the workaround
(until we can bump mono) is to mark the declaring type.

https://bugzilla.xamarin.com/show_bug.cgi?id=43658
2016-08-29 08:17:57 -04:00
Alex Soto 88912d0777 Merge pull request #692 from spouliot/tvos-scenekit
[tvos][scenekit] Fix binary compatibility with earlier versions (even if Apple removed some API)
2016-08-28 14:12:48 -05:00
Alex Soto 109e65cbaf Merge pull request #695 from spouliot/xtro-update-2
[tests][xtro] Update data files
2016-08-28 13:49:30 -05:00
Alex Soto b90c5d8a6d Merge pull request #694 from spouliot/tvos-mediaplayer
[tvos][mediaplayer] Enable MPContentItem on tvOS
2016-08-28 13:48:24 -05:00
Sebastien Pouliot b5638fce4d [tests][xtro] Update data files 2016-08-28 12:18:18 -04:00
Sebastien Pouliot 6b30fd2c9c [tvos][mediaplayer] Enable MPContentItem on tvOS
No news from Apple on the original rdar but the issue was fixed in Xcode
8 beta 6 (and likely earlier betas)

> MP_EXTERN_CLASS_AVAILABLE(3_0)
> @interface MPMediaItemArtwork : NSObject

which makes it possible to enable the type (as it does nor depend on
other, unavailable, types).

references:
* rdar://24982126
* https://trello.com/c/2gxuFbeS
2016-08-28 12:07:43 -04:00
Sebastien Pouliot c2e6794411 [tvos][scenekit] Fix binary compatibility with earlier versions (even if Apple removed some API) 2016-08-28 11:29:35 -04:00
Alex Soto 7b92e3c468 Merge pull request #691 from spouliot/tvos-gamekit-fix
[tvos][gamekit] GKPeerPickerConnectionType needs to stay in the current tvOS profile (for binary compatibility)
2016-08-27 12:54:10 -05:00
Sebastien Pouliot 42807bcc09 [metalperformanceshaders] Remove [DesignatedInitializer] from MPSMatrixMultiplication (#690)
It's the only one, so it's kind of designated, but it's not marked as
such in the header files and it's better matching them (xtro test wise)

reference:
!extra-designated-initializer! MPSMatrixMultiplication::initWithDevice:transposeLeft:transposeRight:resultRows:resultColumns:interiorColumns:alpha:beta: is incorrectly decorated with an [DesignatedInitializer] attribute
2016-08-27 12:52:59 -04:00
Sebastien Pouliot 59982c91cb [tvos][gamekit] GKPeerPickerConnectionType needs to stay in the current tvOS profile (for binary compatibility) 2016-08-27 12:51:41 -04:00
Alex Soto 99cf87be0d Merge pull request #688 from spouliot/safariservices-di-fix
[safariservices] Add missing [DesignatedInitializer] on SFSafariViewController
2016-08-27 00:55:52 -05:00
Sebastien Pouliot fbd407c9cb [safariservices] Add missing [DesignatedInitializer] on SFSafariViewController
reference:
!missing-designated-initializer! SFSafariViewController::initWithURL:entersReaderIfAvailable: is missing an [DesignatedInitializer] attribute
2016-08-26 20:55:12 -04:00
Sebastien Pouliot d85caeffde [tvos][avfoundation] Adjust API for tvOS (#687)
Some types were removed in tvOS 10, including:

!unknown-protocol! AVAssetDownloadDelegate bound
!unknown-type! AVAssetDownloadTask bound
!unknown-type! AVAssetDownloadURLSession bound
!unknown-type! AVAudioInputNode bound

and we're replacing them with stubs so our binaries won't contain any of
the selectors that could be rejected by Apple on the app store

Some (new) fields are also not part of tvOS (and were not in iOS either)

!unknown-field! AVVideoCodecAppleProRes422 bound
!unknown-field! AVVideoCodecAppleProRes4444 bound
!unknown-field! AVVideoColorPrimaries_EBU_3213 bound
!unknown-field! AVVideoTransferFunction_SMPTE_240M_1995 bound
!unknown-field! AVVideoYCbCrMatrix_SMPTE_240M_1995 bound

* [tests][xtro] Many categories are not marked as not available on tvOS, even if the type being extended is not available. This adds entries for them so only missing AV* API remains in tvos.unclassified
2016-08-26 20:40:01 -04:00
Chris Hamons 9fdd40d114 [XM] Missing NSUserNotification bindings (#686)
- https://bugzilla.xamarin.com/show_bug.cgi?id=38118
2016-08-26 15:38:22 -05:00
Rolf Bjarne Kvinge db04e2435b Take target type into account when caching delegates for blocks. Fixes #34513. (#685)
Native code can provide the same native method for blocks
with different managed signatures, so it's not enough
to hash by method address, we need to take the target type
of the delegate into account as well.

https://bugzilla.xamarin.com/show_bug.cgi?id=34513
2016-08-26 15:55:37 -04:00
Chris Hamons ab7477a0d0 [XM] Add NSOpenGLLayer binding (#684)
- https://bugzilla.xamarin.com/show_bug.cgi?id=43542
- Quick hand test here - https://gist.github.com/chamons/05f94781ec910869343f114fe7b4edbe
2016-08-26 14:40:52 -04:00
Chris Hamons 3bdb0e37a6 [XM] More xtro-sharpie fixes (#682) 2016-08-26 12:32:45 -05:00
Rolf Bjarne Kvinge 36ea73ca65 Share the same block descriptors between copies of a block. Fixes #43592. (#683)
In bug #43592 the following occurs:

* App calls an API that takes a block.
* We create a stack-based ObjC block based on the delegate the app provided.
  This block has a pointer to a block description, describing the block
  in question (including the signature of the block, as an ObjC-type
  encoded string). We allocate a new block description for every block.
* Apple's API stores the pointer to the signature string somewhere.
* Apple calls _Block_copy to get a heap-based block.
* We create a heap-based block, and copy the entire description into the
  new heap-based block (including a copy of the signature).
* Apple returns from the API, and then we free the stack-based block
  (and the descriptor, and thus the signature string in the descriptor).
* Apple uses the pointer to the signature stored previously to investigate
  the signature of the block, and crashes because this signature has been
  freed.

The assumption in Apple's code is that the description will never be freed,
which is true for any Xcode project (clang will always be able to create the
block description at compile-time and emit it in the binary, which means the
memory will never be freed). We could potentially do the same thing in the
static registrar, but we'd still need a solution when using the dynamic
registrar.

To fix this instead of copying the entire description structure when creating
a heap-based block from the stack-based block, we make the description ref-
counted, and just use the same description in the heap-based block.

The signature will now stay in memory until both the heap-based and stack-
based blocks have been freed, and we hope Apple doesn't have any API that
needs the signature after all the blocks for that signature have been freed.

https://bugzilla.xamarin.com/show_bug.cgi?id=43592
2016-08-26 19:22:38 +02:00
Chris Hamons bc9c25de72 [XM] Add missing SafariServices binding (#681) 2016-08-26 10:30:45 -05:00
Rolf Bjarne Kvinge a617bee08f [xharness] Crashing is not OK. (#680) 2016-08-26 09:12:44 -04:00
Sebastien Pouliot 6d5beb61cb Merge branch 'cycle8' into xcode8 2016-08-26 08:19:33 -04:00
Sebastien Pouliot 2bcd40054f [linker] Ensure we do not devirtualize methods that needs to be called from a base class to satisfy an interface. Fixes #34308 (#675)
Update unit tests to catch this case and be more precise in others.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43408
2016-08-26 08:17:01 -04:00
Rolf Bjarne Kvinge a3a8733d30 Bump [watch-]mono to get fixes for #43357 and #43216. (#679) 2016-08-26 12:55:37 +02:00
Rolf Bjarne Kvinge ad9c4c3231 Bump maccore to get mlaunch compatible with Xcode 8 beta 6. (#678) 2016-08-26 12:55:17 +02:00
Rolf Bjarne Kvinge cd96e255e4 [CoreAnimation] Re-mark CALayerDelegate as informal to fix #43585. (#677)
CALayerDelegate was an informal protocol in earlier versions
of iOS, but elevated to protocol in iOS 10 [1]. Unfortunately this causes
problems with the static registrar, since it needs to know if a protocol
is informal or not to generate the right code, but there's no way
with the current set of attributes we have to express the fact that
CALayerDelegate was an informal protocol until iOS 10, so the static
registrar don't know to treat it correctly when building with earlier
SDKs.

This is the error that results when using CALayerDelegate with an earlier SDK:

    /work/monotouch-samples/ZoomingPdfViewer/obj/iPhone/Debug/mtouch-cache/registrar.m:1336:51: error: no type or protocol named 'CALayerDelegate'
    @interface ZoomingPdfViewer_TiledPdfView : UIView<CALayerDelegate> {
                                                      ^
So we temporarily revert the change to make CALayerDelegate formal,
until we have enough metadata for the static registrar to do the
right thing (which is filed as bug #43780 [2])

[1] https://github.com/xamarin/xamarin-macios/commit/0178aa04
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=43780

https://bugzilla.xamarin.com/show_bug.cgi?id=43585
2016-08-26 11:38:05 +02:00
Rolf Bjarne Kvinge 2d5df9f11b Bump [watch-]mono to get fixes for #43357 and #43216. (#676) 2016-08-26 10:34:34 +02:00
Sebastien Pouliot 0bea77b781 [linker] Ensure we do not devirtualize methods that needs to be called from a base class to satisfy an interface. Fixes #34308 (#675)
Update unit tests to catch this case and be more precise in others.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43408
2016-08-26 09:24:51 +02:00
Jeffrey Stedfast 73a1d74cab Cycle8 codesign simulator (#674)
* [msbuild] Always codesign iOS frameworks (#642)

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

* [msbuild] Always codesign *.dylibs, even for Simulator builds (#672)

Another fix for https://bugzilla.xamarin.com/show_bug.cgi?id=43264
2016-08-25 18:22:20 -04:00
Jeffrey Stedfast f42e9ee935 [msbuild] Explicitly check that IsMacEnabled == true (#673) 2016-08-25 16:46:34 -04:00
Jeffrey Stedfast 3fbfcf7b22 [msbuild] Always codesign *.dylibs, even for Simulator builds (#672)
Another fix for https://bugzilla.xamarin.com/show_bug.cgi?id=43264
2016-08-25 16:40:31 -04:00
Sebastien Pouliot 144d96999b Merge branch 'cycle8' into xcode8 2016-08-25 14:08:23 -04:00
Chris Hamons 1c6e1959b7 [XM] Add support for disabling lldb attach on crash (#670)
- https://bugzilla.xamarin.com/show_bug.cgi?id=23482
2016-08-25 13:06:38 -05:00
Chris Hamons 3ad2491006 Fixup C8 static registrar to work w\ Xcode 8 (#647)
* Fix static registrar on 10.12 by teaching it that QTKit is dead (#472)
* Rip out all 64-bit registration in 32-bit XM.
2016-08-25 14:03:43 -04:00
Sebastien Pouliot df32a6663b [watchos] Ena[scenekit]ble the last missing API from SceneKit now that AVFoundation is enabled in watchOS (#668) 2016-08-25 14:02:20 -04:00
Chris Hamons 82882b70f7 [XM] Add CoreLocation APIs that exist on macOS (#671)
- https://bugzilla.xamarin.com/show_bug.cgi?id=43593
2016-08-25 13:46:55 -04:00
Jeffrey Stedfast 11c4f6bdd9 [msbuild] Always codesign iOS frameworks (#642)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43264
2016-08-25 13:08:03 -04:00
Sebastien Pouliot 0656de444b [watchos][spritekit] Enable the last missing API from SpriteKit now that AVFoundation is enabled in watchOS (#669) 2016-08-25 13:02:26 -04:00
Jeffrey Stedfast 791423f4f1 [msbuild] Add the Insights API Key to the iOS archive manifest (#656)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43489
2016-08-25 11:45:55 -04:00
Sebastien Pouliot afd50b2bef [watchos][avfoundation] Enable AVFoundation in watchOS (#659) 2016-08-25 11:39:48 -04:00
Rolf Bjarne Kvinge 1d4019e966 [xharness] Don't run into an infinite loop if failing to run sqlite3. (#666) 2016-08-25 11:08:40 -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
Sebastien Pouliot c50002ce7e Merge branch 'cycle8' into xcode8 2016-08-25 09:27:13 -04:00
Rolf Bjarne Kvinge e291f1717d Revert "Bump [watch-]mono to master to get fix for #43658." (#665) 2016-08-25 14:44:53 +02:00
Rolf Bjarne Kvinge 451781a98f [xharness] Don't run classic tests on wrench. (#661) 2016-08-25 13:11:51 +02:00