Xcode 4.1 with more than 400 compiling errors - iphone

Probably is a stupid thing but I'm quite new with Xcode... Today I've updated to OS X Lion and XCode 4.1 but now when I try to compile my iPhone app more than 400 compiling errors appear, some of them are even from sqlite3.h, CLLocation.h and other original libraries from Apple. All errors seem to be originated by a problem with #import ...
Yesterday I was working with OS X Snow Leopard with Xcode 4.0 and all was fine. I'm using GCC 4.2 compiler in Xcode and I haven't change any configuration on Xcode or my app.
Here are some errors:
http://img10.imageshack.us/img10/7585/screenshotyum.png
Help please!
UPDATE:
Ok, I solved the problem. It was not related with the compiler version or the base SDK, the error was that Xcode 4.1 doesn't accept the #import "/usr/include/sqlite3.h", it has to be change to #import <sqlite3.h>
More info here (only Apple Developers)
Hope this will help to other people.

This caused me some serious headaches so thanks for posting! To clarify, after updating to Lion and Xcode 4.1 I had 400 errors because of: #import "/usr/include/sqlite3.h" but changing it to #import <sqlite3.h> solved it! Took me ages to figure this out!!!

Related

Can't run swift project on Iphone with Skobbler

I have this error when I build the project on Iphone :
Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
/Users/Tom/Library/Developer/Xcode/DerivedData/Test-bwacbfyhutgdvnhetuiouvtcvvfi/Build/Products/Debug-iphoneos/Test.app/Frameworks/SKMaps.framework: invalid resource specification rule(s)
Command /usr/bin/codesign failed with exit code 1
If I built the project with the iOS Simulator, it run perfectly
I Work with swift 1.2 - Xcode 6.3.1 and OSX 10.10.3
Thank you for your help !
Ysee
EDIT :
I solved this problem, I had to manually install Skobbler SDK then I tested the installation with cocoapods. This works perfectly!
I solved this problem, I had to manually install Skobbler SDK then I tested the installation with cocoapods. This works perfectly!
If you work with Swift don't forget to add #import "SKMaps/SKMaps.h" in your Bridging-Header.h
Ysee

SenTestingKit Not found In Xcode4

When I tried to import <SenTestingKit/SenTestingKit.h>, I get this error: SenTestingKit/SenTestingKit.h: No such file or directory.
I am using unit testing for the first. I am using xcode 4.2 with ios 5 sdk. But in my system I have two xcode version installed,4.2 and 3.2.5. Although i am using xcode 4.2 ,xcode3.2.5 is the default xcode in my system. Can any one help me with the unit testing?
SenTestingKit.framework is at :
/Developer/Library/Frameworks/SenTestingKit.framework (OS X)
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOSX.X.sdk/Developer/Library/Frameworks/SenTestingKit.framework (iOS)
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulatorX.X.sdk/Developer/Library/Frameworks/SenTestingKit.framework (simulator)
for Xcode versions 4.3 and above prepend /Applications/Xcode.app/Contents/ to the paths above
I don't know, but the frameworks path will be different for both xcodes. it might be in 3.2.5 frameworks path and when using 4.2, it may not find it. Correct me if I'm wrong.

Using GCC 4.2 in Xcode 4.2 iOS SDK 5.0

I found this post about using GCC 4.2 in Xcode 4.2 StackOverflow Post.
Did anyone else receive the error "Error writing -: Broken pipe" after following the steps in the above post?
After following the steps I can see GCC 4.2 as an option for the compiler.
Compiling a project using LLVM compiler 3.0 still works, but using LLVM GCC 4.2 or GCC 4.2 generates the pipe error.
I hope someone encountered the same problem and managed to fix it!
Simple and userful solution https://github.com/kennethreitz/osx-gcc-installer/
It automates the lists of the declaration on the stackoverflow

strange compiling errors with Xcode 4.1 on Lion

I just upgraded my Mac to Lion and then Xcode 4.1. My iPhone project which worked well with Xcode 4.0 had 401 errors in Xcode 4.1.
I googled the solution and got two useful ways.
changed the complier from GCC 4.2 to LLVM 2.1.
changed #import "/usr/include/sqlite3.h" to #import <sqlite3.h>
Now the number of errors reduced to 15, saying
Expected function body after function declarator
on OBJC_ARC_UNAVAILABLE in file Runtime.h, which is a built-in source file.
I tried to change iOS Deployment Target from iOS 3.0 to iOS 4.1 and set Other C Flags as
-D__IPHONE_OS_VERSION_MIN_REQUIRED=040100
But neither of them worked.
Any help will be appreciated. Thank you.
I had the same issue, and was able to resolve it by changing this
#import "/usr/include/objc/runtime.h"
to this
#import <objc/runtime.h>
where ever I included this file. This change appears backward compatible with 4.0.2 running under Snow Leopard as well.

UIKit SDK 3.0 error

I am using iphone_sdk_3.0_beta_5__9m2735 SDK.
When I try to compile my code using simulator 3.0 option I get following error. The code compiles for rest all simulator option ie 2.0, 2.1, 2.2, 2.2.1
While compiling my code I get following error
from /Users/videomac/manish/EXPLab/2009-05-27-11-20 myApp_LL_2/myApp_Prefix.pch:7:
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:30,
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:11: error: syntax error before 'AT_NAME' token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:19: error: syntax error before '}' token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:21: fatal error: method definition not in #implementation context
The errors are located in file UILocalizedIndexedCollation.h which is SDK file.I am using UIKit Framework of SDK 3.0. Can anyone tell me what should I do to remove this error?
I've traced this problem to be the compiler version being used. From what I can tell, [REDACTED] requires GCC 4.2 while iPhone SDK 2.x only works with GCC 4.0.
Here's a way to fix this.
In your Target Info, select Build separator and look for the section Compiler Version. Then:
Select the C/C++ Compiler Version row
Set the default to GCC 4.0
At the bottom-left control, hit Add Build Setting Condition
On the left, choose Device - iPhone OS 3.0
On the right, chose GCC 4.2
Repeat steps 3 to 5, now with Simulator - iPhone OS 3.0 on step 4.
Appleā€™s engineer had confirmed that they had a bug in UIKit framework:
We do have a simple workaround for this UIKit bug. In UILocalizedIndexedCollation.h change this:
UIKIT_EXTERN #interface UILocalizedIndexedCollation : NSObject
to
UIKIT_EXTERN_CLASS #interface UILocalizedIndexedCollation : NSObject
Denis2342
Firstly you should discuss beta products here.
However, this is not connected with the beta. You have an error in one of your own header filesprobably a missing '#end' statment.
BTW, google could have solved this for you rather than asking here.