my xcode project after one month developing unexpectedly has been removed ,because of a silly mistake ,unfortunately i don't have any backup!
everything i have is an archived file : myprojectname.xcarchive
is there any way to de-compile it extract some of classes or codes?
any help would be greatly appreciated!
Normally this is not possible because the archive does not contain your app's source code. You can look inside a xcarchive simply by control-clicking it in the Finder and choosing “Show Package Contents”.
Not sure if this is going to help, but I am going to give a try!!
Please correct me if I am wrong, since I am new to iOS development.
You can first generate IPA out of the xcarchive using a developer profile and install it in a device. Then you can run the safari simulator to check the resource files used in the application. Though you cannot import all the resource files from there, this may help you avoid the unnecessary need to write everything from the scratch. (It will save you a lot of pain).
Related
Is there are means whereby if files are altered outside of Xcode, that a warning in can be shown to ask if you want to refresh the file? This feature is available in Visual Studio, for example.
As a temporary solution, were working on source files in a Dropbox folder.
Although growl notifies us that some files has changed, Xcode doesn't know about these changes.
No, Xcode won't do that, and since there's no support for plugins you're pretty much stuck with that behavior. Some suggestions:
Create a local git repository (Xcode can do this for you when you create the project, I don't know if you can do it once it is created.
Use another IDE, like AppCode (this isn't even a solution, just came to me and I decided to add it).
With a version control system you can see the little 'M' on edited files, browse changes, etc. But since you wrote that this is a temporary solution I bet you already know this.
I am trying to create an ipa file (Product->Archive->Share) but Xcode produces just archive file.
It worked well few days ago. I was always getting working ipa but now I can't make it to produce ipa (when I click on share in archive I can't sign the code). I have added subproject into main project within few past days (CorePlot-CocoaTouch). I am no one hundred sure it can relates.
If you've added a static library, they get installed by default now. This is not okay for iPhone applications. Go to the project file and select the static library's target. Under Build Settings, go to the Deployment section and change the Skip Install setting to YES. Since Xcode 4, it is now NO by default, which will break your IPA (since the only binary you can install legally is the application binary itself).
You may have to switch from the Basic view to the All view to see this setting.
Since the answer that worked for me is buried in the comments, I thought I'd bring it to the top. In my case, changing the header files for the static library to Project fixed the issue.
To do this, select your library target, then go to Build Phases > Copy Headers and move the header files from Public to Project.
One who has tried all other answers and had no luck the please check this check box, hope it'll help (did the trick for me xcode 6.0.1)
In XCode 5 the same error occurs if you have multiple targets and wrong checkmarks in Manage Schemes. Then Xcode puts 2 binaries into 1 Generic Archive. This does not affect checked in files into e.g. git!
The other answers are all probably right, but didn’t help in my case. I spent hours on this and finally rebooted. Then I once more got the application archive I had gotten a week ago.
If you include a project that produces a static library, try checking the option "copy only when installing". This stopped Xcode from including the static library inside my application archive. I used Xcode 6.3.2.
I highlighted a line of code I was going to delete after building and running the app. After I ran the app, the code was still highlighted so I pressed delete and my entire class was deleted... I am an idiot...
The file did not go to the trash so I thought xcode might store it somewhere, does anyone know if it is possible to retrieve this file?
you can easily revert if you are using version control. if you are not using it (yet), you should -- worse things happen.
if you don't use version control and you use xcode's snapshots... you could look there. you may also be able to find it using Time Machine.
but... add "learn version control" to your #1 thing to learn this week for development.
I used the Disk Drill to restore mistakenly deleted files.
check http://www.cleverfiles.com/
For one of my clients, I've developed a small iOS app. I'm a member of their dev team, so I've been using a development certificate to sign my local test builds.
Now the app is almost done and it should go into internal testing on the clients side. I created an archived build of the app which I then sent to my client. They imported it into the organizer and tried to "Share" it to be able to re-sign it using an ad hoc profile.
Creating the .ipa fails with an "no such file or directory" error though. The archive appears to be fine otherwise - the organizer shows all the usual information, the icon, and it will let them export it as another archive. Creating an .ipa without re-signing fails as well, which leads me to believe this is not an issue with ther certs and provisioning profile.
If I try the same thing on my side, writing an .ipa from the very same archive using my development cert, the operation succeeds.
It may be worth mentioning that the same procedure was working fine while we were still using XCode 3.x on earlier projects. This is the first time we've been trying this using XCode 4.
No additional (static) libraries have been used.
Any help greatly appreciated!!
Edit:
Someone at the apple dev forums suggested to me that I should check the system console for xcode error messages while attempting to export the .ipa - none were printed out. We discovered some other, older messages however, which read as follows:
18.04.11 13:54:35 /Developer/Applications/Xcode.app/Contents/MacOS/Xcode[123] /Users/User/Library/Developer/Xcode/Archives/2011-04-15/Foobar.xcarchive/dSYMs/Foobar.app.dSYM/Contents/Info.plist:
set flags (was: 00200000): Operation
not permitted
The timestamp is roughly at the time when my client first imported my archive, but we can't be sure since we didn't watch the console back then.
The message had been printed multiple time, once for every single ressource file contained in the bundle. Does this tell you guys something?
Problem solved.
Following another suggestion on the apple dev forum, we repaired permissions on both systems. Additionally, I built and archived the app again and used a different way to transmit the archive to my client. We did all of this in one try, so I can't quite tell which of these measures actually did the trick. If you stumble across this because you have the same problem, you might want to try all of this, too.
Thanks for listening!
Update:
It happened again - and this time, we tried to solve it step by step. Result: It's all about how the file is being transmitted. I just attached the archive package to a mail to my client, that's what broke it, although I don't know why. Zipping the archive before transmitting it solved the problem, however.
After downloading XCode 4.3 beta with the IOS 5 SDK, the Organizer function to share and archive stopped working with a cryptic error "No such file or directory found".
It turns out that this is related to having two different versions of codesign_allocate . To fix the problem, do the following in a terminal window.
sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin
Another hint - try the manual way to create a shared ipa - since it gives you a lot more detail of what went wrong. See http://blog.dmahajan.net
Can you see if this is also linked to your problem?
EasyCoder's answer fixed this issue for me - I have the 5.0 beta SDK and had the same problem.
I ran the following and it was fixed:
ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin/codesign_allocate
can i make, that when compiling in the adhoc-profile, i made for xcode, pack it into a zip complaining to itunes or an ipa, give it an automatic name (optional ... appname_date_time.zip) and copy it to a network-path ?
so, what is really my problem: i think i understood, that in a past-build-phase i can run a shell-script. but i haven´t done many shell-scripting now. can i zip on osx with the shell and for this case in a simple way ?
and can i let the message "no provisioned iphone connected" be gone ?
why ?
i want, that some company-internal people can load my software without email-spamming on each new release.
ok, build and archive builds at least the .ipa automatically. the rest might be just a second click and a script. so if no one has a more elegant solution, this is enough
Check out the BetaBuilder gem - https://github.com/lukeredpath/betabuilder. It worked about 90% of the way for me - I had to re-route its guts a bit to make it work, but my fork (https://github.com/dts/betabuilder) works for me. Hopefully, you can cobble together a solution for you (it was worth the effort for me!)
You can automate this, but need to get after the code signing, which is behind the last build phase you can add to Xcode. So the solution is creating a new aggregate target and define the shell script in there.
Here is an example of the whole process including a readme file on how to set it up: https://github.com/TheRealKerni/HockeyKit/tree/develop/client/iOS/Beta%20Automatisation