No derived data for builds after upgrading to Xcode 4.5 - xcode

I have a MacBook Pro that has Mac OS X 10.7.5. I was doing iOS development using Xcode 4.4 and I recently upgraded to Xcode 4.5.
For my application, I have built some 3rd party libraries that it depends on, and those libraries need to be placed in a certain location so my application can pick them up and use them. However I'm unable to locate the recent builds of the libraries because, even though Xcode says the libraries build successfully, nothing is available for derived data in the Organizer.
What can I do to determine where these libraries are being built?

In Xcode 4.5 look at Preferences->Locations.
This shows where your Derived Data location actually lives on the File System.
Click on the arrow next to the Derived Data path to show the path in the Finder.
I recently upgraded from Xcode 4.3.3 and found that the build location has been automatically changed to Custom, so my (debug) build products are now in:
~/Library/Developer/Xcode/DerivedData/Build/Products/Debug
I am guessing that Apple have made this change to simplify the location of build products in a single location. In Xode 4.3.3 for example build products were placed under:
~/Library/Developer/Xcode/DerivedData/XXX
where XXX is a randomly generated folder based on your Xcode project name.
I have also found it useful to enable hidden folders to be displayed in the Finder so that you can actually browse the contents of your Library folder. I used the free Onyx tool to enable the display of hidden folders.
Hope this is of some help.

I went into Organizer, right clicked on the project which was no longer generating derived data (even though I could see it was... just the delete button was greyed out) and removed it from organizer. When I reopened the project it button was available again

Related

File path broken in Xcode. (lots of ../../../../) [duplicate]

I am not sure if it is related with beta software I am using.
I've recorded a video which shows the problem:
https://youtu.be/AuxjNpylaMc
When I create new files in Xcode, they're put in super weird location which causes a lot of problems when pushing files to repository.
When I create a file in Xcode (no matter where in project, no matter which project I am loaded into, no matter where is the project located on my drive) this is how the relative path is generated:
../../../../../../System/Volumes/Data/Users/patryksredzinski/Desktop/PerfTester/PerfTester-Xcode/PerfTester-Xcode/wtfTableViewCell.swift
I've found out a solution which is to move the file in xcode project navigator to another group, which will make a copy of the file with valid path. I can then remove old file and move back copied version.
Is it related with macOS beta 4 version? Did they broke something? Is there any way to fix it?
(these invalid paths cause the project to work only on my machine)
macOS Catalina 10.15 Beta (19A512f)
xcode Version 10.3 (10G8)
(tested also on Xcode 11 beta 4 and same issue)
I came across the same issue right after updating to macOS Catalina Beta 4 as well. Here is a workaround:
Navigate to the project file in Finder, right click the xcodeproj > Open With > Other... > Enable: All Applications > [text editor of choice]. Open up the project.pbxproj file.
Find the section named /* Begin PBXFileReference section */ and below it, locate the section where it says:
path = ../../../../../../System/Volumes/Data/Users/patryksredzinski/Desktop/PerfTester/PerfTester-Xcode/PerfTester-Xcode/wtfTableViewCell.swift
and replace it with path = wtfTableViewCell.swift.
Save the file. Xcode should reflect the changes you made. To check, navigate to the inspector panel, under Identity and Type > Location, the path should now only display the [filename].swift.
Hopefully a permanent fix will come out soon.

Weird relative path while creating new files in Xcode. Is it related with macOS Catalina beta 4 version?

I am not sure if it is related with beta software I am using.
I've recorded a video which shows the problem:
https://youtu.be/AuxjNpylaMc
When I create new files in Xcode, they're put in super weird location which causes a lot of problems when pushing files to repository.
When I create a file in Xcode (no matter where in project, no matter which project I am loaded into, no matter where is the project located on my drive) this is how the relative path is generated:
../../../../../../System/Volumes/Data/Users/patryksredzinski/Desktop/PerfTester/PerfTester-Xcode/PerfTester-Xcode/wtfTableViewCell.swift
I've found out a solution which is to move the file in xcode project navigator to another group, which will make a copy of the file with valid path. I can then remove old file and move back copied version.
Is it related with macOS beta 4 version? Did they broke something? Is there any way to fix it?
(these invalid paths cause the project to work only on my machine)
macOS Catalina 10.15 Beta (19A512f)
xcode Version 10.3 (10G8)
(tested also on Xcode 11 beta 4 and same issue)
I came across the same issue right after updating to macOS Catalina Beta 4 as well. Here is a workaround:
Navigate to the project file in Finder, right click the xcodeproj > Open With > Other... > Enable: All Applications > [text editor of choice]. Open up the project.pbxproj file.
Find the section named /* Begin PBXFileReference section */ and below it, locate the section where it says:
path = ../../../../../../System/Volumes/Data/Users/patryksredzinski/Desktop/PerfTester/PerfTester-Xcode/PerfTester-Xcode/wtfTableViewCell.swift
and replace it with path = wtfTableViewCell.swift.
Save the file. Xcode should reflect the changes you made. To check, navigate to the inspector panel, under Identity and Type > Location, the path should now only display the [filename].swift.
Hopefully a permanent fix will come out soon.

Xcode Source Editor option not displayed in Extensions

Is there a way to activate Xcode Source Editor option in System Preferences > Extensions? For some reason, it's not showing on my Mac (the last option).
If the Xcode Source Editor is missing from the left pane (see image above), try one of these solutions before resorting to a reinstallation:
In the Applications folder, rename Xcode and then change the name back to Xcode, or move Xcode.app out of the Applications folder, then back in, as described by this Stack Overflow answer.
Move the Xcode app to the Trash and re-install it from the AppStore.
I install the Xcode manually that's why not found on Extensions.
To fix quickly:
Quit Xcode
Rename Xcode in the applications folder temporarily with any name.
Launch renamed Xcode
Quit Xcode
Name it back to the old value ("Xcode")
Go back to Extention you will find the Xcode
The entry is shown if the system detects that both Xcode and at least one Xcode extension is installed. Yet the code to detect Xcode has a few issues.
If you install Xcode first and don't have an extension, the entry is not shown. If you then install an extension, the system re-checks if Xcode is still installed and if yes, it should add the entry. However, the check code will fail in some situations. E.g. if you renamed Xcode.app to something like Xcode_13.4.app (as you need to manage different versions of Xcode), the detection code may not find it. It also may not find it if you moved Xcode to a different location outside of /Applications. And even if not renamed and still in the default location, the detection code sometimes fails and the exact reason why that happens is unknown (it may have issues with certain ownership, certain file permissions, case-sensitive file systems, etc.)
In all these situations, renaming Xcode causes it to be re-detected by the system and then the system sees that Xcode and at least an extension is installed and the entry appears immediately. No need to reboot or start the renamed Xcode; you rename it, you rename it back, and the entry is there and will stay there (even after deleting all extensions, it stayed on my system).
If you first installed any app with an extension and then Xcode, the problem does never appear as in that case you immediately trigger the rename-fix above, because the moment you install Xcode, the system will always detect it correctly (regardless how the app is named or where it is located or any other issue the scan code might have) and detecting Xcode and knowing there is an extension, the menu entry appears at once. The code that detects Xcode extensions seems to always work correctly.
This is probably one of the issues where the Xcode detection code has not been tested very well by the Apple but since it seems to work for the vast majority of users, Apple sees no reason to further investigate why it would sometimes fail.
It will get activated by default if any plugin are added in Xcode.
You have to download XcodeClangFormat plugin from GitHub and follow the installation steps. Then Xcode Source Editor will be visible automatically.
Please refer this link

Migrate xib file to Xcode 4.4

This should be an easy one, but surprisingly I could not find any information about it being or not being possible to do.
I have some .xib files created in older versions of Xcode/Interface Builder and I would like to use Xcode 4.4's new features but so far I've only been able to achieve this by deleting the older .xib files and creating new ones from scratch.
You may need to update the older xib files' development target. Select the xib file from the project navigator and open the file inspector. In the file inspector's Interface Builder Document section is a Development menu. Try updating the development target to Xcode 4.4 and see if that allows you to take advantage of the new Xcode 4.4 features.
If updating the development target doesn't work, you'll have to provide some more information about the problems you're having and the features you haven't been able to access.

How to make an IPA on XCode 4.3?

I have a Mac OS X Lion setup with XCode 4.3. I am not a registered Apple developer.
I told, via the plist files: /Applications/Xcode.App/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist and
/Applications/Xcode.App/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/SDKSettings.plist, XCode not to require codesigning.
I then compiled my project, just a basic iPhone app project, it ran well in simulator. I could build and archive it, then sign it using a self-created certificate and the archive appeared in the Organizer.
Nothing strange for the moment, but there comes the problem: I have no "Share" button in the organizer. I absolutely need to make an IPA file out of my project if I want it to work under an iPhone as it won't accept xcarchive files. I only get the "Validate" and "Distribute" buttons which both require to be a registered Apple developer. But, no "Share" button which enables building an IPA... for free.
I have gone through XCode settings but nothing seemed to help me there. Even the documentation says a Share button is available in XCode 4.3, so my question is: Why don't I get the possibility to make an IPA? IS there any workaround to get this Share button or make an IPA out of the xcarchive via any command line or whatever?
Here's how you can make an IPA in XCode 4.3:
To Disable Code Signing:
Go to /Applications.
Right click on XCode and select 'Show Package Contents'.
Copy Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist to your desktop. (Make sure to actually copy and paste. No drag and drop)
Open it and under DefaultProperties set CODE_SIGNING_REQUIRED to NO.
Copy it back and replace the original file.
Restart XCode.
Open your project.
In Project Navigator select your project and open Build Settings section of your porject (and not any particular target)
Under Code Signing find Code Signing Identity and for both Debug and Release modes set Any iOS SKD to Don't Code Sign.
Now you should be able to build your project without any errors.
To make an IPA:
In 'Project Navigator' select Products
Right click on [NameOfYourProject].app and select 'Show in Finder'.
Create a folder and name it Payload
Move [NameOfYourProject].app to Payload.
Compress Payload and rename it to [NameOfYourProject].ipa
You should be able to get an IPA by clicking 'Distribute...' in Organizer->Archives, and choosing to 'Save for Enterprise or Ad-Hoc Deployment'.
Beginning iOs 5.1 Apple moved their files from /Developer/... to XCode->Show Package Content
In order to export codesign_allocate correctly run this line on your Mac terminal :
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate

Resources