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

1333 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot a2b103c317 Bump Xcode for GM, version to 10.0.x and maccore for monotouch.dll packaging (#799) 2016-09-07 17:11:05 -04:00
Rolf Bjarne Kvinge b54a6ed3e6 [mtouch] Fix compiler warning (unused variable). (#789) 2016-09-07 21:28:13 +02:00
Sebastien Pouliot 4b90fce057 [tvos] Add missing attributes to get introspection to works on tvOS 9.0, 9.1, 9.2 and 10.0 (#798) 2016-09-07 15:18:20 -04:00
Alex Soto febbc22073 [Photos] Add Abstract attributes to a couple of classes (#797)
This adds Abstract to some classes for XAMCORE_4_0
and tvOS added in 10.0
2016-09-07 14:42:35 -04:00
Rolf Bjarne Kvinge d8f1449ac7 [introspection] Fix API for introspection test for older watchOS versions. (#794)
* [introspection] Implement system version check for watchOS.

Fixes a P/Invoke test that should be skipped when running on
older OS versions.

* [tests] Add availability attributes to fix running introspection tests on older watchOS devices.
2016-09-07 13:45:36 -04:00
Vincent Dondain 5ddee0dcbf [msbuild] Update classic build error (#791)
We now want the build error to always show up.
monotouch.dll will be shipped with XI 10 to allow migration (dependent on the dll being available).
Therefore the check wasn't valid anymore because it was only applying the error if monotouch.dll wasn't there.
This was done to avoid breaking our internal tests but we should actually be fine, if not we'll update the tests.
2016-09-07 12:50:22 -04:00
Vincent Dondain df7b2a5165 [msbuild] Add missing iOS+tvOS 10 Extension points (#786) 2016-09-07 17:42:14 +02:00
Jeffrey Stedfast d079b8afcb [msbuild] Parse the mmp ExtraArgs to get the custom mono bundle dir name (#790)
The mmp utility allows users to pass -custom_bundle_name to specify
a custom directory name to use instead of MonoBundle, so we need to
parse the extra args to extract this value so that we can scan that
directory for dylibs to codesign.
2016-09-07 11:30:29 -04:00
Rolf Bjarne Kvinge 7a34f5e9bf [mtouch] Fix incremental builds when generating P/Invoke wrappers. Fixes #44048. (#788)
We need to compile the generated P/Invoke wrappers to a dylib, and link the
dylib for the product assembly (Xamarin.WatchOS.dll) with the generated
P/Invoke wrappers.

Since there might be P/Invokes in any assembly, just link in the P/Invoke
wrapper dylib for every assembly.

https://bugzilla.xamarin.com/show_bug.cgi?id=44048
2016-09-07 17:22:34 +02:00
Alex Soto 424fe9ae1e [UIKit] Remove 3 protocol members until bug 43579 is fixed (#783)
https://bugzilla.xamarin.com/show_bug.cgi?id=43579

We are removing the following 3 protocol members
- UITextFieldDelegate.EditingEnded2 (UITextField textField, UITextFieldDidEndEditingReason reason)
- UITextViewDelegate.ShouldInteractWithUrl2 (UITextView textView, NSUrl url, NSRange characterRange, UITextItemInteraction interaction)
- UITextViewDelegate.ShouldInteractWithTextAttachment2 (UITextView textView, NSTextAttachment textAttachment, NSRange characterRange, UITextItemInteraction interaction)

Reasons:
- We need to fix bug https://bugzilla.xamarin.com/show_bug.cgi?id=43579
- Bad naming, we do not want 2 suffix

Hopefully we can have this ready for C8SR0 or C8SR1
2016-09-07 10:08:43 -04:00
Jeffrey Stedfast 4d4decdad1 [msbuild] Fixed the mmp task to make sure the MonoBundle dir exists before enumerating its files (#787) 2016-09-07 09:15:40 -04:00
Rolf Bjarne Kvinge b6e7eb0d61 [HomeKit] Put availability attribute for tvOS on the type, never the member. (#785)
HomeKit was added to tvOS in tvOS 10, which means every type was
introduced in tvOS 10, which means we only need availability attributes
on the types, never the individual members.
2016-09-07 08:44:17 -04:00
Rolf Bjarne Kvinge f49a0cdb9d [UserNotifications] Rename method to have a verb. (#784)
`Trigger` can be both a verb and a noun, but according to Apple's
documentation it's a noun in these cases (the method 'Creates and returns a
trigger'), so add the verb `Create` to make the meaning clear (and follow API
guidelines that say methods should have a verb).
2016-09-07 08:22:51 -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 ada20a538e [cloudkit] Some fixes after auditing (#762)
* [cloudkit] Some fixes after auditing

* Fix and simplify CKUserIdentityLookupInfo creation from email / phone#
	* Call InitializeHandle to "handle" null handles (and throw instead of
	  crashing)
	* Reduce internal metadata (and code) to create them

* CKNotificationType: Remove extra [Watch (3,0)] on member (all new in 3.0)

* CKSubscriptionType: Fix inconsistency in wrt watchOS (type not available)

* CKRecord: Remove `Record` prefix from new fields (consistency)

* Fix build
2016-09-07 00:57:25 -05:00
Sebastien Pouliot 5019115ad6 [foundation] Fix generic constraint for NSMeasurement (#781)
The generator does not currently offer flexibility for constraints.

That's made harder since binding files uses attributes, [BaseType], to
define the type hierarchy.

Here we cheat as we can add, non-decorated, interfaces in the bindings
that won't generate anything - they are only to please the compiler or,
in this case, it let us fool the generator into producing the code we
need (because it does not consider the namespace)

Based on Alex elegant attempt to fix this in:
https://github.com/xamarin/xamarin-macios/pull/780

Generated code diff:
https://gist.github.com/spouliot/eeef3491a6e08d9344a19e9bbc632848
2016-09-06 20:13:31 -05:00
Vincent Dondain e4093d5908 [msbuild] ACTool update for iMessage Extension (#778) 2016-09-07 00:59:45 +02:00
Sebastien Pouliot 0cc8b176e8 Merge branch 'cycle8' into xcode8 2016-09-06 18:46:23 -04:00
Sebastien Pouliot a06a372923 Bump mono to include fixes for bug #41961 and 41956 (#779)
references:
* https://bugzilla.xamarin.com/show_bug.cgi?id=41961
* https://bugzilla.xamarin.com/show_bug.cgi?id=41956

mono points to mono-4.6.0-branch
watch-mono points to mono-4.6.0-branch-watchos-debugging
2016-09-06 18:39:40 -04:00
Sebastien Pouliot 1db2f0167b Bump [watch]-mono (#775) 2016-09-06 17:37:32 -04:00
Rolf Bjarne Kvinge 4c5325f03b [PhotosUI] PHContentEditingController as a model is useless. (#774) 2016-09-06 16:57:51 -04:00
Rolf Bjarne Kvinge 853a690d02 [PhotosUI] PHContentEditingController as a model is useless. (#774) 2016-09-06 16:56:48 -04:00
Sebastien Pouliot 00fb925b7f [avfoundation] Audit related fixes (#776)
* Fix AVMetadataISOUserDataKeyDate constant name -> `Iso`

* Remove unneeded comments (from sharpie)

* Remove duplicated (same as type) availability attributes added on
  the previous commit (missing API)
2016-09-06 16:55:43 -04:00
Rolf Bjarne Kvinge cfb84f6e17 [runtime] Use printf on watchOS, NSLog doesn't shown up (by default) (#772)
* [runtime] Use printf on watchOS, NSLog doesn't shown up (by default).

* [runtime] Use a wrapper function for logging.

So that we can chose between printf and NSLog at runtime,
depending on where we're running.
2016-09-06 16:55:23 -04:00
Sebastien Pouliot 09386206d6 Revert "Bump F# to 4.0.1.5" (#777)
Wrench can't build it - might be related to different mono version being used on different bots (wrench/felix use mono 4.4 stable)
2016-09-06 15:53:24 -04:00
Alex Soto 494ef376a0 Merge pull request #773 from rolfbjarne/xcode8-usernotifications-review
[UserNotifications] Improve a method name a bit by removing a 'With*' suffix
2016-09-06 14:50:22 -05:00
Rolf Bjarne Kvinge d0d30a378f [VideoSubscriberAccount] Simplify method name to a name that matches the Swift name. (#771) 2016-09-06 15:34:02 -04:00
Sebastien Pouliot 645acd8f57 Bump F# to 4.0.1.5 (#419) 2016-09-06 14:57:28 -04:00
Vincent Dondain 562b9564f1 [msbuild] Show proper build error when monotouch.dll doesn't exist (#750)
Due to the deprecation of classic we needed to provide a better and single error message
rather than the countless msbuild errors you'd have because you'd be missing monotouch.dll

* Migrate MySingleView & MyLibrary to Unified
2016-09-06 14:50:54 -04:00
Alex Soto 861bfe4f9e Merge pull request #770 from spouliot/macos-intro-fix
[macos] Fix introspection tests (typo + NSUrlSession* test sharing)
2016-09-06 13:28:40 -05:00
Sebastien Pouliot 596dd0a3f3 [macos] Fix introspection tests (typo + NSUrlSession* test sharing) 2016-09-06 13:32:51 -04:00
Manuel de la Pena 546a2fd907 [mtouch] Fix case of the final target directory. 2016-09-06 18:19:27 +02:00
Manuel de la Pena 0fb03df1b9 [AVFoundation] Get AVPlayerViewController back to TV 9 2016-09-06 18:06:43 +02:00
Rolf Bjarne Kvinge 7826524c87 Bump mono to get fixes for #41961 and #41956. (#767)
* Bump mono to get fixes for #41961 and #41956.

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

* Bump mono to get fix for failing LinkSdk test.
2016-09-06 11:17:00 -04:00
Alex Soto 35adef2796 Merge pull request #769 from spouliot/photos-todo-update
[photos] Update TODOs wrt lack of PHLivePhotoShouldRenderAtPlaybackTime in the SDK
2016-09-06 09:55:09 -05:00
Sebastien Pouliot 3054daf39b [photos] Update TODOs wrt lack of PHLivePhotoShouldRenderAtPlaybackTime in the SDK 2016-09-06 09:58:36 -04:00
Manuel de la Pena ddae0a4fce [AVFoundation] Add missing AVCapturePhotoOutput settings methods on iOS 10. (#766) 2016-09-06 08:02:44 -04:00
Rolf Bjarne Kvinge 4298ebfdfb Merge pull request #764 from rolfbjarne/cycle8-watchos-debugging-on-device
Add support for debugging over http. Fixes #41554.
2016-09-05 17:28:29 +02:00
Manuel de la Pena 50b81e2f21 [AVFoundation] Add TV OS missing apis. (#760)
* [AVFundation] Add TV OS missing apis.

* As per review, added missing constructor and renamed method.

* As per review, add 'Get' verb to method.

* As per review bump tv os attr to 10.0
2016-09-05 16:06:27 +02:00
Manuel de la Pena 6b79e79d78 [AVFoundation] Add missing ios api. (#763)
* [AVFoundation] Add missing ios api.

* As per review, rename constant name.
2016-09-05 11:56:52 +02:00
Rolf Bjarne Kvinge 3859240031 Add support for debugging over http. Fixes #41554.
The watchOS device has limited networking support; in particular
it does not allow inbound/output network connections using 'bind'
(kernel-level sandbox restrictions).

This means that we can't use BSD sockets to connect to the debugger
in the IDE on the desktop. Instead we create an http tunnel that
knows how to convert socket send/recv data into http requests on
both sides.

https://bugzilla.xamarin.com/show_bug.cgi?id=41554
2016-09-05 10:05:00 +02:00
Rolf Bjarne Kvinge a9294ab9c8 [runtime] Check if debug mode is specified in environment variables. 2016-09-05 10:05:00 +02:00
Rolf Bjarne Kvinge 18a5b4eccb [runtime] Make the debugger mode an enum instead of bool to allow more than two debugger modes. 2016-09-05 10:05:00 +02:00
Rolf Bjarne Kvinge d11b3f2761 [runtime] Only enable debugging on watchOS devices if a native debugger is also attached.
Launching a watchOS extension on device with the managed debugger
attached is slow, which means that the launch watchdog will kick in
and kill the app before it has launched.

So we attach the native debugger as well, which prevents the launch
watchdog from killing the app. Incidentally it also makes watchOS
not background the app.

We're using private API to determine whether a native debugger is
attached, but it's only in debug code, and as such would not be
included in release builds for customer apps. Also the code is
currently limited to watchOS since it's not needed on other
platforms for now.
2016-09-05 10:05:00 +02:00
Sebastien Pouliot 6cf2cf6c16 [audit] Add comments on two correct, but uncommon, binding patterns (#761) 2016-09-04 12:40:45 -04:00
Alex Soto 71b11daa3f Merge pull request #759 from spouliot/healthkit-audit-fixes
[healthkit] Audit-based fixes
2016-09-03 13:04:39 -05:00
Sebastien Pouliot de772baaf2 [healthkit] Audit-based fixes
* Made some types abstract based on the documentation. Most (all but the
new HKDocumentSample) are under XAMCORE_4_0 as this would be a breaking
change.

	> The HKObject class is an abstract class
	> The HKDocumentSample class is an abstract class
	> The HKQuery class is an abstract class.
	https://developer.apple.com/reference/healthkit

	> The HKObjectType class is an abstract class.
	https://developer.apple.com/reference/healthkit/hkobjecttype

	> The HKSample class is an abstract class.
	https://developer.apple.com/reference/healthkit/hksample

* Removing default .ctor

	> Do not instantiate HKCDADocument objects directly
	https://developer.apple.com/reference/healthkit/hkcdadocument

* Change WeatherCondition from NSNumber to HKWeatherCondition (enum) on
  HKMetadata (strong dictionary)
2016-09-03 11:46:16 -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
Alex Soto db4c0a03dc [generator] Fix some CWL warnings that generator emits (#758)
When using WrapAttribute on methods generator still tries to create
signatures to interop with ObjC which is incorrect since the pruppose
of Wrap attribute is to create nicer signatures on top of an "ugly"
API so user gets a delightful coding experience.

When generator tries to create a signature for a decorated method with
WrapAttribute to interop with objc and the signature contains a NET Type
(i.e System.Type) it throws a BindingException but it was swallowed
by a try/catch that only printed a not so useful description of the
the problem. Now it throws the actual BindingException when it really
does not know how to create a signature to interop with ObjC on a
*not* decorated method with WrapAttribute.
2016-09-03 10:21:10 -04:00
Alex Soto 2d64329af4 Merge pull request #756 from spouliot/cloudkit-classic-fix-2
[cloudkit] Fix some API removal from monotouch.dll (classic)
2016-09-03 01:59:00 -05:00