App binary rejection because of missing storyboard file? - iphone

I got this email from Apple:
We have discovered one or more issues with your recent delivery for "App Name Here". To process your delivery, the following issues must be corrected:
Missing Storyboard File - The referenced storyboard file 'Pass_iPhone.storyboard.storyboardc' was not found in the application bundle.
I don't understand the issue, my storyboard is visible in my project and is editable ect? What can I do to fix this?

I'm not sure if this is your problem, but one thing to check: With the storyboard file selected in the Xcode Project Navigator on the left side, click on the File Inspector tab in the Utilities panel on the right side and make sure your storyboard file has the check box selected for your project under Target Membership. If it is not selected, the file will not be included in the app bundle, although it will still be editable.

Related

Xcode Base internationalization doesn't work

I'm trying to localize my app.
I noticed that if I add a language every localized file become doubled.
In this way it's impossible to maintain code or storyboard so I learnt that I need Base internationalization.
The problem is that when I select that checkbox in xcode project setting it shows a window without nothing to select, does anyone know how to fix this?
Here's a screenshot
First, you need to go to your storyboard file, open the bar on the right side, and go to Show the File Inspector, the furthest tab to the left. Then, scroll down and click localize. After this, when you check Use Base Localization, you should see the storyboard appear.
This could happen if Base Internationalization was active before then disabled and files deleted manually.
Create Base.lproj folder in your project folder using the finder.
Move your main story board to it also using the finder.
fix the reference to it from Xcode.
remove app. from device, clean & build your project.
All will be back to normal.

In Localizable, ViewController.xib's link broken

I'm making iphone app using XCODE 4.2.
I would like to make a localized apps.
I moved the project folder. And then files(related localization)' link is broken.
I use to move folder often.
How can I do? please tell me.... thank!~
Select the xib marked in red
open the File Inspector (View - Utilities - File Inspector)
change "Full Path" to new location

NIB in bundle is missing with name MainWindow-iPad

I have a Tab bar application having 6 tabs. When I debug and runthe app, it crashes by giving following message in console :
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/priyachaturvedi/Library/Application Support/iPhone Simulator/4.2/Applications/7C5CE523-A843-443A-9B0B-BDF2336EA7D0/Aljex Mobile-iPad.app> (loaded)' with name 'MainWindow-iPad''
I have already searched out the answersin the following links
How to fix iPhone Simulator trying to launch a Nib that isn't there?
How are XIBs loaded for localized apps?
and
Could not load NIB in bundle
and many other but nothing worked for me.
any one have any idea why this is happening to me???
Thanks in advance !!!
Suppose you already checked filenames and so on. So I exclude hypothesis of filenames mismatch. Where might be a problem? You might by mistake excluded MainWindow-iPad.xib from being copied into your app during build (linking) time. How to check that?
Insure MainWindow-iPad.xib is in your project.
In project in section Products select your app and in context menu choose Show in Finder. In Finder in context menu choose Show Package Contents. Ensure your MainWindow-iPad.xib is there. If it isn't there, go to step 3. If MainWindow-iPad.xib is in package, double check file names, the problem seems to be in filenames mismatch.
If it isn't there find MainWindow-iPad.xib in your project, select it and ensure checkbox of your target in Inspector isn't deselected. You might did that by mistake. Check this checkbox and rebuild.
I have the same problem too. I realise that when you enter the name of the xib file, it has to be "MainWindow-ipad" without the xib extension in your app targ

Why can't I add a child pane plist file into my project's Settings.bundle?

I'm running Xcode 4.1 and I've been following a tutorial about app settings. Everything has been going great up until I get ready to add a plist for a child pane that I want to add.
The video tutorial I'm watching (also using Xcode 4.1) shows the guy right-clicking the settings.bundle and choosing Add File... and then saving a file named More. In the video tutorial, he ends up with a More.plist showing up in the project and also in the settings.bundle right in the same level with the Root.plist. I just get it in the project. Nothing in the settings.bundle, and I can't figure out how to copy it there.
I've also noticed that in the tutorial, in the Project Navigator, the settings.bundle has an icon that looks kind of like an outline of a shield. In my Project Navigator, the settings.bundle looks like a white sheet of paper with a corner folded down.
Anyone know what the heck is going on?
FWIW, the root app settings works fine in the simulator. I can see the stuff I set up just fine. I can click on the link to my child pane and it switches to it, but nothing that I added in the more.plist shows up there.
Any help GREATLY appreciated!!
Argh, Apple tends to change things without letting anyone know. The whole settings bundle thing is just not well integrated into XCode if you ask me.
If you ever try to localize your application, you will find that you have to manually add the localization folders to the settings.bundle.
Looks like we have to do the same thing to add child menus now, as just adding the plist file does not put it into the settings.bundle.
Here is the set of steps I just tried that worked.
Open up finder, you can right click or two finger click Settings.bundle and choose "Show in Finder".
Right click Settings.bundle in the finder window, choose show package contents.
Copy the new plist file into this the settings.bundle next to the Root.plist
Delete the new plist from the main project.
I was not able to get the text field to show up under additional .plist page.
My Fix:
Leave only 1 Child.plist file outside Settings.bundle
Navigate to Root.plist
Right click and select 'Show Ray Keys/Values'
Right click and select 'Add Row'. Add:
Key: File
Type: String
Value: Root
In Xcode 4.3.2,
Right click the Project Name in the Project Navigator, and choose Show in Finder.
In Finder, right click the setting.bundle and choose Show Package Contents.
Copy the new .plist to setting.bundle.
Back to XCode, open the setting.bundle, wilfully add one item under the Preference Items, then expand it and modify the value of Type to Child Pane.I can't upload the image, so give the link of the blog.
This problem still exists in Xcode 4.2. Creating and moving [child].plist in Finder does help thanks to John S up there.
Some additional tips.
Make sure to turn on "Show Raw Keys/Values" by right clicking inside the opened root.plist file for the "ChildPane Type" to appear. Also make sure to select "Property List Type" as "iPhone Settings plist". If you're having trouble with ordering items, just open the plist file in a text editor and move the xml elements around accordingly.
Additional additional tip: in Xcode 4.2 to explore/expand the contents of the bundle make sure to set its type to Application Bundle (via File Inspector Menu).
Same issue, waste my almost 1 hour.
1st make sure your plist format is correct.
My solution:
Delete you bundle, and re-build & run.
Now everything is fine...

Could not load nib in bundle on iPhone device

I'm trying to test an app I'm developing on my iPhone. To do that I changed the target from Simulator to Device on Xcode. The application is correctly uploaded to the device and it works. The main view is shown but if I try to open a secondary view, the application crashes.
On the iPhone log (I installed the iPhone configuration utility to see the console [is the only way to see the log from iPhone?]) I can see this error:
Could not load NIB in bundle
But, on the simulator it works fine. What's wrong? Any ideas?
I had the same problem and fixed it like so:
Open XCode Target
Click the "Build phases" tab
Click the "Copy bundle resources" section
Click the +
Add the missing Nib file
I've found that sometimes the device is case sensitive and the simulator is not.
What's the filename of your xib?
or
Try uninstalling the app from the simulator and installing it again - the simulator might have an old file left over from a previous run of the app - have you renamed / moved the xib at all during development?
I had a similar problem and was getting the same error. Turns out I was using the full name of the xib file in the attributes panel under "NIB Name:"
Don't use "SomeViewController.xib", just use "SomeViewController" without the ".xib" extension.
I had the same problem when invoking initWithNibName:#"MyViewController"
Changing the invocation to initWithNibName:NSStringFromClass([MyViewController class]) worked well
You can try these things:
Make sure case is correct
Use xib filename without the ".xib" extension
Remove any -(dash) or other special chars, use _(underscore)
Remove the xib file from the project and add back to the Xcode project
Check the build settings and make sure deployment is changed to currect SDK
In my case, the xib simply wasn't being copied into the bundle. Once I added the xib into the "Copy Bundle Resources" step for the application target, everything went fine.
I finally managed to solve that issue with these two steps:
In the view controller files inspector, remove any localization
(just for testing)
Ensure that you have checked the correct target membership
I don't know why it works on the simulator :(
For me, the problem was exactly what FreeAsInBeer said: the nib somehow was missing from the bundle, whereas it had been there before and worked properly in previous versions of the app.
To fix the problem, I did the following:
Select the project in the Project Navigator.
In the project settings select Build Phases.
Expand Copy Bundle Resources.
Scroll down (if necessary) and click on the + button.
In the dialog that appears, click on the Add Other... button.
Browse for the missing .XIB file in the file system.
Build and Run... the missing nib should appear when you run it.
This is just what worked for me when I got that message. Your mileage may vary, since circumstances are not always the same for everyone, but I hope this helps someone who runs into this issue.
-Evan
I ran into the same problem. In my case the nib name was "MyViewController.xib" and I renamed it to "MyView.xib". This got rid of the error.
I was also moving a project from XCode 3 to 4.2. Changing the Path type did not matter.
I had the same error message.
My problem, however was that my language settings on my phone were set on "English" and the Region on "United Kingdom". However, the file that could not be loaded was placed in the de.lproj directory.
Moving the file into the root directory solved it.
A simple mistake that might cause this error is trying to initWithNibName on an imported viewController when you are using a storyboard rather than individual Nib files. If this is the case then just init the controller instead of trying to init with a nib that doesn't exist, or init those fields with nil.
If Storyboard and no nib, change initWithNibName: bundle: to just be init OR initWithNibName:nil bundle:nil
For what its worth, I received this error when one of my tab bar buttons had the wrong class assigned to it.
I've got it to run with delete all of the localization from the xib
In the right window.
Maybe the file is in the localization folder.
I've the same problem. And my solution is remove all Localizations for the view.
I had exactly the behavior you described: works on simulator but get the "Could not load NIB in bundle" when running on the device, and the app remain stuck on the launch image.
In my case the problem was about the MainWindow.xib file that Xcode automatically created with English localization. I am supporting English and Italian in my app and realized that I was missing the localized version of MainWindow.xib for the Italian language.
Because I had no need to localize this file (it's Xcode default to create it localized) I fixed the problem by simply removing the English localization, so the same file is used independently of the localization. Another way to fix the problem would be to add the missing localized version, if you need it.
The app was crashing on the device because my device is configured for Italian language. The simulator instead was set to English and this is why the app run correctly. Just to verify, I set the simulator to Italian language and the app crashed confirming the localization problem.
I also had this problem when I loaded a child view controller from initWithCoder, which is a good place to initialise, but keep in mind you have to add it as an actual child AFTER the view has loaded.
So shift something like this:
[self addChildViewController: self.pageViewController];
[self.view addSubview: self.pageViewController.view];
[self.pageViewController didMoveToParentViewController:self];
...out of your init method and into viewDidLoad. Not saying this is your problem in particular but this may be helpful to others.