Finding and deleting Xcode beta marker - xcode

I have a new version of an app to submit and accidentally opened it with Xcode 11 (latest beta); now Apple reject a binary built with non-beta Xcode 10 (the message warning that builds can only be submitted from non-beta Xcode).
I'm guessing that somewhere in my project is a marker identifying the build erroneously as from Xcode 11.
I'm hoping someone can let me know how to remove this pointer so I can submit my app.
Thanks

1 - Make sure all of your projects (including pods) is compatible with one stable Xcode.
2 - In organizer window
Right click on the archive on select show in finder
Right click on archive and select show package contents
Head to de product -> application
Right click on YourApp.app and select show package contents
Open info.plist
Change the value of DTXcodeBuild to 10E1001 (The version of older stable Xcode)
Change the value of BuildMachineOSBuild to 18D42

Related

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.

The document "XXXX.xib" could not be opened. Could not read archive

After opening my project in the Xcode5 developer preview, errors appeared against a few .xib files when I tried to open the project in Xcode 4.5. The error text was:
The document "XXXX.xib" could not be opened. Could not read archive.
Please use a newer version of Xcode. Consider changing the document's Development Target to preserve compatibility.
The project's development target in Xcode5 appears to be iOS 5.0.
Looking at the source code of the .xib files with errors, it is clear that the .xml structure for .xib files in Xcode5 has changed quite dramatically, and it needs to be reformatted to be backwards compatible.
Is there a way to set development targets for specific .xib files? Does anyone know how this error can be resolved?
Many thanks.
Just open Storyboard in XCode 5, into right panel and "File Inspector" tab do:
edit your "Interface Builder Document" like follow:
Save it and open in previous XCode.
First of all open project with Xcode5. and then
select XXX.xib find Interface Builder Document
Opens in Xcode 4.6(if is 5.0)
close project
open it with 4.6
A better and easier solution that works even if your project isn't under source control can be found here (mine):
Just installed xcode 5 and have missing storyboards
Hope that helps.
It's a current problem when you open your Xcode 4.6 project with the new XCode 5.
To reuse correctly your XIB with Xcode 4.6 :
1 Open your project with XCode 5
2 Select your Xib to restore
3 In the File Inspector Section, in "Interface Builder Document",
select Xcode 4.6 in the Development's version of Document Versioning
4 Build and close
5 Reopen your project with XCode 4.6
It's possible to have some regression with elements width & size in your XIB, but it was restored successfully.
Cheers,
well obviously you created your project prior to the new xcode developer preview. then you tried opening your project with the new DP and boom, it automatically changed everything in your xibs to be able to present your xibs in a higher version. easy to fix. with your xcode 4 ios 6 open the same project, then right click on the name of the xib that is not opening and select source control and from there select discard changes. that should return the xib back to the shape it was before you opened it with the new xcode DP.
let me know if you need more help but that should take care of your problem.
First you have to open your's project with newer version of Xcode.
Right click on XXX.xib file and select "Show File Inspector."
Go to Interface Builder Document.
Change Development option with older version of Xcode.
Once I used to manage a project with XCode 5 xibs in XCode 4. I split xibs for each XCode version and made this build script that compiles xib to nib and place that nib them inside the app
#get SDK version
SDK_VERSION=$(echo $SDKROOT | sed -e 's/.*iPhone\(OS\)*\(Simulator\)*\([0-9]*.[0-9]*\).sdk/\3/')
if [ $SDK_VERSION == '7.0' ]; then
echo 'Current SDK is 7.0'
ibtool --compile ${TARGET_BUILD_DIR}/${TARGET_NAME}.app/output.nib ${PROJECT_DIR}/ProjectFolder/input.xib.xib
echo 'Copied nibs to' ${TARGET_BUILD_DIR}/${TARGET_NAME}.app
else
echo 'Current SDK is not 7.0 (SDK is' $SDK_VERSION')'
fi

No derived data for builds after upgrading to Xcode 4.5

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

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

The selected run destination is not valid for this action

I have opened a project that has always been iphone/ipad. I can't build it now because for some reason my only "Scheme" option is "MyApp My Mac 64-bit". How can I get this set back to iphone/ipad simulator and devices? My "Targeted Device Family" setting is iPhone/iPad.
I had that issue several times. Basically, just set the Base SDK in Build Settings to Latest OS X and it should work properly.
I ran in to this issue recently and i solved it by changing the value of the executable from "None" to "AppName.app" on xcode.
You should change:
Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> None
to:
Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> AppName.app
Have you tried editing the Scheme? (I'm assuming you are running XCode 4). I believe you just might need to set the "Base SDK" setting to "iphoneos" (this translates to "Latest iOS").
I was facing same issue in my application and I solved it by following these steps:
1. Go to Project-> Build Settings
2. Change BaseSDK to Latest OS
The above solutions didn't work for me because Xcode 4 didn't give me any choices to go back to iOS. I closed Xcode, opened it again, and then it worked!
I have the same problem, it appears that you also made the jump with the new Xcode 4 upgrade and this appears to be a code incompatibility.
If you want to keep it for IOS (Iphone / Imac ) edit Scheme [Product/Edit Scheme/ Build/ build => Destination drop down list.
Make sure you have installed the Ios SDK before running Xcode.
Elsewhere if you have to compile the same app for the Mac, I'd like also to know the answer as this generate the same errors as you.
I had similar issue recently. Got it solved by doing some changes in Base SDK of Project. Following are steps :
Click on the top-level project icon in the left hand panel
In the right hand panel that appears, select Build Settings (near the top).
Select "All" option (instead of Combined)
Ensure Base SDK is set appropriately, like "OS X 10.7", "Latest iOS(6.1)" etc.
I also just ran in to the issue. For me I was trying to "Build for Testing" and was running into this error.
To fix it I had to "Edit Scheme..." and then in the "Build" dropdown click on "Build" and made sure to check the "Test" checkbox for the Target.
I had the same error message. My solution is to delete the info.plist file from build phrases -> copy bundle resources.
Deployment target is missing for specified SDK ...
Choose other "Deployment Target" (in the Build settings) and simulator will appear.
Note:It's happening when use 5.1 SDK(latest) with XCode 4 on Snow Leopard..
I've just got this error, for me it was because of some reasons my device name didn't appear in xcode devices dropdown, just a generic name. Unplugged and plugged back the device and was fine.
For me I had to combine a couple of the solutions here to get it to work. For me the Project Build Settings were set to "Latest iOS" already.
To fix it, I had to change it to "OS X 10.6", then build the app (it will fail to build), then set it back to "Latest iOS", which now works again.
I just installed Xcode 4.1 (painful!) and when I opened one of my apps that built fine before the upgrade, the only active scheme was "My 64-bit Mac". In this case, the required change was to Edit Schemes, and for the Build scheme's Info tab, set the Executable dropdown to my target. It was set to None. As soon as I did that, the simulator/device showed up instead.
Tried the rest of these with no joy.
AFIAK this is a version control problem, in general not just a Git problem!
I gave a colleague a copy of a project that had modified files in it and this problem occurred.
However when I committed/updated the repo and gave him fresh copy.
This problem was fixed!
I've hit the same issue, needing to build with the 10.6 SDK. But I've found that XCode 4.4 doesn't contain this SDK! So I had to put it back, by opening the XCode.app package contents, and going to:
XCode.app/Contents/Developer/Platforms/MacOSX.platforms/Developer/SDKs
and copying in MacOSX10.6.sdk from my old XCode 3 Developer folder.
Surprisingly enough, this works! When you quit and relaunch XCode, and select the Base SDK for the project, 10.6 appears in the drop-down.
But beware, when XCode installs an update, you'll have to repeat this process, as I found just now after updating to 4.4.1.
I got same error and for some reason after going through all these it did not work. Notice in the very top menue is had my App Name> IOS Developer. Changed to App Name> IPhone 5.0 and went right into Simulator and got no error.

Resources