CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

ObjCTry 1.1.0

ObjCTry 1.1.0

Maintained by Svetislav Markovic.



ObjCTry 1.1.0

  • By
  • Svetislav Markovic

Version License Platform

ObjCTry

Simple code wrapper to help catching ObjC exceptions within Swift. It works simply by converting exceptioins to errors and rethrows them to allow Swift do-catch block to catch them.

Requirements

iOS 10.0, Swift 4

Example usage

do {
    try ObjC.try {
        // code that throws ObjC exceptions
    }
} catch {
    print(error)
}

Installation

ObjCTry is available through CocoaPods.

To install it, simply add the following line to your Podfile:

pod "ObjCTry", "~> 1.1"

ObjCTry is available through Carthage.

To install it, simply add the following line to your Carthage file:

github "svetam/ObjCTry" ~> 1.1

Author

Svetislav Markovic ([email protected])

License

ObjCTry is available under the MIT license. See the LICENSE file for more info.