Skip to content

Instantly share code, notes, and snippets.

//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
+ (NSString *)platform;
@hujunfeng
hujunfeng / udid-faq.md
Last active January 24, 2024 14:15
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
hujunfeng / ios7statusbar.md
Last active March 20, 2019 14:20
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
hujunfeng / wwdc14-sessions-titles
Last active May 8, 2021 06:18
WWDC 2014 sessions titles list
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

[diff]
tool = Kaleidoscope
[difftool]
prompt = false
[merge]
tool = Kaleidoscope
[mergetool]
prompt = false
keepBackup = true
[difftool "Kaleidoscope"]
@hujunfeng
hujunfeng / wwdc15-session-titles
Created June 13, 2015 04:56
WWDC 2015 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
Pod::Spec.new do |s|
s.name = "MediaKit"
s.version = "0.1"
s.summary = "MediaKit for iOS"
s.homepage = "http://www.2359media.com"
s.author = '2359 Media'
s.source = { :git => "https://github.com/2359media/MediaKit-iOS.git", :branch => 'experimental' }
s.platform = :ios, '7.0'
s.license = { :type => 'Copyright', :text => <<-LICENSE
Pod::Spec.new do |spec|
spec.name = '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 = 'https://github.com/yahoo/searchsdk-ios'
spec.author = {
'Mobile Search' => 'mobile-search-eng@yahoo-inc.com'
}