Xcode 9中tvOS启动图片无法显示,疑似界面Bug?
Hey Joel, let's tackle this frustrating tvOS launch image issue you're dealing with. Those odd UI glitches—like the missing "e" in "Launch Image Source" and the absent "Launch Image File" option—are strong hints that your project's configuration might be corrupted or Xcode's parsing of it is broken. Here are some targeted steps to resolve this:
Manually inspect your Info.plist file
Xcode's GUI can sometimes misrender configuration data, so dive into the rawInfo.plist(right-click it in Xcode > Open As > Source Code) and check for launch image-related keys:- If using an Asset Catalog, confirm
UILaunchImageAssetspoints to your correct asset set (e.g.,LaunchImage). - If using a standalone image file, ensure
UILaunchImageFileis present and set to your image's filename (without the.pngextension).
Look for any typos, missing keys, or invalid XML formatting—these could be causing the GUI to glitch.
- If using an Asset Catalog, confirm
Wipe Xcode's Derived Data
Corrupted cached data is a common culprit for weird UI and build issues. Delete your project's Derived Data folder by:- Opening Xcode > Preferences > Locations.
- Clicking the arrow next to the Derived Data path to open it in Finder.
- Locating your project's folder, deleting it, then restarting Xcode and reloading your project.
Verify your Asset Catalog (if using one)
If you're usingAssets.xcassetsfor launch images:- Open the Launch Image set and double-check that all required tvOS sizes are populated with your valid PNG (no alpha channel, correct dimensions).
- Ensure the set's properties are configured for tvOS (check the Attributes Inspector on the right).
- Try deleting the existing Launch Image set and creating a new one from scratch, then reimport your images.
Check bundle resource inclusion
Make sure your launch image is actually being included in your app bundle:- Go to your target's Build Phases tab.
- Expand the "Copy Bundle Resources" section.
- Confirm your launch image file or Asset Catalog is listed—if not, click the + button to add it manually.
Test with a fresh project
Create a new blank tvOS project, add your launch image, and see if it displays correctly. If it does, your original project likely has deeper configuration corruption. You can then try migrating your code and resources to the new project, or compare theInfo.plistand project settings between the two to spot discrepancies.Update or roll back Xcode
Sometimes version-specific bugs in Xcode cause tvOS configuration issues. Try updating to the latest stable Xcode release, or if you recently upgraded, roll back to a version where your launch images worked (if applicable).
The missing character and absent option in the Xcode interface are clear signs that something's off with how Xcode is parsing your project's configuration—these steps should help you reset or fix that corruption so your launch image displays as expected.
内容的提问来源于stack exchange,提问作者Joel Prine

