I deployed my app with images for the retina display onto my iPad. Those images are too big. So I want to try using normal size image. I removed my retina display images from the project. I did a cleanup and deployed the app onto my iPad. I still see the retina display image on the device. I am using cocos2d. So the retina display image files are named sprite-hd.png.
I will try testing with sprite#2x.png format. I think even after the app is deleted (long touch and then touch little x icon), the app's resources are still the in the device.
Delete the app from the device, clean targets in Xcode (command-shift-k) and run again and it should work fine.
Related
I have an ios app but am trying to add a launch image to the start. I am testing on an old ios 6 phone (which I think is the retina 4.7). I added the launch image in assets catalog like
I then have it mentioned like so:
When I run the app on my iPhone 6 device it has no load screen. What am I missing? I used to have a LaunchScreen.storyboard but I have all these images of the right size made and want to use those.
I've had this issue before and I believe it's a bug with Xcode. It will still be trying to use the LaunchScreen.storyboard file.
Try the following:
Clean your project.
Delete the app from the device/simulator.
Restart Xcode/Simulator and re-run.
See https://stackoverflow.com/a/33698093/5032154 for more info.
I'm trying to add a launch image to my app which is purely a UIwebview based app. I get the launch image on the simulator (iPhone 7) but not in test flight (iPad pro).
I followed some guides and removed the laud storyboard file, ticked every orientation and requires full screen. Any suggestions on what is causing the problem. I added all images in the assets.xcassets launch image catalogue.
I am making a test sprite kit game, and when I run it on the device, the splash screen doesn't show up although it does work on the simulator.
Here are some screenshots:
Normally I set the target to iOS 7.1 and later, so I use a .xib file and LaunchImage file in xcassets.
I have put 2 correctly sized splash screens in the iPhone portrait iOS 7&8 section, and have selected "Portrait" under iOS 7 and later. The link from the settings file is definitely going to the correct file.
When I run it on the simulator (presumably all devices are iOS 8), the .xib file is used and it displays that splash screen.
When I run it on my iPhone 4, it displays a black screen. In my other apps, it would choose the image from xcassets and display it, but this is not the case.
Does anyone know how I could solve this problem?
Edit
Basically, I have put 4 images into xcassets for a splash screen. I have selected iPhone portrait for iOS 7 and iOS 8.
In the settings pane I deleted the launch screen file reference, so the only reference is to the xcassets launch image (It points to the correct place). I have also deleted the LaunchScreen.xib file.
But when I run the app on the device and the simulator, no splash screen shows up.
I faced similar issue and fixed by Restarting the Mac and iPhone
Uninstalling the app from Simulator/ iPhone helped to fix this issue.
I was having the same problem, and I finally figured out a solution. I want my launch screen to show up on ALL devices capable of running iOS 7 or later, when running my landscape-only Sprite Kit game. Most devices that run iOS 7 can be upgraded to iOS 8 or greater, except for the iPhone 4 (which is stuck with iOS 7.1), and the launch screen wasn't appearing on my iPhone 4 test device. Then I stumbled across Apple Tech Note TN2244. As described in the Tech Note, once you edit the info.plist to enable landscape orientation for iOS 7.0+ iPhone launch images, the correct launch image will appear. As a side note, if you disable the launch image asset catalogs as suggested, the XCode Swift compiler gives you warning messages -- but you don't really need to disable launch image asset catalogs, and if you configure them properly the warnings will disappear and landscape launch images will now work just fine on all devices, including iPhone 4.
Your app's launch image is displayed as soon as your launch your app. Hence the name. It is removed when the appDelegate appDidFinishLaunching: method runs. If you are app has very little to load, your image might get displayed and removed before you have time to see it.
If you want to manually set a longer display time for your launch image, you can add this code to the appDidFinishLaunching: in the appDelegate.m file:
sleep(4);
4 being the number of seconds.
I have several games made with Cocos2d-iphone. All of them are old projects created with Xcode 4 or 5. All games scale fine on the new iPhone 6 and 6 Plus except one that seems to avoid the scaling mode and is running on native iPhone 6/6 Plus resolution. The project does not contain Launch images with the resolutions that seem to disable the scaling mode as explained here
Is there anything else that unlocks the native resolutions? I want the game to run in scaling mode for now until the HD assets are ready for the new resolutions.
I've made a new empty project that does not have any assets and it is working with the native screen sizes.
1. Is there anything else that unlocks the native resolutions?
No for older projects you can only unlock native resolutions by adding launch images
2.I've made a new empty project that does not have any assets and it is working with the native screen sizes.
If you create project from XCode 6 naive resolution will be automatically enabled even if launch images are not added. I just created new sample project from Xcode 5.1.1 and than ran it on Xcode 6 and naive resolution was not enabled and views were scaled in order to fit the screen.
Hope that clears the confusion as your project are old as you mentioned naive resolution will not be enabled unless you add launch images.
Correction
Based on comments i am correcting my answer for projects created in XCode 6 you can delete
Launch Screen File and also not add any iPhone 6/6+ specific launch images. The app will not run in native iPhone 6/6+ resolution.
So For iOS8 you can have either Launch images for iPhone 6 and 6 Plus or a Launch Screen File
Bhumit is partially right, but I believe there is one missing detail.
To disable native resolution (and ensure scaled resolution) I did the following:
Remove LaunchScreen.xib from project as well as any iPhone 6/6+ launch images you may have.
In your app's target, go to General, and under "Launch Screen File" blank out the entry.
Clean and rebuild
I have several games made with Cocos2d-iphone. All of them are old projects created with Xcode 4 or 5. All games scale fine on the new iPhone 6 and 6 Plus except one that seems to avoid the scaling mode and is running on native iPhone 6/6 Plus resolution. The project does not contain Launch images with the resolutions that seem to disable the scaling mode as explained here
Is there anything else that unlocks the native resolutions? I want the game to run in scaling mode for now until the HD assets are ready for the new resolutions.
I've made a new empty project that does not have any assets and it is working with the native screen sizes.
1. Is there anything else that unlocks the native resolutions?
No for older projects you can only unlock native resolutions by adding launch images
2.I've made a new empty project that does not have any assets and it is working with the native screen sizes.
If you create project from XCode 6 naive resolution will be automatically enabled even if launch images are not added. I just created new sample project from Xcode 5.1.1 and than ran it on Xcode 6 and naive resolution was not enabled and views were scaled in order to fit the screen.
Hope that clears the confusion as your project are old as you mentioned naive resolution will not be enabled unless you add launch images.
Correction
Based on comments i am correcting my answer for projects created in XCode 6 you can delete
Launch Screen File and also not add any iPhone 6/6+ specific launch images. The app will not run in native iPhone 6/6+ resolution.
So For iOS8 you can have either Launch images for iPhone 6 and 6 Plus or a Launch Screen File
Bhumit is partially right, but I believe there is one missing detail.
To disable native resolution (and ensure scaled resolution) I did the following:
Remove LaunchScreen.xib from project as well as any iPhone 6/6+ launch images you may have.
In your app's target, go to General, and under "Launch Screen File" blank out the entry.
Clean and rebuild