Get the similar timezone list as in iphone Settings app

前端 未结 3 1498
面向向阳花
面向向阳花 2021-02-04 21:50

I am able to get list of timezones using

NSArray *timezoneNames = [NSTimeZone knownTimeZoneNames] ;

but the generated list of timezones does no

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-04 21:59

    Settings.app uses a plist file to display the timezone list. The name of file is: "all_cities_adj.plist". To get to this file you need to traverse deep down into the SDK itself. I have mentioned the traverse path below where you can find it.

    1.Go to the folder where you have your Xcode. 2.Right-Click on it and then click Show Package Contents. 3.Then Contents --> Developer --> Platforms --> iPhoneSimulator.platform --> Developer --> SDKs --> iPhoneSimulator6.1.sdk --> System --> Library --> PrivateFrameworks --> AppSupport.framework 4.In this folder you can find the plist file.

    Please let me know if it helped...

提交回复
热议问题