Originally created by @Arti3DPlayer on GitHub (Mar 30, 2016).
I added -DDebug flag to my project.
Then in code did:
#if Debug
Armchair.debugEnabled(true)
#endif
But always get message:
[Armchair] Debug is disabled on release builds.
[Armchair] If you really want to enable debug mode,
[Armchair] add "-DDebug" to your Swift Compiler - Custom Flags
[Armchair] section in the target's build settings for release
Source:
public func debugEnabled(debugEnabled: Bool) {
#if Debug
Manager.defaultManager.debugEnabled = debugEnabled
#else
print("[Armchair] Debug is disabled on release builds.")
print("[Armchair] If you really want to enable debug mode,")
print("[Armchair] add \"-DDebug\" to your Swift Compiler - Custom Flags")
print("[Armchair] section in the target's build settings for release")
#endif
}
Originally created by @Arti3DPlayer on GitHub (Mar 30, 2016).
I added -DDebug flag to my project.

Then in code did:
```
#if Debug
Armchair.debugEnabled(true)
#endif
```
But always get message:
```
[Armchair] Debug is disabled on release builds.
[Armchair] If you really want to enable debug mode,
[Armchair] add "-DDebug" to your Swift Compiler - Custom Flags
[Armchair] section in the target's build settings for release
```
Source:
```
public func debugEnabled(debugEnabled: Bool) {
#if Debug
Manager.defaultManager.debugEnabled = debugEnabled
#else
print("[Armchair] Debug is disabled on release builds.")
print("[Armchair] If you really want to enable debug mode,")
print("[Armchair] add \"-DDebug\" to your Swift Compiler - Custom Flags")
print("[Armchair] section in the target's build settings for release")
#endif
}
```
@nataliachodelski commented on GitHub (May 19, 2016):
@Arti3DPlayer & @coneybeare I'm going thru different areas trying to add the -DDebug flag and still haven't worked it out. No matter what I've tried i get the "Debug is disabled on release builds. If you really want to enable debug mode, add "-DDebug" to your Swift Compiler - Custom Flags section in the target's build settings for release" message. I thought I had finally found the Custom Complier Flags in the Pods Project Settings, but Armchair rating prompt is still not showing and now i get the above "Debug Warning" message 2 x when the project builds.
Could you pretty please explain how you figured this out Arti3DPlayer? Ideally if you could post a picture of xcode showing the area of the project and the area of the build settings where you find and add the flag, that would be super helpful.
What I have tried so far:
Code to show prompt, and note warning about -DDebug flag in log. I followed the Example AppDeleagte setup code exactly in my AppDelegate file (other than changing app #), and took the demo prompt code from the example project as well. Example project builds and Armchair prompts fine on my device...but not in my own project.
@nataliachodelski commented on GitHub (May 19, 2016):
@Arti3DPlayer & @coneybeare I'm going thru different areas trying to add the -DDebug flag and still haven't worked it out. No matter what I've tried i get the _"Debug is disabled on release builds. If you really want to enable debug mode, add "-DDebug" to your Swift Compiler - Custom Flags section in the target's build settings for release"_ message. I thought I had finally found the Custom Complier Flags in the Pods Project Settings, but Armchair rating prompt is still not showing and now i get the above "Debug Warning" message 2 x when the project builds.
Could you pretty please explain how you figured this out Arti3DPlayer? Ideally if you could post a picture of xcode showing the area of the project and the area of the build settings where you find and add the flag, that would be super helpful.
What I have tried so far:
<img width="1035" alt="screen shot 2016-05-18 at 4 48 07 pm" src="https://cloud.githubusercontent.com/assets/10591026/15378456/82b304bc-1d18-11e6-89f4-2edda8027755.png">
<img width="1042" alt="screen shot 2016-05-18 at 4 47 49 pm" src="https://cloud.githubusercontent.com/assets/10591026/15378457/82b39e72-1d18-11e6-9fe2-509216701da1.png">
Code to show prompt, and note warning about -DDebug flag in log. I followed the Example AppDeleagte setup code exactly in my AppDelegate file (other than changing app #), and took the demo prompt code from the example project as well. Example project builds and Armchair prompts fine on my device...but not in my own project.
<img width="871" alt="screen shot 2016-05-18 at 4 51 40 pm" src="https://cloud.githubusercontent.com/assets/10591026/15378505/e21575b6-1d18-11e6-8a17-cfa3ea4197e3.png">
@Arti3DPlayer commented on GitHub (May 19, 2016):
@nchodelski you were close.

select Armchair project and set `-DDebug` flag here
@nataliachodelski commented on GitHub (May 21, 2016):
Thanks for the advice re where to set the flag. I have tried setting -DDEBUG specifically for the Armchair target within the Pods Project as you described but I still have the same result. It really is weird. I made my own issue about it....maybe I can get to the bottom of it eventually.
For now I worked around it by temporarily modifying Armchair.swift to think it's in debug mode all the time....total hack but it works great for testing! Lol.
@nataliachodelski commented on GitHub (May 21, 2016):
Thanks for the advice re where to set the flag. I have tried setting -DDEBUG specifically for the Armchair target within the Pods Project as you described but I still have the same result. It really is weird. I made my own issue about it....maybe I can get to the bottom of it eventually.
For now I worked around it by temporarily modifying Armchair.swift to think it's in debug mode all the time....total hack but it works great for testing! Lol.
@nchodelski i noticed that you write -DDEBUG with uppercase. But it should -DDebug. Method that i showed you works for me and other guys.
@Arti3DPlayer commented on GitHub (May 23, 2016):
@nchodelski i noticed that you write `-DDEBUG` with uppercase. But it should `-DDebug`. Method that i showed you works for me and other guys.

@nataliachodelski commented on GitHub (May 23, 2016):
Wow, that was it. When i used "DDebug" Armchair debug mode worked perfectly! I'm amazed it was actually such a simple thing. I had been using it as "DDEBUG" in capitals because in every example I saw of how to add the flag, it was always written or shown as "-DDEBUG" in all caps. I didn't realise it was case sensitive.
Thanks very much for that tip!!
@nataliachodelski commented on GitHub (May 23, 2016):
Wow, that was it. When i used "DDebug" Armchair debug mode worked perfectly! I'm amazed it was actually such a simple thing. I had been using it as "DDEBUG" in capitals because in every example I saw of how to add the flag, it was always written or shown as "-DDEBUG" in all caps. I didn't realise it was case sensitive.
Thanks very much for that tip!!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Arti3DPlayer on GitHub (Mar 30, 2016).
I added -DDebug flag to my project.
Then in code did:
But always get message:
Source:
@coneybeare commented on GitHub (Mar 30, 2016):
You have to add the flag to the pod project
@Arti3DPlayer commented on GitHub (Mar 31, 2016):
How to do this ?
@Arti3DPlayer commented on GitHub (Mar 31, 2016):
Ah, ok i understand
@nataliachodelski commented on GitHub (May 19, 2016):
@Arti3DPlayer & @coneybeare I'm going thru different areas trying to add the -DDebug flag and still haven't worked it out. No matter what I've tried i get the "Debug is disabled on release builds. If you really want to enable debug mode, add "-DDebug" to your Swift Compiler - Custom Flags section in the target's build settings for release" message. I thought I had finally found the Custom Complier Flags in the Pods Project Settings, but Armchair rating prompt is still not showing and now i get the above "Debug Warning" message 2 x when the project builds.
Could you pretty please explain how you figured this out Arti3DPlayer? Ideally if you could post a picture of xcode showing the area of the project and the area of the build settings where you find and add the flag, that would be super helpful.
What I have tried so far:


Code to show prompt, and note warning about -DDebug flag in log. I followed the Example AppDeleagte setup code exactly in my AppDelegate file (other than changing app #), and took the demo prompt code from the example project as well. Example project builds and Armchair prompts fine on my device...but not in my own project.
@Arti3DPlayer commented on GitHub (May 19, 2016):
@nchodelski you were close.
select Armchair project and set
-DDebugflag here@nataliachodelski commented on GitHub (May 21, 2016):
Thanks for the advice re where to set the flag. I have tried setting -DDEBUG specifically for the Armchair target within the Pods Project as you described but I still have the same result. It really is weird. I made my own issue about it....maybe I can get to the bottom of it eventually.
For now I worked around it by temporarily modifying Armchair.swift to think it's in debug mode all the time....total hack but it works great for testing! Lol.
@Arti3DPlayer commented on GitHub (May 23, 2016):
@nchodelski i noticed that you write
-DDEBUGwith uppercase. But it should-DDebug. Method that i showed you works for me and other guys.@nataliachodelski commented on GitHub (May 23, 2016):
Wow, that was it. When i used "DDebug" Armchair debug mode worked perfectly! I'm amazed it was actually such a simple thing. I had been using it as "DDEBUG" in capitals because in every example I saw of how to add the flag, it was always written or shown as "-DDEBUG" in all caps. I didn't realise it was case sensitive.
Thanks very much for that tip!!