Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Use UIStatusBarStyleDefault in standalone apps unless otherwise speci…
Browse files Browse the repository at this point in the history
…fied. This fixes a longstanding issue where the status bar style is different between Expo client and standalone apps
  • Loading branch information
brentvatne committed Apr 25, 2020
1 parent 104b52e commit 474a56e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/xdl/src/detach/IosNSBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ async function _configureInfoPlistAsync(context: AnyStandaloneContext): Promise<
// make sure this happens first:
// apply any custom information from ios.infoPlist prior to all other exponent config
let usageDescriptionKeysConfigured: { [key: string]: any } = {};
let extraConfig;
if (config.ios && config.ios.infoPlist) {
let extraConfig = config.ios.infoPlist;
extraConfig = config.ios.infoPlist;
for (let key in extraConfig) {
if (extraConfig.hasOwnProperty(key)) {
infoPlist[key] = extraConfig[key];
Expand All @@ -270,6 +271,13 @@ async function _configureInfoPlistAsync(context: AnyStandaloneContext): Promise<
}
}

// reset the status bar style to the default gray. this can be removed if we
// ever change expo client to use `UIStatusBarStyleDefault` instead of
// `UIStatusBarStyleLightContent`
if (!extraConfig?.UIStatusBarStyle) {
infoPlist.UIStatusBarStyle = 'UIStatusBarStyleDefault';
}

// bundle id
infoPlist.CFBundleIdentifier =
config.ios && config.ios.bundleIdentifier ? config.ios.bundleIdentifier : null;
Expand Down

0 comments on commit 474a56e

Please sign in to comment.