Codesign: What are unsealed contents? - macos

I have just upgraded to XCode 6 and tried to build my Developer ID signed Mac app.
However, I now get the following codesign error:
unsealed contents present in the root directory of an embedded framework
This applies to the Dropbox.framework that I use. Obviously that could not be signed. What does the error mean? What is wrong?

Have a look at OS X Code Signing In Depth
Beginning with OS X version 10.9.5, there will be changes in how OS X recognizes signed apps
Structure your bundle according to the expectations for OS X version 10.9 or later:
Only include signed code in directories that should contain signed
code.
Only include resources in directories that should contain
resources.
Do not use the --resource-rules flag or ResourceRules.plist. They
have been obsoleted and will be rejected.

The problem is the version.txt file that resides in the Dropbox.framework. While this is useful to know which version the framework is, it seems no longer to be OK for codesigning.
When I removed the file everything worked fine again.

Had the same problem for several hours today, as I tried to adapt a pre-Yosemite .framework bundle to Yosemite. In the end, the problem was the symlinks I made, not strictly files in the directory.
Initially, the package had a broken symlink in its root directory. I fixed it up.
The symlink I added:
Headers -> Versions/Current/Headers/
What it needed to be:
Headers -> Versions/Current/Headers
That extra slash is the killer.
Note that this bit me twice in two different spots: I also had
Current -> 1.8.0/
where I needed
Current -> 1.8.0
I'm not much of a *nixer, so maybe this is common sense, but hopefully it helps other windows devs like myself.

I ran into a similar issue today... my error was "unsealed contents present in the bundle root". The fix for me was to remove the custom icon I had on on my app. AppName.app/Icon? was corrupt somehow...

I researched this for a while today and none of the suggestions I found helped, my sdl_mixer.framework had five embedded frameworks that I couldn't get past iTunesConnect. My solutions was to remove three of them that I didn't actually need, and the other two were added to my project as standalone frameworks, not embedded in the sdl_mixer. Hopefully this helps someone, I spent hours on this.

In my case, I was trying to sign an app with some old frameworks inside. None of these suggestions helped. Turned out I had to remove the PkgInfo file from inside a framework to get this message to go away.

I had such error:
<some_path>: unsealed contents present in the bundle root
Command CodeSign failed with a nonzero exit code
The issue was that I used a custom CONFIGURATION_BUILD_DIR[About]. And after some changes(changing macOS and iOS platforms) it occurred
And when you clean your project this custom location build is not cleaned(like derived data). To solve this problem remove content of this folder manually

I have hit this twice now, so I am adding the causes, since codesign is very opaque and generally refuses to tell you what the problematic resource is.
On one occasion, I had an unsigned binary executable. Each executable and framework needs to be individually signed before singing the bundle as a whole.
Then I hit another case. I sign my code as part of the publish process, re-signing each executable and framework. But Xcode also signs the bundle as well, and it turns out that was leaving cruft behind in _CodeSignature folders. So now, before signing each of the executables and frameworks and then the bundle, I pre-remove Xcode's generated _CodeSignature folders with something like:
find MyApp.app -name _CodeSignature -type d -exec rm -rf {} +
Hopefully this hard-won information will save someone some time one day.

I had the same problem and what worked for was deleting the contents of the DerivedData folder. Xcode doesn't say which resource is causing the problem, so I rebuilt everything from scratch. Clean didn't work either.

I hit the problem when I tried to sign another framework, the answers here are very inspiring, here must be some problems with the framework structure, but I did find any them. The structure seems to be right, the symlinks have not tailling "/", there is not extra file (checking with ls) ...
After tons of trying, I finally realized there is a extra .DS_Store in the framework, which is really annoying :(
So if you still hit the error, try to check if there is any hidden files.

Another possible cause of this problem: if you are building iOS and macOS apps that have the same name and the same installed location, you may find that both of them are written into the same app bundle. First the iOS app build places its contents directly in the app bundle root, and then the macOS app build places its contents into a "Contents" folder in the app bundle, and then codesign complains about the iOS resources.

Related

XCode, frameworks, app submission and SwiftFolder

I have built a Swift app. I added all libraries in Project -> Target -> Link binary with Libraries. I added external frameworks such as Parse to the project too.
I then selected all frameworks under the project and created a group folder called Frameworks.
I have observed/recorded three issues:
When I run ls -l in shell, the Frameworks folder is not actually there
Only frameworks such as Parse & Bolts are actually listed under the project. Other frameworks (e.g. QuartsCore, CoreGraphics etc.) are not listed anywhere with the ls -l command
If I try to archive the project, because the Frameworks folder is not 'there' as far as xcode is concerned, the SwiftFolder is not created (which would result in the app being rejected)
Surely it should be a straight forward process. What am I missing?
Apologies in advance for the fact that my code works yet I cannot solve such a simple problem!
1: A group in Xcode is not a file system folder, it's an in-app Xcode-specific construct. You can add file system folders to Xcode, but they are different and distinct from groups.
2: iOS frameworks will not be visible in your project folder as their location is managed by Xcode. They are added/linked to your app bundle at compile time.
3: Is your app failing validation/being rejected? Sounds like it could be a separate issue, everything else you're seeing sounds normal.
Only one thing worked - Shenzhen (failed on first attempt due to space issue). Here is what you need to do:
Go to Shenzhen on github, download, run and send apple the bill ;)
In case you are wondering, before I tried Shenzhen again, I actually tried the following:
Created a "Hello World" Single View Swift application in xcode. Added all the libraries and used the xcode archive facility to see if it generates the Payload and SwiftFolder. It failed on both.
I downloaded xcode 7.1 (beta) and tried again. This time I got the Payload folder but still no luck with SwiftFolder. So don't waste time on xcode 7.1 for this.
Called apple dev support (and yes, you are likely to be billed for this) - was transferred between three call centres (English spelling - sorry) and finally submitted the issue.

Why I can't submit or validate project in Archives organizer (XCode)? [duplicate]

I have a problem generating a iOS App archive from an application. The application compiles just fine and even works in the simulator. Now I wanted to make som ad hoc testing and cannot generate the iOS App Archive. When I click on the Product -> Archive it generates a generic xcode archive. Can anyone help me. I should mention, that I have already generated an iOS App Archive of this application. It has just stopped to generate iOS Archive for some reason. Thanks a lot.
Check Build Settings:
Skip install is NO for the main project target
Skip install is YES for framework (sub-projects) targets
In Build Phases for sub-projects, Copy Headers needs to be in Project, not Public (does not apply if building static library)
Installation Directory under Deployment is valid (/Applications for example)
This can happen if you've added a framework/library ... you need to edit the Target->Build Settings of that library and set the 'Skip Install' setting to 'Yes'. When you re-archive, XCode should start producing a 'iOS App Archive' again rather than a 'generic xcode archive'.
In addition of Skip Install to Yes and in case you opened another lib/framwork project within your app project you have to move headers (if any) from public to project in the Build Phase / Copy Headers.
I did the following to make it work for me:
I had a three20 static library, I used cocoapods to include the files within the main project
followed the skip install for all other sub projects/static libraries and switched the copy headers from public to project as stated above
most importantly: in each library your project uses go to build phases -> Copy Files and ensured that destination is changed from Absolute path to products directory. Note: see the hint below to narrow your search to find the library causing this error.
and that was it!
hint: to get an idea of the offending files that's causing your archive to create an archive file rather than an ipa do this:
Select the archive and click the Distribute button.
Select the 'Save Built Products' option.
Hit Next and Save.
Browse the created directory in Finder.
The 'libraries' subdirectory will identify the libraries that you need to set the Skip Install to Yes.
in some cases usr/local/include will identify the culprit header files you need to move from Public to Project or the files that you have to change from absolute path to products directory (or even the files you forgot to set the skip install to yes flag). but that directory (ie usr/local/include) varies depending on your sublibrary directory structure. In many cases.. you will see all the files listed under Copy Files in step 3 above listed here. If you find them here, then you have a definite answer for the cause of your problem.
update to hint: to make life even more simpler.. whatever files appears under step 4 in hint above.. simply search for it in the global search of xcode.. and you should get immediate results for what you want.. for example, this was the content of my folder (following the steps in hint above):
So I could tell it has something to do with the crypto and ssl libraries.. searching for them:
made me realize that i forgot to set skip install to yes.
If you export the archive, open it and see /urs/local/include in Products try this suggestion:
In each pod, under Packaging, Private Headers Folder Path and Public Headers Folder Path is set to /usr/local/include. If I clear them then I get a valid archive.
Worked for me after upgrading my React Native app to 0.11.0, Xcode 7 and CocoaPods 0.39.0.beta.4.
If you're using CocoaPods as well as WatchKit or a Today Extension, there is an open issue on the CocoaPods repo explaining what your problem might be.
The solution for me was to remove the Copy Pod Resources phase from the WatchKit Extension and Today Extension targets under Build Phases. The project compiled and archived as expected once I did this.
Hope this helps someone, this had me stumped for an entire day!
If any of the above answers don't work, your issue is probably with cocoaPods. The latest update 0.38.1 messed things up for me, but then i downgraded to 0.37.1 and things returned to normal. Using Xcode 6.3.1
Later edit: updating to 0.38.2 will also fix this. More info about what caused this issue here: Cocoapods 0.38.1 failed to create valid Archive
Although I'm using Xcode5 and what sorted it for me was editing the Build Scheme - trying all of the above suggestions that were applicable didn't help in my case.
I had two targets, say, "App" and "App FREE". My problems with the generic archive happened when I was trying to Archive the FREE version, which I added after the 'normal' version of the app. In my case, when I selected its Scheme in the toolbar and chose Edit Scheme ... I saw that Build section had two targets, namely App and App FREE.
I unchecked all columns for App, leaving only App FREE's columns checked, and clicked OK. Next time I chose Product > Archive I got my App FREE instead of a Generic Archive. :)
If you have only single project, maybe this solution would be useful.
This problem had occurred, when I duplicated the target. As a result I had two targets parallel built. This was causing the issue. Generic IOS archive was built.
To turn the parallel built off go to
Manage schemes,
Edit scheme,
Build,
Remove the other target.
I had this problem after updating to iOS 9 and Xcode 7. Josh H's solution worked for me:
In each pod, under Packaging, Private Headers Folder Path and Public
Headers Folder Path is set to /usr/local/include. If I clear them then
I get a valid archive.
I also made a post install script for my Podfile to do this automatically!
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['PUBLIC_HEADERS_FOLDER_PATH'] = [""];
config.build_settings['PRIVATE_HEADERS_FOLDER_PATH'] = [""];
end
end
end
Just add it to the bottom of your Podfile and run pod install
I had this issue. In my case, it was caused by keeping a Mac app target as a dependency of the iOS app.
The reason it was setup like this was that the Mac app was a tool used to generate some data for the iOS app, which was then included in the bundle.
I had to remove that dependency and build the tool separately before making a build of the iOS app itself.
In my scenario I was getting the erroneous "Generic Archive" only after I began including Swift code in my predominantly Objective-C project. After lots of troubleshooting and examination of the archive file that Xcode was spitting out, I noticed that the SwiftSupport folder (with the required dylibs for the Swift runtime) was in a different place in my archive than from a vanilla brand-new Swift project app archive.
I found the Installation Directory build setting and noticed it was set to a custom path in my project. I simply deleted it (setting it to its generic value of /Applications) and the next Build -> Archive I did worked as expected and gave me a proper iOS App Archive.
TL; DR: Make sure your Installation Directory build setting is set to its default value of /Applications when including Swift code in your app, especially if you are starting with an older project file that may have some unexpected legacy build settings.
I have multiple project in my workspace, (GTL, Pods and my main project) and this is what worked for me:
Select the Project, there will be 2 types there, there's the Project and there's the Targets.
For projects that is not your main like GTL or PODS:
Projects:
Skip Install = NO
Installation Directory = /Applications
// For pods
Private Headers Folder Path = ""
Public Headers Folder Path = ""
Targets:
Skip Install = YES
Installation Directory = /Applications
// For pods
Private Headers Folder Path = ""
Public Headers Folder Path = ""
For the main project (which is usually named the same as your product name):
Projects:
Skip Install = NO
Installation Directory = /Applications
Targets:
Skip Install = NO
Installation Directory = /Applications
Check the ios deployment target on each projects and targets to make sure they are all the same.
Leaving this here to save others from the same journey.
I found I needed to remove the same Copy Pod Resources build phase from a static library target in my workspace too.
Addition to Alex L 's answer.
Point 3. Change 'Build Settings' -> 'Public Header Folder Path' to 'include/xxx' also works.
If none of the above helped you...after a lot of time.......
I deleted the value in the Info.plist for Bundle Version because I was happy enough with just Bundle Version Short 1.0. Bad. Don't do this.
*Note I actually did this by editing it in the UI on the right not realizing it would put an empty key in the Info.plist file. I think that makes it invalid. My bundle showed up as other items while archiving and had no icon, and I couldn't upload to anywhere.
This boils down to invalid values in the Info.plist. If it's not a valid archive, try unzipping an old archive and dropping in / overwriting your current one and see if it fixes it when rebuilding the archive.
Go to Build Settings and add
yourAppName/Resources/dist.plist to the Code Signing Entitlements
Press cmd + B with iOS Device or a Real Device selected as Build Target
When done -> scroll to "Products" folder and right-click on yourAppName.app
Choose "Show in Finder"
Create a folder with Name Payload (capital "P")
Copy yourAppName into your Payload Folder
Create a zip from your Payload Folder
Rename the zip to yourAppName.ipa
DONE
After trying just about everything:
Clean, Archive
delete DerivedData, Archive
restart Xcode (I was using XCode7), Archive
combinations of above...
I then noticed my boot partition was 'low on free disk space'... about 1GB or so.
I rebooted, then got about 18GB free.
Then opened Xcode and project, performed Archive... and surprisingly (after an hour of trying to build an Archive) I finally got a non Generic Archive.
No idea if its a free disk issue which fixed it or a reboot of the macOS that fixed it, but it worked for me.
If you have any .xcodeproj files in Project>Targets>Build Phases>target dependencies remove it from there and then build your ipa. It works for me. Cheers
You can get answer here : xcode is creating generic xcode archive instead of iOS App Archive
In my case, i had to move both FMDB and BlocksKit to static libraries. Previously they were built as subprojects. Remember you can use lipo to create universal libraries. When building the final products, the simulator code will be stripped automagically.
Another possible reason for this is to have references in "Target Dependencies" to projects for a different platform. In my particular case, I was working on a project that shares code for OSX and iOS. In one of the iOS targets, I had accidentally added an OSX target as dependency.
In order to be thorough, I am posting my solution.
I experienced the exact same problem trying to build an Archive of an iOS project in Xcode 5.1.1 (5B1008). None of the above suggestions fixed the problem, and most of them were irrelevant (I had not added any Frameworks, and did not have any Public entries in the Copy Headers section of my Build Phases).
In my case, fixing the problem consisted of simply closing my project, deleting any archives that I had previously made, going to Preferences > Accounts, removing my developer account, quitting Xcode, relaunching, re-adding my developer account, starting the Archive process again. This fixed my problem immediately.
One more solution, since all the above didn't work for me...
Changed the User Header Search Paths (I suppose Header Search Paths would work just as elegantly) to "$(BUILT_PRODUCTS_DIR)/BlocksKit".
Background:
In BlockKit, the developers have structured the headers in the main project differently than the structure on deployment. So, you can't reference the headers in the project, and must reference the headers copied into the build directory.
The way this worked for me in (Xcode 5) I had 2 targets and when I edited the scheme, on the left pane of the scheme editor, you will see the [BUILD, RUN, TEST, PROFILE XXX.APP, ANALYZE, ARCHIVE] from the BUILD pane, you will see your project targets listed in a list. At the far right end you will see the ARCHIVE selections, make sure only one target is selected for archiving.
I had 2 of my targets selected in my project, I checked only the target I wanted in the product, and it worked!
I solved this error by opening solely the app project in XCode, ie. not opening a workspace comprising the application and other projects/libraries/frameworks.
Having 2 separate project, a framework or shared library and an iOS application, I had to open 2 different XCode windows, each by directly opening the .xcodeproj file instead of the common .xcworkspace, in order to preperly build each.
As a nice side effect, XCode no longer rebuilds every target of every project after I do a Clean, resulting in shorted build times.
Background: I am creating an open source SDK, and a demo iOS application. I had both opened in a single workspace.
Setting Skip install to YES on the SDK targets would prevent anyone from creating an archive, as it would be empty, so this was not an option. Using Project instead of Public headers would lead to an archive missing the header files that should be distributed, so this was not an option either.
For it was because i was working in a workspace.
The project did archived but would ne be displayed in the organizer window.
I closed the workspace and open the project on its own.
The archived has been opened in the organizer ... hope it's help.
In my case, I had a custom script that was copying some temporary files into:
${TARGET_BUILD_DIR}/myTempDir
That meant that, after investigating the archive to inspect its contents, I found right next to the .app file a myTempDir folder. Once I modified the script to save elsewhere things were sorted.
Try setting $(PROJECT_NAME)Headers in Framework projet's Public Headers Folder Path. You have to go to build settings of the Library Target then edit the Public Headers Folder path as $(PROJECT_NAME)Headers.
If using Xcode 7 with cocoapods v.0.38.2. Try removing copy pod resources from your today extension target.
I encountered this problem after adding a OS X command line tool to my iOS app's project, and Skip Install was set to NO by default for the command line tool's target. Since you obviously can't install an OS X binary to an iOS device, archiving defaulted to a generic Xcode archive. Setting Skip Install to YES for this target fixed the problem.

Xcode fails without specifying and errors

All of a sudden my project fails to build in Xcode. If I look at the log I see all the needed dependencies being built, and then I get a strange error:
Verify final result code for the complete build operation
Build operation failed without specifying any errors.
Individual build tasks may have failed for unknown reasons.
I removed my code directory and replaced it with a backup, did a clean, tried building all the other components separately (they succeed) - nothing works. I tried a command line build, same issue.
There were only a few hits on google for this error, none offered any useful advice.
Can anyone please help?
Update: When I run the command line build, I see the following error:
2012-05-25 08:55:53.830 xcodebuild[3358:4203] No recorder, buildTask: <Xcode3BuildTask: 0x400f35e60:'ProcessPCH MyProject-Prefix.pch':REfc(32370056113422336):deps=0:phaseNum=4>
I checked the output of xcodebuild and it is returning '65'.
I thought there might be a problem with the MyProject-Previx.pch file, so I shut off "Precompile Prefix Header", and now I get the same error with a different file:
2012-05-25 09:15:11.784 xcodebuild[3882:3703] No recorder, buildTask: <Xcode3BuildTask: 0x40048ab60:'CompileC HelperRoutines.m':REfc(33777199068741632):deps=0:phaseNum=4>
Build operation failed without specifying any errors. Individual build
tasks may have failed for unknown reasons. One possible cause is if
there are too many (possibly zombie) processes; in this case,
rebooting may fix the problem. Some individual build task failures (up
to 12) may be listed below.
I've run into this problem consistently recently while running Xcode 9.0 Beta 3 and Xcode 8.3.3.
The fix is to delete ALL in the Derived Data folder. It then seems to work again.
rm -rf ~/Library/Developer/Xcode/DerivedData
NOTE: just cleaning the build or deleting the current build folder for a project does not seem to help.
Hope this helps :)
I was hitting this error and it infuriated me for an hour or so. The answer below helped me out a lot: essentially your machine has a ton of running processes, XCode can't handle it, and rebooting your machine is the best answer.
https://stackoverflow.com/a/13183522/1863655
I looked around for a bit and the only one that worked for me was shortening my project folder name.
All other tries: restarting, recloning, deleting derived data, etc. didn't work. The only thing that worked was making the project folder name shorter.
I also encountered same error. I was edited .pch (Prefix Header) file. Then I started getting this strange error.
Then I removed all editions which I made in .PCH.
Then I quit my Xcode.
When I restarted Xcode this strange error was gone.
Hope this will work for you also.
Best luck Buddy (y)
Build operation failed without specifying any errors. Individual build tasks may have failed for unknown reasons.
One possible cause is if there are too many (possibly zombie) processes; in this case, rebooting may fix the problem.
Some individual build task failures (up to 12) may be listed below.
This happens occur when the total path length is too long.
change the folder name or location of directory, shorter then before.
Happy 2019, everyone, but sad to say this can still happen in Xcode 10.2.
I had four projects open in Xcode but only one failed in this way. I tried a main menu > Product > Clean Build Folder. The little progress spinner started up and 5 minutes later was still spinning. Hmmmm.
So I quit Xcode and in Terminal did a cd ~/Library/Developer/Xcode/DerivedData. Although ls -alww showed only one subfolder named after each of my other projects, as expected, there were five subfolders whose name began with the name of the problem project. I deleted all of them
rm -R ProblemProjectName-*
and relaunched Xcode. Problem solved.
Mine gave this error sometimes, also LLVM failed with exit code 1 and clang failed with exit code 255, at different code locations each time. I just had to reboot (OS X 10.7, Xcode 4.5).
I rebooted, no luck. Then I noticed that when I relaunched XCode, one of my tabs was loaded with no file in it. I figured out what file I was editing in it, opened it, saved it and then I was able to build.
None of these answers worked for me on XCode 5.
Luckily, I'm still only testing XCode 5 - I kept XCode 4 around.
XCode 5 simply won't build one of my two projects, claiming that my libraries aren't built with the right settings, and I keep running into the error described on this page on the other one... so I'm sticking with XCode 4, which builds both of my projects perfectly well.
If you are experiencing this issue on XCode 5, consider "reverting to XCode 4" as another strategy.
Overall the idea that repeatedly running a program, XCode or not, degrades your system to the point where you have to reboot does not fill me with confidence in that program.
With Xcode 5.0.0, this error was caused after an update to the CLI tools.
Updating to Xcode 5.0.1 and installing all the required components again still didn't fix the error. However, 5.0.1 was kind enough to actually emit an error that was useful.
/bin/mkdir -p /Users/xxx/Documents/XCode/SampleApp/bin/SampleAppDebug.app/Contents
error: (null)
This lead me to look at the bin folder, and find out that the 5.0.0 build with broken CLI tools had made a symlink in bin/ to the derived information folder with SampleAppDebug.app, which for some reason it could not write to.
I manually removed all contents of the bin/ folder and rebuilt without errors.
I faced same problem. I have change my System time.I delete file "/Users/YOURNAME/Library/Developer/Xcode/DerivedData/ModuleCache/YOURBUNDLEID/UIKit.pcm". Then it's work fine for me. Try this.
I added into the Framework search paths the header file location.... removing this from the top level project settings fixed the issue for me.
Change at your peril.
The only workaround, that works for me - push your code to git repo and clone it to new location.
I highly recommend to reclone your repo, because you'll deal with some random problems if you prefer rebooting/turning off and onXcode.
did you set "Perform Single-Object Prelink" to Yes?
try turn it off.
i had the similar problem. i have tons of files in a static library. reducing the number of files or setting "Perform Single-Object Prelink" to NO solved my problem.
Same error and following didn't work for me for Xcode 6.3.2 on Mac OS X Yosemite 10.10.3:
Git discarded changes to last successful build point
Creation of new fresh project from scratch from a builtin template (though I cannot recall whether it built successfully or not)
Restart of Xcode
System Reboot
and the following worked:
I faced the problem in the morning and it got resolved in the evening with a couple of Xcode restarts and System reboots and creation of new project. So, I'm not sure what really triggered.
I faced the same problem today. Cleaning the DerivedData and cloning the project somewhere else didn't help. What fixed my problem was repairing the volume from the Disk Utility app and removal of all Xcode plugins.
I have encountered same issue without having any code changes for my project running on Xcode 9.2. It looks like if you have some run scripts or external build systems attached to the project, this might cause an issue. Try committing or discarding changes and build again. If it still persist, delete local repo and clone again. Also maintain smaller folder names for project location.
Same issue when added watchOS target inside iOS app, using Xcode 11.1 with SwiftUI:
Go to menu Xcode / Preferences / Locations
Open Derived Data folder in Finder clicking on the arrow next to /Users/yourUserName/Library/Developer/Xcode/DerivedData
Locate your app Derived Data folder and delete it
Menu Product / Clean Build Folder
You should be able to compile again.
I know this is super late to answer but I'm answering since none of the above solutions worked.
For me restarting, clean building, deleting derived data nothing worked.
Because the issue was not due to any zombie objects or something like that.
I'm using Xcode 11. I think it's an Xcode bug that sometimes errors are not shown in the issue navigator. But don't worry check the build report in Report navigator(The last tab in project navigator: the one that looks like a comment box with lines in it. or simply cmd + 9).
Click the relevant build and resolve the issue, mine was missing file in pods directory.
just try to rename the folder name of the project. it did the trick for me
I had this same problem, however the accepted solution did not work for me, what worked was:
deleting .workspace file
deleting Podfile.lock file
deleting the Pods folder
pod deintegrate ; pod install
For me it was fixed by changing to the new build system(in File -> Project settings)
I have Xcode 11.7

Xcode can't find paths that are there

I have an xcode project that was created on another mac. That make was PROBABLY osx 10.5 using Xcode 3. (When I went to install xcode I could only get Xcode 4 AND was required to upgrade my mac to 10.6) anyway, I am experiencing problems compiling this project that compiles fine on the other computer.
I don't know why. The build always fails and I see it is looking for a path incorrectly.
The physical directory layout is like this
/path/devfolder/devfolderMainProject/mainproject.xcodeproj
/path/devfolder/helpinglibrary/helpinglibrary.xcodeproj
/path/devfolder/anotherlibrary/anotherlibrariesFiles/...
But when Xcode starts doing the stuff for the helping library, it returns linker errors and I can see it is looking for files in the wrong places
linker error /path/devfolder/helpinglibrary/../../anotherlibrary/anotherlibrariesFiles/src/correctfile.cpp does not exist
so I browse and see that the file definitely does exist, and that Xcode is looking too many directory up
../../
should just be
../
so that it only goes 1 directory up, how do I make it look in the right place?
Moving the folders around in finder breaks plenty of OTHER things, so I am not sure what to do here.
I suggest you to open the target properties. In the "Build" tab, look for the settings OTHER_LDFLAGS and LIBRARY_SEARCH_PATH. I have a project with a structure just identical to your one and I have edited these properties to inform the Xcode where to look for my libraries. Maybe you can have some wrong value in some of these settings.

Sharing an archived iOS build won't succeed on the clients side - no such file or directory

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

Resources