Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -2007,6 +2007,7 @@ COMMON_FRAMEWORKS = \
OSLog \
SceneKit \
ShazamKit \
Symbols \
SoundAnalysis \
SpriteKit \
StoreKit \
Expand Down
1 change: 1 addition & 0 deletions src/rsp/dotnet/ios-defines-dotnet.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
-d:HAS_SPEECH
-d:HAS_SPRITEKIT
-d:HAS_STOREKIT
-d:HAS_SYMBOLS
-d:HAS_SYSTEMCONFIGURATION
-d:HAS_THREADNETWORK
-d:HAS_TWITTER
Expand Down
1 change: 1 addition & 0 deletions src/rsp/dotnet/maccatalyst-defines-dotnet.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
-d:HAS_SPEECH
-d:HAS_SPRITEKIT
-d:HAS_STOREKIT
-d:HAS_SYMBOLS
-d:HAS_SYSTEMCONFIGURATION
-d:HAS_THREADNETWORK
-d:HAS_UIKIT
Expand Down
1 change: 1 addition & 0 deletions src/rsp/dotnet/macos-defines-dotnet.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
-d:HAS_SPEECH
-d:HAS_SPRITEKIT
-d:HAS_STOREKIT
-d:HAS_SYMBOLS
-d:HAS_SYSTEMCONFIGURATION
-d:HAS_THREADNETWORK
-d:HAS_UNIFORMTYPEIDENTIFIERS
Expand Down
1 change: 1 addition & 0 deletions src/rsp/dotnet/tvos-defines-dotnet.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
-d:HAS_SOUNDANALYSIS
-d:HAS_SPRITEKIT
-d:HAS_STOREKIT
-d:HAS_SYMBOLS
-d:HAS_SYSTEMCONFIGURATION
-d:HAS_TVMLKIT
-d:HAS_TVSERVICES
Expand Down
1 change: 1 addition & 0 deletions src/rsp/ios-defines.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
-d:HAS_SPEECH
-d:HAS_SPRITEKIT
-d:HAS_STOREKIT
-d:HAS_SYMBOLS
-d:HAS_SYSTEMCONFIGURATION
-d:HAS_THREADNETWORK
-d:HAS_TWITTER
Expand Down
1 change: 1 addition & 0 deletions src/rsp/macos-defines.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
-d:HAS_SPEECH
-d:HAS_SPRITEKIT
-d:HAS_STOREKIT
-d:HAS_SYMBOLS
-d:HAS_SYSTEMCONFIGURATION
-d:HAS_THREADNETWORK
-d:HAS_UNIFORMTYPEIDENTIFIERS
Expand Down
1 change: 1 addition & 0 deletions src/rsp/tvos-defines.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
-d:HAS_SOUNDANALYSIS
-d:HAS_SPRITEKIT
-d:HAS_STOREKIT
-d:HAS_SYMBOLS
-d:HAS_SYSTEMCONFIGURATION
-d:HAS_TVMLKIT
-d:HAS_TVSERVICES
Expand Down
1 change: 1 addition & 0 deletions src/rsp/watchos-defines.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
-d:HAS_SOUNDANALYSIS
-d:HAS_SPRITEKIT
-d:HAS_STOREKIT
-d:HAS_SYMBOLS
-d:HAS_UIKIT
-d:HAS_UNIFORMTYPEIDENTIFIERS
-d:HAS_USERNOTIFICATIONS
Expand Down
215 changes: 215 additions & 0 deletions src/symbols.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
using CoreFoundation;
using ObjCRuntime;
using Foundation;

using System;

namespace Symbols {
[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSObject))]
interface NSSymbolEffect : NSCopying, NSSecureCoding { }
Comment thread
mandel-macaque marked this conversation as resolved.

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSObject))]
interface NSSymbolContentTransition : NSCopying, NSSecureCoding { }
Comment thread
mandel-macaque marked this conversation as resolved.

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface NSSymbolEffectOptions : NSCopying, NSSecureCoding {
[Static]
[Export ("options")]
NSSymbolEffectOptions CreateOptions ();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it sounds better if you remove Options:

Suggested change
NSSymbolEffectOptions CreateOptions ();
NSSymbolEffectOptions Create ();


[Static]
[Export ("optionsWithRepeating")]
NSSymbolEffectOptions CreateOptionsWithRepeating ();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, but also removing With:

Suggested change
NSSymbolEffectOptions CreateOptionsWithRepeating ();
NSSymbolEffectOptions CreateRepeating ();

and the same for the other Get and Create methods here.

This matches the Swift names better (and also sounds better).


[Export ("optionsWithRepeating")]
NSSymbolEffectOptions GetOptionsWithRepeating ();

[Static]
[Export ("optionsWithNonRepeating")]
NSSymbolEffectOptions CreateOptionsWithNonRepeating ();

[Export ("optionsWithNonRepeating")]
NSSymbolEffectOptions GetOptionsWithNonRepeating ();

[Static]
[Export ("optionsWithRepeatCount:")]
NSSymbolEffectOptions CreateOptionsWithRepeatCount (nint count);

[Export ("optionsWithRepeatCount:")]
NSSymbolEffectOptions GetOptionsWithRepeatCount (nint count);

[Static]
[Export ("optionsWithSpeed:")]
NSSymbolEffectOptions CreateOptionsWithSpeed (double speed);

[Export ("optionsWithSpeed:")]
NSSymbolEffectOptions GetOptionsWithSpeed (double speed);
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSSymbolEffect))]
interface NSSymbolPulseEffect {
Comment thread
mandel-macaque marked this conversation as resolved.
[Static]
[Export ("effect")]
NSSymbolPulseEffect CreateEffect ();

[Export ("effectWithByLayer")]
NSSymbolPulseEffect GetEffectWithByLayer ();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are properties in Swift (https://developer.apple.com/documentation/symbols/pulsesymboleffect/4197828-bylayer)

Suggested change
NSSymbolPulseEffect GetEffectWithByLayer ();
NSSymbolPulseEffect ByLayer { get; }


[Export ("effectWithWholeSymbol")]
NSSymbolPulseEffect GetEffectWithWholeSymbol ();
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSSymbolEffect))]
interface NSSymbolBounceEffect {
Comment thread
mandel-macaque marked this conversation as resolved.
[Static]
[Export ("effect")]
NSSymbolBounceEffect CreateEffect ();

[Static]
[Export ("bounceUpEffect")]
NSSymbolBounceEffect CreateBounceUpEffect ();

[Static]
[Export ("bounceDownEffect")]
NSSymbolBounceEffect CreateBounceDownEffect ();

[Export ("effectWithByLayer")]
NSSymbolBounceEffect GetEffectWithByLayer ();

[Export ("effectWithWholeSymbol")]
NSSymbolBounceEffect GetEffectWithWholeSymbol ();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, these can be properties and named better.

}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSSymbolEffect))]
interface NSSymbolVariableColorEffect {
Comment thread
mandel-macaque marked this conversation as resolved.
[Static]
[Export ("effect")]
NSSymbolVariableColorEffect CreateEffect ();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NSSymbolVariableColorEffect CreateEffect ();
NSSymbolVariableColorEffect Create ();


[Export ("effectWithIterative")]
NSSymbolVariableColorEffect GetEffectWithIterative ();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, simplified and property:

Suggested change
NSSymbolVariableColorEffect GetEffectWithIterative ();
NSSymbolVariableColorEffect Iterative { get; }


[Export ("effectWithCumulative")]
NSSymbolVariableColorEffect GetEffectWithCumulative ();

[Export ("effectWithReversing")]
NSSymbolVariableColorEffect GetEffectWithReversing ();

[Export ("effectWithNonReversing")]
NSSymbolVariableColorEffect GetEffectWithNonReversing ();

[Export ("effectWithHideInactiveLayers")]
NSSymbolVariableColorEffect GetEffectWithHideInactiveLayers ();

[Export ("effectWithDimInactiveLayers")]
NSSymbolVariableColorEffect GetEffectWithDimInactiveLayers ();
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSSymbolEffect))]
interface NSSymbolScaleEffect {
Comment thread
mandel-macaque marked this conversation as resolved.
[Static]
[Export ("effect")]
NSSymbolScaleEffect CreateEffect ();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NSSymbolScaleEffect CreateEffect ();
NSSymbolScaleEffect Create ();


[Static]
[Export ("scaleUpEffect")]
NSSymbolScaleEffect CreateScaleUpEffect ();

[Static]
[Export ("scaleDownEffect")]
NSSymbolScaleEffect CreateScaleDownEffect ();

[Export ("effectWithByLayer")]
NSSymbolScaleEffect GetEffectWithByLayer ();

[Export ("effectWithWholeSymbol")]
NSSymbolScaleEffect GetEffectWithWholeSymbol ();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified properties

}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSSymbolEffect))]
interface NSSymbolAppearEffect {
Comment thread
mandel-macaque marked this conversation as resolved.
[Static]
[Export ("effect")]
NSSymbolAppearEffect CreateEffect ();

[Static]
[Export ("appearUpEffect")]
NSSymbolAppearEffect CreateAppearUpEffect ();

[Static]
[Export ("appearDownEffect")]
NSSymbolAppearEffect CreateAppearDownEffect ();

[Export ("effectWithByLayer")]
NSSymbolAppearEffect GetEffectWithByLayer ();

[Export ("effectWithWholeSymbol")]
NSSymbolAppearEffect GetEffectWithWholeSymbol ();
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSSymbolEffect))]
interface NSSymbolDisappearEffect {
Comment thread
mandel-macaque marked this conversation as resolved.
[Static]
[Export ("effect")]
NSSymbolDisappearEffect CreateEffect ();

[Static]
[Export ("disappearUpEffect")]
NSSymbolDisappearEffect CreateDisappearUpEffect ();

[Static]
[Export ("disappearDownEffect")]
NSSymbolDisappearEffect CreateDisappearDownEffect ();

[Export ("effectWithByLayer")]
NSSymbolDisappearEffect GetEffectWithByLayer ();

[Export ("effectWithWholeSymbol")]
NSSymbolDisappearEffect GetEffectWithWholeSymbol ();
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSSymbolContentTransition))]
interface NSSymbolReplaceContentTransition {
Comment thread
mandel-macaque marked this conversation as resolved.
[Static]
[Export ("transition")]
NSSymbolReplaceContentTransition CreateTransition ();
Comment thread
mandel-macaque marked this conversation as resolved.
Outdated

[Static]
[Export ("replaceDownUpTransition")]
NSSymbolReplaceContentTransition CreateReplaceDownUpTransition ();

[Static]
[Export ("replaceUpUpTransition")]
NSSymbolReplaceContentTransition CreateReplaceUpUpTransition ();

[Static]
[Export ("replaceOffUpTransition")]
NSSymbolReplaceContentTransition CreateReplaceOffUpTransition ();

[Export ("transitionWithByLayer")]
NSSymbolReplaceContentTransition GetTransitionWithByLayer ();

[Export ("transitionWithWholeSymbol")]
NSSymbolReplaceContentTransition GetTransitionWithWholeSymbol ();
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[BaseType (typeof (NSSymbolContentTransition))]
interface NSSymbolAutomaticContentTransition {
Comment thread
mandel-macaque marked this conversation as resolved.
[Static]
[Export ("transition")]
NSSymbolAutomaticContentTransition CreateTransition ();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stopped suggesting, they all follow the same pattern :)

Comment thread
mandel-macaque marked this conversation as resolved.
Outdated
}

}
1 change: 1 addition & 0 deletions tests/mtouch/RegistrarTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ public void MT4134 ()
new { Framework = "PushToTalk", Version = "16.0" },
new { Framework = "SharedWithYou", Version = "16.0" },
new { Framework = "SharedWithYouCore", Version = "16.0" },
new { Framework = "Symbols", Version = "17.0" },
};
foreach (var framework in invalidFrameworks)
mtouch.AssertError (4134, $"Your application is using the '{framework.Framework}' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS {framework.Version}, while you're building with the iOS {mtouch.Sdk} SDK.) Please select a newer SDK in your app's iOS Build options.");
Expand Down
57 changes: 0 additions & 57 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-Symbols.todo

This file was deleted.

Loading