Skip to content

Commit 1420f25

Browse files
authored
Deprecate UIApplicationMain & NSApplicationMain (#212)
Fixes: rdar://105803968
2 parents 27da1bf + e110e20 commit 1420f25

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

Style.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,21 @@ Spelled as two words, not closed up or hyphenated.
111111

112112
See entry for *Swift*.
113113

114+
## deprecation
115+
116+
In the language reference,
117+
include a deprecation note at the start of a section
118+
that describes a deprecated feature.
119+
Use wording and markup like the following:
120+
121+
```
122+
> Deprecated:
123+
> This attribute is deprecated;
124+
> use the <doc:Attributes#main> attribute instead.
125+
> In Swift 6,
126+
> using this attribute will be an error.
127+
```
128+
114129
## definite initialization
115130

116131
Not “definitive initialization”.

TSPL.docc/ReferenceManual/Attributes.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,8 +1122,14 @@ for a method marked with the `objc` attribute.
11221122

11231123
### NSApplicationMain
11241124

1125+
> Deprecated:
1126+
> This attribute is deprecated;
1127+
> use the <doc:Attributes#main> attribute instead.
1128+
> In Swift 6,
1129+
> using this attribute will be an error.
1130+
11251131
Apply this attribute to a class
1126-
to indicate that it's the application delegate.
1132+
to indicate that it's the app delegate.
11271133
Using this attribute is equivalent to calling the
11281134
`NSApplicationMain(_:_:)` function.
11291135

@@ -2342,8 +2348,14 @@ The imported module must be compiled with testing enabled.
23422348

23432349
### UIApplicationMain
23442350

2351+
> Deprecated:
2352+
> This attribute is deprecated;
2353+
> use the <doc:Attributes#main> attribute instead.
2354+
> In Swift 6,
2355+
> using this attribute will be an error.
2356+
23452357
Apply this attribute to a class
2346-
to indicate that it's the application delegate.
2358+
to indicate that it's the app delegate.
23472359
Using this attribute is equivalent to calling the
23482360
`UIApplicationMain` function and
23492361
passing this class's name as the name of the delegate class.

0 commit comments

Comments
 (0)