Author Archives: Tang

About Tang

A mobile developer, work in Stockholm, Sweden

Xcode instruments

 The two columns worth noting in Instruments are # Persistent and # Transient. The Persistent column keeps a count of the number of objects of each type that currently exist in memory. The Transient column shows the number of … Continue reading

Posted in iOS, Mobile | Tagged | Leave a comment

Views vs. layers

A layer is a simple model class that exposes a number of properties to represents some image-based content. Every UIView is backed by a layer, so you can think of layers as the lower-level behind the scenes class behind your … Continue reading

Posted in iOS, Mobile | Tagged | Leave a comment

Xcode tips and ticks

Faster Testing When using TDD you can work more quickly by running a subset of tests – press ⌃⌥⌘G to re-run only your last test, or ⌘-click several tests to run only them. Opening Xcode If you’re in a folder … Continue reading

Posted in iOS, Mobile | Tagged | Leave a comment

gitsubree usage

Basic commands about subtree git subtree add –prefix=<prefix> <commit> git subtree add –prefix=<prefix> <repository> <ref> git subtree pull –prefix=<prefix> <repository> <ref> git subtree push –prefix=<prefix> <repository> <ref> git subtree merge –prefix=<prefix> <commit> git subtree split –prefix=<prefix> [OPTIONS] [<commit>] 1. Add … Continue reading

Posted in git | Tagged | Leave a comment

CommentPlus for Swift Func

Usage reference: https://zhihuitang.github.io/2019/01/13/CommentPlus-for-Swift-Func.html Download the Xcode extension from here Unzip and double click the extension CommentPlus.app to install the extension In Xcode, put the cursor on the upper line of func, then select Xcode menu bar: Editor -> CommentGenerator -> … Continue reading

Posted in iOS, Mac | Tagged | Leave a comment

Charles Proxy in Android

1. SSL Proxy/Charles + Android trouble https://stackoverflow.com/questions/17823434/ssl-proxy-charles-and-android-trouble/31945622#31945622 2. Enable SSL Proxy for Nougat+ Update your AndroidManifest.xml application section with networkSecurityConfig.xml <application android:name=”AppName” android:icon=”@mipmap/ic_launcher” android:label=”@string/app_name” android:networkSecurityConfig=”@xml/network_security_config”> Add network_security_config.xml file to your xml resource folder app/src/main/res/xml/network_security_config.xml <?xml version="1.0" encoding="utf-8"?> <network-security-config> <base-config> <trust-anchors> … Continue reading

Posted in Android | Tagged | 1 Comment

Intermediate iOS Debugging

1. Stop when exception 1.1 Open Breakpoint navigator (Cmd + 8) 1.2 Add Exception Breakpoint  1.3 Keep default values  1.4 Move breakpoint to User level  2. Edit breakpoint Edit Breakpoint  Add Debugger Command:  We will … Continue reading

Posted in iOS, Mobile | Tagged | Leave a comment