iPhone XCode compiling ADHOC - iphone

I inherited some source code and am now trying to adhoc compile it.
However, I'm seeing this error message
CodeSign error: The entitlements file '/Users/teepusink/Documents/i_think_the_original_guys_path/Entitlements.plist' is missing
Where can I change that path? I do see that there exist an Entitlements.plist file and I've changed the Code Signing identity to mine.
Thanks,
Tee

Got the same problem and had to fix it manually in the XCode project file. XCode did not accept my changes via "Get Info".
make a backup first!
open your .xcodeproj file by right clicking the file in Finder.app and selecting "Show Package Contents"
open project.pbxproj
search for "/Users/teepusink/Documents/i_think_the_original_guys_path/Entitlements.plist"
delete the lines with CODE_SIGN_ENTITLEMENTS = "/Users/teepusink/Documents/i_think_the_original_guys_path/Entitlements.plist";
After that I was able to re-add the Entitlements.plist file and it showed up there with the correct path and the build process ran without errors.

You can change it by right clicking on your Target under Targets in Groups & Files, hit the 'Get Info' option. Select Adhoc from the Configuration dropdown at the top left, then change Code Signing Entitlements to the path of the Entitlements.plist file located on your computer.

Another easy way to fix a path is to just delete the file reference in your project, make sure the file is where you want it (move, copy, check out from the repository), and then (re)add the file/plist to your project.

Related

"Symbols Tool failed" error while exporting iPhone application with APP Store Profile

After successful Archive, while exporting the Archive to "Save for App Store Deployment", I got the following error:
"Symbol Tool Failed".
During the Export sequence, I have observed, "Binary and Entitlements" section, has two entries.
1) The app store targetAppName (5 Entitlements). with valid Provisioning Profiles.
2) One of the build files FTALDeviceDetailsViewController.o (o Entitlement) with Provisioning Profiles (none)
I bet the second entry here is what is causing the error. Here is the error log:
Any one know how to remove the second entry?
I found another interesting information, regarding this issue:
Unser Archive folder
ActiveLife\ 11-12-14\,\ 3.56\ AM.xcarchive/Products/Applications/ActiveLife.app/
I found following 3 files those are generated in response to second Entitlement file:
FTALDeviceDetailsViewController.d
FTALDeviceDetailsViewController.dia
FTALDeviceDetailsViewController.o
I have manually deleted these 3 files, and now I am able to generate .ipa file.
Now still mystery to me is; why are these files generated and how to fix the root of the problem?
I experienced the same "Symbols Tool Failed" issue yesterday. With the following more detailed error:
Archive upload failed due to the issues listed below.
Unable to validate your application.
The path '/var/folders/c6/wfv094t921j7q1bzhht5wtdnhvjv1/T/XcodeDistPipeline.blK/Packages/XXXXXX.ipa' does not contain a file.
The cause of the problem was that a third party library (*.a file) had accidentally been included in the "Copy Bundle Resources" "Build Phase". The give-away that this was the problem was that this *.a library appeared in the list of "Binary and Entitlements" screen when submitting the upload:
Ultimately the third party source code had been added to our workspace as a "Folder Reference" and someone had checked the 'target membership' for that folder. This resulted in the the third parties libary folder (which contained the *.a) being included in the "Copy Bundle Resources". Simply unchecking the 'target membership' box for the folder fixed the issue.
The reason for the issue is, some how FTALDeviceDetailsViewController.m file is ended up Copy Bundle Resources causing this is be treated as separate target.
When I delete the file from the Copy Bundle Resource, every thing worked as expected.
Now the mystery questions to me, what are .d .dia generated? This is up for further study.
Unchecking "Upload your app's symbols to receive symbolicated reports from Apple" option fixes the "Symbol tools failed" error when you Archive the app in Organiser window of Xcode.
I faced this too, and trying to find something wrong with the copy bundle resources, as the previous answers, I found a folder being copied, removing it solved the problem.
Basically some framework has been added to Copy Bundle Resources. Remove it to resolve the issue!
Could also be that there is a framework unnecessarily added in 'Embed Frameworks' in Xcode Build Phases
"Symbols Tool Failed" error can also be caused by this.
Xcode 13.1 - Check BuildTarget -> General -> Frameworks and Libraries. If something is marked as Embed And Sign it may need to be changed to Do Not Embed.

Xcode - resource already exists?

I'm simply trying to add a file to my Xcode resources folder and it fails claiming the file already exists, which simply isn't true.
I assume it has a record of the name and is confusing itself, I tried performing a 'clean' but this didn't help. Any ideas? Thanks!
click on project and get info.Then search for the file.And then delete it.
Try fully closing/re-opening Xcode and failing that, reboot yet?
Just to be sure, use the file filter at the bottom of the project navigator to triple check the file is not there.
If the file is definatly not in the project sometimes Xcode gets confused when you delete a file and the file may actually be on disk. So check the actual project directory on disk to ensure that your file is not in there.
Quick way to get to your project directory, right click the project file (or any file) and select Show in Finder or at the very top of the Xcode window cmd + click the project title and select the folder it is in.

Info.plist file "no such file" error

I have tried to move the files in my project folder to a different folder and everything went ok, except that Xcode cannot find my Info.plist file now. This is the error I get.
could not read data from '/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp/MyApp-Info.plist': The file “MyApp-Info.plist” couldn’t be opened because there is no such file.
The actual files location is
'/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp-Info.plist'
I have checked the build settings for the project and they read
MyApp/MyApp-Info.plist
I have tried deleting the build folder and cleaning the project, but I always get this same error. I appreciate any help you can offer
Remove MyApp/ portion from build settings. plist file usually is located in the same folder ad project. You can always open project file in vi and edit it manually.
It is just a guess but it seems like one trailing /MyApp is too much in the location you are wanting to read from:
'/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp/MyApp-Info.plist'
As opposed to the actual location:
'/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp-Info.plist'
It would make sense to check out the URL / PATH variable you want to read from.
I had the same problem after trying to duplicate and rename a project.
In Build Settings, I had to fix two paths before I finally got it compiling successfully:
Under Packaging, Info.plist
Under Apple LLVM 5.0 - Language, Prefix.pch

Distribution build - "No such file or directory exists"

While creating an ad-hoc build in Xcode 4, I get an error "Operation couldn't be completed. No such file or direcotry exist" when I select Share in "Organizer - Archive" window. I have also included Entitlements.plist file, even status message also displays the build is successful.
I don't know what the problem is and where am I going wrong. Please suggest.
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
I've put this on my blog http://blog.dmahajan.net as well.
Did you sign the archived version with your Ad-Hoc profile, if so then select "don't Re-sign" in the share screen drop down.
Guys,
Another thing I found is that if you've developed an app in xcode < xcode4 and you are creating builds in xcode4 then you might get this error.
To resolve this, follow these steps-
1. In Entitlements.plist, add a key- "application-identifier", type- "String", value - "$(AppIdentifierPrefix)$(CFBundleIdentifier)"
Now create an "Archive" build, when the window appears, right click on the app name and "Show in finder".
AppName -> Right Click -> Show Package Contents.
Products -> .app file. Now use this .app file along with the provisioning profile.
This solution worked for me very well.
Another possibility: duplicated keys in your keychain. Solved my problem.

Unable to copy dSYM file into archive

Whenever I run 'build and archive' from XCode I get the following message:
Unable to copy dSYM file into archive.
Please make sure that your application has set the “Debug Information Format” build setting to “DWARF with dSYM File”.
I have checked my Debug format and it is set to the suggested value(DWARF with dSYM). Has anyone else ran into this issue, if so how did you fix it?
Try setting 'Generate Debug Symbols' to true in the build settings of the target you're trying to build and archive.
This solved the issue for me!
this worked for me ,i hope it help someone out there...
Goto to the build setting and search for "Generate debug symbol" and set it to Yes.
then search for debug information format in build setting and set "Debug information format" to "DWARF with dSYM file"
I just ran into the same problem, but I had an build script which removed the dSYM file before Xcode could. So it wasn't there and that was what Xcode was crying about.
I attached a screenshot, so perhaps the next one which runs into that problem can recover a bit quicker from that.
The 'Generate Debug Symbols' solution worked for me as well. After it worked once, I disabled the setting again, and I build & archive worked again, producing a file smaller by 700kb than the debug symbols enabled version. Not sure if this is actual savings after the app is on the app store, but it doesn't hurt!
That's how your build settings for both release and debug configuration should look like:
Generate Debug Symbols → Yes
Debug Information... → DWARF with DSYM
Deployment Postprocessing → YES
Strip Linked Product... → No
Strip Debug... → No
If there's still no luck, try check the Report Navigator.
The point is, dSYM file may be generated in another location, or not generated at all.
In my case, the dSYM file has not been generated, and there hasn't been a corresponding line that goes like "Generate Appname.dSYM ...in {path}"
But there's been Fabric installed, and it logged the fact of the dSYM file's absence:
Just filer the Report Navigator by "dSYM".
If dSYM is not generated in appropriate folder
Check environment variables, especially DWARF_DSYM_FOLDER_PATH and DWARF_DSYM_FILE_NAME.
To embed the dSYM within the app bundle, just set DWARF_DSYM_FOLDER_PATH to $(CONFIGURATION_BUILD_DIR)/$(EXECUTABLE_FOLDER_PATH) and DWARF_DSYM_FILE_NAME to $(EXECUTABLE_NAME).dSYM
Now the build should create dSYM for your target