Skip to content

Commit

Permalink
Don't call sharedApplication in App Extension (#26077)
Browse files Browse the repository at this point in the history
Summary:
Related to this bug: #25769

Note I also had to add to the bottom of my podfile because RCTLinking had APPLICATION_EXTENSION_API_ONLY='YES' by default somehow.

```
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
    end
  end
end
```
Pull Request resolved: #26077

Test Plan: Sandcastle should be sufficient.

Reviewed By: shergin

Differential Revision: D16860356

Pulled By: sammy-SC

fbshipit-source-id: 02cb3fd3f977420ccdc2991f0c3666ab0186b7bf
  • Loading branch information
ccorcos authored and facebook-github-bot committed Aug 19, 2019
1 parent 9a3d722 commit 81733d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/DevSupport/RCTDevLoadingView.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ - (void)setBridge:(RCTBridge *)bridge
CGSize screenSize = [UIScreen mainScreen].bounds.size;

if (@available(iOS 11.0, *)) {
UIWindow *window = UIApplication.sharedApplication.keyWindow;
UIWindow *window = RCTSharedApplication().keyWindow;
self->_window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenSize.width, window.safeAreaInsets.top + 30)];
self->_label = [[UILabel alloc] initWithFrame:CGRectMake(0, window.safeAreaInsets.top, screenSize.width, 30)];
} else {
Expand Down

0 comments on commit 81733d9

Please sign in to comment.