GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SwiftyBeaver/SBObjectiveCWrapper: Objective-C Wrapper for SwiftyBeaver Logger (Swift 2, 3, 4 & 5!)

BranchesTags
Open more actions menu

Latest commit

 

History

64 Commits
64 Commits

Folders and files

NameName
Last commit message
Last commit date
Example-iOS
Example-iOS
 
 
SBObjectiveCWrapper.xcodeproj
SBObjectiveCWrapper.xcodeproj
 
 
SBObjectiveCWrapper.xcworkspace
SBObjectiveCWrapper.xcworkspace
 
 
SBObjectiveCWrapper
SBObjectiveCWrapper
 
 
SBObjectiveCWrapperTests
SBObjectiveCWrapperTests
 
 
Sources
Sources
 
 
lib
lib
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
Cartfile
Cartfile
 
 
Cartfile.resolved
Cartfile.resolved
 
 
LICENSE
LICENSE
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 
SBObjectiveCWrapper.podspec
SBObjectiveCWrapper.podspec
 
 

Repository files navigation

SBObjectiveCWrapper

Platform iOS 8+ Platform Mac OS X 10.9+ Platform Platform
Language Swift 4.0 Carthage compatible Accio supported Cocoapods compatible

SBObjectiveCWrapper enables you to use SwiftyBeaver logging in your Objective-C code.

Requirements

  • iOS 9.0+ / Mac OS X 10.9+
  • Xcode 9+

Installation

Platform & Installation Support

\ iOS 9+ OSX 10.9+ watchOS 2+ tvOS 9+
Carthage ✅ ✅ ✅ ✅
CocoaPods ✅ ✅ ✅ ✅
Download ✅ ✅ ✅ ✅

For installation details please see the next points.

via Carthage

You can use Carthage to install SBObjectiveCWrapper by adding this to your Cartfile:

Swift 3.0

github "SwiftyBeaver/SBObjectiveCWrapper"

Swift 2.3

github "SwiftyBeaver/SwiftyBeaver" ~> 0.7

This will also install SwiftyBeaver if it is not installed already.

via CocoaPods

To use CocoaPods just add this to your Podfile:

Swift 3.0

pod 'SBObjectiveCWrapper', '~> 1.1.0'

Swift 2.3

pod 'SBObjectiveCWrapper', '~> 0.7.0'

This will also install SwiftyBeaver if it is not installed already.

or Download

Prerequisite: Make sure you have SwiftyBeaver installed! Follow the installation directions here: SwiftyBeaver

  1. Download the latest source code.
  2. Drag & drop the /sources folder into your project (make sure "Copy items if needed" is checked)
  3. Rename the "sources" group to "SBObjectiveCWrapper" if you'd like

Usage

Let's go!

In order to use the SwiftyBeaver Objective-C Wrapper you must get your logging environment setup using Swift.

If you already have SwiftyBeaver working with Swift you can skip ahead to the Objective-C section.

###SwiftyBeaver Setup

A more detailed example of setting up SwiftyBeaver can be seen in the SwiftyBeaver readme. Below are the minimum steps you need to do in your AppDelegate.swift file to get logging working:

Near the top:

import SwiftyBeaver
let log = SwiftyBeaver.self

This makes the log variable accessible to any of your Swift files.

We then need to add a destination. This should happen as early as possible (most likely in your appDelegate:didFinishLaunchingWithOptions() method). Here we add a console destination:

let console = ConsoleDestination()  // log to Xcode Console
log.addDestination(console)

Objective-C

Once you can log from Swift now you can import SBObjectiveCWrapper into any of your Objective-C .m files:

@import SBObjectiveCWrapper;

This allows you to use the following logging macros:

SBLogVerbose(@"This is a verbose message.");
SBLogDebug(@"This is a debug message.");
SBLogInfo(@"This is an info message.");
SBLogWarning(@"This is a warning message.");
SBLogError(@"This is an error message.");

Contact & Contribute

If you have questions please contact us via the dedicated SwiftyBeaver Twitter account. Feature requests or bugs are better reported and discussed as Github Issue.

License

SBObjectiveCWrapper is released under the MIT License.

About

Objective-C Wrapper for SwiftyBeaver Logger (Swift 2, 3, 4 & 5!)

github.com/SwiftyBeaver/SwiftyBeaver

Resources

Readme
License
Activity
Custom properties

Stars

25 stars

Watchers

2 watching

Forks

11 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.