Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[maccatalyst] Increase iOS compatibility by removing XAMCORE_3_0 #11238

Merged
merged 2 commits into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1207,10 +1207,10 @@ TVOS_TARGETS += \
#

# MacCatalyst is a variant of iOS, so it defines the iOS variables as well.
MACCATALYST_DEFINES = -define:IPHONE -define:IOS -define:MONOTOUCH -d:__IOS__ -d:XAMCORE_3_0 -d:__MACCATALYST__ $(APPLETLS_DEFINES) -d:SYSTEM_NET_HTTP
MACCATALYST_DEFINES = -define:IPHONE -define:IOS -define:MONOTOUCH -d:__IOS__ -d:__MACCATALYST__ $(APPLETLS_DEFINES) -d:SYSTEM_NET_HTTP
MACCATALYST_GENERATOR=$(BUILD_DIR)/common/bgen.exe
MACCATALYST_GENERATE=$(SYSTEM_MONO) --debug $(MACCATALYST_GENERATOR)
MACCATALYST_GENERATED_DEFINES= -d:__MACCATALYST__ -d:XAMCORE_3_0 -d:IOS
MACCATALYST_GENERATED_DEFINES= -d:__MACCATALYST__ -d:IOS

MACCATALYST_CORE_WARNINGS_TO_FIX=-nowarn:219,618,114,414,1635,3021,$(IOS_WARNINGS_THAT_YOU_SHOULD_FIX)
MACCATALYST_CORE_DEFINES=$(MACCATALYST_DEFINES) -d:COREBUILD
Expand Down
12 changes: 0 additions & 12 deletions src/UIKit/UIBarItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@

namespace UIKit {
public partial class UIBarItem {
#if __MACCATALYST__ && !NET
// This method exists to improve compatibility with assemblies that reference Xamarin.iOS.dll in Mac Catalyst,
// such as Xamarin.Forms. Setting the IsError field to true in the attribute means that everything will work at runtime,
// but that nobody can use this method at compile time.
// This is disabled in .NET because we won't try to be compatible with Xamarin.iOS.dll in .NET.
[Obsolete ("Use the overload that takes a 'UIStringAttributes' instead.", true)]
public void SetTitleTextAttributes (UIKit.UITextAttributes attributes, UIControlState state)
{
using (var dict = attributes == null ? null : attributes.Dictionary)
_SetTitleTextAttributes (dict, state);
}
#endif

public void SetTitleTextAttributes (TextAttributes attributes, UIControlState state)
{
Expand Down