Default App Icon not appearing in iOS Simulator - xcode

I have searched quite a lot for an answer to this problem. If I have a general application, HelloWorld, and create an interface and then go to test it, then click on the Home button, not even the default grey/white icon is there like it's supposed to be. Anyone have any ideas why? I've even tried specifying a custom icon in the Info.plist file, but still nothing...
I've got the latest version of Xcode and the SDK as well. (3.25 - 4.2)

I solved it. Apparently, in order for it to put the icon there, I have to run it from within XCode, and not Interface Builder.

Related

WidgetKit on Mac with Intent doesn't work

I am trying to make a WidgetKit widget for macOS Big Sur. The widget itself works -- the same code on both the Mac and iOS. The issue is that on the Mac the intent (settings) does not work. When I click "Edit Widget" the options I defined do not appear. When I press "Done," it's replaced with a screen that says "Unable to load."
This seems to happen with a brand new target and just a simple new text parameter. These are the steps I took:
Create a new Mac project
Add a new Widget target
Change the generated Intent, adding a parameter. You also need to add a "Siri Dialog Prompt"
Click "Run"
Click "Info" in the Widget Simulator
Click "Configure Intent"
Am I missing something or is this a bug?
This has been an issue since at least Big Sur beta 5 and Xcode 12b6. I opened a ticket with Apple, but I'm also asking here as it seems that some people have it working and it's entirely possible that I'm missing something!
This seems to be a bug of the Widget Simulator. When I run the same Widget in the Widget panel of Big Sur, I see all configuration options.
The problem turned out to be an older copy of the app on my disk and macOS getting confused and looking in the wrong place.
I'm adding a Widget to an existing app that doesn't currently have one. I have the current, App Store version in /Applications. I've been running the updated version from Xcode or exporting it to my desktop and running it from there. The Widget itself -- as noted in the question -- runs just fine. But it seems that when looking for the Intent used for the configuration, it prefers to look in /Application rather than the Xcode version. As soon as I deleted the original app, the widget and its settings immediately started working.
Thanks to Ely for pointing me to this blog which didn't give the answer but pointing me in the right direction.

Invalid Bundle Error - "requires launch storyboard"

I keep getting this error when I try to submit my app to the store using Xcode:
ERROR ITMS-90475: "Invalid Bundle. iPad Multitasking support requires launch storyboard in bundle 'com.companyname.appname.'"
Anyone know what this error really means?
This is because you need to specify how your app is supposed to handle multitasking on iPad.
If you don't want to handle multitasking right now, you can simply disable it by going to the "General" tab of your target:
I solved the problem in this way, see here:
If you must opt out of Slide Over and Split View, do so explicitly by adding the UIRequiresFullScreen key to your Xcode project’s Info.plist file and apply the Boolean value YES.
You need to add a Launch Screen (Xcode > File > New).
Under iOS > User Interface you select "Launch Screen" to add it to the project.
For the iPad you need to support all 4 orientations.
Select in Xcode your target file, and under the General Tab, go to the "App icons and Launch Images".
Here you select the Launch Screen file you created.
When you launch the app you'll see the launch (bitmap) images are not used, but the Launch Screen Storyboard.
You can either do it as André showed or directly add:
<key>UIRequiresFullScreen</key>
<true/>
On your .plist file.
If you are using Cordova, you might want to use the cordova-ios-requires-fullscreen plugin (see How to disable iOS9 multitasking through Ionic/Cordova?)
Update: you can also use the cordova-plugin-ipad-multitasking, which seems to also prevent another issue (ITMS-90474)
Update: this should now be fixed using Cordova tools 5.4 without the need for these plugins.
In Xcode 14.2, setting the launch storyboard should be as simple as selecting the required storyboard as Launch Screen File in the "General" settings for the target. This not only avoids spelling mistakes, it also ensures that the storyboard is included in the bundle. However, I found that uploading to the App Store failed as per the OP if support for multiple windows is included (that is, if requires full screen is not checked).
If the storyboard has been configured in this way then the problem may be because the name of the storyboard includes a .storyboard extension, which it's not supposed to (see also post by Muhammad Ibrahim). This can be fixed without checking the box for requires full screen:
In Xcode, go to your build target and select the General tab.
In the section "App Icons and Launch Screen", check if a Storyboard file is selected and if it has a .storyboard extension.
If so -> tap the name of the storyboard to edit it, take off the .storyboard extension and press return.
That's it! The name of the storyboard will no longer show, but the problem will be fixed.
IF you ONLY want to set RequiresFullScreen For iPhone, and support iPad Multitasking, try this:
<key>UILaunchStoryboardName~ipad</key>
<string>LaunchScreenIPad.storyboard</string>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIRequiresFullScreen~ipad</key>
<false/>
LaunchScreenIPad.storyboard is the name of LaunchScreen for iPad.
iPhone will still use Launch Images Source pictures.
Apple Document Ref: Creating Platform- and Device-Specific Keys
If you want to support split views in iPad, in your info.plist file, set just "LaunchScreen" as the value for key "UILaunchStoryboardName", instead of "LaunchScreen.Storyboard" and you need to support all 4 orientations for iPad.

Destination toolbar disappeared on XCode 6.4

Today in the morning I tried to compile my project to run in my device and I found the destination toolbar disappeared and I cannot choose my IOS device or IOS Simulator device as target. (I can do it in the Product/Destination Menu)
After some research I found the >> at the right on the screen and when I pushed a Scheme option appeared but it is disabled and I can't enable again.
This is what I tried with no success:
Open an old project to see if the problem was in my project
Create a new project (with Swift and Objective C but I don't think this make any difference)
Restart my computer
Hide and show the toolbar (View menu/Hide Toolbar and the View menu/Show Toolbar)
I tried all the previous options with the device connected and disconnected
I have installed the IOS Simulator 8.4 (when I run my project it runs in the last selected simulator) and XCode 6.4.
Looks like Xcode hides that menu when the window is a certain size. I have to make my window quite large before it comes back.
Not a fix as such but you can work around it using the menus: Product > Scheme and Product > Destination
You're probably running into the same issue I am. Like #BrandonWilliams said in his answer, it appears again if the Xcode window is wide enough. The underlying cause, for me at least, seems to be that in this build of Xcode (6.4) running on El Capitan beta 2 (with Xcode 7 beta installed), I am seeing duplicate simulators for iOS 8.4. And since there are two of the same version, the Schemes dropdown shows some sort of long GUID next to each one, causing the Scheme dropdown to be quite large:
I came to SO looking for an answer but realized that I had seen this issue before.
So the problem is basically that auto layout sucks (I mean it is not working properly in Xcode 6) and on El Capitan, the destination toolbar is for some reason hiding instead of collapsing properly. So when your Xcode window is narrow, the destination toolbar disappears.
But, if you expand the window far enough, it shows back up again.
In case you can't tell, in the first screenshot, the window is about 1241 pixels wide and in the second screenshot the window is 1541 pixels wide.
Go to Product then Destination and choose at which simulator or device you want to test your build.
I'm running with same problem. You can select device or change scheme using below steps:
Select Product from menu
Select Scheme or Destination
Select required Scheme option or Destination option
Alternative Solution:
The only solution is to use Xcode 7 or above. I've installed Xcode 7.1 and found Scheme/Simulator list available. Refer screenshot.
It seems that Xcode 6 or below doesn't support OS X El Capitan.
I am still seeing this problem in Xcode 7.2 on iMac with resolution 1920x1080. Resizing the XCode windows dens't help. I can have the menu bar back if I push the green button and go to full screen mode. But that's pretty annoying. This is how I finally figure out a solution that works for me. I notice that only if I open the project file that I have been working daily that the menu bar is missing. If I create a new project, the menu bar is there. And here is my solution:
Remove your project file on disc (or move it to a different folder)
Open the Welcome to Xcode window by shift+command+1
Make sure your project is no longer under this list. If it is still there, click on it and Xcode will tell you the project is not found and it will be removed.
Add the project file back and open it and I have my menu bar back (if you have moved it, simply opening it from a different file location may work I guess)
I guess the problem is that some cache value in Xcode about the project file is messed up somehow. Hope this helps.
I make my XCode screen little big and now find both options.
On XCode 9.0 beta, this worked for me: select View -> Show Toolbar from menu
right click on title bar -> select show toolbar
Fixed it by deleting the following file ~/Library/Preferences/com.apple.dt.Xcode.plist and restarting Xcode.
The downside is that Xcode preferences dropped to defaults obviously.

Tab Bar Icon display issue in universal app

I have an odd issue that's driving me nuts by now. Hopefully someone here can help me or ran into something similar. I've searched up and down but didn't find anything similar.
I am creating a universal app (Xcode 4.3.3) with storyboard including a UITabBar with 4 icons. The icons are from the free glyphish set, and look just fine in the iPhone simulator. In the iPad simulator, however, they look enlarged, and only about the top half is visible in the tabbar.
In addition to the original icon, I also created #2X, ~ipad and #2X~ipad versions (I did this for pretty much all art via batch in Photoshop). However, the icons look the same (i.e. too large) in the iPad simulator even when I remove these other versions and only keep the glyphish original.
I looked at the storyboard source code, I changed around a bunch of Tabbar and TabbarItem settings in the storyboard, nothing seems to help. HELP!
EDIT: I just noticed that the icons look fine in the iPad (Retina) simulator!?!?
SOLVED IT:
OK, solved it myself. Not sure which of these steps did it, but here's what I did:
delete the app from the simulator
Clean the Project
Recompile and Run
Now the icons display correctly. Go figure.
SOLVED IT: OK, solved it myself. Not sure which of these steps did it, but here's what I did:
Delete the app from the simulator
Clean the Project
Recompile and Run
Now the icons display correctly. Go figure.

Xcode Interface Builder wont start

I have a relatively confusing problem: I created several empty Xcode projects and ran the iPhone and iPad emulators just to see what happens and everything is fine, empty, but fine. However, then I decided to actually add some content but when I double click my .xib file nothing happens. The Xcode loses focus, but nothing opens. The Interface Builder simply does not open.
Do I need to start it separately somehow or do I need to download and install it separately or something else altogether?
I had the same problem when i first installed xcode.
What solved it for me was manually starting the Interface Builder once (via spotlight).
After that it worked again by double clicking on the xib file in xcode....
The most common cause of this in my experience is failure to reboot after installing or upgrading Xcode. Xcode gives you the impression that you don't need a reboot, but in practice you do. Have you done this yet?
Try to search for interface builder in Mac OS search bar on the top right of the screen, open it, click on open existing file. Open any xib file once, then it will be automatically detectedd by xCode.

Resources