https://github.com/mainasuk/consoleprint
https://github.com/mainasuk/consoleprint
cocoapods swift
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mainasuk/consoleprint
- Owner: MainasuK
- License: mit
- Created: 2019-05-30T11:23:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-26T07:23:16.000Z (about 7 years ago)
- Last Synced: 2025-03-10T21:16:22.360Z (over 1 year ago)
- Topics: cocoapods, swift
- Language: Swift
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ConsolePrint
[](https://travis-ci.org/MainasuK/ConsolePrint)
[](https://cocoapods.org/pods/ConsolePrint)
[](https://cocoapods.org/pods/ConsolePrint)
[](https://cocoapods.org/pods/ConsolePrint)
This idea come from [here](https://onevcat.com/2016/02/swift-performance/). Has been used for many years and I decided to open source it.
## Installation
```ruby
…
pod 'ConsolePrint'
…
# Enable ConsolePrint manually. Default not print anything
post_install do |installer|
installer.pods_project.targets.each do |target|
if ['ConsolePrint'].include? target.name
target.build_configurations.each do |config|
if config.name == "Debug"
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] += "ConsolePrint"
end
end
end
end
end
```
## Usage
```swift
// e.g.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
consolePrint("Hello, World!")
return true
}
// ^ AppDelegate.swift[36], application(_:didFinishLaunchingWithOptions:): Hello, World!
```