Why Changing launchImage so troublesome?
My app used a .storyboard for a Launch Screen.Now, I need to replace a new picture for the launchScreen. First of all, I put the picture into 'Image.xcassets', the launchScreen is white.
Then I search some ways to solve it .
Delete the app and restart. This can change the launchImage, but this method is not good for the users.
Put the picture in the root directory. In a few days the launchScreen does load the new image. but maybe 2 or more days later, launchScreen become white or black.
Has anyone ever experienced this, what advice? thanks for any help.
These caches are used by Springboard to make app switching fast. This isn't a problem that will affect your production users and should in theory go away the next time Springboard decides to snapshot your app.
That being said, this isn't a problem you can fix. This is a bug in Apple's code not yours.
Related
I have a launch image with text, that I'd like to internationalize (I know that Apple doesn't like launch images with text though...).
It would be great, if I could do this in code, because then the footprint of the app will be much smaller.
Is it possible to do so and how would I access the launch image? I know the the app icon can't be created dynamically by code, thats why I guess the launch image might follow the same rule.
Thanks.
If you mean the Default.png, no you can't.
As you mentioned, you can localize them but it will raise your app size.
One possible solution is to make a really quick app start and a launch image without a text and right after your app launch (-applicationDidFinishLaunching may be appropriate) you display a pseudo splashscreen with your localized text for n seconds.
But keep in mind this isn't nice nor something apple wants.
This can not be done, since the launch image is in the application bundle which is readonly.
You could however present a second screen just after launching, if you make sure you do not do anything in the application:didFinishLaunchingWithOptions: but show you seconds splashscreen it will only show the default.png for a very short time.
I have a problem with my xcode, all worked before but suddenly my app does not launch.
Xcode saying that it's launching but I just have black screen on simulator and nothing in the log...
I try on device but It's the same problem.
Screen of xcode : http://i.stack.imgur.com/bYh4y.png
Edit : I tried with an other project and the app it's running.
Edit 2 : The problem come from storyboard... I will post a new ask. Thanks
You probably don't need this anymore, but I'm going to try to provide my answer for others out there.
Sorry if I'm violating the rules, etc. I'm new here. :)
Overall list of possible fixes (you guys have gotten here way before me, but I'll include them anyway--with credit).
Sometimes, when it hasn't been used in a while (or if the project is new, etc.), the simulator takes a minute to load. This was mentioned by 68cherries.
Did you check your storyboard entry point? I can't see it in the picture, but recently I've had it disappear a couple times. Just check "Is Initial View Controller"... see this picture.
And finally... although this has been said by the great Jim... did you try "cleaning" your app? This always helps me out.
Anyway, I hope I haven't bothered you and that this helps anyone who may need it!
I understand, Its a HIG violation to play around with the default launch icons and splash screens, but I have requirement such that, I need to display the splash screen only for the first time, Is it possible to implement it ?
One simple solution, I can think of is : displaying as an imageView on top of UIwindow and then removing it based on a timer. Am looking for other options.
My advice is to rework your view hierarchy so that the first view mimics the splash screen you wish to show (A view controller with a uiimage embedded should work fine for what you've described). Then push the "main screen" over top of that view after your specific period of time. A little code to ensure that this happens only on the first run with some persistent storage and you should be good to go.
I do not advise working with UIWindow directly. Doing so can lead to all sorts of headaches.
That is to simple.
But you aren't need to manipulate the launch image, but an image loaded by your app.
To prevent to launch the second time you can set a flag in the internal storage.
Make sure to use a lazy load / initalization technique and display the image fast as much is possible, than do the initializations.
I hope it helps!
If you use iOS6, you can use restoration feature.
At first run your app will show launch image. All other runs it'll show last state screenshot.
So you know its a HIG violation but looking for some workaround.
You have to have a launch image while uploading the app and showing on first launch.
I assume you dont care about app review in appstore.
Lets think
Launch image has to be in main bundle. And the main bundle is readonly for your code.
I have some workaround but it may work only for second time launch to show the launch image and then no again.
Add your launch image with any name
Add a symlink to your app bundle with name Default.png, which shows the file in 3. step
Copy that launch image to your app directory folder (your symlink in app bundle shows the file) on first launch.
Launch second time the app and see the launch image
Delete the copied image.
When your app can not find a png file which showed by your symlink it can not show launch image
PS: Personally I did not try that but may work.
I'm using Trigger.IO's toolkit to add the launch images. After doing so, the app fails to remove them from view after initially starting up the app. After hitting home and then going back to the app, the launch image disappears after launch.
The app isn't actually freezing after launch but just keeping the launch image at the forefront. I used a partially transparent image initially, and it appeared just to have a high z-index. I could use the app, but the launch image remained on screen over the top of everything.
As of platform version v1.4.20 you can control the launchimage visibility (http://docs.trigger.io/en/v1.4/release-notes.html#v1-4-20).
We've seen some instances of very early usage of the Forge APIs causing the launchimage not to show. In most cases, leaving the launchimage to hide itself manually is fine; if you're having problems or want more control over the launchimage, you can use forge.launchimage.hide.
Very odd, the problem seems to have dissipated even though I have not attempted to address it directly considering it was merely a config file change.
I'll report back if the problem surfaces again, but all is well currently!
Try add to use this code line
[window setRootViewController:mainController];
For full help, we need a some your codes
Thanks for the time to look. I have a weird problem. my Launch image (AKA Splash screen) seems to automatically be tied to my App icon. so I cant change one with out changing the other. In other words, when I add a new app icon, it changes the launch image to match.
I am guessing this has something to do with the .plist file, but I cant figure out where to fix it.
Thanks for the time!
You can specify them differant in plist file. See here
ALSO
Check Apple's link for default name of different files. You just need to rename with default name and add the image files in your project.