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

Remove usage of UIApplication.sharedApplication #34787

Closed
wants to merge 1 commit into from

Conversation

evoactivity
Copy link
Contributor

Summary

Brings in line with rest of code base and avoids running into this error

‘sharedApplication’ is unavailable: not available on iOS (App Extension) — Use view controller based solutions where appropriate instead.

when Requires Only App-Extension-Safe-API is set to Yes.

Changelog

[iOS] [Fixed] - Update usage of UIApplication.sharedApplication in RCTKeyCommands

Test Plan

Setting Requires Only App-Extension-Safe-API to Yes before this change means the app will not compile, after the change it does.

Brings in line with rest of code base and avoids running into this error
```
‘sharedApplication’ is unavailable: not available on iOS (App Extension) — Use view controller based solutions where appropriate instead.
```
when `Requires Only App-Extension-Safe-API` is set to Yes.
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Sep 26, 2022
@react-native-bot react-native-bot added Bug Platform: iOS iOS applications. labels Sep 26, 2022
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,725,527 +0
android hermes armeabi-v7a 7,128,411 +0
android hermes x86 8,032,083 +0
android hermes x86_64 8,005,366 +0
android jsc arm64-v8a 9,595,873 +0
android jsc armeabi-v7a 8,362,168 +0
android jsc x86 9,540,083 +0
android jsc x86_64 10,132,493 +0

Base commit: cc13b02
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: cc13b02
Branch: main

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @evoactivity in 5e79fa8.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Sep 26, 2022
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
Brings in line with rest of code base and avoids running into this error
```
‘sharedApplication’ is unavailable: not available on iOS (App Extension) — Use view controller based solutions where appropriate instead.
```
when `Requires Only App-Extension-Safe-API` is set to Yes.

## Changelog

[iOS] [Fixed] - Update usage of UIApplication.sharedApplication in RCTKeyCommands

Pull Request resolved: facebook#34787

Test Plan: Setting `Requires Only App-Extension-Safe-API` to Yes before this change means the app will not compile, after the change it does.

Reviewed By: dmytrorykun

Differential Revision: D39812410

Pulled By: cipolleschi

fbshipit-source-id: 78d185ba20301b10609e4a387f000f0cfda55663
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: iOS iOS applications. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants