Skip to content

Instantly share code, notes, and snippets.


Hu Junfeng hujunfeng

View GitHub Profile
View UIDeviceHardware.h
// UIDeviceHardware.h
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
+ (NSString *)platform;
hujunfeng /
Last active May 27, 2020
UDID, identifierForVendor and advertisingIdentifier FAQ

What's the difference between UUID, GUID and UDID?

  • UUID (Universally Unique Identifier): A sequence of 128 bits that can guarantee uniqueness across space and time, defined by [RFC 4122][rfc4122].

  • GUID (Globally Unique Identifier): Microsoft's implementation of the UUID specification; often used interchangeably with UUID.

  • UDID _(Unique Device Identifier)): A sequence of 40 hexadecimal characters that uniquely identify an iOS device (the device's Social Security Number, if you will). This value can be retrieved through iTunes, or found using UIDevice -uniqueIdentifier. Derived from hardware details like MAC address.

Is UDID deprecated?

hujunfeng /
Last active Mar 20, 2019
About iOS 7 Status Bar Style

UIStatusBarStyle in iOS 7

  • The status bar in iOS 7 is transparent, the view behind it shows through.

  • The style of the status bar refers to the appearances of its content. In iOS 7, the status bar content is either dark (UIStatusBarStyleDefault) or light (UIStatusBarStyleLightContent). Both UIStatusBarStyleBlackTranslucent and UIStatusBarStyleBlackOpaque are deprecated in iOS 7.0. Use UIStatusBarStyleLightContent instead.

How to change UIStatusBarStyle

  • If below the status bar is a navigation bar, the status bar style will be adjusted to match the navigation bar style (UINavigationBar.barStyle):
hujunfeng / wwdc14-sessions-titles
Last active Aug 29, 2015
WWDC 2014 sessions titles list
View wwdc14-sessions-titles
102 Platforms State of the Union
103 Apple Design Awards
201 Advanced Topics in Internationalization
202 What's New in Cocoa Touch
203 Introducing HealthKit
204 What's New in Cocoa
205 Creating Extensions for iOS and OS X, Part 1
206 Introducing the Modern WebKit API
207 Accessibility on OS X

Embrace iOS 8 App Extensions to Reach More Users

An iOS app is sandboxed to protect unintentional access of its content from malicious software. App sandboxing is a great way to keep iOS apps in a safe environment. An iOS app basically lives in its own world. However, it also creases the difficulties for apps to collaborate. For example, a user might want to take a photo with the Camera app (because it can be opened quickly from lock screen), and share the photo with Instagram. Because of sandboxing, The Instagram app cannot directly access the photo image inside the Camera Roll, but it needs to copy the

View gist:558b448f689cc40ac190
tool = Kaleidoscope
prompt = false
tool = Kaleidoscope
prompt = false
keepBackup = true
[difftool "Kaleidoscope"]
hujunfeng / wwdc15-session-titles
Created Jun 13, 2015
WWDC 2015 Session Titles
View wwdc15-session-titles
101: Keynote
102: Platforms State of the Union
103: Apple Design Awards
104: What's New in Xcode
105: Introducing WatchKit for watchOS 2
106: What's New in Swift
107: What's New in Cocoa Touch
108: Building Watch Apps
201: iOS Accessibility
202: What's New in Cocoa
View MediaKit-iOS.podspec do |s| = "MediaKit"
s.version = "0.1"
s.summary = "MediaKit for iOS"
s.homepage = "" = '2359 Media'
s.source = { :git => "", :branch => 'experimental' }
s.platform = :ios, '7.0'
s.license = { :type => 'Copyright', :text => <<-LICENSE
View YahooSearchKit.podspec do |spec| = 'YahooSearchKit'
spec.platform = :ios, '7.0'
spec.version = '0.5.0'
spec.summary = "Yahoo Search SDK for iOS"
spec.license = { :type => 'Yahoo', :text => 'Yahoo Confidential' }
spec.homepage = '' = {
'Mobile Search' => ''
You can’t perform that action at this time.