It's now required to cast objc_msgSend[Super] to a function of the correct
signature, so let's do that.
Also remove the define that allowed us to use the previous behavior.
Also limit the output from the native compiler, so that we don't overload the
IDEs with output if the native compiler produces tens of thousands of errors.
Fixes https://github.com/xamarin/xamarin-macios/issues/6526.
The generator will create special *Appearance types (these are nested
classes). If we've bound a type with the same *Appearance name, we can end up
in a situation where the csc compiler uses the the type we don't want due to
C#'s resolution rules - this happens if the bound *Appearance type is
referenced from the containing type of the special *Appearance type. So always
reference the bound *Appearance types using global:: syntax.
Fixes https://github.com/xamarin/xamarin-macios/issues/6834.
* [registrar] Fix verification of generic parameters to accept unrelated generic types. Fixes#6687.
When we export generic classes to Objective-C, we verify that any generic
parameters are constrained so that we know how to handle them.
Example:
class MyObj<T> : NSObject where T: NSObject
{
[Export ("foo:")]
public void Foo (T obj);
}
in this case we verify that the parameter T is constrained to NSObject, so
that we can treat the argument like an NSObject.
The problem was when the function contained a generic type which was not
related to T:
class MyObj<T> : NSObject where T: NSObject
{
[Export ("foo:")]
public void Foo (Action<int> obj);
}
in which case the same logic would kick in and reject the Action<int> type
since it's not related to NSObject (no generic arguments could be found, and
the default response was 'not valid').
So I've changed the default response for generic types that are unrelated to
the generic parameter we're verifying to accept such types.
Fixes https://github.com/xamarin/xamarin-macios/issues/6687.
* No need to use a UIViewController as the super class, NSObject works just fine for this test.
Fixes the test build on macOS.
Xcode 10.3 was released over the summer with a very small subset
of the (already out) Xcode 11 betas API.
This PR fix some availability attributes and also ensure we can
run introspection tests successfully on an iOS 12.4 device.
* [msbuild] Improve altool task by logging execution errors
The altool task was just logging the XML output produced by the tool execution but was not logging any build error neither failing in that case.
* [msbuild] Log the altool output when failing to parse it
* [msbuild] Adds missing SessionId property to altool targets
Sets the missing SessionId property on the altool targets to enable running those from Visual Studio.
* [msbuild] Ensure Entitlements are compiled before creating an IPA
When creating an IPA from an archive the `CreateAppBundle` target will be skipped because we already have a bundle and the same will happen with the Entitlements compilation, but we need to re-compile those with the new certificate and profile. Adding `_CompileEntitlements` as a `CreateIpa` dependency will ensure it's run when creating an IPA file from an archive. Nothing changes when creating IPAs from a regular build since at the point the of creating the IPA the `_CompileEntitlements` target was already run, so it will be skipped.
This test started failing on iOS 13 beta 5. It is still failing on beta 7.
This test is designed to fail at every new iOS version until it's fixed by Apple.
Let's ignore it for good, mention it in https://github.com/xamarin/xamarin-macios/issues/6212 and check it one last time at GM.
FYI iOS 13 changed the tint color for the red pin, it's now (255, 69, 58, 255) instead of (255, 59, 48, 255).
Let's not test iOS colors for Apple (:
A simple NotNull check should be enough.
We were getting:
```
Xamarin.MTouch.LinkerWarnings: The warning 'MT5203: Native linking warning: warning: ignoring file /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/test-libraries/.libs/ios/libtest.x86_64.a, building for iOS Simulator-i386 but attempting to link with file built for unknown-archive' was not found in the output:
Message #1 did not match:
actual: 'Native linking warning: warning: ignoring file /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/test-libraries/.libs/ios/libtest.x86_64.a, building for iOS Simulator-i386 but attempting to link with file built for iOS Simulator-x86_64'
expected: 'Native linking warning: warning: ignoring file /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/test-libraries/.libs/ios/libtest.x86_64.a, building for iOS Simulator-i386 but attempting to link with file built for unknown-archive'
```
New framework - but it includes some of iOS API that were previously in
QuickLook.framework. Types were moved but remains in the old namespace
until `XAMCORE_4_0` is defined.
* [publishing] Added conditional behavior to CreateIpa and its dependencies
The targets execution needs to change based on the 'IsAppDistribution' property value, which will be set from the IDE.
According to the value of this property, some dependencies should be run or should be skipped.
The strategy adopted is to use the BeforeTargets value because doing this way we will force the conditionals over '$(IsAppDistribution)' to be evaluated each time a target is attempted to be run.
The most intuitive way of doing it is by directly add DependsOnTargets and conditions on the PropertyGroup items, but doing this will not work because the IDE usually runs the targets when the MSBuild project is already loaded, which means that the properties have already been evaluated so they will not be evaluated again, which causes conditional values to be out of date.
The only way of making it work in these cases is by forcing the conditional evaluations of each target execution attempt, and that is accomplished by adding the conditions directly on the Target 'Condition' property.
* [publishing] Simplified targets by using DependsOn + conditions in existent targets
- Using BeforeTargets on `_BeforeCreateIpaForDistribution` made that target run even if `CreateIpa` was skipped because its condition was false, which is wrong. Instead of including that condition into `_BeforeCreateIpaForDistribution` it seems more reasonable to move it to the `CreateIpa` DependsOnTargets property group to avoid maintaining the same condition on both targets in future changes that could lead to errors.
- Removed `_BeforeCreateIpaForBuild` since it was an unnecessary extensibility point and made the `CreateIpa` dependencies more complicated.
- We still need `_BeforeCreateIpaForDistribution` and `_BeforeCreateIpaForDistributionDependsOn` as extensibility point for the publishing workflow on VS.
- Simplified the previous approach by removing unnecessary targets and dependencies when the only thing needed was just the following condition on existent targets: `'$(IsAppDistribution)' != 'true'`. For instance, removed `_BeforeCodeSignForBuild` and included the mentioned condition into `_CreateAppBundle`. The purpose of `_BeforeCodeSignForBuild` was just skipping `_CreateAppBundle` for distribution builds, but it made the targets more complicated to understand and maintain.
- Same thing applies to `_BeforeCollectFrameworksForBuild` and `_BeforeCodesignNativeLibrariesForBuildDependsOn` which were just skipping the `_CompileToNative` target for distribution builds.
The `enum` is decorated with `[Obsolete]` since it's unused by any API.
However recent logic skips obsolete members it so it looks missing...
even if it won't be removed until `XAMCORE_4_0` is enabled.
Not quite clear why the original PR [1] did not report it... but all
subsequent ones are
https://github.com/xamarin/xamarin-macios/pull/6767
`gamePlayerID` and `teamPlayerID` are decorated as `[iOS (12,4)]...` since
the headers mention so in both Xcode 11 betas and the recent 10.3 (stable)
https://github.com/xamarin/xamarin-macios/wiki/GameKit-iOS-xcode103-final
The `enum GKError` has been unified (at some point) so it was simplified.
Mark the `iconWithContact:` API as not available with Catalyst
Note that the category `UIApplicationShortcutIcon (ContactsUI)` was
inlined in UIKit's `UIApplicationShortcutIcon` so only that file needs
to be updated.
* [WatchKit] Remove this framework for iOS while keeping backwards compatibility. Fixes#6492.
* Copy all generated sources and modify them to throw PlatformNotSupported exceptions.
* Adjust some existing source code to also throw PlatformNotSupported exceptions.
* Sprinkle Obsolete attributes generously.
* Stop generating code for the WatchKit framework for iOS.
Fixes https://github.com/xamarin/xamarin-macios/issues/6492.
* [introspection] Adjust test.
* [mtouch] Don't link with WatchKit, and show a warning if we detect code that want to use WatchKit.
* [xtro] Remove WatchKit for iOS.
* [introspection] Don't check obsoleted NSString fields for null.
There's probably a reason the field was obsoleted.
* [introspection] Add exception for the WatchKit framework.
* [xtro] Ignore obsolete enums.
There's probably a reason they're obsoleted.
In particular it solves a confusion between WKWebKit.WKErrorCode and
WatchKit.WKErrorCode: for iOS, the latter is obsoleted, and this way we always
process the former instead.
* [mtouch] Adjust wording for MT4178 to be more accurate.
* [WatchKit] Make more API obsolete/hidden.
Two classes managed to slip past the first time.
* [tests] Adjust test after WatchKit removal.
Also introduce `PlatformName.MacCatalyst` while keeping the old
`UIKitForMac`, with the same value, until we can clean up existing
bindings globally (and without too much conflicts).
* [tests] Handle Xcodes without proper versions by ignoring them. Fixes xamarin/maccore#1768. (#6386)
This can happen if an Xcode hasn't been completely/successfully installed or
removed.
Fixes https://github.com/xamarin/maccore/issues/1768.
* [CoreGraphics] Fix lifetime of delegates passed to CGPatternCreate. (#6368)
We may get callbacks after the managed CGPattern instance has been
disposed/garbage collected, so make sure our delegates survives that long.
Since the delegates don't need any instance state, just make them static.
* [d16-2] Bump mono to pick tz/DST fixes.. (#6454)
* [xharness] Don't try to find simulators for ignored tests. (#6421)
Trying to find a simulator will mark the test as a failure if the simulator
couldn't be found, and we don't want that to happen to ignored tests.
This should fix an issue where xharness seems to try to run the 32-bit
simulator tests when asked to run only device tests.
* [tests] Only call MTLDevice.CreateSharedTexture macOS 10.14+. Fixesxamarin/maccore#1663. (#6423)
Fixes https://github.com/xamarin/maccore/issues/1663.
* [d16-2] [GameController] GCGamepad is deprecated in the headers, so mark it as such. Fixes xamarin/maccore#1742. (#6428)
* [GameController] GCGamepad is deprecated in the headers, so mark it as such. Fixesxamarin/maccore#1742.
Fixes https://github.com/xamarin/maccore/issues/1742.
* Add attribute for tvOS too.
* [package] Remove creation of files/symlinks under /Developer (#6665)
* [d16-2] [tests] wrench is long gone (#6698)
* [tests] wrench is long gone
* Use a different Url that works and ensure we get a nice message when we have a failure.
* Fix new callback test.
* Ignore the outgenerated projects until they are moved to their own dir. (#6714)
Related issue https://github.com/xamarin/xamarin-macios/issues/6162