Iphone compile warning - iphone

im compiling my app , which is working great and i wanted to ask you 2 questions
1. im getting about 14 warnings like that
no '-addCategory' method found
which i know how to solve but even after i cleaned everything added the function to the header file and compile again it's still there i cant get rid of it.
2. im pretty new in coding and the code is not GREAT but it's ok how do i know apple will accept it ?
thank you very much !!

Declare that method in .h file
Implement that method in .m [implementor of .h] file .with the same signature.
Clean in once.
And try..
It should work..!

Related

MFMailComposeViewController.h Broken

After successfully implementing the MFMailComposeViewController in my app, run it in the simulator and my iPhone, where it still works fine, it just crashed.
I get 5 MFMailComposeViewController.h issues: Cannot find protocol declaration, Expected identifier or '(', etc,...
My Controller header includes:
MessageUI/MessageUI.h
MessageUI/MFMailComposeViewController.h
and conforms to protocol:
#interface DetallViewController : UIViewController < UIActionSheetDelegate,
MFMailComposeViewControllerDelegate>
I've tried to:
1) remove and add the framework
2) Restart the device and Xcode as suggested in many posts
3) Create a separate controller to handle MFMailComposeViewController
After 3 days with this issue I'm completely stuck on this. As you can imagine, any help would be appreciate.
I would think this is a kind of reference issue since it appears whether the framework is selected or not.
Thanks in advance
Just to anybody it may help, I finally found the issue:
A missing #end in an imported header.
Thanks to everybody for the efforts.

Integrate auriotouch in another app

excuse me to create again this question, but I have another problem. I'm trying to integrate the aurioTouch Apple sample in my app. I have put all the code that was in aurioTouchAppDelegate in my app delegate file. The code runs, but some methods, like methods in EAGView file doesn't run, I don't know whym they are not called.
Some help or hints are welcome...
Have you integrate all the setting from Project's Build Settings. Actually I had the same issue but then I compare all the settings from Build Settings and found that some of the Linker flags were creating the problem and then was able to solve the problem. So whenever you have such problems try to go to Project's Build setting and compare all the keys. Mostly the Linker flags creates the problem in such cases.... hope this help to others also...
EDIT
After referring to your project. Notice that you have overloaded the property view of ViewController with your custom View EAGLView. You have not separated customView and ViewController's view.
Also, one major thing is you have to Initialize your EAGLView and add it to your ViewController's view. and rest of the things will go on in EAGLView.

expected expression before '.' token

Can someone tell me why this doesn't work?
-(IBAction) website_btn {
[myAppDelegate viewGallery];
}
Because I am getting this error.
error: expected expression before '.' token
I know it sounds strange. Need someone to throw me a life jacket here.
If you are compiling with GCC in Xcode, try switching to clang, clang is much better at identifying where there error is, GCC will sometime claim an error is at one location when the actually error is much higher up or even in a header file.
The code you have posted has no issues. It may be due to the error in the code above it. If still the code is fine. Then clean all your target and Build again hope this will work. As it works for many of us..
Thanks everyone!!!!
It was an error I had causing this error.
Just remember to extend your class with UIApplicationDelegate.
...
#interface YourClass : UIViewController <UIApplicationDelegate> {
....
Sorry, I am new to iPhone so I know I am not using proper terms here.

Issue with Duplicate symbol in link phase of project build in Xcode

I've been building a game application for iOS. The application was working fairly well, but I've done a fairly large restructure today to be a little more model-view-controller 'compliant'.
I've built the main game engine in C++, but use Objective-C for managing the viewControllers, views etc.
Now, when I compile the project, I'm getting an error in the link phase. Details are below:
ld: duplicate symbol ApplicationEngine::OnFingerUp(Vector2) in /Users/Dan/Library/Developer/Xcode/DerivedData/BlackHoles-exrlidtstxzdtsbyjghgquhlsqul/Build/Intermediates/BlackHoles.build/Debug-iphonesimulator/BlackHoles.build/Objects-normal/i386/ApplicationEngine.o and /Users/Dan/Library/Developer/Xcode/DerivedData/BlackHoles-exrlidtstxzdtsbyjghgquhlsqul/Build/Intermediates/BlackHoles.build/Debug-iphonesimulator/BlackHoles.build/Objects-normal/i386/AppDelegate.o for architecture i386
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 failed with exit code 1
OnFingerUp is a function within my C++ ApplicationEngine, and gets called from the viewController.
Is the problem likely to be caused by some confusion in my #includes / #imports?
My AppDelegate file needs to #include a MainViewController file to set up the initial viewController. The MainViewController in turn #includes the ApplicationEngine file to instantiate that class. ApplicationEngine contains the OnFingerUp method. The OnFingerUp method is then called from MainViewController when I get a touch input. Could this sequence of includes be causing the duplicate?
I've noticed that if I temporarily remove the OnFingerUp method from the app completely, then I get the same issue with another method within the ApplicationEngine.
There aren't any errors or warnings as the individual files compile. I've also tried to Clean All and recompile, but no joy.
Does anyone have any suggestions as to how I could approach solving the issue? Thanks, Dan.
I can think of 3 causes for this: 1) Accidentally #including a .cpp file, 2) forgetting #ifndef guards in the header file, 3) forgetting inline when writing the method definition in a header file.

IPhone App Build Successful But nothing shows

Very new to Iphone development here, I have a project which is successfully building (which is a first for me :) It loads the simulator but it just closes as soon as it loads, how can I debug this? It appears the Interface Builder xib files are not loading, I've added a xib thats from a hello world project, (they have different project names) Is this an issue?
Any advice would help,
Thanks!
You probably have an error in the Debugger Console. If it has to do with the XIB, it could be that you simply got the name wrong.
Another simple mistake is trying to use Outlets before viewDidLoad is called (for instance, in init).
In either case -- the message in the console will help.