Powered by
Powered by
HuntMyIdeas-Inspire You To Make It Happen
Follow
   Me
  • Blogs
  • About Me
  • Home

How to fix some common Xcode Errors

2/24/2016

Comments

 
Picture
1.Application windows are expected to have a root view controller at the end of application launch

​Answer:

​
Applications are expected to have a root view controller at the end of application launch.


In AppDelegate.m ,You have the following line of code.You can can replace

 [window addSubview:[someController view]];
to
 
[self.window setRootViewController:XViewController];
Read:
Top 5 Frequently Asked iOS Interview Questions And Answers.
Most Important iPhone interview Questions and Answers

Note:
If  You are using simply UINavigationController then replace 
with the following  line .

[[UINavigationController] initWithRootViewController:XViewController]; 

and then use the code below.
[self.window setRootViewController:self.navigationController] ;

In order to set the window's root view controller .

Read:-
Best Tutorials- Properties in objective C
Top 5 Simple iOS Interview Questions And Answers

2.Xcode 'CodeSign error: code signing is required'

Answer:-


Xcode gives error when it doesn't match or recognize your certificate.
There are lot of possible ways to solve this issue.It's sometimes difficult to resolve.First of all follow the the below procedure.

Step1 .
Go to "Window" tab->Organiser->ViewDetails.

Step 2:-

Try to remove the provisioning that are in your device. Then re-add them (download them again on the apple website). And try to compile again.It should work successfully.

Note:-

1) Make sure "Code Signing Identity" is NOT "Don't Code Sign". Pick a profile to sign with a valid provisional certificate or team provisional certificate both in "Project" and "Target".It should compile without any issue.
Picture
Read:
What is the difference between IBOutlet and IBAction in iOS ?
Top iOS interview Questions And Answers Collection

​3.SpringBoard failed to launch application with error 
Answer:-


Springboard (also known as Home Screen) is the standard application that manages the iOS home screen

step1:  Goto  Simulator -> Click Reset and Content and settings.
b) Now clean, build and run your application. Hope  it will work.


Picture
This happens when trying to run application in Xcode 5

Read:
What are the differences between Cocoa and Cocoa Touch?
Top 5 Basic iOS Questions Asked in interviews


4.Getting black screen after launching iOS simulator from Xcode
​
Answer:-

After clicking "Run" in Xcode, It compiles and builds successfully, launches iOS simulator but it never gets to loading the app. Only the status bar at the top. It displays a black screen.


Step: Go to iOS Simulator menu-> "Reset Content and Settings".
​It should work.
Picture
Read:
Top iOS Interview Questions And Answers for Beginners
iOS Interview Questions with Answers part 4

5.Unrecognized selector sent to instance error
Answer:-

The unrecognized selector error means that somewhere in your project, a method was called on an object and there is no such methods on that object . 

so it crashes. “Selector” is another term for a method.


So now you can go back to your code and see where you’re calling the method and why the object doesn’t have that method.

Check if that method exists in the header (.h) file of the class and pay attention to the parameters and letter casing to make sure it matches.
​

If you’re calling a method on a IBOutlet property that is referring to an element in your storyboard, then make sure that the UIElement has it’s custom class set to the class that has the actual method.

Read:
some key concepts for an iPhone developer to learn as a fresher
What are best practices that you use when developing projects in Objective-C ?

6.This class is not key value coding-compliant for the key
answer:-


*** Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key handleButtonClick.

 This error may indicate that there’s a IBoutlet in your Storyboard that’s connected to a property which doesn’t exist anymore.

This can occur if you connected the UIElement to a property and then removed the property from the .h file.


In order to fix it, go into your storyboard and right click each element to check the connections to the properties and “break” any connections to properties that don’t exist in your .h file anymore by clicking the little “x” beside each bad connection

Read:

Application's Background Transition Cycle in iOS
How to start a long-running task when your app goes to the background in iOS ?


​
Comments

    Enter your email address:

    Delivered by FeedBurner

    RSS Feed

    Archives

    August 2018
    January 2018
    December 2017
    November 2017
    October 2017
    August 2017
    April 2017
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014


    ​​Categories

    All
    Affiliate Marketing
    Alexa Rank
    Apple's Latest Updates
    Blog Tips
    Cocos2d X
    Cocos2d-x
    Google AdSense Tips
    Grab-some-ultimate-ideas
    How-to-create-a-twinkling-star-background-effect-in-ios
    In-App Purchase Tutorial In Cocos2d-x (C++) Using SDKBOX
    Ios Interview Questions And Answers
    IOS Multiple Choice Questions And Answers
    Objective C
    Online Business
    Secrets To Effective IPhone App Marketing
    SEO Tips
    Swift Interview Questions
    Swift Tutorials
    Top 10 Articles Objective C
    Top 10 Articles-Objective-C
    Top 10 Popular Movies Ever
    Top 10 Popular Things To Know
    Top 10 Ultimate Issues Xcode
    Top 400 IOS Interview Questions
    Top IOS Sample Projects To Learn From
    Top Secrets To App Marketing
    UICollectionView
    Unity 3D
    Xcode

WELCOME TO HUNTMYIDEAS

Picture
I am Jitendra Gochhayat,an iOS Developer,Designer,blogger,
​from Odisha,India.
I write about ​​​blog tips and,
Make money online Tips,
​Objective C tutorials
SUSCRIBE TO NEWSLETTER

    Subscribe to this blog and receive notifications of new posts by email

Suscribe
Picture
Picture
Picture
Picture
Picture
HuntMyIdeas-2016 Powered By Weebly
Picture
Powered by Create your own unique website with customizable templates.
Powered by
Powered by