Skip to content

Instantly share code, notes, and snippets.

🤗
2333

Shawn Wang iShawnWang

🤗
2333
Block or report user

Report or block iShawnWang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am ishawnwang on github.
  • I am ishawnwang (https://keybase.io/ishawnwang) on keybase.
  • I have a public key ASCgW2WZPG5ADfgS4QaCjUoKqXYhhAXgfpWFXWEpO634hAo

To claim this, I am signing this object:

@iShawnWang
iShawnWang / Log+Extension.swift
Last active Aug 22, 2017
Custom CleanroomLogger Channel demo
View Log+Extension.swift
Original issues : [CleanroomLogger/issues/37](https://github.com/emaloney/CleanroomLogger/issues/37)
extension Log {
static func setup() {
#if DEBUG
Log.enable(debugMode: true)
Log.sqlite = MyLogChannel(prefix: "Sqlite") // enable your channel or using Xcode console filter
#endif
}
}
@iShawnWang
iShawnWang / LOL
Last active Oct 14, 2016
Detect Ad Hoc Build Configuration in code at runtime
View LOL
//AdHoc detect with following 2 conditions :
//1.`embedded.mobileprovision` contains field `ProvisionedDevices` (Debug and Ad Hoc Build contains this field ,Release not)
//2.it is not DEBUG Build , we can use `#ifdef DEBUG` to decide it
NS_INLINE BOOL isAdHoc(){
BOOL isAdHoc = NO;
BOOL isDebug;
#ifdef DEBUG
isDebug=YES;
View url-schemes-settings-ios.mkd

###Note Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

###[UPDATE : Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.]

###[UPDATE 2:The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead]

##[UPDATE 3: For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached]

@iShawnWang
iShawnWang / README.md
Last active Jul 5, 2016
Mac :Setup Avatar for SourceTree App ,为 SourceTree App 设置 Commit 时的头像
View README.md
  1. Close SourceTree App
  2. Launch Finder,
    Command + Shift + G go to ~/Library/Application Support/SourceTree/ SourceTree Preference and Cache Directory,
  3. Delete Directory ImageCache
  4. Go to Gavatar with your account the same as you login in the SourceTree App
  5. Setup Avatar
  6. Launch SourceTree ,it will fetch avatar from Gavatar with account you login
  7. Done :)
You can’t perform that action at this time.