{ tech }

  • Inject cookies in WKWebView

    | /

    We often encounter scenarios where we need to inject cookies into WKWebView from the outside.

    There are several specific schemes, generally speaking, the choice needs to be made in combination with the actual scene.

    Here is a description of an actual scenario in a project I’ve encountered.

  • respondsToSelector Of Super

    | /

    respondsToSelector is often used to determine whether an instance implements a method for safe calling.

    But please don’t call the respondsToSelector method on super.

    Sometimes we only want to call a method of the parent class, but we only know that although the parent class implements a certain protocol, it does not necessarily implement the method in the protocol.

  • Hexo Environment Variables

    | /

    When we debug Hexo, we always encounter scenarios where we need to block some production environment logic. Such as some of Google’s JS libraries and so on.

    So we need some way to distinguish debug environment, production environment, etc. What we probably need are environment variables.

  • Something About Optional Assignment

    | /

    We all know that in Swift, optional chaining is an important feature that can help us write concise and elegant code.

    However, the optional assignment derived from the optional chain may have some strange phenomena when used.

  • When Rejected For UIRequiredDeviceCapabilities

    | /

    A month ago, after I submitted the AppStore review as usual. Soon I received a review response with the subject line “We noticed an issue with your submission.”

    I guess I may have screwed up again.

    The reason for rejection is about UIRequiredDeviceCapabilities.

  • When Hexo Comments Dont Match Post

    | /

    Last week I introduced a commenting system on my hexo blog.

    It all went well at first, until I found that at some point, the comment area and the blog post itself didn’t match.

    Finally I modified some code writing and finally fixed the problem.

    This blog post documents this slightly tortuous process.

  • iOS Crash 符号化解析

    | /

    在公司的时候,通常 Crash 平台都做的很好,帮我们做好了符号化解析,一些三方平台也会提供类似的能力。



  • VSCode 常用快捷键

    | /

    vscode 快捷键


    Command + Shift + P / F1 显示命令面板
    Command + P 快速打开
    Command + Shift + N 打开新窗口
    Command + W 关闭窗口