Tool for comparing Xcode project files - iphone

I've been given the Xcode project files for version 1 and 2 of a iOS app. Version 1 is working, version 2 is buggy with more features. The original programmer is no longer available. No versioning system was used.
Is there a tool to compare the different projects - so I can see what code was added between version 1 & 2?

You can compare two Xcode project using FileMerge tool available with Xcode.
Below are steps for comparison in Xcode 6.1
Right click on Xcode icon -> Select 'Open Developer Tool' -> Select 'FileMerge' option
This will open window as show below :
Select two Xcode project which is to be compared by clicking Left and Right button
Click on 'Compare' button. This will create list of file that are added, removed or altered
by comparing two Xcode project.

I'm pretty sure that nearly everything in an xcode project is stored in text files so you should be able to use standard diff tools to compare the projects. This, of course, excludes resources such as images, audio, etc.
FileMerge is an app that comes with Apple's Developer tools. It does diffs and merges. It can be run through the terminal with the the opendiff command.

Related

Where is my latest build for my iPhone app?

This seems very strange, I recently upgraded to Xcode 4.2 and I'm about to release an updated version of my app. When I go to the Build folder non of the builds seem to have changed and they are all dated from before I updated to Xcode 4.2
My code has todays date but I cannot see where the lates builds are. Does Xcode 4.2 store the builds in a different place or am I missing a setting in Xcode?
Click on the "Log Navigator" icon (speech bubble) in the left pane, and select the log entry for your build.
The log will contain the full path to your build. Often it's something like:
/Users/user/Library/Developer/Xcode/DerivedData/App-cmxgycqjtykiurgecgrmvvavwwjq
/Build/Products/Debug/App.app/Contents/MacOS/App
If you are doing a production build, I recommend using the "Archive" feature, which will do a clean build with all the right compiler optimisations, and then present you with the build in the organiser window.
You can then click "share" to save the app in whatever format you prefer (pkg, app, ipa, etc). In the case of an iOS app, this will also offer to embed the provisioning profile in the app, which is nice for ad-hoc deployment.

Using Emacs with Xcode 4?

I want to get rid of the slow code editor of Xcode 4 and use Emacs instead. In Xcode 3 I can do this from the file types preferences, but I can't find that in Xcode 4.
How can I change the editor in Xcode 4?
If for some reason Apple went crazy and removed this feature from Xcode, is there a way to edit the xcodeproj from within Emacs (add/remove files), as well as build and use the iPhone Simulator?
In answer to your questions:
Yes, Apple went crazy and removed the ability to associate an alternative editor so you won't be able to automatically use Emacs as an editor within Xcode4 as you did under Xcode3. You will have to setup your project in Xcode4 and (separately) use Emacs to edit source files in the project.
You can use the "xcodebuild" command line tool to build your Xcode4 project from within Emacs. Just Google or search through SO earlier messages for some tips on how people do this.
To install your app on the simulator and run it from the command line, read the replies to this post.

Xcode 3 projects in Xcode 4

I just upgraded from Xcode 3 to 4. Have been playing around a bit first to get used to the new interface and trying to find where everything has moved to... (pfffff). New projects seem to work fine but it's definitely a large transition.
Now I tried opening some older projects but something strange happens...
ALL my projects are iPhone projects, none is for OS X but when opened in Xcode 4 it says in the left most pane: 1 target, missing base SDK. In the right pane I see: Mac OS X Application Target, everything in the Targets Section is related to OS X and NOT to iPhone.
I tried adding a target for iPhone, but still the target is missing. I then deleted the OS X target and see in the left pane: 1 target, IOS SDK 4.3 but the "Run" option in Project menu is still disabled.
I also tried this with sample files from tutorials I used in the past (eg Beginning iPhone 3 Development en More iPhone 3 development) but I have the same problem!
1) Shouldn't Xcode open those Xcode 3 projects just fine ?
2) What can I do to have the "Run" option working again ?
You need to set two Build Settings:
For Base SDK - set this to Latest iOS
For Deployment Target - set this to iOS 4.3 (or whatever the minimum SDK is that you want your app to work on.
Related to point 1 - if you hard code the SDK version here, then whenever it's upgraded, you'll likely get error messages about missing SDKs if the old one is removed
Yo have to try this
You have to select your project then in middle pane you have to select "Targets" and then go to "Build Settings" tab and in base SDK select "IOS 4.3".
Your project -->Targets(your Project Name) -->Build Settings -->Base SDK --> IOS 4.3
You need to set Base SDK and IOS Deployment Target. My Xcode 3 projects works fine after that.
If you select your project, in the editor window you get the PROJECT and TARGETS to work with.
You can set proper values their.
You may need to do more things. In Xcode4 configurations are managed using Scheme. So, Go to
Menu -> Product -> Manage Scheme,
Select your scheme, and Edit your scheme.
You may relieved off some issues there.
You need to follow both answer, set the base SDK and manage the SCHEME.some times you may not see the iphone simulator option in the dropdown list then go to Manage scheme change debug to release then you may see the iphone simulator in dropdown and change it back to debug mode.

Configuring Your App For OpenEars in xcode 3.2.6

i configured the Openers successfully with the help of this link. http://www.politepix.com/openears/configuring.
however they are documented "Configuring Your App For OpenEars" only in Xcode 4.
i am using xcode 3.2.6 cant able to use Openears library in my application using this document .may i knoe any other document links to explain "Configuring Your App For OpenEars" only in Xcode 3.2.6.can any one help me please.i stuck in here in the document.cant able to do this process in xcode 3.2.6.this following steps i can do with xcode 3.2.6...please help me
steps that i cant do in xcode 3.2.6
Step 2: From Xcode, select your blue project icon for your app (not the OpenEarsLibrary project) in the Project Navigator and select its target under the TARGETS header in the left-hand column in the editor. Navigate to the tab Build Phases. Click “Target Dependencies”.
Click the plus button for Target Dependencies. Then select the gray OpenEarsLibrary icon in that dialog and click “Add”.
Step 3: In the same view, with the app target still selected underneath the header TARGETS in the left-hand pane of the editor window, navigate to the Build Phases pane and select “Link Binary With Libraries”
Tapping the plus button, add the OpenEars framework libOpenEarsLibrary.a found in a folder at the top called workspace
please help by converting the above step according to the xcode 3.2.6
Go to this page: http://www.politepix.com/openears/gettingstarted and find the phrase "It is still possible to download the previous version of OpenEars and its distribution contains instructions for Xcode 3 which should be very helpful for figuring out how to install current versions of OpenEars in Xcode 3". Download the previous version of OpenEars that is linked in the phrase "download the previous version of OpenEars".
Inside this download are the entire instructions for installing that older version of OpenEars in Xcode 3, saved as PDFs. The steps in the PDFs are not all the same as the instructions for the current version, but the part about linking the library (the specific part you are asking about) is still exactly the same. This explanation is in the PDF called "Configuring Your App For OpenEars.pdf" starting on page 4.
Wondering why you are still using Xcode 3 but what you need to do from memory is look for the root level targets expander icon in the tree. It looks like a red/white archery target and was usually after the resources folder. Expand it and right click what will probably be the sole target for your project. From there you will be offered the similar opportunity to add build phases.
If that doesnt exist in the contextual menu have a dig around in the Properties section for the target. It might be one of the tabs to add link dependancies.

Install Xcode 3.2.4, get "Base SDK Missing"

When you update Xcode to 3.2.4, your previously working Xcode iOS project gives you the message "Base SDK Missing". Something like this:
What gives? How to fix?
The Problem
iOS SDK 4.0 is gone in this release, replaced by iOS SDK 4.1. Details in "The Explanation" below. (NB: this repeats some information in my previous Q/A regarding 3.2.3).
The Fix
To fix this specific problem, you need to reset the Base SDK for your target(s), etc. You can either do that for the entire project (most folks), or for each target and/or configuration which applies. Rarely, you might need to do both.
Edit Project Settings
Load your project
From the menu, select Project > Edit Project Settings...
Click the "Build" tab.
Under "Configurations" select "All Configurations".
Go to the Change Base SDK section below.
Edit Specific Target/Configuration Settings
Load your project
From the menu, select Project > Active Target > "YourTarget"
From the menu, select Project > Edit Active Target "YourTarget"
Click the "Build" tab.
Under "Configurations" select "All Configurations", or the Configuration you want.
Go to the Change Base SDK section below.
Change Base SDK
Under Architecture > Base SDK, choose one of the available device
options: iOS Device 3.2 or iOS Device 4.1. If you are iPhone-only, 4.1 is the way to go.
If you want to target previous iOS versions, then in that same
window, under Deployment > iPhone OS Deployment Target, select the
lowest version you want to support. Note that support for 2.x versions
through the app store is deprecated.
The Explanation
iOS SDK 4.0 is gone in this release, replaced by iOS SDK 4.1. This is very similar with what happened with the 3.2.3 upgrade, which I covered in detail here. You can still use 3.2.4 to target iOS versions down to 3.0, but AFAIK, you must compile against the 4.1 SDK with Xcode 3.2.4. If this statement confuses you, study the following sentence closely:
The iOS SDK you compile against -- the "Base SDK" -- does not downward limit what iOS versions you can support.
In fact, there are two different settings, cf. Change Base SDK above. If you remain confused, take heart, and read my detailed post on the previous switchover, which is itself chockablock with links to good stuff.
I ran into the same problems for 3.2.5 and followed the same instructions. It didn't work for me, but I noticed that new projects would work properly. When I grepped ShareKit.xcodeproj/project.pbxproj, I noticed that there were still stray references to iphoneos4.0 in the file for SDKROOT param even after changing it in xcode. Manually editing this file and changing all references of SDKROOT to iphoneos fixed the problem. Hope that helps someone.
For all older projects, select the main window, select Option-Cmd-E, choose build and "latest ios...".
Close the build window.
In the main window, option-click the dropdown for Base SDK and you should see the latest build available.
It's still a pita, but it's easier than navigating, closing windows, etc....
If anyone knows a better method, I'd be happy to hear it...