Is it possible to re-open an .xcarchive file on Xcode?
I know this is not common, but I would like to open a project exactly as it was submitted to the App Store. I don't have back up of that exact build, so it would be really great to open the archive copy!
Before you ask why don't I just download it from the store, I must say this build has been approved and is just pending on my release. :)
Thanks!
A xcarchive is a folder containing a (compiled) app bundle, a dSYM (debug file) for the app, and an Info.plist containing metadata about the archive (such as the name of the app and the date the archive was created). You can look inside a `xcarchive by control-clicking or right-clicking it in the Finder and choosing “Show Package Contents”.
The archive does not contain your app's source code (unless you have made a serious mistake in your project configuration).
You should use a version tracking system like git to store your source code. When you create an xcarchive for distribution, you should tag the current version of the source code in your build system, so that you can easily extract the source code used to build that archive.
You can see contents of ProjectName [Date Time].xcarchive by right click on it and select Show Package Content.
It comprises of three things :
dSYMs : dSYM files store the debug symbols for your app.
Info.plist : property list containing details such as ApplicationProperties, ArchiveVersion, CreationDate, Name, Scheme.
Products : This contains App file for your project.
Related
I have an existing iPhone app (made on a previous version of XCode by a colleague) that I would like to import into XCode. I have the files FirstViewController.h, .m, and .xib files as well as the ones for the other views that were all renamed. I also have the supporting files, such as the sqlite database that is being used, images, the AppDelegate files, and so on. However, I was given all of these files without the .xcodeproj file. I have been trying to recreate the app given all of these files, but to no luck. Can anyone please give me any hints or direction as to how I should try and recreate this app?
If you absolutely cannot get ahold of the original Xcode project file, I would recommend just going through the standard New Project wizard to create a new project, and then import your existing files into the new project. This would involve, at a minimum:
Launch Xcode (the latest available version)
Create a new project by choosing File menu > New > Project
Choose an iOS application project template which most closely resembles your application
Follow the rest of the wizard steps to create your project
Once you have your new project, import the existing files:
For each type of file, right click in one of the file groups in the Project Navigator in the left-hand sidebar and select 'Add Files to …', then follow the prompts to import your file(s)
Adjust your code to build properly, using Product > Build and Product > Run as needed.
The iOS App Programming Guide can likely answer a lot of general questions about how to lay out your app structure, set up build settings, etc. Code signing and Deployment Target are two important project-specific settings you'll need to configure, which can be done using the project settings editor by selecting the very top row (where it says your project's name) in the Project Navigator. That should hopefully get you started.
In XCode4, is there a way to have a 'resource' (i.e. a CSV used to load a sqlite database) that is there for project purposes, but not have it compiled into my project? So my final app doesn't include it? I can't seem to see to to have this facility.
Thanks
Assuming you do not want the file get into your .app file, One solution i can think of is, do not include 'Target' when adding the file to the project. If you want to exclude your already added file then
Choose the target
Go to Build phases
Expand copy bundle resources
Select your resource file and remove it.
I've got an App that I am trying to localize for several languages. I'm doing most of the localization through .strings files, but for the larger help files, I need localized versions of html files.
I've read Apple's documentation as well as doing many searches on Google, and I think I am doing things correctly.
In my xcode project directory, I have an "en.lproj" and a "ja.lproj" (Japanese). I put versions of my HTML help file in each directory, and I import these into my Resources group in xcode. After doing so, the files seem to show up correctly. I see a "help.html" file under Resources, and it is a "group" and if I look inside it I see:
help.html (english)
help.html (japanese)
When I build my App, my App seems to correctly contain the two versions of the files under their appropriate .lproj directories, and everything is working correctly when I run the App (I see English documentation when settings are English, and Japanese when settings are Japanese).
However, when I build my project, I get annoying warnings from xcode 4.2:
Warning: Multiple build commands for output file .../ja.lproj/StartQuizController.html
Warning: Multiple build commands for output file .../en.lproj/StartQuizController.html
From what I understand, these "multiple build command" messages occur when there are conflicting filenames that are being added to your App. However, since these files are localized and exist in their own subdirectories, there is no real conflict.
Am I doing something wrong, or are the warnings a bug in xcode 4.2?
Thanks,
Ron
I think you can prevent these warnings if you do it the Xcode way.
Xcode uses only one copy command to copy the localized files, you have probably two separate commands.
You could try to delete the files form the "copy bundle resources" build phase first.
Delete the copy command for the localized files and add a new one. If Xcode treats your localized files right it should show a single file instead of a file for each localization in the "Choose items to add"-Picker.
If that doesn't work just remove them completely and add the physical files again.
Backup all your html files. Then delete them from the project (both logical and physical).
Add the English version of the file to Xcode, let Xcode copy it to your directory.
Select file in left sidebar
Open first tab of the right sidebar
add localizations by using the + button in the localization section
either replace the content of the file trough Xcode or use Finder to replace the localized versions.
I´m trying to localize my project as well. I always add a in-App user´s manual in a html file wich gets loaded on a UIWebView.
I haven´t done it yet, but what I´m going to do is to create different files for each language, say for example:
info_en.html // for english
info_es.html // for spanish
info_ca.html // for catalan
then when the webView gets loaded, instead of loading the #"info_en.html" file, I will load the NSLocalizedString(#"info", nil); Then, in each localized string file, the name for the html file will match the language.
I believe this should help but, again, I haven´t tried myself yet.
I am developing an iPhone application using XCode4 editor. I have to rename my project. I can't create a new project with new name because I have proceeded too far with my coding and there are too many files in the project.
How can I rename my project in Xcode4? I have searched on net but cant find such options in xcode4 to rename the project.
You can click on project name in xcode and then click again. The field becomes editable. Rename it and it will prompt you to rename the other files and delegate class names.
Its really simple in xcode 4. Renaming files, folders, groups and project names can be done using the above method.
You can set bundle display name in info.plist. it shows your name with icon. and for renaming the folder name simply select the folder and single click on the name then you can change the name.
When you rename your folder name, you can also change your app delegate class name and product name in info where you give provisioning profile for installing on device.
Basically I want to make an independent copy of my Xcode project and all of my files. How can I do this? I'm researching graphing frameworks and I want to use the same UI for each.
Seconding #zoul's comment, this can be accomplished in Xcode 4.5 with four steps.
In Finder, duplicate the project folder. Do not update the .xcodeproj file name.
In Xcode, rename the project. Accept the proposed changes.
Still in Xcode, rename the scheme in "Manage Schemes".
In Info.plist, rename your Bundle identifier.
Few months ago, I had the need to create a different applications with the same source code.
I didn't wanted to copy the full directory, so I came up with a procedure that allowed me to mantain the source code in one place and create many different apps based on the same source code.
My procedure is the following:
duplicate the target to make a new target and change the name to the new name
change the name of the product and info.plist in the build options (select the new target and click info button), make sure this is for All Configurations
rename the info.plist file created at the duplication to "newnameInfo".plist (click on the file and then info button and pick the target)
add icon.png to the resources for the specific target.
change the name of the icon
in the NewnameInfo.plist change the icon name to icon_xxx and the bundle identifier com.yourdomain.newname
in language/other flags you can have a flag to check at the code.
create a new APP_ID in the iOS Provisional Portal
if APN is used, configure the APN BEFORE creating the development profile
create a new development & distribution (ad-hoc or appstore)
in Target (info) choose the right profile for the code sign
I hope this helps.
--nnahum
Go to your project folder. Right click on it. Select "duplicate".
Is there something you want to achieve that this doesn't accomplish?
Copy and paste your project folder. Open the new folder and open the Xcode project file. Select the project name in the "Project Navigator" on the left side and then in "File Inspector" on the right hand side, change the name of the project under Identity and Type.
That way you will have a duplicate project with two different names.
Hope this helps!