PhoneGap Xcode Missing Header files on Build 'Cordova/CDVViewController.h' file not found - ios

I am using PhoneGap 2.2.0 and XCode 4.5.2.
I can test my programs in the simulators, and I can put them on my devices to test them.
But I simply cannot build for distribution. It always fails with the following error:
my-projevt-path/Classes/AppDelegate.h:30:9: 'Cordova/CDVViewController.h' file not found
I've seen this problem around the web and still can't make it work, given whatever solutions have been posted.
I've changed things in Build Settings, I've reinstalled PhoneGap, I've run new lines in terminal, I've done my app over starting a new PhoneGap project from scratch, I've checked preferences in the build location in Xcode... I can't figure this out AT ALL.
Please, can anyone help? I've been working on this for days.
Thanks!

Problems in Xcode
If you have compilation problems related to missing headers, the build products should build into the same build directory. You may need to set the preference "Xcode Preferences -> Locations -> Derived Data -> Advanced…" to "Unique". This is the default setting for Xcode on a fresh new install, if you upgraded from older versions of Xcode, you might have a legacy preference in there that you need to update.
Found the answer!!!

Yes I am getting the same problem yeah and some help could be great.....
I followed all the instructions even with the ./update_cordova_subproject path as well it does not work. Also I solved the locking problem but I could not find the solution to this problem

The answer, in my case, had seemingly nothing to do with the error message that was being sent. Missing header files? That didn't seem to be the issue. Or, at least, not the direct cause of the issue.
This was an issue with my provisioning/certificates being somehow not right. I had re-created them several times, but it continued to be an issue.
I sent the job to another developer, who opened it on his machine, revoked my certificates and created new ones, and built it without changing anything else. He forwarded me the certificate, the provisioning, and an archive of the job. I opened the archive in xCode and validated it and uploaded it. And it was fine.
If you have got this problem, be certain your certificate/provisioning is set up right. I thought mine was, but apparently it wasn't? The "Apple Process" is definitely weird, and when certificates / profiles gets messed up, problems arise.

I was having the same problem and just solved it! First of the problem may very well be because of your distribution provisioning files... but when you look at the Project Navigator in xCode at the top level you have your Project and inside you have the CordovaLib.xcodeproj click on this file and you will see the iOS Deployment target. Make sure the proper IOS version is selected there. This is 1/2.
2) Then you need to duplicate the Release configuration and rename it Distribution. While the CordovaLib.xcodeproj is selected make a build and then build the actual project. This worked smoothly for me.

Add this line to your Build Settings -> Header Search Paths:
$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
Don't replace the existing line that looks similar, that is still needed to be backwards compatible with Xcode 7 and Xcode 6.4.

Related

An empty identity is not valid when signing a binary for the product type 'Application' in xcode version 10.2

I have compile webrtc ios source code ,then I used the command:
gn gen out/ios --args='target_os="ios" target_cpu="arm64"' --ide=xcode
then I open the workspace with Xcode.
but when I compile the code, Xcode gives me this error below.
An empty identity is not valid when signing a binary for the product type 'Application'. (in target 'AppRTCMobile')
my Xcode version is 10.2, the latest version.
I really don't know how did this happen,can anyone can help me?
my code sign setting is:
everything looks ok.
I added CODE_SIGNING_ALLOWED=NO as an additional parameter and that fixed this issue for me.
I needed to to turn OFF Automatic manage signing and turn it ON afterwards. It seems like Xcode did fix some inconsistency by that action.
I saw this error in Xcode 12.2b when building to run on a device, but I had not set signing to Automatic, or selected profiles, etc.
Basically I was running and testing on the simulator, then plugged in a device for testing and forgot to change any signing settings.
Perhaps this error is new to Xcode 12.x for that scenario.
If you're using CocoaPods check your project.pbxproj for (null) references, there's an issue that make BuildFile references to become (null)
Even if you have the identity correctly defined it may be "empty" because of this issue
Try, as suggested:
pod deintegrate
pod install
This error can occur when an Xcode project is generated (rather than built from within xcode), and the generated output project is unexpectedly in release mode.
I was working on a Godot project and got the above error which led me to this post. The error is not WebRTC or Godot specific.
If you only want to debug the project for now on a device, and don't need release builds yet, switch to a debug scheme using the scheme switcher (1)
If the generator didn't create a debug scheme, (which is the case for me for my issue) you can add one via New Scheme (2)
At first I could not work out why it was complaining about "empty identity" (this refers to the Team drop down) when as per the screen shot I had this value set. I had the project view filter settings on Debug (as per the screenshot (3) so the Release settings (where Team was set to "None") were not showing up. Change this to All to see if that is where the None in the error is coming from for you.
Debug builds only require a basic signing setup. If you still have issues with Release builds when it comes time for that, you may need to clear out certificates & provisioning profiles from your Derived Data, Apple Developer portal and Keychain.
Release build certificates are hard to manage & replace so be careful with randomly generating & deleting them.
The problem has been fixed, it's my mistake.
Select the target, then choose info.plist and select the one for your project.

Xcode 6.01 Archive validation error: Invalid Segment Alignment

I have been working on an iOS project solely in Xcode. Deployment target is iOS 8.0. After updating to Xcode 6.x, building and testing on my iPhone 5s and iPhone 6 as well as the simulators works fine. However, when I create an archive and want to validate it, I get the following error:
Archive validation failed due to the issues listed below.
iTunes Store operation failed.
Invalid Segment Alignment. This app does not have proper segment alignment and should be rebuilt with the latest version of Xcode. Please contact Developer Technical Support if you need further assistance.
I have googled for the past couple of days and it seems that this problem mostly occurs in connection with other development tools, especially from Adobe. However, I have only used Xcode for development.
This is what I have tried so far:
Reinstalling Xcode 6.01
Turning Autolayout on and off
Set target from 8.0 to 7.1
Just submit the archive (no error message, but new version is not found in Testflight)
Unfortunately, none of this has worked. My questions:
What does the error message want to tell me?
Has anyone any idea how to solve this problem?
Thanks a lot!
I found the solution. XCode seems to have lost track of two of my files (XX.h and XX.c) This file name (with a .o extension) was in the summary of the 1st step of the validation.
I removed the references to both files, added them again and everything works fine. Hope that helps someone!
(Edit: sorry, cannot flag this answer as the right answer, will do so in two days when stackoverflow lets me)
More detailed instructions:
When pressing "Validate" in the Organizer, look at the "Summary" dialog that pops up
If there are any .o files listed in addition to your app, go back to Xcode and remove the corresponding .h AND .m files from your project (removing the reference is sufficient)
Re-add them by dragging and dropping them back into your project
Recompile and it should work (assuming you're not using Adobe Air components in your app)
(thanks a million for this post Fynh, your fix made it finally work for me!)
In my case I was submitting an app that include a framework I had built that was a universal framework - created using lipo (for use with both device and simulator).
After replacing the universal compiled framework with device compiled framework, validation was successful.
To fix this bug I had to go Targets / Build Phases / Expand Copy Bundle Resources and remove the empty.cpp file (my error was about a empty.o file)
Hope this helps someone

armv6 and armv7

I've got an app that I created that I'm trying to test on an older iphone 3g. I've used this phone many times for testing but this new app for some reason will not accept the build.
I've done some searching and found that I need to charge the architecture from "armv7" to "armv6", I did this in both the project and target. After doing that I get the following error when trying to build to the device (construction is the name of the app)
Could not launch "construction"
No such file or directory (/Users/Matthew/Library/Developer/Xcode/DerivedData/Construction-cqtujdbjhpvbkrehtfzwvuhvxdrs/Build/Products/Debug-iphoneos/Construction.app/Construction)
But I can build in the simulator at it works fine... any idea?
thank you so much - clearing UIRequiredDeviceCapabilities in Info.plist would have never appeared to me.
None of these solutions worked for me. I'm using XCode 4.5 and ML. What I ended up doing (and still need to test thoroughly), was to re-create my project, started clean and then moved all sources and libraries to the new project and chose my provisioning profile for this new project. In the copy, I also manually copied the contents of the old Info.plist file and pasted them onto the newly Info.plist replacing them all.
In my case, I'm using CorePlot and that library needs armv7 (according to linker), so I can't just go armv6.
What I'm trying to figure out is when (cheap) XCode changed some settings to not run as a debugger on the device. I'm guessing something in the 'project.pbxproj' file. Otherwise I can't explain why the newly created project works and the old one doesn't.
I know this solution might not work for everyone, as in my case, as would lose all svn changes.
I'll post any progress on this.
My next step is to add CorePlot and let the project build it and not use the prebuilt one.
None of these worked for me either. But this DID work...
DO THE USUAL THINGS:
I cleared the build directory (cmd-k),
cleared the DerivedData (see prefs|Locations),
deleted the app from my iPhone 5,
unplugged the iPhone, and
restarted Xcode.
AND LASTLY DO THIS:
Open Xcode Organizer. Click on Devices | (your device name) | Applications. And finally, delete your application from here (aka. delete the app from your device, AGAIN).
Build and run...
Sorry I answered my own question! I figure I should leave this up in case anyone else has the same problem... I didn't update the plist setting to armv6 before... I did have to delete the armv7 in the plist to make it work

Xcode suddenly stopped running project on hardware: "Could not launch xxx.app: .. No such file.." [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Xcode has stopped being able to run my app, it started directly after I deleted it from the device and attempted to re-install by rerunning it in Xcode (something I've done hundreds of times before).
It says
"Could not launch XXX.app"
"No such file or directory (/Users/Mylaptop/Library/Developer/Xcode/DerivedData/MyApp-ekxcbebfpzkahtfkujyqkcwprzia/Build/Products/Debug-iphoneos/MyApps.app/MyApp)."
I've rebooted the phone, relaunched Xcode, cleaned everything, rebuilt everything. This error message won't go away.
This is with Xcode 4.5 which I've been using since it became available, if I revert to 4.3.2 then Xcode says "Finished running app" but it doesn't actually do anything - the app is neither installed nor run.
I'm completely stuck - unable to run anything on the device anymore.
Any suggestions?
That is really annoying. This error happens in a number of different situations. Sometimes restarting the Xcode, fixes the problem. If not, follow these steps:
Disconnect your device.
Delete the app from your device.
Quit Xcode (Do not just simply close the window, quit it)
Delete derived data folder (~/Library/Developer/Xcode/DerivedData/-gbrvhlvwmpiobxdujegtghggrffp - or something like that)
Now start Xcode once again, connect device and run the project. It should work fine.
from DhilipSiva blog
Try deleting "Required device capabilities" in the -Info.plist file.
You can't require armv7 on a 3G, and you can't require armv6 on any newer device, so just delete this attribute entirely.
I found the answer. The iOS deployment target's version was not the same as my device's OS version.
First tried some of the above with info.plists and deleting derived data, clean, etc.
My solution: quit XCode, reopen project. Go to derived data in Finder. Deleted data for all projects (was all trashable, but I would try deleting your troubled projectdata first). And then it worked again. Deleting derived data from XCode didn't work.
The following resolved my problem... my app worked for me in debug/release, then I built a few ad-hoc archives and debug/release builds stopped working.
Symptoms:
invalid entitlements errors when launching from Xcode to device (play with entitlements...)
immediate abort with no error (finished running ) when running simulator
could not launch ... directory blabla.../build/product/debug-iphoneos/... not found when launching from Xcode to device.
Eventually after trying to benefit from everyone else's pain I found in Targets [AppName]:
Build Settings
Build Locations
Build Products Path build
should be
Build Products Path build/Products
No idea how this got set incorrectly.
This must be hard-coded somewhere in Xcode/Springboard because 'Products' appears in both Xcode and in the Device console.
This is Xcode 4.5.1.
I solved this problem by
renaming a directory above my XCode project
Changing the name of the project in XCode fixed it for me.
In XCode, under the Project Navigator, click the project name, and it should let you rename it just like a file in Finder. Deleting derived data did not help.
I built my XCode Project with CMake and somehow it (or my stupid self) deleted or emptied the property "Executable file" in the info.plist. I set it back to ${EXECUTABLE_NAME} and it worked again.
Took me really alot of time working through all the suggestions and fixes until I finally found that problem.
Hope this will help some one struggling with the same problem
Edit:
It was in some way CMake messing up my plist file. I created my own Info.plist and used it the following way:
SET_TARGET_PROPERTIES( MyApp PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/MyApp.plist )
Inside my plist I had this entry:
<key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string>
Unfortunately CMake still seems to parse that file and replaced ${EXECUTABLE_NAME} with an empty string since its the CMake variable syntax. My quick work around is the following:
SET( EXECUTABLE_NAME "\${EXECUTABLE_NAME}" )
Now it works like a charm.
I am probably alone with exactly this problem, but who knows.
I had the same problem, but in my case I had a wrong requirement in my info.plist (require gyroscope for an iPhone 3Gs)
I tried to run my project on a different system other than that on which it was developed. I was getting “Could not launch xxx.app: .. No such file..”.
Removed the app from the device and then deleted the derived data from organizer in xcode for the app.
Organizer-->Projects-->Derived DAta-->Delete
My problem was resolved.
You need to set the deployment target LOWER than your device's version
For me, the solution was just to use the correct (non-distribution) provisioning profile.
I was defaulting to always using my ad hoc provisioning profile, but then I changed to using my developer profile (team profile) and that solved things. I went ahead and cleaned out the Derived Data directory to be safe but I don't know for certain if it is required.
XCode used to have a warning that told you to use the correct provisioning profile but that error message seems to have gone away in XCode 4.5.
I've had this problem by a very strange solution.
My problem was slightly different as I have 2 Developer certificates in Keychain. We have two developer accounts (lets say AD and BD).
1) I did change Bundle identifier from com.BD.game to com.AD.game
2) Device on which I had problems was only signed in AD provisioning profiles.
3) I was unable to debug the game on iPad - although the device had valid provisioning profiles, I had valid certificates, I restarted Mac, device, reinstalled Xcode ... nothing helped.
Do what i did today was examining the project.pbxproj file for any strange entries.
What I found was that Xcode was using proper provisioning profile, but signed the ipa/app with wrong certificate.
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: **BD** (XX******)";
After I manualy corrected the name and id; everything works like charm.
I got the same error. In my case I was set deployment target as 6.1 and trying to run an iOS 5.1 iPad. When I changed my deployment target to 4.3, issue solved.
Still having the problem . Try this
Disconnect your device.
Delete the app from your device.
Quit xcode.
Now start Xcode, connect device and run the project. It should work fine.
For me (using IOS 7 and Xcode 5), the error went away right after I did "Add to Member Center" with my device in the Organizer.
I would like to mention that the easiest way to open the DerivedData folder in Finder is the following:
Open the Organizer.
Click on "Projects".
Select your problematic project.
Next to the path of the DerivedData, click on the little right-arrow button.
Deleting the contents of the DerivedData folder worked for me. Instead of using the "Delete..." button, you should have more success deleting the files manually through Finder.
Go to: your project Target - > Info and from CustoM iOS Target Properties remove the Required Device Capabilities.
In my case that were armv7 and armv7s.
After that the app was built successfully on my iPhone 4.
This is how it looks after i removed both of requirements
For me, I forgot that I had "telephony" in the "Required device capabilities" in the info.plist. Removed that, and it finally worked on my iPad.
For me restarting of Xcode, cleaning DerivedData and restaring device wasn't enough in most cases, until I had figured out that iTunes was also running, and after quitting iTunes everything worked fine!
So my steps now are simple:
1. Quit Xcode.
2. If iTunes is running, quit iTunes.
3. Reopen project.
No need to remove app from the device, clean project or restart/disconnect device.
I think that's because Xcode and iTunes use some common libraries (as you know, Xcode Installer always asks to quit iTunes on installing iOS SDK).
I had this problem and tried a number of the suggestions which didn't work for me - then I found the one about removing the "Required device capabilities" in the -Info.plist file (which for me included location-services & gps)
That worked!
I then re-added them and it still worked.. go figure.
This was xCode 4.6.1 & my app is developer with Phonegap/Cordova
I tried all the above and yet it still wouldn't run. I fixed the problem by changing the derived build location. File>Project settings>"derived data location" change to project-relative. Or you could just make sure the default path has permission to read/write.
My issue seemed to be picking picking Portrait (top home button) as Item 0 in Supported Interface orientations in my plist. Removing that or moving it down seemed to fix my problem. Go figure.
I had this problem too for a Universal app with Xcode 4.5 on my iPhone ONLY, where I had two debug devices:
iPhone 4 iOS 5.1.1
iPad 1 iOS 5.1.1
The Info.plist had an empty entry under "Required device capabilities"
I know that I did not enter this empty 'Item 0'. The app loads on the iPhone
since I removed the empty item. I did not encounter
this problem on any of several earlier versions of Xcode,
This means that Xcode 4.5 handles this 'inserted' item differently
for the two devices I use. I have been wrong before, but this does seem
like a bug in Xcode 4.5.
This may seem obvious but you must also set your deployment target to the operating system that your device is running.
So if you upgrade to iOS 6, it will set your deployment target to iOS 6. You'll need to deploy to 5.1 if the device you are testing on still runs 5.1.
My issue finally got resolved by checking to make sure that the productName attribute in the /* Begin PBXNativeTarget section */ section of my project.pbxproj file matched the name attribute.
Once editing it so that they were the same, Xcode finally runs the app on my device correctly!
Thanks to Max Weisel for helping me! :D
Deleting the derived data folder did not help for me.
Using Xcode 4.4.2 the only solution was to open Organizer and delete old expired and extraneous provisioning profiles on the iDevice. Then everything worked perfectly again.
This may be a red herring, but I experienced these problems when I added custom launch images before deleting the default ones. Deleting the default launch and custom images and then adding back in the custom ones fixed it for me. I'm working with iOS 6 and Xcode 4.5.2
There seems to be a few different things that can cause this very helpful error message.
For me, it was down to an incorrect "Required device capabilities" in the Info.plist. I had added a blank array item by mistake (on top of the the architecture, armv7).
Deleted the blank array item and now everything is fine!
I had this problem and nothing really helped except:
My problem started after changing the contents of my info.plist and no reverting had helped.
What solved it for me was:
Create a vanilla info.plist in a brand new project
replace the old info.plist with the new
renaming it (like app_info.plist)
Set Build Settings/Packaging/INFOPLIST_FILE to be the new one.
Make all the changes you need for your project
Hope that helps. I tried everything else suggested here and this was the only solution for me.
Facing same problem but now problem is solved, i deleted Executable file info.plist. I set it back to ${EXECUTABLE_NAME} and it worked again.. :)
In my case i just set 777 permission directly to xxx.app folder to all files and work!

Xcode 4.3: Codesign operation failed (Check that the identity you selected is valid)

After installing Xcode 4.3 I can't validate and distribute application using Organizer.
While building, signing and validating in Xcode is OK, the validation in Organizer fails with the message in the title of this question.
First, Xcode 4.3 can download provisioning profiles automatically (there's an option in Organizer), but it downloads only development profiles and ignores distribution profiles as if there are none. OK, I downloaded and installed it manually and it appears in Organizer. Then I set proper Code Signing Identity both for project and for target and use Distribution profile that matches Distribution certificate in my keychain. Then I do Archive (build-sign-verify) and no errors, in the log I see green checkmarks for CodeSign and for Verify steps. Looks good and the archive appears in Organizer.
And that's where all goes wrong, I just select Validate, choose the new version I just prepared in iTunes Connect, choose correct code signing identity, same as was used for Archiving (actually, there are no other choices in my case), it asks for iTunes login/password as usual, and then says
Codesign operation failed
Check that the identity you selected is valid
Ahhh!!! Why!? It had no problems while archiving it, then same code signing doesn't work when trying to submit to AppStore. Well, not even submit, but validate before actually sending it. So this issue is local to my machine. The very same signing and validation that is successful during build, fails in Organizer...
I tried everything, re-installed Xcode, removed/revoked and re-issued all certificates, removed duplicated private and public keys from keychain, put all certificates in one "login" keychain, issued new profiles, installed Application Loader 2.5.1, and so on... still no luck.
Could it be that I have some left-over from previous Xcode installs? Or that I have to update some tools to make Organizer work properly?
Meanwhile, if anyone knows another way to upload binary to AppStore, please share. I couldn't figure out how to do that using Application Loader, when it asks me to choose a bundle to upload, all I have is xcode archive created by Xcode in Archive step. How do I get my hands on iap or whatever file the Application Loader wants from me?
I've discovered that Xcode 4.3.1 has a serious issue validating apps with resources within a directory tree within an application bundle.
Apps can pass validation within the Xcode "Build for Archive" process - it only fails when the validation is run via Organizer.
After spending hours trying to trace down the usual code signing entitlement issues, I eventually noticed the following line in the system console when the export fails:
3/10/12 2:32:48.450 PM [0x0-0x261261].com.apple.dt.Xcode: /Users/chris/Library/Developer/Xcode/Archives/2012-03-10/Coverage 3-10-12 2.32 PM.xcarchive/Products/Applications/Coverage.app/Tiles/T-Mobile-roam/4: Is a directory
I spent a day trying to isolate this bug, and I've finally nailed it.
The code signer in XCode 4.3.1 when validating for the App Store or saving for AdHoc distribution chokes whenever there is a subdirectory in your bundle that has the same name as its parent directory.
For example:
test/test/file.x -- FAIL
test/test2/file.x -- WORKS
This seems to be new in Xcode 4.3.1, and hopefully will be fixed soon.
Notes: This thread seems related: https://devforums.apple.com/message/630800
I was the original poster on the Apple Dev Forums...
https://devforums.apple.com/message/621193
I've also attempted to bring this to the attention of the AddThis developers:
https://www.addthis.com/forum/viewtopic.php?f=19&t=38292
As mentioned in the other posts, the only way I've found to prevent the code signing failure is to remove the ATResources.bundle file from the project.
Of course, this bundle contains many of the necessary images for AddThis, among other things, but the error no longer occurs.
I'm hoping this helps someone else discover the correct way to solve this issue.
The problem is AddThis or explicitly the ATResources.bundle in the AddThis folder.
So you have two options:
The first one is using an older version of Xcode to Archive.
The second one is relocate all the images inside the
ATResources.bundle into a folder, and copy the content of the
Localizable.strings into your own Localizable.strings
Then open the FBDialog.m file and search for "close.png", remove that
line of code and replace it with:
UIImage* closeImage = [UIImage imageNamed:#"close.png"];
Now you're ready to Archive.
Finally consider to file a bug report in https://bugreport.apple.com/
In my case, it was a damaged custom framework.
I have so many subdirectories on my bundle that have the same name as their parents, so I was not able to validate and submit. The only solution I found is to download xcode 4.2.1 from Apple developer center and install it side by side with xcode 4.3.2. Then I used it to validate and submit.
I'm developing on Sencha 2. The key here is to launch the System Console from Apps/Utilities and look at the error log when distributing. That's the easiest way to see the offending directory. In Sencha2 its in the /sdk/src/device/device. Good stuff: Still happening in xcode 4.3.2
Just confirming that the problem was indeed nested folders with the same name in my app.
In my particular case this was the issue:
problem: images/packs/1/1/img.png
solution: images/packs/pack_1/1/img.png
Smooth sailing after that. This happened in Xcode 4.3.3
found the solution, it really works for me. hope this will help you guys.
if the issue is because of Addthis, try following
noted that the inside ATResources.bundle you have a folder named ATResources.
ATResources contains exactly the copy items (ADDTHIS.db,en.lproj,images) which is present in ATResources.bundle. so we can simply delete the ATResources folder from ATResources.bundle.
for deleting,, select the files from ATResources.bundle and right click , show in finder -> and remove ATResources folder.
the major issue is because subdirectory in your bundle that has the same name as its parent directory.
:)
I had same problem in my project (in xcode 4.3.2) and as per all answers I checked for any .png file starting with ._* and also checked folder and its subfolder are different name.
Also checked code signing identity as per requirement, but did not succeed to solve this problem.
After whole days effort finally I got reason for "Packaging operation failed" error in my project.
In my case, I have classed About_us.h and About_us.m and by mistake I import header file like #import "About Us.h" (white space in middle). So when I loaded app on Device it will successfully loaded but when I try to create ipa using archive its give me error and return me Estimated App Store Size just 143 kb.
Finally while I change header like #import "About_Us.h" and try to make ipa I got real size in proper MB.
Hope this will help someone.
I experienced this issue on Xcode 5.0.2 (5A3005) with 2 completely separate folders that happened to be named the same thing.
Most other cases in this thread focus on the parent/sibling relationship, but I think it's any two folders with the same name will cause this failure.
I had same problem as you do, and radven response inspired me:
did you see that ATResources directory contains nothing more than just copy of its parent?
ADDTHIS.db
en.lproj/*
images/*
ATResources/ADDTHIS.db
ATResources/en.lproj/*
ATResources/images/*
As a quick-and-dirty fix I removed the redundant subdirectory. Application builds and seems to work fine, and Xcode is able to sign.
Let me know if I missed any consequence of this fix?
Gee, I spent like an hour on this problem.
I just removed AddThis from my project. Do it and it would work.
restarting xcode made the buttons work for me. they were greyed out before, in case anyone here is having the same problem
Techi50 alluded to this but to be clear - under Xcode 4.3.5 there is a serious bug where code signing will fail if you have subdirectories with the same name as the parent directory. In the Sencha Touch 2 SDK tree, for example, there is
/sdk/src/device/device
argh... hours of trying to code sign with no luck... rename to:
/sdk/src/device/device_epic_fail
(since I don't need those libraries anyway)
and I can code sign.
And one big bug hunt is over. Apple... fix please...
Updating the AddThis SDK from 0.1.7 to 0.1.9 fixed this problem for me (using XCode 4.3.1).
I've determined another cause of this error, which occurred for me in Xcode 4.6.2 (4H1003). I had a subproject building an executable. This executable is a helper tool which is copied into my app's bundle when it builds.
The app has a min deployment target of OS X 10.7 and builds for 64-bit Intel as a result.
The helper tool, however, was set to a deployment target of 10.6, and was building for 32-bit/64-bit Intel.
Changing the helper tool to also build for 10.7 and 64-bit Intel only fixed the error. I can reliably recreate the error by changing the helper tool back to 32-bit/64-bit Intel; this is not a 'erm, zap your PRAM' fix.
As #radven and #tomek-cejner mentioned sometimes some extra directories could cause problems. Maybe if named improperly? for me the offenders were different.
Gruntfile.js, karma-e2e.conf.js, karma.conf.js, and the entire node_modules directory.
see: How to build IPA for distribution with TestFlight with XCode 5?

Resources