Swapped images in xcode and now app is crashing - ios

I deleted old images in xcode project, default.png, default#2x.png, etc., replaced them all with new images with the SAME SIZE and the SAME NAME - app build succeeded but crashed when opened (didn't go beyond hang screen using testflight)
Git Hard Reset and redeployed - app worked
Changed Images again - app build succeeded but crashed when opened (didn't go beyond hang screen using testflight)
Put back old images manually without reset - app build succeeded but crashed when opened (didn't go beyond hang screen using testflight)
Clearly this is not about the new images because I put them back. No clue what is happening. Not even sure what to google here.
Edit: Sorry, I am very new to this, but I see this at the bottom:
2013-11-07 22:41:17.651 MySaleTable[1934:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'MainStoryboard_iPhone' in bundle NSBundle (loaded)'
* First throw call stack:
(0x2d52bf53 0x378556af 0x30146d41 0x2ff15b49 0x2fd07c25 0x2fca26a7 0x2fca19a9 0x2fd074fd 0x3213970d 0x321392f7 0x2d4f69e7 0x2d4f6983 0x2d4f5157 0x2d45fce7 0x2d45facb 0x2fd06799 0x2fd01a41 0x2eb45 0x37d5dab7)
libc++abi.dylib: terminating with uncaught exception of type NSException

Suggest you delete the derived data in the Xcode organizer, close and reopen Xcode. Then open the right pane file browser, and one by one seclect your storyboards and images in the left pane, and verify that it's included in the project. Select your storyboard and verify it loads in the center pane. You can also select the target and insure images and storyboards are in the Copy ToBundle phase (I forget exact name).

Related

Storyboard error with Target Membership(GREYED OUT)

I recently renamed my project and a variety of errors came up relating to the paths that Xcode was trying to use to access my files.
This was most likely due to an ill attempt at renaming the project so I retracted my efforts and decided I would just change the name of the App the customers see. Anyways a peculiar error has risen up because of this.
When I build the app it crashes with a THREAD 1 SIGABRT error. Here is the output of the console.
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'Could not find a storyboard
named 'Main' in bundle NSBundle
(loaded)'
*** First throw call stack: (0x18b2341c0 0x189c6c55c 0x191835bd0 0x191306b48 0x1910ef0a8 0x1913057c0 0x19131a080 0x1913028c4
0x18cdd58bc 0x18cdd5728 0x18cdd5ad0 0x18b1e2278 0x18b1e1bc0
0x18b1df7c0 0x18b10e048 0x1910e85dc 0x1910e3360 0x100037bb8
0x18a0f05b8) libc++abi.dylib: terminating with uncaught exception of
type NSException
I have cleaned my project several times as well as doubled check the plist to ensure the string was correct. Here is a link to a similar question whose answer I tried.
Could not find a storyboard named 'Main' in bundle
I found my problem but still am not sure how to fix it. In my main storyboard under The File Inspector my TARGET MEMBERSHIP for the App is GREYED OUT but the Test and UITest version of it are not.
I have tried a variety of build with different checks as well as deleted the app off of my physical device and cleaned the project and tried again. I even deleted the reference to the Main.storyboard and re-added by dragging from a pane like in one of the answers on the link provided and it lets me select all the Target Membership's but when I open the File inspector only the tests are selected on not the main top option. Can anyone help me out on this?
It would be greatly appreciated, I have been at it for hours and I am sure it is something small I am missing.
have you tried to verify the your info.plist?
you can also create a new storyboard (copy all viewController in Main.storyboard) and then in "Main storyboard file base name" key of your plist set the value of your new storyboard name.
Or check this Build Settings:
check also the target associated it.

Could not instantiate class named ADBannerView after Removing iAD

Weird thing that I have spent about 4 hours debugging:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named ADBannerView'
I used to have iAD and then removed it. Now I use Google AdMob.
I have macros set up to determine the free/paid version. On the free version that is supposed to show ads, everything is fine and it displays the AdMob ads.
In the paid version, which does not call any ads, I get this error: Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named ADBannerView'
The only thing I can think of is that I may have an old iAd Banner View somewhere, but I can't find it!
Any hints?
Also: Everything works fine on the simulator.
Have you checked to make sure that there are no ADBannerViews in Interface Builder? The sort of error you are seeing says that the app is trying to create one somewhere.
Educated guess:
are you using the UI State Preservation & Restoration API? If so return NO from application:shouldSaveApplicationState: to get rid of the current saved state.
Once that works you should implement some kind of restoration version checking to prevent crashes on your users devices.
If that doesn't work, or you are not using state restoration, try to delete the app from the device. If you deploy from Xcode files are only added, never removed. So it's possible that an old file references ADBannerView. Delete the app to get rid of such orphan files.
Edit: That link should take you to the "Encode version information along with the rest of your app’s state." section. It doesn't, but you will find a small info about version checking at the bottom of the page.

iPad app closes after 2 seconds, memory issue?

I made a magazine iPad app so you can scroll through different slides to the left, right, down and up. It's all ready and accepted by the iTunes app store. Problem is, if someone downloads the app it closes directly after 1 seconds of loading.
Weird part is that i installed the app trough xCode and all works without any problems. My guess is that the app takes too much memory. I made a screenshot of the memory instrument:
But how can i release a Srollview if it must be loaded all the time?
Hope someone could push me in the right direction!
I have tested your app on my iPad2 with iOS 5.1.1, and it crash with the following message:
OxygenEvents[97151] <Error>: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x375c388f 0x31638259 0x375c3789 0x375c37ab 0x309de54d 0x309de6bb 0x309de423 0x3096f001 0x308dd3c7 0x307bac59 0x30730c17 0x10d5d5 0x30730c8b 0x109beb 0x30730c8b 0x3072f461 0x30721e87 0x307927d5 0x10960b 0x3072fcab 0x307297dd 0x306f7ac3 0x306f7567 0x306f6f3b 0x3771322b 0x37597523 0x375974c5 0x37596313 0x375194a5 0x3751936d 0x3072886b 0x30725cd5 0x10944f 0xf0050)
It is because you use "Autolayout" in your Interface Builder files (nib / xib files), which is an iOS 6.0 only feature.
To solve this, either disable Autolayout in all your xib files like this:
or simply make your app iOS 6.0 only by setting deployment target as iOS 6.0

Getting an error from the Stanford iOS Class, but my code seems identical

I believe I did what the instructor did verbatim, but my app (it's a simple app) won't work and errors out if I press a button.
I click run, and it builds, but when I click a button in the iOS simulator the app crashes and brings me back to Xcode with an error.
I don't know what I did wrong. It brings me to the main.m file when we didn't even deal with that in the Stanford guide (maybe it has to do with the fact that the Stanford guide uses iOS 5.0 and I'm on 5.1?).
Here's the project if anyone wants to take a lot at it. I'm just really confused.
http://cl.ly/212A3q3J1m1F1y3A041A
(Also, did I just need to include the xcodeproject file, or was I right in including the whole project folder in a zip file?)
It looks like you have your buttons linked to a selector called digitedPressed:
They also appear to correctly be linked to digitPressed. Just remove the references to digitedPressed. (Right click the Calculator View Controller in your storyboard)
Don't forget to check the XCode debugger! This is the error the XCode debugger showed me:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CalculatorViewController digitedPressed:]: unrecognized selector sent to instance 0x9129cc0'

iOS: Deleted Code Keeps Affecting App

I removed an attribute from an object; I made sure there is no reference to it after I took it off; but when I run the app it crashes upon a certain method saying that it cannot find this attribute that I had removed.
To be more specific, I used this attribute in a method and the error I get in the log is:
2011-08-04 15:32:17.895 myApp[10125:207] -[myUIViewController aMethodName:anAttributeThatIHadDeleted:]: unrecognized selector sent to instance 0x5e5d010
2011-08-04 15:32:17.962 myApp[10125:207] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[myUIViewController aMethodName:anAttributeThatIHadDeleted:]: unrecognized selector sent to instance 0x5e5d010'
I tried the following and it didn't help:
I made sure that this anAttributeThatIHadDeleted does not appear in this method (nor in the h file neither in the m file)
I deleted the app from the iPhone Simulator, and then did Product >> Clean
I even closed the simulator, closed the application, after I did this delete + clean actions
Can anyone think of anything else I can do to resolve this?
If you're absolutely sure the method doesn't exist anymore, I'd delete it from the simulator, quit the simulator, quit XCode, delete the "build" folder in Finder of you project and then start them all again
There was one thing I forgot to do.....
Deleting the Interface Builder >> UIButton connection to the File's Owner IBAction method and re-connecting it to the new one (it was the same one, I just deleted an attribute from it, but apparently it doesn't sync with IB, you have to do it manually...)

Resources