Cant hide statusbar on ios with xcode phonegap

I am trying to remove the status bar in my xcode iOS project. phone version 2.5. Ive tried the following.

1) removal of the status panel from special projects related to telephone recording by adding the following line to config.xml

<preference name="fullscreen" value="true" />

This is my xml file.

    <?xml version="1.0" encoding="UTF-8"?>
    <widget>
    <preference name="KeyboardDisplayRequiresUserAction" value="true" />
    <preference name="SuppressesIncrementalRendering" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="TopActivityIndicator" value="gray" />
    <preference name="EnableLocation" value="false" />
    <preference name="EnableViewportScale" value="true" />
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="ShowSplashScreenSpinner" value="false" />
    <preference name="FadeSplashScreen" value="true" />
    <preference name="FadeSplashScreenDuration" value=".25" />
    <preference name="MediaPlaybackRequiresUserAction" value="false" />
    <preference name="AllowInlineMediaPlayback" value="false" />
    <preference name="BackupWebStorage" value="cloud" />
    <preference name="fullscreen" value="true" />

    <content src="index.html" />

    <plugins>
        <plugin name="Device" value="CDVDevice" />
        <plugin name="Logger" value="CDVLogger" />
        <plugin name="Compass" value="CDVLocation" />
        <plugin name="Accelerometer" value="CDVAccelerometer" />
        <plugin name="Camera" value="CDVCamera" />
        <plugin name="NetworkStatus" value="CDVConnection" />
        <plugin name="Contacts" value="CDVContacts" />
        <plugin name="Debug Console" value="CDVDebugConsole" />
        <plugin name="Echo" value="CDVEcho" />
        <plugin name="File" value="CDVFile" />
        <plugin name="FileTransfer" value="CDVFileTransfer" />
        <plugin name="Geolocation" value="CDVLocation" />
        <plugin name="Notification" value="CDVNotification" />
        <plugin name="Media" value="CDVSound" />
        <plugin name="Capture" value="CDVCapture" />
        <plugin name="SplashScreen" value="CDVSplashScreen" />
        <plugin name="Battery" value="CDVBattery" />
        <plugin name="Globalization" value="CDVGlobalization" />
        <plugin name="InAppBrowser" value="CDVInAppBrowser" />
    </plugins>

    <access origin="*" />
</widget>

Test

ive is also added to my plist file. This should remove the status bar for specific ios applications.

<key>[UIApplication sharedApplication].statusBarHidden = YES;</key>

the code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>icon.png</string>
                <string>icon@2x.png</string>
                <string>icon-72.png</string>
                <string>icon-72@2x.png</string>
            </array>
            <key>UIPrerenderedIcon</key>
            <false/>
        </dict>
    </dict>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleDisplayName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIconFile</key>
    <string>icon.png</string>
    <key>CFBundleIdentifier</key>
    <string>org.apache.cordova.HelloWorld</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSMainNibFile</key>
    <string></string>
    <key>[UIApplication sharedApplication].statusBarHidden = YES;</key>
    <string>YES</string>
    <key>NSMainNibFile~ipad</key>
    <string></string>
</dict>
</plist>

Why is this not working?

+5
source share
2 answers

OP 99% is correct, but you only need to check "Hide during application launch"

Here you will find it:

Select Project Navigator (folder icon in the sidebar)

Select the root project (the one that has the name of your project)

"", " "

+4

i ..! , . target/yourProject . : , .

+3

All Articles