Skip to content

Commit b33a1e7

Browse files
committed
Mark UserNotifications as automatically safe
1 parent 6faee94 commit b33a1e7

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

crates/objc2/src/topics/FRAMEWORKS_CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1515
### Added
1616
* Added `IOKit` "serial" submodule.
1717
* Marked a bunch of functions safe in:
18+
- `CoreGraphics` / `objc2-core-graphics`.
1819
- `CoreFoundation` / `objc2-core-foundation`.
1920
- `CoreVideo` / `objc2-core-video`.
2021
- `Foundation` / `objc2-foundation`.
2122
- `IOKit` / `objc2-io-kit`.
2223
- `QuartzCore` / `objc2-quartz-core`.
24+
- `UIKit` / `objc2-ui-kit`.
25+
- `UserNotifications` / `objc2-user-notifications`.
2326
* Added a lot of missing APIs.
2427
* Added `AsRef` impls for toll-free bridging between types like `CFString` and `NSString`.
2528
* Added `cast_unchecked` methods on collection types like `NSArray<T>` and `CFDictionary<K, V>`.

framework-crates/objc2-user-notifications/translation-config.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,15 @@ class.UNMutableNotificationContent.counterpart = "ImmutableSuperclass(UserNotifi
1515

1616
# Unsure whether this should depend on Intents, or vice-versa
1717
class.UNNotificationAttributedMessageContext.methods."contextWithSendMessageIntent:attributedContent:".skipped = true
18+
19+
##
20+
## Safety
21+
##
22+
23+
# SAFETY: UserNotifications is well-behaved.
24+
unsafe-default-safety.property-getters = true
25+
unsafe-default-safety.property-setters = true
26+
unsafe-default-safety.instance-methods = true
27+
unsafe-default-safety.class-methods = true
28+
unsafe-default-safety.functions = true
29+
unsafe-default-safety.not-bounds-affecting = false

0 commit comments

Comments
 (0)