Gedatsu provide readable format about AutoLayout error console log

Overview

Swift 5.2 Cocoapods Carthage Swift Package Manager

Gedatsu

Gedatsu

Gedatsu provide readable format about AutoLayout error console log

Abstract

At runtime Gedatsu hooks console log and formats it to human readable about AutoLayout ambiguous constraints.

Original Gedatsu

Install

Cocoapods

Add the line below to Podfile and execute $ pod install.

pod 'Gedatsu', configuration: %w(Debug)

Carthage

Add the line below to Cartfile and execute any $ carthage checkout && carthage build commands.
e.g.) $ carthage bootstrap --platform iOS.

github "bannzai/Gedatsu"

Swift Package Manager

Gedatsu supports to install via Swift Package Manager. You can add Gedatsu on Xcode GUI. See document.

Usage

Gedatsu will start when after call Gedatsu.open. As an good example for iOS project, call Gedatsu.open when AppDelegate.application:didFinishLaunchingWithOptions:.

#if DEBUG
import Gedatsu
#endif

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    #if DEBUG
    Gedatsu.open()
    #endif
    return true
}

Support Versions

platform version
iOS >= 11.0
macOS >= 10.11
Swift >= 5.2

LICENSE

Gedatsu is released under the MIT license. See LICENSE for details.
Header logo is released CC BY-NC 4.0 license. Original design by noainoue.

Comments
  • Use '#if canImport(Gedatsu)' instead of '#if DEBUG'

    Use '#if canImport(Gedatsu)' instead of '#if DEBUG'

    Use '#if canImport(Gedatsu)' instead of '#if DEBUG'. Because when you want to use Gedatsu in multiple configurations, you don't have to change '#if' macros.

    opened by uhooi 3
  • Gedatsu crashes if the view whose translatesAutoresizingMaskIntoConstraints property is true is in the ambiguous view tree.

    Gedatsu crashes if the view whose translatesAutoresizingMaskIntoConstraints property is true is in the ambiguous view tree.

    Below code, maybe you can reproduce the crash. I tried to test in iOS 12.2 and 13.5. In the lldb, po self.rawValue is 35.

    スクリーンショット 2020-06-05 15 57 22

    It does not crash if translatesAutoresizingMaskIntoConstraints property of footerButton and footerView is false.

    class ViewController: UITableViewController {
        let footerButton: UIButton = {
            let button = UIButton()
            button.setTitle("Button Label", for: .normal)
            return button
        }()
        lazy var footerView: UIView = {
            let view = UIView()
            view.addSubview(self.footerButton)
            NSLayoutConstraint.activate([
                footerButton.centerXAnchor.constraint(equalTo: view.centerXAnchor),
                footerButton.centerYAnchor.constraint(equalTo: view.centerYAnchor),
                footerButton.topAnchor.constraint(equalTo: view.topAnchor, constant: 32)
            ])
            return view
        }()
    
        override func viewDidLoad() {
            super.viewDidLoad()
            tableView.tableFooterView = footerView
        }
    }
    
    opened by mogaming217 2
  • Imp/first/gedatsu

    Imp/first/gedatsu

    What

    Gedatsu Implementation first

    • Hook stderr with DispatchSource event.
    • Swizzle private API about UIView.engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:

    Memo

    • NSFileHandler readabilityHandler and Notification event does not work well...
    • _NSSetLogCStringFunction and _NSLogCStringFunction C functions does not work after iOS 11.
    • UIView.engine:willBreakConstraint:dueToMutuallyExclusiveConstraints private API written by below object file.
    $ nm /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore | grep dueToMutuallyExclusiveConstraints
    
    opened by bannzai 1
  • Handling unknown defaults for NSLayoutConstraint.Attributes and Relation

    Handling unknown defaults for NSLayoutConstraint.Attributes and Relation

    Description

    No using blank fatalError when pass through to switch ... @unknown default statement. Handling this exception about pre check attributes and relation is valid before buildHeader content. The reason for creation PR of this issue and it is closed: #26.

    opened by bannzai 0
  • :metal: Support macOS

    :metal: Support macOS

    What

    • Rename iOS example project directory
    • Add macOS example project
    • switching with #if os(iOS|macOS)
      • Confirm Pass test :tada:
    • Adding and fix make command for macOS
    • Separate Carthage project file

    Why

    reference: https://github.com/bannzai/Gedatsu/issues/18

    opened by bannzai 0
  • Fix use of unresolved identifier 'gedatsuAssert'

    Fix use of unresolved identifier 'gedatsuAssert'

    Fix build error when use carthage

    /Carthage/Checkouts/Gedatsu/Sources/Gedatsu/Gedatsu.swift:42:9: error: use of unresolved identifier 'gedatsuAssert'
            gedatsuAssert(data != nil)
            ^~~~~~~~~~~~~
    /Carthage/Checkouts/Gedatsu/Sources/Gedatsu/Interceptor.swift:21:13: error: use of unresolved identifier 'gedatsuAssert'
                gedatsuAssert(false, "unexpected queue is empty", ignoreWarnLog: true)
                ^~~~~~~~~~~~~
    /Carthage/Checkouts/Gedatsu/Sources/Gedatsu/UIViewExtension.swift:15:9: error: use of unresolved identifier 'gedatsuAssert'
            gedatsuAssert(Thread.isMainThread)
            ^~~~~~~~~~~~~
    /Carthage/Checkouts/Gedatsu/Sources/Gedatsu/UIViewExtension.swift:16:9: error: use of unresolved identifier 'gedatsuAssert'
            gedatsuAssert(NSClassFromString("NSISEngine") == engine.classForCoder, "Unexpected receive argument for NSEngine")
            ^~~~~~~~~~~~~
    
    ** ARCHIVE FAILED **
    
    opened by ElonPark 0
  • Can't install Gedatsu through Carthage

    Can't install Gedatsu through Carthage

    I try to install Gedatsu through Carthage, but I can't install.

    Here are the commands at runtime.

    $ carthage update --platform iOS Gedatsu
    Dependency "Gedatsu" has no shared framework schemes for any of the platforms: iOS
    

    This is probably due to Gedatsu-Carthage.xcodeproj.

    opened by funzin 0
Releases(1.2.0)
Owner
bannzai
bannzai
📱💬🚦 TinyConsole is a micro-console that can help you log and display information inside an iOS application, where having a connection to a development computer is not possible.

TinyConsole TinyConsole is a tiny log console to display information while using your iOS app and written in Swift. Usage Wrap your Main ViewControlle

Devran Cosmo Uenal 2k Jan 3, 2023
Customizable Console UI overlay with debug log on top of your iOS App

AEConsole Customizable Console UI overlay with debug log on top of your iOS App AEConsole is built on top of AELog, so you should probably see that fi

Marko Tadić 142 Dec 21, 2022
A Swift-based API for reading from & writing to the Apple System Log (more commonly known somewhat inaccurately as "the console")

CleanroomASL Notice: CleanroomASL is no longer supported The Apple System Log facility has been deprecated by Apple. As a result, we've deprecated Cle

Gilt Tech 62 Jan 29, 2022
Simple Design for Swift bridge with Javascript. Also can get javascript console.log.

SDBridgeOC is here. If your h5 partner confused about how to deal with iOS and Android. This Demo maybe help. YouTube video is here. bilibili Video is

null 20 Dec 28, 2022
Automate box any value! Print log without any format control symbol! Change debug habit thoroughly!

LxDBAnything Automate box any value! Print log without any format control symbol! Change debug habit thoroughly! Installation You only need drag LxD

DeveloperLx 433 Sep 7, 2022
Delightful console output for Swift developers.

Rainbow adds text color, background color and style for console and command line output in Swift. It is born for cross-platform software logging in te

Wei Wang 1.7k Dec 31, 2022
Styling and coloring your XCTest logs on Xcode Console

XLTestLog Notes with Xcode 8 and XLTestLog Since Xcode 8 killed XcodeColors, the current way using XCTestLog on Xcode 8 is just plain texts with emoji

Xaree Lee 58 Feb 2, 2022
JustLog brings logging on iOS to the next level. It supports console, file and remote Logstash logging via TCP socket with no effort. Support for logz.io available.

JustLog JustLog takes logging on iOS to the next level. It supports console, file and remote Logstash logging via TCP socket with no effort. Support f

Just Eat 509 Dec 10, 2022
XCLog is a Swift extension that helps you print something in console when debugging your projects.

XCLog XCLog is a Swift extension that helps you print something in console when debugging your projects. Installation Open Xcode > File > Add Packages

null 1 Jan 9, 2022
Bugsnag error monitoring & exception reporter for iOS, macOS, tvOS and watchOS

Bugsnag error monitoring & exception reporter for iOS, macOS, tvOS and watchOS The Bugsnag crash reporter for Cocoa library automatically detects cras

Bugsnag 207 Nov 17, 2022
🍯 Awesome log aggregator for iOS

?? Awesome log aggregator for iOS

Cookpad 204 Oct 24, 2022
Puree is a log collector which provides some features like below

Puree Description Puree is a log collector which provides some features like below Filtering: Enable to interrupt process before sending log. You can

Cookpad 149 Oct 18, 2022
Log every incoming notification to view them again later, also includes attachments and advanced settings to configure

Vē Natively integrated notification logger Installation Add this repository to your package manager

alexandra 43 Dec 25, 2022
A custom logger implementation and Task Local helper for swift-log

LGNLog A custom logger implementation and TaskLocal helper for Swift-Log. Why and how This package provides two and a half things (and a small bonus):

17:11 Games 0 Oct 26, 2021
A log should tell a story, not drown the reader in irrelevance.

StoryTeller A log should tell a story, not drown the reader in irrelevance Story Teller is an advanced logging framework that takes an entirely differ

Derek Clarkson 10 Sep 20, 2019
A logging backend for swift-log that sends logging messages to Logstash (eg. the ELK stack)

LoggingELK LoggingELK is a logging backend library for Apple's swift-log The LoggingELK library provides a logging backend for Apple's apple/swift-log

null 17 Nov 15, 2022
Log messages to text files and share them by email or other way.

LogToFiles How to log messages to text files and share them by email or share center. 1 - Add the Log.swift file to your App 2 - Just log the messages

Miguel Chaves 0 Jan 9, 2022
Simply, Logify provides instant colorful logs to improve log tracking and bug tracing

Logify Simply, Logify provides instant colorful logs to improve log tracking and bug tracing. Why I need to use Logify? As discussed before in a lot o

Furkan KAPLAN 13 Dec 28, 2022