XCode 4 Archive/IPA Error: "The operation couldn’t be completed. No such file or directory" - objective-c

I've found various proposed solutions to this problem on this internet, but none of them work for me. Does anyone know why this might be happening?
http://answers.unity3d.com/questions/15294/xcode-build-and-archive-error-no-such-file-or-directory
http://blog.joshschumacher.com/2011/04/06/xcode4-the-operation-couldn%E2%80%99t-be-completed-no-such-file-or-directory/
I've tried archiving with every combination of coding signing vs not using code signing, and I've tried using every combination of provisioning profiles, but I still get the same error every time.
I'm very confused as to why I'd even be getting an error like this when trying to save a file. I'm using XCode 4, my application builds for archive fine. In fact, I can even upload my application to itunesconnect (and it was accepted!). I just can't create an IPA for sharing and beta testing before submission.
Any ideas?
The error message
Right before I get the error

After much frustration, I filed a developer support request with Apple. The technician I spoke with was able to save my archive as an .ipa on her computer -- the exact same archive that I was not able to save on mine, which pointed to a possible bug in my system (and from the sounds of it, many other people's).
She recommended that I uninstall and reinstall XCode and the developer tools, and that worked!
Here were her uninstall instructions:
Make sure that your machine is running the latest Mac OS X (10.6.7) and iTunes.
Run the following command in the Terminal application to uninstall your SKD:
sudo <Xcode>/Library/uninstall-devtools --mode=all (where <Xcode> is the path to the directory that contains your SDK.)
Drag your <Xcode> to the trash and restart your machine
Re-download and install Xcode (4.0.2) from the iOS Dev Center. Make sure that the System Tools, UNIX Development, Essentials packages in the Custom Install pane are selected before installing it.

I have the same issue after my distribution certificate was expired. I add new ones (private key and certificate) and xCode "Share" command starts to produce such error.
The problem resolves as soon as I remove old private key & certificate from Keychain Access.
Hope it helps

Selecting "Don't Re-sign" at Identity solved the same issue for me.

I actually had the same problem, but a different solution (and reason). I had Xcode 3 and Xcode 4 both running at one point. I recently deleted Xcode 3 and moved my Xcode 4 from /Xcode4 to /Developer directory. This caused me to have the same issue you describe.
I moved the directory back to /Xcode4 and now my archives save out correctly.

I also had the same problem but I could resolve the problem in the below way.
My project was on the portable disk (formatted as FAT-32) and the project referred some folders on the same disk as "add folder reference for any added folder". I could build it any configurations however I couldn't just make .ipa file with above alert.
So, I copied the referenced folders on the portable disk to the desktop of the disk installed XCode (MacOS). And adding again the folders into the project. I could make .ipa file.

I installed Xcode 4.0.2 in one directory and then manually moved it to another.
When I moved Xcode back to the first directory everything worked.

Related

WEKA not identifying .ARFF files on M1 Mac

I have downloaded the latest version of WEKA on a newer Mac with the M1 chip and am having trouble opening .ARFF files. When I go to open the file, the file is not appearing as an option to open. It is perhaps a problem with permissions? But when I look at the permissions for the app, I am able to read and write. I am not getting an error message of any sort. I can only see the directories and no files.
Has anyone else had this problem and found a solution?
Many thanks!
I tried uninstalling and making sure I had downloaded the latest version of WEKA and I tried moving the .ARFF file to a new location.

Xcode 8 not opening project on start

I have a problem to open my project in Xcode 8 it's loading and not open. Yesterday It's opened but today not. I already deleted xcurdata folder, cleared DerivedData folder and deleted file com.apple.dt.Xcode in ~>/Library/Caches
Someone give me a light?
It's a problem with my icloud. My project was in Documents and every time that I install some framework with cocoapods, the Xcode stop to work, and load after icloud finish sync. I solved the problem putting the folder of project out of icloud.
This is in regards to an issue where you try to load a project in Xcode 8 after doing a migration to Swift 3 and all it does is stall and show the "Loading..." indicator in the Xcode status window?
Other methods of trying to correct this were:
1) Deleting ~/Library/Saved Application State/come.apple.dt.Xcode.savedState
2) Deleting /xcuserdata/ from Project.xcworkspace and Project.xcodeproj
3) Backing up the current story board, removing it from the project, recreating it, then cutting and pasting the contents from the old story board to the new story board.
I've tried all of the above to no avail. I've also upgraded to 8.1. I had a git folder inside my documents folder, so I am in the process of migrating that out my documents folder. Will try to load the project again after it's finished.
Just curious but did you have the "Optimize Mac Storage" option checked for iCloud sync? I did have it checked, I could see how this could cause a lot of issues with Xcode should your projects be stored in the documents folder. If some assets aren't getting touched for a long time, they are removed from the local drive and only stored in iCloud...
In my case with Xcode 8.2, I experienced slow and lots of hangs .. I am working with many projects .. the solution that so far seems to solves all such issues was to "disable" git repository creation during project creation .. I did recreate all of my projects without "git" repository because first: I am not experienced in using such "git" version control, and second: cause I manage versioning myself.

Invalid Binary Or Invalid Swift Support

After I send my app for approval to the app store I get the message 'Invalid Binary' in the iTunes Connect. Then I get the following message in an email from Apple:
Invalid Swift Support - The bundle contains an invalid implementation of Swift. The app may have been built or signed with non-compliant or pre-release tools. Visit developer.apple.com for more information.
My app is just a simple game application. No external programs are called. I have researched this message and went through and checked the following:
xcode is up to date - checked in app store
EMBEDDED_CONTENT_CONTAINS_SWIFT to YES or NO
send with the xcode app, not the application loader
did NOT build with the command line
(Xcode menu -> Preferences -> Locations tab - verified that the Command Line Tools matches Xcode version.
"Clean"ed the app, rebuilt and rearchived and then resent, same message
The app validates through the organizer fine
viewing the contents of the archive shows a SwiftSupport folder
I am only using one developer account and have never logged into any other developer account
I cannot find anything online that would help solve this problem.
I am running OS X Yosemite 10.10.1.
xcode version is 6.1.1 version 6A2008a - built, cleaned and sent with this version
I have also pressed the Option key and "Cleaned Build Folder" and resent, same message
I cannot find any other reason for this online or in any forums. Any help is greatly appreciated. Thank you for your time.
SOLUTION I FIND
Edit:
(1)
One you contact Apple and you wait long time … for reset iTunes connect because this problem coming in Apple . (Apple ask to send log of this problem)
(2)
An other solution, your create an other project application on iTunes connect and upload your work, this solution work fine, is the solution for me .
(3)
An other solution, you create a new project on Xcode, copy and paste your project in this other project.... (create new provisioning profile etc..) And upload your work in the same project application on Itunes Connect.
(4)
Step (2) + step (3), create a new project in Xcode and Itunes Connect.
(5)
Create a new project with the same name bundle identifier, it works perfectly !
See: Technical Q&A QA1881 Embedding Content with Swift in Objective-C.
It seems that you only need to set EMBEDDED_CONTENT_CONTAINS_SWIFT to YES "If you are building an app that does not use Swift but embeds content such as a framework that does".
What language is your app written in? If Swift yo do not need EMBEDDED_CONTENT_CONTAINS_SWIFT.
I ran into this problem the other day. Took some doing, but I finally figured out the problem ( for me at least). Everything I read online said the problem had to do with this setting:
EMBEDDED_CONTENT_CONTAINS_SWIFT
When this started failing, I had this set to NO. So I tried setting it to YES, and it still failed for the same reason. The GUI wouldn't let me remove this setting, I could only change it between YES and NO.
For what it's worth, my code has no EMBEDDED code, it's all just straight up SWIFT.
Anyway, so I decided to uninstall XCode and redownload it, hoping that would help.
While XCode was downloading, I fired up Beyond Compare, and compared my current project, with a backup from last week, to see what could have changed.
Beyond Compare found that a file deep inside the Projectname.xcodeproj file, changed ... a file called project.pbxproj file.
Inside this, was that line:
EMBEDDED_CONTENT_CONTAINS_SWIFT = NO;
This appeared in the current version of my project (that was failing). Interestingly enough, this line didn't exist at ALL in the old backup version from a week ago. I know that I didn't set this flag. There must have been something in Xcode that did it under the covers.
Anyway with that knowledge, Xcode finished downloading, and I reinstalled. Started it up, opened my project, and magically, Xcode REMOVED that line from the .pbxproj file, and now my project uploaded to itunesConnect sucessfully.
BottomLine: There's a bug in xcode that it may decide to add this line to your project for no reason, making your project invalid.
Solution: Editing the pbxproj file yourself and removing that line might work ... but reinstalling XCode seemed to clear up any confusion it had, and it removed it for me.
If you are submitting an app that has an AppleWatch extension, you can get this error if you try and submit the app using the Application Loader utility and a zip file. I got the error:
The bundle contains an invalid implementation of Swift. and
The bundle contains an invalid implementation of WatchKit.
I went through pretty much every solution for the first of the errors - but it was submitting via Xcode that fixed it.
well xcode 6.1 is a bit old and contains old swift. xcode 6.4 is the newest public one IIRC
"Check your code signing. I had this error when in automatic signing. I Put my dev profile for dev and production profile for release version and error is gone."
Link for the Quote
Sometimes this happens inadvertently.
To be safe, all components of your app should be built with the same version of Xcode and the Swift compiler to ensure that they work together.
I think you need to do a pod clean and install. I reckon one of your swift pods was created on a old version of Xcode, you updated Xcode and then tried to do a submission to the app store.
Read the apple swift blog about binary compatibility and frameworks
You will also want to specify that your embedded content contains swift in the build settings:
EMBEDDED_CONTENT_CONTAINS_SWIFT
Enable this setting to indicate that content embedded in a target's product contains Swift code, so that the standard Swift libraries can be included in the product.

GenerateDSYMFile: dsymutil fails with exit code 11

I upgraded from MacOS X 10.6 (Snow Leopard) to 10.7 (Lion) this morning, and also from Xcode 4.2 to Xcode 4.3.2. Perhaps more importantly, that means that I'm now building my project against the iOS 5.1 SDK instead of 5.0. That's a lot of changes, and one of them caused my project to break: the project will no longer build due to the following error:
Command /Applications/Xcode.app/Contents/Developer/usr/bin/dsymutil
failed with exit code 11
The full command given in the build results is as follows (full disclosure: I've changed the project name to 'MyProject' to protect the innocent):
GenerateDSYMFile /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app.dSYM /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app/MyProject
cd /Users/caleb/MyProject/iphone
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/usr/bin/dsymutil /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app/MyProject -o /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app.dSYM
This only happens when I try to build for an iOS device; building for the simulator works fine.
I've done quite a bit of searching to find an explanation of this error, but haven't found anything yet that explains the error. I did find one SO question about the same error, caused in that case by a bad tag in an Info.plist file, but my Info.plist looks fine. Another question suggests creating a new target and copying everything over. I haven't tried that yet as my project is quite large, but it's looking like the best next step.
Can anyone tell me what "exit code 11" from dsymutil means and how to fix it?
Update: Running the dsymutil command at the command line shows that exit code 11 is a segmentation fault. Still don't know what causes it, though.
A workaround that's working for me so far is to change the Debug Information Format setting in the project from "DWARF with dsym" to plain old "DWARF".
This at least lets me build the project for iOS devices and debug, so that's a very good start. I'm not sure what we lose by leaving out dsym, so I'm going to keep looking.
Update: Apple DTS suggests reinstalling Xcode. I haven't been able to try that yet, but will update this answer if it's helpful.
For future users who come here via Google :
It happened to me because my working directory was full.
EDIT:
Clear Some Space in your disk.
P.S. You can always go ahead and delete everything residing in this directory if you have developed so many apps till date on the same machine. /Users/<username>/Library/Developer/Xcode/DerivedData
P.P.S: Don't forget to check the size of the directory to get surprised. It may take upto 4 hours deleting the entire path, so do it in free time, just delete 2-3 sub directories and resume your work.
Changing "iOS Deployment Target" from 6.1 to 4.0 helped me !
have you made sure that your project build settings, compiler version is set to system default?

Installing of Adobe Air file fails with "file damaged"

Adobe Air brings following exception:
The application could not be installed because the AIR file is
damaged. Try obtaining a new AIR file from the application author.
Please add the different reasons which may lead to this error.
We had the same error as this guy:
The file ~/.airappinstall contains the following error:
failed while unpackaging: [ErrorEvent type="error" bubbles=false
cancelable=false eventPhase=2 text="invalid package signature"
errorID=5022]
The actual reason was not a damaged file or something like this, but our machine had a date from the past, which was not valid for the given certificate. After correcting the date/time on the computer, the installation worked just fine.
Even I faced the same error=5022, after thinking a lot on this issue, I finally got the
solution for this problem. It is simple, before installing the air app set the correct Date & Time for the system, WALLA it installs smoothly.
No need of changing the png name or anything else.
I faced this problem yesterday because my antivirus (avast pro/silent mode) was blocking access to file until finishing scanning, looks like installer don't like to wait, so when I switched off silent mode I made antivirus ignore scanning the file and installation completed successfully.
I have a virtual drive mapped to S: so that paths are the same between my home computer and work computer. I was trying to install the AIR app from an S: path. I guess it did it like it. Moving app to my desktop and launching there, worked.
Make sure you are signing the Application distributable and distributing the certificate along with the .air file.
I ran into same problems and solved it this way.
I had this issue when using Flash Builder 4, but building a Flex 3 application.
Basically, the installed AIR SDK in the Flex 3 SDK folder was AIR 1.5.3 (if I remember correctly), but the Flex 4 SDK folder had the AIR 2.0 SDK files (I'm not completely what the problem was).
My solution was to download the AIR 2.0 SDK, and unzip it over the Flex 3 SDK folder. Once I did that, the installation file worked fine. There is actually an article on Adobe about overwriting the AIR SDK files this way, although it didn't mention anything about installations or Flash Builder 4.
Mine was failing because I had another app on my system with the same name. Not a version of the app, a completely different app--native, not AIR.
Once I removed that app it worked fine.
For odd installation errors, keep in mind that Chrome uses a version of Flash that does not support AIR badge installation.
I encountered this error when trying to install an AIR file from an external / network drive. Copied the file locally, and installation proceeded normally.