Skip to content

[e-m-c] use #selector syntax in ExpoAppDelegateSubscriberManager#41380

Merged
vonovak merged 1 commit intomainfrom
vonovak__e-m-c_use_selector_syntax_in_expoappdelegatesubscribermanager
Dec 3, 2025
Merged

[e-m-c] use #selector syntax in ExpoAppDelegateSubscriberManager#41380
vonovak merged 1 commit intomainfrom
vonovak__e-m-c_use_selector_syntax_in_expoappdelegatesubscribermanager

Conversation

@vonovak
Copy link
Copy Markdown
Contributor

@vonovak vonovak commented Dec 3, 2025

Why

This PR improves the way selectors are referenced in ExpoAppDelegateSubscriberManager.swift by using explicit selector references to protocol methods instead of using string-based selectors. This approach is more type-safe.

How

Updated all selector references in ExpoAppDelegateSubscriberManager.swift to use explicit protocol method references:

  • Changed selector references like #selector(application(_:willFinishLaunchingWithOptions:)) to #selector(UIApplicationDelegate.application(_:willFinishLaunchingWithOptions:))
  • Replaced string-based selectors using NSSelectorFromString with #selector syntax
  • Made similar changes for both UIKit (iOS) and AppKit (macOS) application delegate methods but I did not test macos!

Test Plan

  • green CI

Checklist

Copy link
Copy Markdown
Contributor Author

vonovak commented Dec 3, 2025

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Dec 3, 2025
@vonovak vonovak marked this pull request as ready for review December 3, 2025 16:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 3, 2025

Subscribed to pull request

File Patterns Mentions
packages/expo-modules-core/** @Kudo, @lukmccall

Generated by CodeMention

Copy link
Copy Markdown
Member

@gabrieldonadel gabrieldonadel left a comment

Choose a reason for hiding this comment

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

👏

Copy link
Copy Markdown
Contributor Author

vonovak commented Dec 3, 2025

Merge activity

  • Dec 3, 8:09 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Dec 3, 8:11 PM UTC: Graphite rebased this pull request as part of a merge.
  • Dec 3, 8:12 PM UTC: @vonovak merged this pull request with Graphite.

@vonovak vonovak changed the base branch from vonovak__e-m-c_add_tests_for_expoappdelegatesubscribermanager_callback_forwarding to graphite-base/41380 December 3, 2025 20:10
@vonovak vonovak changed the base branch from graphite-base/41380 to main December 3, 2025 20:10
@vonovak vonovak force-pushed the vonovak__e-m-c_use_selector_syntax_in_expoappdelegatesubscribermanager branch from 350ac45 to bbaf3fd Compare December 3, 2025 20:10
@expo-bot
Copy link
Copy Markdown
Collaborator

expo-bot commented Dec 3, 2025

Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.

I've found some issues in your pull request that should be addressed (click on them for more details) 👇

⚠️ Suggestion: Missing changelog entries


Your changes should be noted in the changelog, e.g.:
- use #selector syntax in ExpoAppDelegateSubscriberManager ([#41380](https://github.com/expo/expo/pull/41380) by [@vonovak](https://github.com/vonovak))
Read Updating Changelogs guide and consider adding an appropriate entry to the following changelogs:


Generated by ExpoBot 🤖 against bbaf3fd

@expo-bot
Copy link
Copy Markdown
Collaborator

expo-bot commented Dec 3, 2025

The Pull Request introduced fingerprint changes against the base commit: bc2e754

Fingerprint diff
[
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-modules-core",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid",
        "expoAutolinkingIos"
      ],
      "hash": "e548f3590f55781d349964972ed50475675533fc"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-modules-core",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid",
        "expoAutolinkingIos"
      ],
      "hash": "7a7c1d05c6b0afcac921753a366523e572ec704e"
    }
  }
]

Generated by PR labeler 🤖

@vonovak vonovak merged commit ad35242 into main Dec 3, 2025
12 of 15 checks passed
@vonovak vonovak deleted the vonovak__e-m-c_use_selector_syntax_in_expoappdelegatesubscribermanager branch December 3, 2025 20:12
Kudo pushed a commit that referenced this pull request Dec 4, 2025
)

# Why

This PR improves the way selectors are referenced in `ExpoAppDelegateSubscriberManager.swift` by using explicit selector references to protocol methods instead of using string-based selectors. This approach is more type-safe.

# How

Updated all selector references in `ExpoAppDelegateSubscriberManager.swift` to use explicit protocol method references:
- Changed selector references like `#selector(application(_:willFinishLaunchingWithOptions:))` to  `#selector(UIApplicationDelegate.application(_:willFinishLaunchingWithOptions:))`
- Replaced string-based selectors using `NSSelectorFromString` with `#selector` syntax
- Made similar changes for both UIKit (iOS) and AppKit (macOS) application delegate methods but I _did not test macos_!

# Test Plan

- green CI

# Checklist

- [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)

(cherry picked from commit ad35242)
aleqsio pushed a commit that referenced this pull request Dec 5, 2025
)

# Why

This PR improves the way selectors are referenced in `ExpoAppDelegateSubscriberManager.swift` by using explicit selector references to protocol methods instead of using string-based selectors. This approach is more type-safe.

# How

Updated all selector references in `ExpoAppDelegateSubscriberManager.swift` to use explicit protocol method references:
- Changed selector references like `#selector(application(_:willFinishLaunchingWithOptions:))` to  `#selector(UIApplicationDelegate.application(_:willFinishLaunchingWithOptions:))`
- Replaced string-based selectors using `NSSelectorFromString` with `#selector` syntax
- Made similar changes for both UIKit (iOS) and AppKit (macOS) application delegate methods but I _did not test macos_!

# Test Plan

- green CI

# Checklist

- [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants