TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2016 |
SPMSupports SPM | ✗ |
Maintained by Matteo Crippa.
To run the example project, clone the repo, and run pod install
from the Example directory first.
If you are ain debug mode and logs aren't shown, set in your Swift Compiler - Custom Flags -Other Flags, only for DEBUG, a flag like -DDEBUG
Import the lib using:
import Debug
then use print function normally, but prepend Debug
like this:
Debug.print('Hello world!')
Debug support also remote logging, clone Debug-Remote and start the server.
Then add this simple (extra row) in your AppDelegate
:
Debug.set(remoteURI: "http://")
Set your remote log url according the one provided by the server.
IMPORTANT Each time you restart the server you will get a new url, pay attention in updating the url in your app before starting.
Then update your Info.plist
file adding this entry:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localtunnel.me</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
</dict>
</dict>
Debug is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Debug"
then add after end
this few rows to manage DEBUG flags
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'Debug'
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['OTHER_SWIFT_FLAGS'] = '-DDEBUG'
else
config.build_settings['OTHER_SWIFT_FLAGS'] = ''
end
end
end
end
end
Matteo Crippa, @ghego20
Debug is available under the MIT license. See the LICENSE file for more info.