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

4285 Коммитов

Автор SHA1 Сообщение Дата
Alex Soto cb8902d118
[CoreMotion] Update bindings to Xcode 10 Beta 1 (#4247)
* [CoreMotion] Update bindings to Xcode 10 Beta 1

* Add a note about why sharpie did not pick up these classes

* Remove CMMovementDisorderManager from simulator checks since it is not available there
2018-06-14 18:57:57 -05:00
Alex Soto 785e0fbb70
[ReplayKit] Update bindings to Xcode 10 Beta 1 (#4249)
* [ReplayKit] Update bindings to Xcode 10 Beta 1

* Implement feedback
2018-06-14 14:49:12 -05:00
Vincent Dondain 2f1859733d
[arkit] Update to Xcode 10 beta 1 (ARKit 2.0) (#4209)
I obsoleted `GetProjectPoint` in favor of `Project` because of the introduction of `Unproject` (which made me realize the naming was wrong) and based on the API doc https://developer.apple.com/documentation/arkit/arcamera/2923538-projectpoint?language=objc. 

The `CGPoint` returned is the projection of a point. An other naming option would have been `GetProjectedPoint` but I think `Project` is closer to the original and clear enough. You project/unproject something onto something else and you get the projection back.
2018-06-14 13:44:45 -04:00
Manuel de la Pena f77f44940e
[NaturalLanguage] Added the new framework for Xcode10. (#4236) 2018-06-14 19:21:44 +02:00
Rolf Bjarne Kvinge b3b51d4359
Merge pull request #4224 from rolfbjarne/xcode10-jenkinsfile
Cherry-pick changes from master to implement support for building on internal Jenkins.
2018-06-14 06:07:30 -07:00
Alex Soto 85e0f60a86
[Intents] Adds Xcode 10 Beta 1 bindings (#4243)
* [Intents] Adds Xcode 10 Beta 1 bindings

* Adds missing comma to enum

* Update deprecation message
2018-06-14 07:10:22 -05:00
Rolf Bjarne Kvinge e11c0019b9 [msbuild] Ignore tests that run into an Apple regression. 2018-06-14 11:14:33 +02:00
Rolf Bjarne Kvinge dccbc5a74b [jenkins] Skip docs testing unless on master. 2018-06-14 10:31:24 +02:00
Alex Soto cb14283da3
[CoreNFC] Update bindings to Xcode 10 beta 1 (#4246)
* [CoreNFC] Update bindings to Xcode 10 beta 1

* Address feedback
2018-06-13 22:21:17 -05:00
Alex Soto 2e516792f4
[GameplayKit] Update bindings to Xcode 10 Beta 1 (#4248) 2018-06-13 21:46:36 -05:00
Sebastien Pouliot 75d88d44ff
[glkit] Update (deprecate in favor of Metal) for beta1 (#4245) 2018-06-13 22:25:57 -04:00
Sebastien Pouliot 5784f8daee
[authenticationservices] New iOS-only framework added in beta 1 (#4234) 2018-06-13 14:06:37 -04:00
Rolf Bjarne Kvinge 61baa008d4 [xharness] Don't include 32-bit XM targets in grouped Makefile targets.
Fixes an issue with the packaged XM tests, where they don't build because we try to build 32-bit tests.
2018-06-13 18:53:57 +02:00
Rolf Bjarne Kvinge 5eb8a5f42c Bump min mono version.
It turns out that some of the vstool versions (from VSfM) we allow require a
mono 5.10.0.171+, so just bump to latest stable.
2018-06-13 14:48:54 +02:00
Rolf Bjarne Kvinge 0b5490b056 [mk] Put shell code in shell scripts and add support for switching between different remotes for dependencies. (#4060)
Put the shell code for resetting README dependencies in a shell script instead
of embedded in the Makefile so that it's easier to write, read and debug.

Also add support for switching between different remotes for README
dependencies (this means that `make reset-X` will now work fine if `X`'s
remote changed).

A side effect is that all README dependencies will now end up with a 'xamarin'
remote in addition to the 'origin' remote, but this should have no other
effect.
2018-06-13 10:06:17 +02:00
Sebastien Pouliot 300018fd42
[corevideo] Update for beta 1 (#4232) 2018-06-12 16:51:57 -04:00
Sebastien Pouliot bbbea580a3
[msbuild] Fix detecting already signed executables. (#3743) (#4231)
The MSBuild tasks will codesign an executable if the executable's timestamp is
later than `_CodeSignature/CodeResources`'s timestamp (or if
`_CodeSignature/CodeResources` doesn't exist).

Unfortunately, the codesign executable modifies both of those files, and the
executable last. This means that even just after running codesign, the
executable's timestamp might be later than `_CodeSignature/CodeResources`'s
timestamp (due to HFS+'s one-second timestamp resolution, this might happen
all within the same second, which means that this is a random issue: the
problem only occurs if the executable was modified at least a second later
than `_CodeSignature/CodeResources`.)

So make sure to touch `_CodeSignature/CodeResources` after running codesign,
so that the next time a build occurs (with no modifications), we don't resign
needlessly.

Fixes this (random) test failure when running the MSBuild tests:

    1) Test Failure : Xamarin.iOS.Tasks.TargetTests.RebuildExecutable_NoModifications
         #1: ../MySingleView/bin/iPhoneSimulator/Debug/MySingleView.app/MySingleView
      Expected: 2017-11-30 10:04:20.000
      But was:  2017-11-30 10:04:22.000

Fixes https://github.com/xamarin/maccore/issues/592.
2018-06-12 15:55:57 -04:00
Alex Soto 20f5d952a9
[CarPlay] Adds Xcode 10 Beta 1 Bindings (#4217)
* [CarPlay] Adds Xcode 10 Beta 1 Bindings

* Adds [DisableDefaultCtor] to CPVoiceControlTemplate

* Implement feedback
2018-06-12 12:12:20 -07:00
Sebastien Pouliot d2b8669113
[messages] Updates for beta 1 (#4230) 2018-06-12 13:59:46 -04:00
Sebastien Pouliot a8ee40e61a
[watchos][clockkit] Update for beta 1 (no new API) (#4229) 2018-06-12 13:35:51 -04:00
Sebastien Pouliot 3b87a2b3dc
[coreimage] Add new filters from Xcode 10 beta 1 (#4228)
Complete the earlier stubs (committed to avoid tests failures) and add
`[Mac (10,14, onlyOn64: true)]` attributes on them.

This solves two XM failures when running on Mojave

```
3) ApiCoreImageFiltersTest.CheckManagedFilters (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.CheckManagedFilters)
     Managed filters not found for CIAreaMinMax, CIDither, CIGuidedFilter, CIMeshGenerator, CIMix, CISampleNearest
  Expected: 0
  But was:  6

  at Introspection.ApiCoreImageFiltersTest.CheckManagedFilters () [0x0019e] in /Users/poupou/git/xcode10/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:146
  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) [0x00032] in /Users/poupou/git/xcode10/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305

4) ApiCoreImageFiltersTest.CheckNativeFilters (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.CheckNativeFilters)
     6 native filters missing: CIAreaMinMax, CIDither, CIGuidedFilter, CIMeshGenerator, CIMix, CISampleNearest
  Expected: 0
  But was:  6
```

Also introduce a new base type `CIReductionFilter` as found by tests

```
[WARN] CIAreaMaximum.SuperClass == CIReductionFilter (native) and CIFilter managed
[WARN] CIAreaMaximumAlpha.SuperClass == CIReductionFilter (native) and CIFilter managed
[WARN] CIAreaMinimum.SuperClass == CIReductionFilter (native) and CIFilter managed
[WARN] CIAreaMinimumAlpha.SuperClass == CIAreaMaximumAlpha (native) and CIFilter managed
```

Finally `CIMeshGenerator` is incomplete because the generator does not
support (never had to before) `NSArray` in filters, so we cannot express
`CIVector[]`. Filed as https://github.com/xamarin/xamarin-macios/issues/4226
2018-06-12 13:16:31 -04:00
Rolf Bjarne Kvinge e7125ac952 [system-dependencies] Fix Xcode provisioning. 2018-06-12 18:29:27 +02:00
Rolf Bjarne Kvinge b177455c99 [system-dependencies] Fix lookup of Xcode package in ~/Downloads. 2018-06-12 18:18:11 +02:00
Rolf Bjarne Kvinge 9cdaf2b753 [jenkins] Cherry-pick a series of fixes for internal jenkins support from the d15-8 branch (#4195)
* [Jenkins] Create artifacts.json and set a GH status as 'Jenkins: Artifacts'.

* [jenkins] Include the url in artifacts.json

* [jenkins] Add sha256 checksum to artifacts.json as well.

* [Jenkins] Enable xamarin before provisioning so that we auto-provision Xcode.

* [jenkins] Fix passing flags to configure.

Quoting empty CONFIGURE_FLAGS ends up doing this:

    ./configure "" --disable-ios-device

and since configure parses arguments until it finds an empty argument, it
would stop parsing at the first argument, effectively not disabling the device
build.

So don't quote CONFIGURE_FLAGS when invoking configure. shellcheck doesn't
quite like this, but the better code is much more complex, and not really
needed, so just add an exception.
2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge ae7c72cba8 Add support for building on Jenkins. (#4159)
Add support for building on internal Jenkins.

Jenkins has been configured to build every branch on xamarin/xamarin-macios that contains a `jenkins/Jenkinsfile`, which means it will start working as soon as this PR is merged.

Results will be posted as statuses on each commit, which can be viewed using the url `https://github.com/xamarin/xamarin-macios/commits/<branch>`:

![screenshot 2018-06-01 11 12 57](https://user-images.githubusercontent.com/249268/40832932-c3b05eb0-658c-11e8-9670-8de5fcc23407.png)

* The `continuous-integration/jenkins/branch` status links to the jenkins job.
* The other two are XI and XM packages (the `Jenkins-` prefix will be removed once we officially switch from Wrench to Jenkins).

More detailed information will be added as a comment to each commit, which can be seen by clicking on the commit and scrolling to the bottom (url of the format `https://github.com/xamarin/xamarin-macios/commit/<sha1>`)

![screenshot 2018-06-01 11 14 33](https://user-images.githubusercontent.com/249268/40833014-fd8772f4-658c-11e8-8a35-5df46bfb16c7.png)

Unfortunately GitHub does not display the commit statuses when viewing a single commit, so to view those statuses you'll have to view the list of commits (the `/commits/` url). Tip: it's possible to use `<sha1>` instead of `<branch>` (and vice versa for that matter) if you're interested in the statuses of a particular commit.

Pull requests will also be built (only from contributors with write access), but by default nothing will be done (the job will exit immediately, although a green check mark will still show up). Jenkins will **not** add a comment in the pull request in this case.

However, if the label `build-package` [1] is set for a pull request, the internal jenkins job will run (it will do everything except the local xharness test run: this includes creating and publishing packages, creating various diffs, run tests on older macOS versions, test docs, etc). A detailed comment will also be added to the pull request (see below for multiple examples), which means that there will be two Jenkins comments: one for the public Jenkins which builds every PR, and one for the internal Jenkins [2].

[1] I don't quite like the name of the label, because it doesn't get even close to explain all that will actually happen, but `run-on-internal-jenkins-and-create-package` is a bit too long IMHO... Also it's non-obvious that this is the label to apply if the reason for executing on the internal jenkins is some other reason (for instance to test a maccore bump). Other ideas:

* `run-internal-jenkins`: doesn't make it obvious that a package will be created (which is probably the most common reason to want to run on internal jenkins)
* We could have multiple labels that mean the same thing: `build-package`, `internal-build`, `run-internal-jenkins`, etc, but it's redundant and I don't quite like it either.
* Any other ideas?

[2] I'm noticing now that these two look quite similar and this might end up confusing (the main difference is that the comment from the public jenkins will say **Build success/failure** and **Build comment file:** at the top. If something goes wrong the failure will also show up differently). Should this be made clearer?
2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge fa7f52dab0 [jenkins] Improve api/generator diff reporting to say if there were changes, and if they were breaking or not. (#4138)
For the api diff for this PR we now show:

* `🔥 breaking changes 🔥`: If there are any breaking changes in the api diff (for this PR).
* `please review changes`: If there are any non-breaking changes in the api diff.
* `no change`: If the api diff is empty.

For the generator diff we show:

* `only version changes`: If there were only changes related to version numbers (since the XI/XM version number is added to the generator, that version number will always show up as a diff when comparing the generated source code)
* `please review changes`: If anything other that version numbers changed in the generated source code.
2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge f7527aaba2 [jenkins] Revert unintended change that prevents the keychain from unlocking properly. (#4158) 2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge e0e2f93176 [jenkins] Fix scripts to be shellcheck-happy. (#4148)
A few general categories of fixes:

* Sprinkle lots of quotes everywhere.
* Don't use environment variables in the format string to printf, instead pass them as arguments.
* Don't use backticks to execute commands (it's deprecated), use the new "$(...)" syntax instead.
2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge 96d3445ccf [tests] Make sure accessing the keychain doesn't make macOS show any dialogs. (#4141) 2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge bece50d6bb [jenkins] Don't treat API/Generator diff failures as errors. (#4127)
This way such failures won't make the build show up as failed, which may cause
other tooling to behave differently (and non-optimal).
2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge c35adef145 [jenkins] Update the urls for html reports. (#4119)
* [jenkins] Update the urls for html reports.

The urls for html reports changed as a consequence of a Jenkins update [1], so
update how we construct the links accordingly.

See also:

* https://xamarinhq.slack.com/archives/C03CCJNR7/p1526646040000120
* https://xamarinhq.slack.com/archives/C03CCJNR7/p1526653512000249

[1] https://wiki.jenkins.io/display/JENKINS/HTML+Publisher+Plugin (update to v1.16)

* Remove extra closing parenthesis.
2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge ccb2f59ca1 [jenkins] Make it possible to skip API comparison by applying a label to a pull request. (#3994)
Implement support for skipping API comparison by applying a label to a pull
request.

This also required some refactoring to move existing code to fetch the labels
for a pull request to a separate script.
2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge d7efd346ee [tools] Improve error reporting when trying to create API/generator diff for a pull request with conflicts. (#3966)
We can't create an API/generator diff for a pull request with conflicts, so
detect this scenario and show a better error than this (from #3961):

    Comparing the changes between origin/pr/3961/merge^1 and HEAD:
    fatal: ambiguous argument 'origin/pr/3961/merge^1..HEAD': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
    fatal: ambiguous argument 'origin/pr/3961/merge^1': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
2018-06-12 14:37:03 +02:00
Sebastien Pouliot fb322c4d15 [jenkins] Clean keystore on bots before running tests (#3754)
Because if invalid data gets into the store then some unit tests
will always fail on that particular bot.

Fix https://github.com/xamarin/maccore/issues/640
2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge 61ec52009e Bump maccore. 2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge 075e1b9c94
Switch maccore to an xcode10 branch. (#4221) 2018-06-12 05:31:38 -07:00
Sebastien Pouliot 7372f627ad
[adsupport] Update for beta 1 (#4213) 2018-06-12 05:19:16 -07:00
Sebastien Pouliot 6d5cffcd10
[scenekit][tvos] SCNGeometryTessellator is now available in tvOS 12 (#4219) 2018-06-12 05:17:16 -07:00
Sebastien Pouliot 06ac9f970b
[accounts] Updates for beta 1 (#4216) 2018-06-11 17:42:33 -07:00
Sebastien Pouliot 2d197b9cfe
[corelocation] Update for beta 1 (macOS only changes) (#4215) 2018-06-11 17:42:18 -07:00
Sebastien Pouliot 8e72465496
[macos][corebluetooth] Enable CBConnectPeripheralOptionStartDelayKey on macOS (#4212)
Headers mention macOS 10.13 but, upon verification, the latest 10.13.5
still reports the key as missing from the framework.

Also remove the 10,13,4 maximum since we now have Mac(10,14) attributes
in the platform assemblies (which solve the previous issue)
2018-06-11 13:22:35 -07:00
Sebastien Pouliot 055a6aac35
[tests] macOS NSSpellChecker randomly [dis]approve of 'Ident' (#3728) (#4211)
Fix https://github.com/xamarin/maccore/issues/661
2018-06-11 13:21:56 -07:00
Alex Soto 02e8a2d7a3
[generator] Fixes WrapAttribute usage with interface protocols (#3885) (#4210)
* [generator] Fixes WrapAttribute usage with interface protocols

Fixes xamarin/xamarin-macios#3869

We need to support the scenario where `WrapAttribute` is used
to wrap an interface protocol type declaration like:

```csharp

	[Wrap ("WeakDelegate")]
	[NullAllowed]
	ICLSDataStoreDelegate Delegate { get; set; }

	[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
	NSObject WeakDelegate { get; set; }

```

We generated invalid code for the setter that needed an explicit cast
and ended up with a CS0266 compiler error:

Bad generated code:

```csharp

[CompilerGenerated]
public ICLSDataStoreDelegate Delegate {
	get {
		return WeakDelegate as ICLSDataStoreDelegate;
	}
	set {
		WeakDelegate = value;
	}
}

```

Good generated code:

```csharp

[CompilerGenerated]
public ICLSDataStoreDelegate Delegate {
	get {
		return WeakDelegate as ICLSDataStoreDelegate;
	}
	set {
		var rvalue = value as NSObject;
		if (value != null && rvalue == null)
			throw new ArgumentException ("The object passed of type " + value.GetType () + " does not derive from NSObject");
		WeakDelegate = rvalue;
	}
}

```
2018-06-11 10:26:30 -07:00
Sebastien Pouliot 45ae4c53ce
[tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976 (#4194) (#4208)
* [tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976

or a good, documented (in test code) reason for not needing it.

https://github.com/xamarin/xamarin-macios/issues/3976

* Fix failures

- static registrar failed on 32bits because one type in PhotoUI missed
  its `onlyOn64: true`

- link with the top, not the sub-frameworks

* [tvos] Fix mistakes in tvOS where some extranous types triggered unrequired/unavailable (or missing) frameworks

* [watchos] Fix watchOS frameworks mapping
2018-06-11 08:01:41 -07:00
Sebastien Pouliot 3c8680ad22
[safariservices] Updates (some deprecations) for beta 1 (#4206) 2018-06-11 05:37:06 -07:00
Sebastien Pouliot b0b3d094b4
[watchconnectivity] Updates for beta 1 (#4205) 2018-06-11 05:34:40 -07:00
Sebastien Pouliot a9d8ce7c07
[watchkit] Update for beta 1 (#4204) 2018-06-11 05:31:52 -07:00
Sebastien Pouliot 2d6ce7459d
Bump to use Xcode 10 beta 1 (#4179)
* Bump to use Xcode 10 beta 1

* Update Versions.plist

* Add a dependency on Xcode 9.4.

* [msbuild] Fix build with Xcode 10 beta 1. (#4182)

Many years ago (in Xcode 7 according to code comment)
Developer/Platforms/iPhoneOS.platform/Developer/usr disappeared, and we coped
by looking at Developer/usr instead (and also the subsequent code to locate
the bin directory was based on the location of the usr directory).

Developer/Platforms/iPhoneOS.platform/Developer/usr reappeared in Xcode 10
beta 1, but it seems useless (for one it doesn't contain a bin directory), so
in order to try to keep things sane don't look for this directory in Xcode 10
and instead go directly for Developer/usr (which is what we've been using as
the usr directory for years anyway).

Fixes this problem when building apps with Xcode 10 beta 1:

      /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(626,3): error : Could not locate SDK bin directory [/Users/rolf/Projects/TestApp/test-app.csproj]

* [runtime] Build 32-bit mac executables using Xcode 9.4.

* [mtouch] Work around broken tvOS headers in Xcode 10 beta 1.

* [mtouch] Work around build problem with Apple's simd headers in Objective-C++ mode.

* Use version-agnostic paths to sdk directories.

* [tests][xtro] Add todo files (from unclassified) and adjust ignore files to avoid errors

* [macos][security] Re-enable SSL[Get|Set]AlpnProtocols. Fixes #4001 (#4022)

* [macos][security] Re-enable SSL[Get}Set]AlpnProtocols. Fixes #4001

This was fixed in macOS 10.13.4

https://github.com/xamarin/xamarin-macios/issues/4001

* [tests][monotouch-tests] Disable a few test cases (one crasher, other failures). Causes to be verified later

* [xharness] Fix permission dialog suppression in Xcode 10.

* [xharness] Ignore 32-bit macOS tests by default.

* [tests] Execute mmp regression tests with Xcode 9.4 since many of them are 32-bit and needs porting to 64-bit.

* [mmptest] Ignore 32-bit XM tests if we don't have a 32-bit-capable Xcode.

* [registrar] Add workaround for broken headers in Xcode 10 beta 1 (radar 40824697).

* [mtouch] Restrict another workaround for an Xcode 10 beta 1 bug to a specific Xcode version to remove it asap.

* [tests] Fix some protocol changes (public or not) find by introspection tests

* [tests][intro] Fix DefaultCtorAllowed failures

* [Intents] Obsolete several Intents classes in watchOS.

Several existing Intents classes have been marked as unavailable in watchOS in
the headers in Xcode 10 beta 1, and corresponding tests are now failing.

So obsolete the managed wrapper types, and fix tests accordingly.

* Fix xtro wrt previous Ietents/intro changes

* [tests] Minor adjustments to mtouch tests to work with Xcode 10.

* [msbuild] Update tests to cope with additional files produced by the Core ML compiler.

* [msbuild] Xcode 10 doesn't support building watchOS 1 apps, so show a clear error message explaining it.

Also update tests accordingly.

* [coreimage] Stub new filters and exclude ?removed? ones from tests

* Update GameplayKit and SpriteKit NSSecureCoding _upgrade_ and fix other non-public cases (in tests)

* [tests] Ignore some GameKit selectors that don't respond anymore (but seems to be available, at least in header files)

* [tests] Fix intro 32bits testing for filters resutls

* [msbuild] Slightly change error message to be better English.
2018-06-08 18:45:24 -07:00
Sebastien Pouliot 847f4c1d8d
[apidiff] Update XML references to produce the API diff for xcode9.4 support (#4160) 2018-05-30 14:12:36 -04:00
Sebastien Pouliot 64fece5f0a
Merge pull request #4026 from spouliot/d15-7-xcode94
Add xcode9.4 support into 15.7
2018-05-29 17:55:31 -04:00