Xcode: Build error: tried to link DWARF for unsupported file: - iphone

I've changed something in my project settings and now when I run this project to build and debug I get build error:
GenerateDSYMFile error: tried to link DWARF for unsupported file: "correct path to my application executable here"
but! when I press RUN once more it works like a charm and my app starts in Simulator.
so I need press cmd-R twice every time to debug my app.
it was normal in previous version of my project so I don't know what changes I've made %)
all my other projects works fine and I can just recreate this project, but I want to figured it out - what trigger this error. I tried to ask this question on Apple devforums but without any success.
any help here? thx )
ps this error shows as Xcode3 as Xcode4

There is same file name as your project name in bundle so get rid of that file by renaming it and use accordingly.
Clean the project and run the project. Good to go.

not sure if you figured out what the problem was, had the same thing happen to me. I had made a text file called the same name as my project - when I got rid of that it fixed it.

Try changing under Build Options > Debug Information Format. See if that helps.

I got it when I tried to run my app in the simulator.
Xcode said ATTACHING TO PROCESS but hung.
So had to kill XCode and restart.
When I ran project again it built ok but when I said RUN it got that link error.
I fixed it by deleting the app in the Simulator and hit run again and it worked.

In my case It was a plist file causing the error.
I renamed the file and updated Info.plist File in Target Build Settings and that fixed it.

I got the same error: "error: tried to link DWARF for unsupported file: /Volumes/..."
This error wasn't shown before up until I changed to Xcode 6 in my Jenkins server. Before we had the same setting of the App and was building without any problem.
I was building the app as Realase version via Jenkins and I had the setting to build with the following configuration "-configuration Release" and the parameter "Debug Information Format" in Build Setting of the app was set to DWARF-with-dSYM.
In order to solve this error I changed in the targets in Xcode in Build Settings in the parameter "Debug Information Format" to DWARF only and I didn't get any error from Jenkins.
The apple developer documentation says this regarding the different values of this parameter:
DEBUG_INFORMATION_FORMAT (Debug Information Format)
Description: Identifier. Identifies the format used to store the binary’s debug information.
Values:
stabs: Use the Stabs format and place the debug information in the binary.
dwarf: Use the DWARF format and place the debug information in the binary.
dwarf-with-dsym: Use the DWARF format and place the debug information in a dSYM file.
Default value:
dwarf
Prerequisite for:
“GCC_ENABLE_SYMBOL_SEPARATION (Separate PCH Symbols).”
Link: https://developer.apple.com/library/mac/documentation/developertools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html

Related

iOS Crashlytics not logged in firebase dashboard

I have configured it for firebase in app delegate.
Change Debug Information Format to DWARF with dSYM
I write the necessary run scripts.
"${PODS_ROOT}/FirebaseCrashlytics/run"
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
But test crashes not showing in crashlytics dashboard
Finally, when I run Crashlytics/run manually, it gives an Could not get GOOGLE_APP_ID in Google Services file from build environment error, but GoogleService-Info.plist is attached to the project and I’m sure. I deleted the GoogleService-Info.plist and added it again. Could it be related to
Could you please tell me why or idea?
Thanks in advance
I assume it's "GoogleService-Info.plist" problem
because it's the only file that has GOOGLE_APP_ID property.
first, check google plist path. put it under your project folder, and then update your script with a specific path of file:
Xcode path: build phases -> Run Script
"${PODS_ROOT}/FirebaseCrashlytics/run" -gsp "${PROJECT_DIR}/[project folder name]/GoogleService-Info.plist" -p ios
second: make sure Xcode used your script succeesfully. to check that navigate to:
Xcode path : report navigator
then select a recent ended build and from center log scroll to the end and find this:
image link
as you see in image the validation should be succesfull
if you didn't find any related log to shell in the build log make sure you unchecked this
image link
Script succeeds in report navigator but still doesn't show my test crashes in crashlytics. imageLink
And I followed these steps of firebase
In Xcode, select Product > Scheme > Edit scheme.
Select Run from the left menu, then select the Arguments tab.
In the Arguments Passed on Launch section, add -FIRDebugEnabled.
But Completed report submission did not print logs
I had a very silly problem.I solved my problem. After you build with Xcode, you have to stop xcode and open the app manually.
I was missing a most important step mentioned in the documentation
While testing for crash please build and detach the Xcode's debugger using square button right before the run button in Xcode
Please refer to this part in documentation

Linker error only while archiving

When I build my project with iOS Device, there is no error. I can even run the project on simulator wit debug mode. But when I try to create an ipa using archive, this error comes up.
I just added another device in the profile, downloaded the new profile and added it in organizer. And now it doesn't let me create an ipa. I tried downloading certificate again, restarting Xcode. But it did not work.
EDIT
When I remove the line which calls QuotedPrintable::decode() method, it works fine. How do I set path to quotedPrintable.h in the build settings?
I had given multiple paths in *Library Search Paths * that confused xcode. Removing the unwanted, and wrong ones solved the problem. :)
Seems that you have different architecture-related settings for Debug and Release configurations (by default run on simulator uses Debug and Archive uses Release). Try to make all architecture-related settings you find (ones with armv%x%) be like for Debug and check what happens.

"object file format unrecognized, invalid, or unsuitable" Xcode error

I don't see any reasons why this message should come at the end of the log:
/Users/Val/Library/Developer/Xcode/DerivedData/Mathematics-dzakmzlewrmgvibasvuixiwmkwwp/Build/Products/Debug-iphoneos/Mathematics.app: object file format unrecognized, invalid, or unsuitable
Command /usr/bin/codesign failed with exit code 1
How can I fix this error?
I am desperate, all my certificates and profiles are valid, the app itself has no bugs at all.
I ran into the same issue with Xcode 7.0.1 and cocoapods. I ended up doing the following:
Closed Xcode
Removed everything under my DerivedData folder
rm -fr /Users/{user}/Library/Developer/Xcode/DerivedData/*
Restarted Xcode and rebuilt the project
For me, this turned out to be the Build Settings/Build Option/Compiler for C/C++/Objective C had become mismatched between Project and Target ... set to default in each case and problem resolved.
Make sure the 'Executable Name' (CFBundleExecutable) entry in your target's info.plist matches the 'Product Name' specified in your target settings.
iPhone Codesign object file format invalid or unsuitable
After battling this error for about 2 weeks and trying every suggested solution, in my case the problem was the following:
* Under Project --> Build Settings --> Build Options, the "Build Variants" was set to something different than Targets --> Build Settings --> Build Options --> Build Variants
Make sure these are set to the same setting, which should be "normal".
That change finally got rid of the usr/bin/codesign failed with exit code 1.
For me, the solution was:
Navigate to YOURPROJECTNAME.xcodeproj
Right Click and Show the content of package
Enter to xcuserdata and remove all users folders
Right Click on project.xcworkspace and Show the content of package
Enter to xcuserdata and remove all users folders

Xcode's Build and Archive not working

The current issue I'm having is that Build and Archive will build my current target but after it's finished building, a pop-up will appear with the message:
"The operation couldn't be completed. No such file or directory"
I have reinstalled Xcode (3.2.3 with SDK 4.0), rebooted my machine, cleaned the cache, cleaned the project, manually deleted the project build directory. Nothing has worked.
I've also checked ~/Library/MobileDevice/Archived Applications and it is empty.
Any ideas?
p.s. This is driving me crazy!
The error The operation couldn't be completed. No such file or directory also occurs in XCode 4.0 GM preview if you do not change identity to "Don't Re-sign" after selecting (Archives) Share in the Organizer
I had this problem and the solution that was recommended to me was:
Open your Xcode project
Select Unity-iPhone in targets (Double click so it opens the info)
Find "Generate Debug Symbols" and check it on. (Just Search for it in the search field)
This worked for me, but I still don't understand why it was necessary.
All answers failed. Best solution,
drag the .app bundle to iTunes and reveal the app in Finder. Boom! you get your ipa there.
Since it only seems to happen with your release configuration, double check the "Build Locations" values in your project settings for the release configuration.
Check the paths in the "build locations" to make sure they exist
Check the permissions for those paths
Try doing just a build (no archiving) for your release configuration
Also keep an eye on your build results window during the build to see if there were any warnings during the signing and packaging stages that could give you clues
Had the same issue and none of the mentions solutions worked.
I finally found the problem when I tried to directly sign the app with the adhoc profile: it told me that I had twice a distribution profile in my keychain. I deleted the old one, then compiled again with the dev profile, and then archiving with the adhoc profile and it worked.
Longshot answer - do you have any unusual characters in your project path? This release note indicates it can cause problems:
While most known cases have been taken
care of, having a space, comma, slash,
backslash, tilde, or other character
special to the Unix shell in the
directory name of any parent folder of
your project can cause your project
build to fail in unexpected ways.
If you have a 3:rd party SDK you need to add "$(SDKROOT)/ResourceRules.plist" to the “Code Signing Resource Rules Path” key in the targets build settings.
I solved this problem by exchanging the wildcard adhoc distribution profile I was using for an app specific adhoc distribution profile.
Of the top of my head, I would check permissions. Some code reports permissions problems as there being no file/folder. Check the Console log. You will sometimes find more info there.
Did you install into /Developer? If you've customized that folder the issue could be that the path contains a space, which could be causing your problem.
Run the Console app and see what information is being spit out there. That should give us more insight into the issue.

Receive message "A signed resource has been added, modified, or deleted" when trying to debug an App on iPhone

While attempting to debug a build created using the 3.2 SDK on an iPhone device I receive the message "A signed resource has been added, modified, or deleted.".
I can clean, rebuild, then install with no error, but if I try to install without cleaning the error shows.
Anyone have an idea as to what might be causing this?
I found a workaround for the bug.
If you delete the .app file in build/Debug-iphoneos/ before building for the device, the app gets installed without errors.
And there is a simple way to do that before every build.
Make sure you have selected "Device" in the dropdown overview menu.
In XCode go to Project > New target...
Then find "Shell Script target" under MacOSX/Other
Name it and add it to the current project
Now, in the left navigation panel, under targets, expand your newly created target and double-click on Run Script.
In the window that opens replace "# shell script goes here" with "rm -fr build/Debug-iphoneos/*.app" (without the quotes).
Now open your main target preferences and under Direct Dependencies add your newly created target.
Build and Go! :)
This error occurs when there is a special character in the Product Name. In my case it was a "?"
If you change the Product Name it automatically updates the "Bundle Name" and "Bundle Display Name" so it is often the best choice to rename an app.
If you want to include special characters in the app name you have to manually rename the "Bundle Name" and "Bundle Display Name"
Bundle Name: This is the actual app bundle name in the file system such as "Awesome App.app". It is generally not visible to the user.
Bundle Display Name: This is a short name displayed under the app icon on the device. Since the bundle name would be truncated to "Awes…tion" you have the option to have a shorter name which fits better such as "Awesome App". It should be similar to the App Store name (set in iTunes Connect)
This is pretty clearly a bug in the 3.2 SDK, but I don't want to downgrade. I've found that doing a Clean by pushing Command+Shift+K, then Return is pretty fast before pushing Command+R to build.
Xcode 8, reason of the "A signed resource has been added, modified, or deleted." was that target was signed with an enterprise provision profile.
In my case, it happened when no changes were made. Make a change to any file and run again.
This can have several causes. The fastest way to figure out what is causing it is to go into Xcode, Window menu, Devices, then click the reveal button at the bottom of the pane to show the Console. Now attempt to run. You should see log output that names the specific files it is complaining about.
Most of the solutions previously posted are just artificial ways of getting Xcode to regenerate the contents of the build folder and/or re-sign the files.
In my case, my WatchKit extension was somehow acquiring references to Cocoapods frameworks that were only targeted toward the main app so they got signed during the build, then pruned later (as they were not used). Then on device, iOS complained that they were missing from the .appex folder for the extension. I ended up not needing any pods in the extension so I just removed them all and removed the extension as a target, then did some minor cleanup to remove the pod-related debris left in the build steps. Now everything works perfectly.
(SOLVED) This is a weird one. I tried everything I could find. Eventually I changed the product name from "Unit Tests (device)" to "Device Unit Tests" - removing the brackets. Now everything works. The spaces in it appear to be fine.
Previously on stackoverflow:
I've just run into this bug with two static library projects. One builds and tests using the GHUnit test runner on the device without a problem. The other projects will not install and gets this error. That means it's something thats different between these two projects. I've so far tried wiping the build directory, taking spaces out of the executable name, and various clean and builds as suggested here.
Same for me, thought it has something to do with multiple targets etc. because I changed a lot there. But it's highly possible that it's a Bug in the 3.2.2 release since I did not test extensively in this sdk version before the massive target changes in my project.
solved my issue!!!
I found out by accident that somehow a space " " found it's way into the Product Name of my app so it was called "First Second.app" instead of "FirstSecond.app". After deleting the space the issue was gone!
I changed it here:
right click on target
Get Info
Build Tab
Packaging Section
Product Name <- The name here will be used for the bundle (.app) name
Hope this helps, let me know!
Cheers,
nils
I could solved by changing project name.
[project]-[Rename] menu. "phase1 (new)" -> "pahse1"
I was getting this same error, but intermittently. I tried all the above and it still didn't work. Today I found what was causing it.
The error seems to occur when editing a xib in interface builder. If you try to run while the interface builder is open in xcode it will cause the above error. To solve just close the interface builder editor. i.e. just select a code file from your project so you are in the Source Editor.
The simplest (and probably most common cause) appears to be rebuilding without any changes.
So the simplest thing to cure it is to make a trivial change to a source file (such as adding a space, then deleting it), and then rebuilding.
If this doesn't work, feel free to try all the other answers here.
For months, I'd get this error without realizing it was due to such a simple cause. I'd usually do a Clean Build to get rid of it.
When I created ipa through terminal using xcodebuild commands, ipa created but while installing it I was getting same error. exportOptionsPlist solved my issue.
xcodebuild -exportArchive -archivePath projectPath/myapp.xcarchive -exportPath projectPath/myApp.ipa -exportOptionsPlist ProjectFolder/exportPlist.plist
In my case, Quit and restarting XCode worked.
For me the issue was related to the provisioning profile settings. The clue to this was that debug builds were installing ok, but release builds were not. I wanted to test a release build, so I ran the scheme with that build configuration.
I fixed it by duplicating the Release Configuration, then modifying those fields in the Build Settings to have the same provisioning stuff as if I am debugging it.
(Adding another build configuration will give you headaches if you are using Cocoapods however, then you'll have to modify your Podfile)
I'm getting the same thing, when installing on a iPod Touch. I can't link for the simulator (for other reasons), so can't say whether the problem occurs there.
Yes, rebuilding clean or deleting the app from the device allows me to install again. Neither are desirable, iterative solutions!
The minimal "cleaning" I've come across as a work around is manually deleting the Foo.app in the build/Debug-iphoneos directory.
it seems this is a bug in xcode 3.2.2:
iphonedevsdk
I had the same problem in Xcode 3.2.1 when I put a + in my app name. Specifically the "product name" in the build settings. It is fine to have a + in the bundle name in your Info.plist. The same probably applies to other punctuation characters.
Go to Window > Organizer > Projects > Find your project and delete derived data
I got this error intermittently while installing app using iPhone config utility on Windows7. Following solution works - Go to C:\Users\{lanusername}\AppData\Local\Temp and delete app specific folders (e.g. abc.app) and try installing app again.
I reported this bug on ICU (Windows versions) to Apple in June 2011. With the following workarounds:
The workaround is this ....
Win XP
1) Close ICU
2) Delete the temp folder: c:\Documents and Settings\[username]\Local Settings\Temp\[AppName].app
3) Delete the deploy folder: c:\Documents and Settings\[username]\Application Data\AppleComputer\MobileDevice
4) Restart ICU. Drag in the App and install normally.
============================
Win 7
1) Close ICU
2) Delete the temp folder: c:\Users\[username]\AppData\Local\Temp\[AppName].app
3) Delete the deploy folder: c:\Users\[username]\AppData\Local\Apple Computer\MobileDevice\Applications\[AppName].app
4) Restart ICU. Drag in the App and install normally.
=========================================================
I simply rebuilt my app, and that solved the issue.
I also faced the same issue. After wasting lot of time I realized that my product name has a special character "?" which cased the problem
Having the DerivedData folder at a network location caused this problem for me.
After trying everything else, I found out my workstation couldn't agree with the University server about what the time was. (It thought everything was always modified). I also had to clean for every rebuild to avoid that frustrating message.
In the end I gave up and built locally, changing Xcode > Preferences > Locations ... feeling altogether pretty dumb for having ever built over the network.
We ran into this issues on XCode_6.3.1. We were building a AppleWatch app, with an extension. We do have a bunch of Pods.. After debugging the issue for almost a bunch of hours, what we found was that there was an issue with the way a file was adde to the project..
It seems like some references to a unused file was sitting in the iPhone App, though it was used in the Watch App.. It turns out that the error XCode was showing was totally useless.
After removing this file and re adding it back to the project the project started working fine & was able to install to the device. To make it even harder to debug the issues, the debug version was installed without an issue, but was unable to install the norman version..
Make sure you add your files to the right target and, look at git history and see if there are lingering fragments that are added to the wrong target.
This is a very general error message indicating something is wrong during the validation process of the code signature. To find out the specific error, you can go to Xcode->Window->Devices and check your device log.
In my case, I have following console spew
Feb 1 18:53:07 iPod-touch installd[40] : 0x1001f8000 -[MICodeSigningVerifier performValidationWithError:]: 192: Failed to verify code signature of : 0xe8008017 (Signed resources have been added, removed, or modified)
Check on this 3rd party framework again, I found an extra CodeResources file under the framework root. Remove that file fixed the problem.