Black screen when launching the app on device sinc

2019-06-02 02:42发布

I've updated XCode7 and like everyone, i have to amend a part of my code to be compliant with Swift2.

But i have a problem, when i m testing the app on the simulator i have no problem. But when i m trying directly on my real device (Iphone 5S IOS9), a black screen displays just with the level of the battery.

I have tried during 3 days to find something on stackoverflow, but nothing seems working.

This topic seems to be the same problem, but doen't work actually. IOS 7 launch image, displaying black screen on device ONLY

I' ve followed the topic iOS 9 Black Launch Screen but it doesn't bring any correct solution

Any idea, or help will be appreciated.

2条回答
狗以群分
2楼-- · 2019-06-02 03:32

Its worked for me:

You can solve this problem using following steps :

  1. First select root level of project and then go in General tab and Find that below blocks.

  2. By default, in "Launch images Source" it shows "Use assets catalogs", click on it

  3. It will ask you to "Migrate launch images to an asset catalog", simply click on "migrate".

  4. Now, In same block in "Launch Screen file", remove default launch screen xib or storyboard. because we don't need to specify it. Just put blank on there.

  5. Now it shows, "Brand Assets" in *launch Images Source", just click on right side arrow of it and set all your app launch screen assets with specific naming scheme.

  6. Press "alt + cmd + shift + k". It will clean build folder of your application.

  7. Now, build and run your app in device.

查看更多
贪生不怕死
3楼-- · 2019-06-02 03:44

When your app connects to an Webserver or to a domain with localhost or non https means http , than post below into your info.plist:

<key>NSAppTransportSecurity</key>  
<dict>  
    <key>NSExceptionDomains</key>  
    <dict>  
        <key>127.0.0.1</key>  
        <dict>  
            <key>NSExceptionAllowsInsecureHTTPLoads</key>  
            <true/>  
        </dict>  
        <key>localhost</key>  
        <dict>  
            <key>NSExceptionAllowsInsecureHTTPLoads</key>  
            <true/>  
        </dict>  
    </dict>  
</dict> 

This let the app make an exception to use Urls without SSL / https.

查看更多
登录 后发表回答