error in compiling .xcdatamodel - iphone

i have xcode 4.3 with ios 5.1 and trying to compile and run the project, but it gives error:
Command /Applications/Xcode.app/Contents/Developer/usr/bin/momc failed with exit code 6
i found something in "Data Model Version Compile".. error after upgrading to Lion (Xcode4.1) but it doesn't provide me any suitable solution. It say's to delete unnecessary .xcdatamodel-directories and i did, but i still stuck up there with same issue. Other thing i found that the extension is changed in new xcode its '.xcdatamodeld' instead of '.xcdatamodel'. I copied content content of '.xcdatamodel' file and put in to '.xcdatamodeld' and added to xcode but it gave error at some where else that persistence store might exist. what should i do to run this project..
thanks in advance!!!

Related

Cannot build any Swift project at all due to strange error about MacOSX10.11.sdk

I'm running macOS 10.12.3 with Xcode 8.3.
I cannot build any macOS Swift projects with it.
If I create a new Cocoa application Xcode project and set it to use Swift, when I try to compile it, I immediately get the following error in the "check dependencies" phase:
error: There is no SDK with the name or path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk'
I have no idea what's going wrong!
The only clue I have is that earlier I created a symlink with the path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk that pointed to MacOSX.sdk in order to fix an issue where an older build of Qt that required an SDK with that path. However, deleting the symlink has no effect.
I can build Swift projects that targeting other platforms like iOS. Just not macOS.
Help!
try running this command then reopening the project
(Xcode uses xtools in the command line to build its projects)
sudo xcode-select -switch /path/to/file/
(by default the path is)/Applications/Xcode.app/
look at this pic
saw it here yesterday

Xcode 8.2, Swift Compiler Error: error: unexpected input file

After updating from Xcode 8.1 to 8.2, I am facing a Swift Compiler Error in my project. I am using the latest Swift version and Carthage for dependency management. It worked perfectly fine with Xcode 8.1, and now I have tried for hours to fix it by cleaning DerivedData and Simulator data, cleaning in Xcode and deleting the Build folder but nothing seems to help. I only have one Xcode version installed.
I get the following compile error:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
cd <ProjectSource>
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk
export TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault
-- all files to compile --
unknown>:0: error: unexpected input file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code
The folder that it is referring to looks like this:
It is actually there so I have no clue about what is going on...
Help is much appreciated! :)
I had the same kind of issue and the comments helped me figure out my problem.
Indeed, this error occurs when there is a typo or an error with the "Other Swift Flag" option. In my case, this option was passed empty by my CI engine causing an error to the generated command line leading to the error :
"error: unexpected input file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk"
As suggested in the comment, remove all Other Swift Tag except "$(inherited)" and check it works back as expected
Answering the question instead of commenting may help people straight forward :)
In my case it was simply because I had a file called .Swift (mind the capital S!). I renamed it correctly to .swift and all went fine.

clang: error no such file or directory: */Debug-iphonesimulator/MailCore/MailCore

I am using mailcore2 in my ios app from fetching my gmail account emails on my device. I have changed the ios sdkversion from 6.1 to 6.0 in the mailcore2 scripts bcz I am trying to compile and run the app using iPhone simulator 6.0 which uses ios sdkversion 6.0. Doing so I am getting the following clang error.
clang: error: no such file or directory: '/Users/shujaat/Library/Developer/Xcode/DerivedData/MyTestApp-ditognlaoajwldfliplqecnxqbfj/Build/Products/Debug-iphonesimulator/MailCore/MailCore'
While trying to compile and run my app using iphone simulator 6.1 (uses ios sdk 6.1), with no changes in the ios sdk version in the shell scripts, I am getting the following error:
/bin/sh /Users/shujaat/Documents/WemoTech/Products/WantList/sourcecode/ThirdPartyLib/MailCore2/Externals/builds/workdir/20130930192723/src/libetpan/build-mac/update.sh
configuring
running prepare-cyrus-sasl.sh
prepare sources
patching file lib/client.c
building tools
generated makemd5i386 properly
building for iPhoneOS - armv7
CONFIGURE FAILED
Command /bin/sh failed with exit code 1
These issues are driving me crazy for the last couple of days. Need your help.
Go to your main project target->"Build phases"->"Target dependencies" add mailcore2 ios
You need to read Check Adding MailCore to Your iOS Project carefully.
These issues are fixed now. I want to explain what I did to get rid of them for others facing same issues:
I made a separate project, and made mailcore2 as a part of it (didn't include the #import line in any of the project files at first). I compiled and run the project and copied the resultant mailcore 2 from it to my original project. It's compiling and running fine now.

Selenium for iPhone emulator compile error

when compiling the code for iWebDriver.xcodeproj I get the following error
error: There is no SDK with the name or path
'/Users/sqaresources/svn_projcts/trunk/iphone/lib/buildtime-src/cocoahttpserver/iphonesimulator3.2'
the following warnings are also shown
Missing SDK in target CocoaHTTPServer: iphonesimulator3.2
Missing SDK in target CocoaHTTPServer: iphoneos3.1.2
I'm running OSX 10.7, Xcode 4.1
Please let me know if there is anything that I can do for this issue.
Thank you
To resolve that problem, navigate to iphone-->lib-->buildtime-src-->cocoahttpserver-->CocoaHTTPServerLibrary.xcodeproj
Open CocoaHTTPServerLibrary.xcodeproj in your xcode (Make sure other instances are closed). And navigate to Build settings and change the 'BaseSDK' to 'Latest iOS(iOS4.3)'.
This should resolve the problem.....

Xcode Error When Building

Whenever I compile something in Xcode, I get 3 errors. One is under "Checking dependencies" and says "Unable to create directory /var/folders/zZ/string of letters/more directories/more letters." What is wrong with Xcode/my computer? I switched to the Xcode 4 preview and that works fine, but is not stable. Yes, I have tried restarting. This has been going on for weeks. Thanks for the help.
I had a similar issue, which showed up after switching to xcode 4. The error was:
error: unable to create '/build' (Permission denied)
The solution was to change '/build' to 'build' in the project configuration under Intermediate Build File Path.
In your case I would guess the pch file has a path that starts with '/'.