Git Product home page Git Product logo

showtime's Issues

`Method Swizzling` on .never

Hello,
This is more of an observation from our team than a bug but

  public static var enabled: ShowTime.Enabled = .never {
    didSet {
      UIWindow.swizzle()
    }
  }

essentially swizzles an event irrespective of .enabled value even if its never. Shouldn't UIWindow.swizzle() only on .debugOnly and .always?

Feature Request: Automatic mode

It would be awesome if there was a mode that automatically enabled ShowTime if there was an external screen connected or a screen recording started. It seems like you could do this via observing the following Notifications:

UIScreen.didConnectNotification
UIScreen.capturedDidChangeNotification

Crash on iOS 16.1

I've seen this crash on my device since iOS 16.1. I can trigger the issue by deleting a row in a List backed by CoreData in SwiftUI.

Screenshot 2022-09-17 at 12 48 39

Show taps in a SFSafariViewController

Hi, how can I visualize taps in a SFSafariViewController that is presented programmatically from another view controller? Will I have to use WKWebView instead?

Where do I change the settings?

Thanks for this great tool @KaneCheshire !

I am working on a react native project and pulled in ShowTime using CocoaPods.
I would like to disable ShowTime by default and only enable it for recording videos.
What I don't understand is: where do I change the settings/where does the config file (?) go?
Maybe, I am the only one, but maybe it makes sense to add this info to the readme.

Sorry for the n00b question!

Thank you!
Cheers
Tim

"Reference to class property 'enabled' is not concurrency-safe because it involves shared mutable state" with Strict Concurrency Checking = Complete

Hello,

I tried enabling Complete Strict Concurrency Checking in Xcode 14.1 (in the Build Settings of my target) and a warning appeared on the line where I was setting ShowTime.enabled.

In particular my code is:

AppDelegate.swift

func applicationDidBecomeActive(_ application: UIApplication) {
    ShowTime.enabled = ...
    ...
}

Please find a minimal sample project attached, it's entirely SwiftUI so no AppDelegate but the behavior is the same.
ShowTimeTest.zip

Thank you.

iOS 13.4 support

Hi! Could you fix some warnings to support latest iOS 13.4? Thanks

Swift Compiler Error: Type 'UIFontWeight' (aka 'CGFloat') has no member 'bold'

This is compiling for iOS 9.0 as target, on Xcode 9.2. In a React Native (0.53) project. I installed manually by dropping ShowTime.swift into my project.

Type 'UIFontWeight' (aka 'CGFloat') has no member 'bold'

screenshot 2018-03-21 12 22 59

Solution: https://stackoverflow.com/questions/31771679/uifont-how-to-get-system-thin-font

I can compile by changing the line to end with weight: UIFontWeightBold. I don't do Swift development so I'm not going to say whether this is a correct fix for PR.

Objectvie-c

Hello, how can i use this framework in my objective-c project ? if possible

Disabled ShowTime should not slow down the app

I use ShowTime in one app and i really like the visual user interactions. It is very helpful for demoing features and reporting bugs via screen recordings.

The app detects if it runs on an internal test device or not (by looking for an installed other non public app which enables test mode even on release builds) and uses for non-test devices
ShowTime.enabled = EnabledNever
and i expected it would then use close to zero CPU time in this case.

I run into performance issues with the app and analysed it with Instruments. I found ShowTime using more than 24% of all the app's CPU time even when disabled:

284.00 ms 24.2% @objc UIWindow.swizzled_sendEvent(_:) ShowTime
283.00 ms 24.1% UlWindow.swizzled sendEvent(:) ShowTime

image

Can i fix this by myself?

extension UIWindow and use swizzling

Thanks for you work, but i see some problems in youre solutions.

private class func swizzle() { // `initialize()` removed in Swift 4

It's bad practice to make extension UIWindow and use swizzling to intercept methods. You can potentially create serious problems for your application even though ShowTime can be turned off. ShowTime.enabled = never will ignored with youre code.

Also always is not good for default value, beacuse turn on should be explicit action.

@objc public static var enabled: Enabled = .always

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.