Debug warning Xcode - dwarf-with-dsym? - ios

I get this warning upon compilation:
DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations. This could also be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved the dSYM from the location Xcode generated it. Unable to process FieldSense.app.dSYM at path /Users/dnb/Library/Developer/Xcode/DerivedData/myApp-ggomikgtclrabvaoqmbwhjyudhxy/Build/Products/Debug-iphonesimulator/myApp.app.dSYM
How to solve?

To solve this issue:
Go to your project settings
Select your target
Go to Build settings
Scroll down to Debug Information Format (make sure to choose All settings)
Set the values to DWARF with dSYM File

Related

How to address this warning generated by crashlytics / fabric?

Here is what I know/do:
I am importing Fabric via a pod.
The build script for Fabric is the last one
It is set to generate a dsysm
DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations.
This could also be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved the dSYM from the location Xcode generated it. Unable to process myapp.app.dSYM at path /Users/no-one/Library/Developer/Xcode/DerivedData/myapp-ahatoktzxteqbcaohqnktdtfczxr/Build/Products/Debug-appletvos/myapp.app.dSYM
Make sure your project build settings are generating a dSYM file.
Go into your target's Build Settings and then type in DEBUG_INFORMATION_FORMAT into the Search Bar that appears in the top right.
It looks like this:
And you can choose "Dwarf With Dsym" from the pop-up menu.

Release Version of iOS App Is Hitting DEBUG Flags

In my schema, I have specified Release as the build type:
In my code I have some checks to see if it's in DEBUG or RELEASE. However it always hits the DEBUG (line 125 in the example below):
Do you know what I might be missing when I build for release so it stops hitting the DEBUG flags?
Conditional compilation like this does not depend on the Build Configuration but the presence of the DEBUG flag within that configuration.
Go to your project's build settings and search for 'flag'. Look under 'Swift Compiler - Custom Flags' and then 'Active Compilation Conditions': each build configuration is then listed and the flag DEBUG should be present where you want your debug code to appear but absent where you do not.

TwitterKit does not compile with Xcode 6.3

I added TwitterKit from Fabric to an app under Xcode 6.3.
The app would compile before I added TwitterKit's Run Script build phase step but once I added TwitterKit it failed with this error during Debug builds:
2015-02-23 11:22:32.382 run[53735:1513077] Fabric.framework/run 1.3.13
2015-02-23 11:22:32.388 run[53735:1513077]
Fabric: dSYM Error
Unable to process fabrictest.app.dSYM at path /Users/mfoouser/Library/Developer/Xcode/DerivedData/fabrictest/Build/Products/Debug-iphonesimulator/fabrictest.app.dSYM
Make sure your project build settings are generating a dSYM file. DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations. This could also be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved the dSYM from the location Xcode generated it.
Command /bin/sh failed with exit code 1
Anyone find a way around this?
This was a simple fix. Just do as the error state, turn on dSYM generation for your debug build.
Change your Build Settings from this:
To this:
Then choose Build again. It should now compile and run.
You can follow below steps ,it worked for me.
open build setting of your project and search for "Generate debug symbol" and set it to Yes.
As in the below screenshot
Search for debug information format in build setting and search for "Debug information format" then set "Debug information format" to "DWARF with dSYM file"
This didn't work for me since it was already set to 'with dSYM' and it didn't build as well. After more digging and trying things out, it seems like the issue (for me at least) is under Build Settings > Generate Debug Symbols, which was set to No by default. I changed it to Yes and it worked like a charm.
No one of proposed answers worked out for me.
Deleted both Fabric.framework and Crashlytics.framework which were added via Fabric app and added them again through Cocoapods.
**It doesnt mean that Cocoapods is only workaround, but probably that they should be re-added to project again.
What worked for me was the previous answers combined:
1- Change "Build Settings -> Debug Information Format -> Debug" value to "DWARF with dSYM File"
2- Change "Build Settings -> Generate Debug Symbols" value to "Yes"
3- Remove Fabric and Crashlytics frameworks and install again

Lipo error with additional schemes in XCode

I want to create additional build configurations and schemes in my XCode project in order to build sepcific archives for TestFlight. One connected to our DEV environment for internal testers, and one connected to our PROD environment for external beta testers.
So I was following this excellent blog post and I created 2 additional build configurations by duplicating the Release one. Then I created 2 additional schemes based on the default one, by changing the build configuration of the Archive build operation to the proper build configuration. Finally I set some user-defined settings in each build configuration to point to the right server URL depending on whether we are in a DEV build or a PROD build.
But now when I archive my project using one of these two additional schemes, I get the following Lipo error:
/fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can’t open input file: /Users/sarbogast/Library/Developer/Xcode/DerivedData/Build/Intermediates/ArchiveIntermediates/MyAppTestFlightPROD/IntermediateBuildFilesPath/MyApp.build/TestFlight PROD-iphoneos/MyApp.build/Objects-normal/armv7/MyApp (No such file or directory)
And indeed when I go to /Users/sarbogast/Library/Developer/Xcode/DerivedData/Build/Intermediates/ArchiveIntermediates/MyAppTestFlightPROD/IntermediateBuildFilesPath/MyApp.build/TestFlight PROD-iphoneos/MyApp.build/Objects-normal/armv7 directory, there is no MyApp file or directory in there.
I read here and there that setting 'Build Active Architecture only' to YES might solve the problem, but I don't want to do that as these are release builds for TestFlight and I want them to work on all architectures.
Any idea what might be wrong in my set up?
I am using CocoaPods and I had log messages saying that the linker could not find Pods for my new scheme. So I added my new scheme to link_with in my podfile and now it works perfectly.
I still don't understand why, because I thought link_with was only to list targets and this is not a target, this is a scheme. But it works.

Time profiler doesn't show me functions

In tutorial, when someone debug app they see something like this:
But when i start recording, by pressing red button:
I see this...
Make sure the Generate Debug Symbols build setting is set to Yes. You need debug symbols to have function names appear in Instruments.
If your project is generating debug symbols, Instruments may not be able to find your project's dSYM file. In Instruments choose Instrument > Call Tree Data Mining > Locate dSYM file to find and open your project's dSYM file. Your project's dSYM file is usually located in the same directory as the application bundle of your project's release version. Additional information can be found in the following article:
Instruments: Locating dSYM Files
I had 2 different versions of Xcode 9.4.1 and 10.1 both of them had command line tools which were in conflict(i suppose). To fix this issue I set right command line tools version there:
"Xcode -> Preferences -> Locations tab -> Command line tools".
Also check Build Settings and set "DWARF with dSYM File" to your target.

Resources