├── HYBUnicodeReadable.podspec ├── HYBUnicodeReadable ├── NSArray+HYBUnicodeReadable.h ├── NSArray+HYBUnicodeReadable.m ├── NSDictionary+HYBUnicodeReadable.h ├── NSDictionary+HYBUnicodeReadable.m ├── NSSet+HYBUnicodeReadable.h └── NSSet+HYBUnicodeReadable.m ├── LICENSE ├── README.md ├── demo ├── demo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── huangyibiao.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── huangyibiao.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── demo.xcscheme │ │ └── xcschememanagement.plist ├── demo │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── demoTests │ ├── Info.plist │ └── demoTests.m └── demoUITests │ ├── Info.plist │ └── demoUITests.m └── screenshot.gif /HYBUnicodeReadable.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint HYBUnicodeReadable.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "HYBUnicodeReadable" 19 | s.version = "1.1" 20 | s.summary = "解决打印日志对于Unicode编码不能正常显示中文的问题,只需要将文件导入工程,不需要引用,就能达到打印日志显示Unicode编码中文数据" 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | s.description = <<-DESC 28 | * 解决打印日志对于Unicode编码不能正常显示中文的问题,只需要将文件导入工程,不需要引用,就能达到打印日志显示Unicode编码中文数据 29 | * 引入工程后,不需要包含头文件即可达到效果 30 | DESC 31 | 32 | s.homepage = "https://github.com/CoderJackyHuang/HYBUnicodeReadable" 33 | s.screenshots = "https://github.com/CoderJackyHuang/HYBUnicodeReadable/raw/master/screenshot.gif" 34 | 35 | 36 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 37 | # 38 | # Licensing your code is important. See http://choosealicense.com for more info. 39 | # CocoaPods will detect a license file if there is a named LICENSE* 40 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 41 | # 42 | 43 | s.license = "MIT" 44 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 45 | 46 | 47 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 48 | # 49 | # Specify the authors of the library, with email addresses. Email addresses 50 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 51 | # accepts just a name if you'd rather not provide an email address. 52 | # 53 | # Specify a social_media_url where others can refer to, for example a twitter 54 | # profile URL. 55 | # 56 | 57 | s.author = { "huangyibiao" => "" } 58 | # Or just: s.author = "huangyibiao" 59 | # s.authors = { "huangyibiao" => "" } 60 | s.social_media_url = "http://weibo.com/u/5384637337" 61 | 62 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 63 | # 64 | # If this Pod runs only on iOS or OS X, then specify the platform and 65 | # the deployment target. You can optionally include the target after the platform. 66 | # 67 | 68 | s.platform = :ios 69 | # s.platform = :ios, "5.0" 70 | 71 | # When using multiple platforms 72 | # s.ios.deployment_target = "5.0" 73 | # s.osx.deployment_target = "10.7" 74 | # s.watchos.deployment_target = "2.0" 75 | # s.tvos.deployment_target = "9.0" 76 | 77 | 78 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 79 | # 80 | # Specify the location from where the source should be retrieved. 81 | # Supports git, hg, bzr, svn and HTTP. 82 | # 83 | 84 | s.source = { :git => "https://github.com/CoderJackyHuang/HYBUnicodeReadable.git", :tag => "1.1" } 85 | 86 | 87 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 88 | # 89 | # CocoaPods is smart about how it includes source code. For source files 90 | # giving a folder will include any swift, h, m, mm, c & cpp files. 91 | # For header files it will include any header in the folder. 92 | # Not including the public_header_files will make all headers public. 93 | # 94 | 95 | s.source_files = "HYBUnicodeReadable", "*.{h,m}" 96 | #s.exclude_files = "Classes/Exclude" 97 | 98 | # s.public_header_files = "Classes/**/*.h" 99 | 100 | 101 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 102 | # 103 | # A list of resources included with the Pod. These are copied into the 104 | # target bundle with a build phase script. Anything else will be cleaned. 105 | # You can preserve files from being cleaned, please don't preserve 106 | # non-essential files like tests, examples and documentation. 107 | # 108 | 109 | # s.resource = "icon.png" 110 | # s.resources = "Resources/*.png" 111 | 112 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 113 | 114 | 115 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 116 | # 117 | # Link your library with frameworks, or libraries. Libraries do not include 118 | # the lib prefix of their name. 119 | # 120 | 121 | # s.framework = "SomeFramework" 122 | # s.frameworks = "SomeFramework", "AnotherFramework" 123 | 124 | # s.library = "iconv" 125 | # s.libraries = "iconv", "xml2" 126 | 127 | 128 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 129 | # 130 | # If your library depends on compiler flags you can set them in the xcconfig hash 131 | # where they will only apply to your library. If you depend on other Podspecs 132 | # you can include multiple dependencies to ensure it works. 133 | 134 | s.requires_arc = true 135 | 136 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 137 | # s.dependency "JSONKit", "~> 1.4" 138 | 139 | end 140 | -------------------------------------------------------------------------------- /HYBUnicodeReadable/NSArray+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+HYBUnicodeReadable.h 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | * @author 黄仪标, 16-12-29 10:12:52 13 | * 14 | * 请不要删除作者信息 15 | * 16 | * @blog article http://www.henishuo.com/ios-unicode-readable/ 17 | * @github https://github.com/CoderJackyHuang/HYBUnicodeReadable 18 | * @email huangyibiao520@163.com 19 | * @sinaweibo 标哥Jacky 20 | */ 21 | @interface NSArray (HYBUnicodeReadable) 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /HYBUnicodeReadable/NSArray+HYBUnicodeReadable.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+HYBUnicodeReadable.m 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "NSArray+HYBUnicodeReadable.h" 10 | 11 | @implementation NSArray (HYBUnicodeReadable) 12 | 13 | #if DEBUG 14 | - (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level { 15 | NSMutableString *desc = [NSMutableString string]; 16 | 17 | NSMutableString *tabString = [[NSMutableString alloc] initWithCapacity:level]; 18 | for (NSUInteger i = 0; i < level; ++i) { 19 | [tabString appendString:@"\t"]; 20 | } 21 | 22 | NSString *tab = @""; 23 | if (level > 0) { 24 | tab = tabString; 25 | } 26 | [desc appendString:@"\t(\n"]; 27 | 28 | for (id obj in self) { 29 | if ([obj isKindOfClass:[NSDictionary class]] 30 | || [obj isKindOfClass:[NSArray class]] 31 | || [obj isKindOfClass:[NSSet class]]) { 32 | NSString *str = [((NSDictionary *)obj) descriptionWithLocale:locale indent:level + 1]; 33 | [desc appendFormat:@"%@\t%@,\n", tab, str]; 34 | } else if ([obj isKindOfClass:[NSString class]]) { 35 | [desc appendFormat:@"%@\t\"%@\",\n", tab, obj]; 36 | } else if ([obj isKindOfClass:[NSData class]]) { 37 | // 如果是NSData类型,尝试去解析结果,以打印出可阅读的数据 38 | NSError *error = nil; 39 | NSObject *result = [NSJSONSerialization JSONObjectWithData:obj 40 | options:NSJSONReadingMutableContainers 41 | error:&error]; 42 | // 解析成功 43 | if (error == nil && result != nil) { 44 | if ([result isKindOfClass:[NSDictionary class]] 45 | || [result isKindOfClass:[NSArray class]] 46 | || [result isKindOfClass:[NSSet class]]) { 47 | NSString *str = [((NSDictionary *)result) descriptionWithLocale:locale indent:level + 1]; 48 | [desc appendFormat:@"%@\t%@,\n", tab, str]; 49 | } else if ([obj isKindOfClass:[NSString class]]) { 50 | [desc appendFormat:@"%@\t\"%@\",\n", tab, result]; 51 | } 52 | } else { 53 | @try { 54 | NSString *str = [[NSString alloc] initWithData:obj encoding:NSUTF8StringEncoding]; 55 | if (str != nil) { 56 | [desc appendFormat:@"%@\t\"%@\",\n", tab, str]; 57 | } else { 58 | [desc appendFormat:@"%@\t%@,\n", tab, obj]; 59 | } 60 | } 61 | @catch (NSException *exception) { 62 | [desc appendFormat:@"%@\t%@,\n", tab, obj]; 63 | } 64 | } 65 | } else { 66 | [desc appendFormat:@"%@\t%@,\n", tab, obj]; 67 | } 68 | } 69 | 70 | [desc appendFormat:@"%@)", tab]; 71 | 72 | return desc; 73 | } 74 | #endif 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /HYBUnicodeReadable/NSDictionary+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+HYBUnicodeReadable.h 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | * @author 黄仪标, 16-12-29 10:12:52 13 | * 14 | * 请不要删除作者信息 15 | * 16 | * @blog article http://www.henishuo.com/ios-unicode-readable/ 17 | * @github https://github.com/CoderJackyHuang/HYBUnicodeReadable 18 | * @email huangyibiao520@163.com 19 | * @sinaweibo 标哥Jacky 20 | */ 21 | @interface NSDictionary (HYBUnicodeReadable) 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /HYBUnicodeReadable/NSDictionary+HYBUnicodeReadable.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+HYBUnicodeReadable.m 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+HYBUnicodeReadable.h" 10 | 11 | @implementation NSDictionary (HYBUnicodeReadable) 12 | 13 | #if DEBUG 14 | - (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level { 15 | NSMutableString *desc = [NSMutableString string]; 16 | 17 | NSMutableString *tabString = [[NSMutableString alloc] initWithCapacity:level]; 18 | for (NSUInteger i = 0; i < level; ++i) { 19 | [tabString appendString:@"\t"]; 20 | } 21 | 22 | NSString *tab = @""; 23 | if (level > 0) { 24 | tab = tabString; 25 | } 26 | 27 | [desc appendString:@"\t{\n"]; 28 | 29 | // 遍历数组,self就是当前的数组 30 | for (id key in self.allKeys) { 31 | id obj = [self objectForKey:key]; 32 | 33 | if ([obj isKindOfClass:[NSString class]]) { 34 | [desc appendFormat:@"%@\t%@ = \"%@\",\n", tab, key, obj]; 35 | } else if ([obj isKindOfClass:[NSArray class]] 36 | || [obj isKindOfClass:[NSDictionary class]] 37 | || [obj isKindOfClass:[NSSet class]]) { 38 | [desc appendFormat:@"%@\t%@ = %@,\n", tab, key, [obj descriptionWithLocale:locale indent:level + 1]]; 39 | } else if ([obj isKindOfClass:[NSData class]]) { 40 | // 如果是NSData类型,尝试去解析结果,以打印出可阅读的数据 41 | NSError *error = nil; 42 | NSObject *result = [NSJSONSerialization JSONObjectWithData:obj 43 | options:NSJSONReadingMutableContainers 44 | error:&error]; 45 | // 解析成功 46 | if (error == nil && result != nil) { 47 | if ([result isKindOfClass:[NSDictionary class]] 48 | || [result isKindOfClass:[NSArray class]] 49 | || [result isKindOfClass:[NSSet class]]) { 50 | NSString *str = [((NSDictionary *)result) descriptionWithLocale:locale indent:level + 1]; 51 | [desc appendFormat:@"%@\t%@ = %@,\n", tab, key, str]; 52 | } else if ([obj isKindOfClass:[NSString class]]) { 53 | [desc appendFormat:@"%@\t%@ = \"%@\",\n", tab, key, result]; 54 | } 55 | } else { 56 | @try { 57 | NSString *str = [[NSString alloc] initWithData:obj encoding:NSUTF8StringEncoding]; 58 | if (str != nil) { 59 | [desc appendFormat:@"%@\t%@ = \"%@\",\n", tab, key, str]; 60 | } else { 61 | [desc appendFormat:@"%@\t%@ = %@,\n", tab, key, obj]; 62 | } 63 | } 64 | @catch (NSException *exception) { 65 | [desc appendFormat:@"%@\t%@ = %@,\n", tab, key, obj]; 66 | } 67 | } 68 | } else { 69 | [desc appendFormat:@"%@\t%@ = %@,\n", tab, key, obj]; 70 | } 71 | } 72 | 73 | [desc appendFormat:@"%@}", tab]; 74 | 75 | return desc; 76 | } 77 | #endif 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /HYBUnicodeReadable/NSSet+HYBUnicodeReadable.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+HYBUnicodeReadable.h 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | * @author 黄仪标, 16-12-29 10:12:52 13 | * 14 | * 请不要删除作者信息 15 | * 16 | * @blog article http://www.henishuo.com/ios-unicode-readable/ 17 | * @github https://github.com/CoderJackyHuang/HYBUnicodeReadable 18 | * @email huangyibiao520@163.com 19 | * @sinaweibo 标哥Jacky 20 | */ 21 | @interface NSSet (HYBUnicodeReadable) 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /HYBUnicodeReadable/NSSet+HYBUnicodeReadable.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+HYBUnicodeReadable.m 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "NSSet+HYBUnicodeReadable.h" 10 | 11 | @implementation NSSet (HYBUnicodeReadable) 12 | 13 | #if DEBUG 14 | - (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level { 15 | NSMutableString *desc = [NSMutableString string]; 16 | 17 | NSMutableString *tabString = [[NSMutableString alloc] initWithCapacity:level]; 18 | for (NSUInteger i = 0; i < level; ++i) { 19 | [tabString appendString:@"\t"]; 20 | } 21 | 22 | NSString *tab = @"\t"; 23 | if (level > 0) { 24 | tab = tabString; 25 | } 26 | [desc appendString:@"\t{(\n"]; 27 | 28 | for (id obj in self) { 29 | if ([obj isKindOfClass:[NSDictionary class]] 30 | || [obj isKindOfClass:[NSArray class]] 31 | || [obj isKindOfClass:[NSSet class]]) { 32 | NSString *str = [((NSDictionary *)obj) descriptionWithLocale:locale indent:level + 1]; 33 | [desc appendFormat:@"%@\t%@,\n", tab, str]; 34 | } else if ([obj isKindOfClass:[NSString class]]) { 35 | [desc appendFormat:@"%@\t\"%@\",\n", tab, obj]; 36 | } else if ([obj isKindOfClass:[NSData class]]) { 37 | // 如果是NSData类型,尝试去解析结果,以打印出可阅读的数据 38 | NSError *error = nil; 39 | NSObject *result = [NSJSONSerialization JSONObjectWithData:obj 40 | options:NSJSONReadingMutableContainers 41 | error:&error]; 42 | // 解析成功 43 | if (error == nil && result != nil) { 44 | if ([result isKindOfClass:[NSDictionary class]] 45 | || [result isKindOfClass:[NSArray class]] 46 | || [result isKindOfClass:[NSSet class]]) { 47 | NSString *str = [((NSDictionary *)result) descriptionWithLocale:locale indent:level + 1]; 48 | [desc appendFormat:@"%@\t%@,\n", tab, str]; 49 | } else if ([obj isKindOfClass:[NSString class]]) { 50 | [desc appendFormat:@"%@\t\"%@\",\n", tab, result]; 51 | } 52 | } else { 53 | @try { 54 | NSString *str = [[NSString alloc] initWithData:obj encoding:NSUTF8StringEncoding]; 55 | if (str != nil) { 56 | [desc appendFormat:@"%@\t\"%@\",\n", tab, str]; 57 | } else { 58 | [desc appendFormat:@"%@\t%@,\n", tab, obj]; 59 | } 60 | } 61 | @catch (NSException *exception) { 62 | [desc appendFormat:@"%@\t%@,\n", tab, obj]; 63 | } 64 | } 65 | } else { 66 | [desc appendFormat:@"%@\t%@,\n", tab, obj]; 67 | } 68 | } 69 | 70 | [desc appendFormat:@"%@)}", tab]; 71 | 72 | return desc; 73 | } 74 | #endif 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 JackyHuang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HYBUnicodeReadable 2 | 解决打印日志对于Unicode编码不能正常显示中文的问题,只需要将文件导入工程,不需要引用,就能达到打印日志显示Unicode编码中文数据 3 | 4 | #用途 5 | 6 | 在开发中,通常希望在console中打印出的信息能够显示出Unicode编码对应的中文,由此作者研究了一下如何解决此问题。 7 | 在这里,将此解决方案贡献给大家,如果觉得有用,请给个star! 8 | 9 | #安装使用 10 | 11 | 支持cocoapods: 12 | 13 | ``` 14 | pod 'HYBUnicodeReadable', '~> 1.1' 15 | ``` 16 | 17 | 或者直接下载源代码然后拖入工程即可!!! 18 | 19 | >注意:不需要引入头文件一样可以使用的!!! 20 | 21 | #效果图 22 | 23 | ![image](https://github.com/CoderJackyHuang/HYBUnicodeReadable/blob/master/screenshot.gif) 24 | 25 | #version 1.0 26 | 27 | 增加对NSData类型的数据的可视化打印,如下: 28 | 29 | ``` 30 | NSString *str = @"我是转换成data格式的字符串"; 31 | NSData *dataString = [NSData dataWithBytes:str.UTF8String length:str.length]; 32 | NSDictionary *dataSet = @{@"key": @"字典转成data", 33 | @"key1": @"在set、数组、字典中嵌套"}; 34 | NSData *dataSetItem = [NSJSONSerialization dataWithJSONObject:dataSet options:NSJSONWritingPrettyPrinted error:nil]; 35 | 36 | NSMutableSet *set = [NSMutableSet setWithArray:@[@"可变集合", @"字典->不可变集合->可变集合", dataSetItem]]; 37 | NSDictionary *dict = @{@"name" : @"标哥的技术博客", 38 | @"title" : @"http://www.henishuo.com", 39 | @"count" : @(11), 40 | @"dataString" : dataString, 41 | @"results" : [NSSet setWithObjects:@"集合值1", @"集合值2", set , nil], 42 | @"summaries" : @[@"sm1", @"sm2", @{@"keysm": @{@"stkey": @"字典->数组->字典->字典"}}, dataSetItem], 43 | @"parameters" : @{@"key1" : @"value1", @"key2": @{@"key11" : @"value11", @"key12" : @[@"三层", @"字典->字典->数组"]}, @"key13": dataSetItem}, 44 | @"hasBug": @[@"YES",@"NO"], 45 | @"contact" : @[@"关注博客地址:http://www.henishuo.com", @"QQ群: 324400294", @"关注微博:标哥Jacky", @"关注GITHUB:CoderJackyHuang"]}; 46 | NSLog(@"%@", dict); 47 | ``` 48 | 49 | 打印结果为: 50 | 51 | ``` 52 | 2015-12-31 16:47:42.352 demo[58176:2693559] { 53 | hasBug = ( 54 | "YES", 55 | "NO", 56 | ), 57 | dataString = "我是转换成", 58 | title = "http://www.henishuo.com", 59 | count = 11, 60 | results = {( 61 | "集合值2", 62 | "集合值1", 63 | {( 64 | "可变集合", 65 | "字典->不可变集合->可变集合", 66 | { 67 | key = "字典转成data", 68 | key1 = "在set、数组、字典中嵌套", 69 | }, 70 | )}, 71 | )}, 72 | summaries = ( 73 | "sm1", 74 | "sm2", 75 | { 76 | keysm = { 77 | stkey = "字典->数组->字典->字典", 78 | }, 79 | }, 80 | { 81 | key = "字典转成data", 82 | key1 = "在set、数组、字典中嵌套", 83 | }, 84 | ), 85 | contact = ( 86 | "关注博客地址:http://www.henishuo.com", 87 | "QQ群: 324400294", 88 | "关注微博:标哥Jacky", 89 | "关注GITHUB:CoderJackyHuang", 90 | ), 91 | name = "标哥的技术博客", 92 | parameters = { 93 | key1 = "value1", 94 | key13 = { 95 | key = "字典转成data", 96 | key1 = "在set、数组、字典中嵌套", 97 | }, 98 | key2 = { 99 | key11 = "value11", 100 | key12 = ( 101 | "三层", 102 | "字典->字典->数组", 103 | ), 104 | }, 105 | }, 106 | } 107 | ``` 108 | 109 | #Version1.1 110 | 111 | 增加条件编译,只对Debug环境下起作用 112 | 113 | #讲解 114 | 115 | 为了更详细地说明如何使用,笔者写了一篇博文,大家可以阅读:[http://www.henishuo.com/ios-unicode-readable/](http://www.henishuo.com/ios-unicode-readable/) 116 | 117 | #维护 118 | 119 | 笔者会一直维护,如果使用过程中出现任何bug,请反馈给作者,谢谢您的支持!!! 120 | 121 | #关注我 122 | 123 | 如果在使用过程中遇到问题,或者想要与我交流,可加入有问必答**QQ群:[324400294]()** 124 | 125 | 关注微信公众号:[**iOSDevShares**]() 126 | 127 | 关注新浪微博账号:[标哥Jacky](http://weibo.com/u/5384637337) 128 | 129 | #支持并捐助 130 | 131 | 如果您觉得文章对您很有帮助,希望得到您的支持。您的捐肋将会给予我最大的鼓励,感谢您的支持! 132 | 133 | 支付宝捐助 | 微信捐助 134 | ------------- | ------------- 135 | ![image](http://www.henishuo.com/wp-content/uploads/2015/12/alipay-e1451124478416.jpg) | ![image](http://www.henishuo.com/wp-content/uploads/2015/12/weixin.jpg) 136 | -------------------------------------------------------------------------------- /demo/demo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 698827C81C322425002363D5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 698827C71C322425002363D5 /* main.m */; }; 11 | 698827CB1C322425002363D5 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 698827CA1C322425002363D5 /* AppDelegate.m */; }; 12 | 698827CE1C322425002363D5 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 698827CD1C322425002363D5 /* ViewController.m */; }; 13 | 698827D11C322425002363D5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 698827CF1C322425002363D5 /* Main.storyboard */; }; 14 | 698827D31C322425002363D5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 698827D21C322425002363D5 /* Assets.xcassets */; }; 15 | 698827D61C322425002363D5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 698827D41C322425002363D5 /* LaunchScreen.storyboard */; }; 16 | 698827E11C322425002363D5 /* demoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 698827E01C322425002363D5 /* demoTests.m */; }; 17 | 698827EC1C322425002363D5 /* demoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 698827EB1C322425002363D5 /* demoUITests.m */; }; 18 | 698827FC1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = 698827FB1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m */; }; 19 | 698827FD1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = 698827FB1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m */; }; 20 | 698827FE1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = 698827FB1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m */; }; 21 | 698828011C322479002363D5 /* NSArray+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = 698828001C322479002363D5 /* NSArray+HYBUnicodeReadable.m */; }; 22 | 698828021C322479002363D5 /* NSArray+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = 698828001C322479002363D5 /* NSArray+HYBUnicodeReadable.m */; }; 23 | 698828031C322479002363D5 /* NSArray+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = 698828001C322479002363D5 /* NSArray+HYBUnicodeReadable.m */; }; 24 | 698828061C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = 698828051C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m */; }; 25 | 698828071C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = 698828051C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m */; }; 26 | 698828081C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m in Sources */ = {isa = PBXBuildFile; fileRef = 698828051C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 698827DD1C322425002363D5 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 698827BB1C322425002363D5 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 698827C21C322425002363D5; 35 | remoteInfo = demo; 36 | }; 37 | 698827E81C322425002363D5 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 698827BB1C322425002363D5 /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 698827C21C322425002363D5; 42 | remoteInfo = demo; 43 | }; 44 | /* End PBXContainerItemProxy section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 698827C31C322425002363D5 /* demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 698827C71C322425002363D5 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 49 | 698827C91C322425002363D5 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 50 | 698827CA1C322425002363D5 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 51 | 698827CC1C322425002363D5 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 52 | 698827CD1C322425002363D5 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 53 | 698827D01C322425002363D5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 54 | 698827D21C322425002363D5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 55 | 698827D51C322425002363D5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 56 | 698827D71C322425002363D5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | 698827DC1C322425002363D5 /* demoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = demoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 698827E01C322425002363D5 /* demoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = demoTests.m; sourceTree = ""; }; 59 | 698827E21C322425002363D5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | 698827E71C322425002363D5 /* demoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = demoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 61 | 698827EB1C322425002363D5 /* demoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = demoUITests.m; sourceTree = ""; }; 62 | 698827ED1C322425002363D5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 63 | 698827FA1C32246A002363D5 /* NSSet+HYBUnicodeReadable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSSet+HYBUnicodeReadable.h"; sourceTree = ""; }; 64 | 698827FB1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSSet+HYBUnicodeReadable.m"; sourceTree = ""; }; 65 | 698827FF1C322479002363D5 /* NSArray+HYBUnicodeReadable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+HYBUnicodeReadable.h"; sourceTree = ""; }; 66 | 698828001C322479002363D5 /* NSArray+HYBUnicodeReadable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+HYBUnicodeReadable.m"; sourceTree = ""; }; 67 | 698828041C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+HYBUnicodeReadable.h"; sourceTree = ""; }; 68 | 698828051C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+HYBUnicodeReadable.m"; sourceTree = ""; }; 69 | /* End PBXFileReference section */ 70 | 71 | /* Begin PBXFrameworksBuildPhase section */ 72 | 698827C01C322425002363D5 /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | 698827D91C322425002363D5 /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | 698827E41C322425002363D5 /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | 698827BA1C322425002363D5 = { 97 | isa = PBXGroup; 98 | children = ( 99 | 698827C51C322425002363D5 /* demo */, 100 | 698827DF1C322425002363D5 /* demoTests */, 101 | 698827EA1C322425002363D5 /* demoUITests */, 102 | 698827C41C322425002363D5 /* Products */, 103 | ); 104 | sourceTree = ""; 105 | }; 106 | 698827C41C322425002363D5 /* Products */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 698827C31C322425002363D5 /* demo.app */, 110 | 698827DC1C322425002363D5 /* demoTests.xctest */, 111 | 698827E71C322425002363D5 /* demoUITests.xctest */, 112 | ); 113 | name = Products; 114 | sourceTree = ""; 115 | }; 116 | 698827C51C322425002363D5 /* demo */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 698827F91C322459002363D5 /* HYBUnicodeReadable */, 120 | 698827C91C322425002363D5 /* AppDelegate.h */, 121 | 698827CA1C322425002363D5 /* AppDelegate.m */, 122 | 698827CC1C322425002363D5 /* ViewController.h */, 123 | 698827CD1C322425002363D5 /* ViewController.m */, 124 | 698827CF1C322425002363D5 /* Main.storyboard */, 125 | 698827D21C322425002363D5 /* Assets.xcassets */, 126 | 698827D41C322425002363D5 /* LaunchScreen.storyboard */, 127 | 698827D71C322425002363D5 /* Info.plist */, 128 | 698827C61C322425002363D5 /* Supporting Files */, 129 | ); 130 | path = demo; 131 | sourceTree = ""; 132 | }; 133 | 698827C61C322425002363D5 /* Supporting Files */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 698827C71C322425002363D5 /* main.m */, 137 | ); 138 | name = "Supporting Files"; 139 | sourceTree = ""; 140 | }; 141 | 698827DF1C322425002363D5 /* demoTests */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | 698827E01C322425002363D5 /* demoTests.m */, 145 | 698827E21C322425002363D5 /* Info.plist */, 146 | ); 147 | path = demoTests; 148 | sourceTree = ""; 149 | }; 150 | 698827EA1C322425002363D5 /* demoUITests */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 698827EB1C322425002363D5 /* demoUITests.m */, 154 | 698827ED1C322425002363D5 /* Info.plist */, 155 | ); 156 | path = demoUITests; 157 | sourceTree = ""; 158 | }; 159 | 698827F91C322459002363D5 /* HYBUnicodeReadable */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 698827FA1C32246A002363D5 /* NSSet+HYBUnicodeReadable.h */, 163 | 698827FB1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m */, 164 | 698827FF1C322479002363D5 /* NSArray+HYBUnicodeReadable.h */, 165 | 698828001C322479002363D5 /* NSArray+HYBUnicodeReadable.m */, 166 | 698828041C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.h */, 167 | 698828051C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m */, 168 | ); 169 | name = HYBUnicodeReadable; 170 | path = ../../HYBUnicodeReadable; 171 | sourceTree = ""; 172 | }; 173 | /* End PBXGroup section */ 174 | 175 | /* Begin PBXNativeTarget section */ 176 | 698827C21C322425002363D5 /* demo */ = { 177 | isa = PBXNativeTarget; 178 | buildConfigurationList = 698827F01C322425002363D5 /* Build configuration list for PBXNativeTarget "demo" */; 179 | buildPhases = ( 180 | 698827BF1C322425002363D5 /* Sources */, 181 | 698827C01C322425002363D5 /* Frameworks */, 182 | 698827C11C322425002363D5 /* Resources */, 183 | ); 184 | buildRules = ( 185 | ); 186 | dependencies = ( 187 | ); 188 | name = demo; 189 | productName = demo; 190 | productReference = 698827C31C322425002363D5 /* demo.app */; 191 | productType = "com.apple.product-type.application"; 192 | }; 193 | 698827DB1C322425002363D5 /* demoTests */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = 698827F31C322425002363D5 /* Build configuration list for PBXNativeTarget "demoTests" */; 196 | buildPhases = ( 197 | 698827D81C322425002363D5 /* Sources */, 198 | 698827D91C322425002363D5 /* Frameworks */, 199 | 698827DA1C322425002363D5 /* Resources */, 200 | ); 201 | buildRules = ( 202 | ); 203 | dependencies = ( 204 | 698827DE1C322425002363D5 /* PBXTargetDependency */, 205 | ); 206 | name = demoTests; 207 | productName = demoTests; 208 | productReference = 698827DC1C322425002363D5 /* demoTests.xctest */; 209 | productType = "com.apple.product-type.bundle.unit-test"; 210 | }; 211 | 698827E61C322425002363D5 /* demoUITests */ = { 212 | isa = PBXNativeTarget; 213 | buildConfigurationList = 698827F61C322425002363D5 /* Build configuration list for PBXNativeTarget "demoUITests" */; 214 | buildPhases = ( 215 | 698827E31C322425002363D5 /* Sources */, 216 | 698827E41C322425002363D5 /* Frameworks */, 217 | 698827E51C322425002363D5 /* Resources */, 218 | ); 219 | buildRules = ( 220 | ); 221 | dependencies = ( 222 | 698827E91C322425002363D5 /* PBXTargetDependency */, 223 | ); 224 | name = demoUITests; 225 | productName = demoUITests; 226 | productReference = 698827E71C322425002363D5 /* demoUITests.xctest */; 227 | productType = "com.apple.product-type.bundle.ui-testing"; 228 | }; 229 | /* End PBXNativeTarget section */ 230 | 231 | /* Begin PBXProject section */ 232 | 698827BB1C322425002363D5 /* Project object */ = { 233 | isa = PBXProject; 234 | attributes = { 235 | LastUpgradeCheck = 0720; 236 | ORGANIZATIONNAME = huangyibiao; 237 | TargetAttributes = { 238 | 698827C21C322425002363D5 = { 239 | CreatedOnToolsVersion = 7.2; 240 | }; 241 | 698827DB1C322425002363D5 = { 242 | CreatedOnToolsVersion = 7.2; 243 | TestTargetID = 698827C21C322425002363D5; 244 | }; 245 | 698827E61C322425002363D5 = { 246 | CreatedOnToolsVersion = 7.2; 247 | TestTargetID = 698827C21C322425002363D5; 248 | }; 249 | }; 250 | }; 251 | buildConfigurationList = 698827BE1C322425002363D5 /* Build configuration list for PBXProject "demo" */; 252 | compatibilityVersion = "Xcode 3.2"; 253 | developmentRegion = English; 254 | hasScannedForEncodings = 0; 255 | knownRegions = ( 256 | en, 257 | Base, 258 | ); 259 | mainGroup = 698827BA1C322425002363D5; 260 | productRefGroup = 698827C41C322425002363D5 /* Products */; 261 | projectDirPath = ""; 262 | projectRoot = ""; 263 | targets = ( 264 | 698827C21C322425002363D5 /* demo */, 265 | 698827DB1C322425002363D5 /* demoTests */, 266 | 698827E61C322425002363D5 /* demoUITests */, 267 | ); 268 | }; 269 | /* End PBXProject section */ 270 | 271 | /* Begin PBXResourcesBuildPhase section */ 272 | 698827C11C322425002363D5 /* Resources */ = { 273 | isa = PBXResourcesBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | 698827D61C322425002363D5 /* LaunchScreen.storyboard in Resources */, 277 | 698827D31C322425002363D5 /* Assets.xcassets in Resources */, 278 | 698827D11C322425002363D5 /* Main.storyboard in Resources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | 698827DA1C322425002363D5 /* Resources */ = { 283 | isa = PBXResourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | 698827E51C322425002363D5 /* Resources */ = { 290 | isa = PBXResourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | /* End PBXResourcesBuildPhase section */ 297 | 298 | /* Begin PBXSourcesBuildPhase section */ 299 | 698827BF1C322425002363D5 /* Sources */ = { 300 | isa = PBXSourcesBuildPhase; 301 | buildActionMask = 2147483647; 302 | files = ( 303 | 698827CE1C322425002363D5 /* ViewController.m in Sources */, 304 | 698827CB1C322425002363D5 /* AppDelegate.m in Sources */, 305 | 698827C81C322425002363D5 /* main.m in Sources */, 306 | 698828011C322479002363D5 /* NSArray+HYBUnicodeReadable.m in Sources */, 307 | 698828061C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m in Sources */, 308 | 698827FC1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m in Sources */, 309 | ); 310 | runOnlyForDeploymentPostprocessing = 0; 311 | }; 312 | 698827D81C322425002363D5 /* Sources */ = { 313 | isa = PBXSourcesBuildPhase; 314 | buildActionMask = 2147483647; 315 | files = ( 316 | 698828071C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m in Sources */, 317 | 698827E11C322425002363D5 /* demoTests.m in Sources */, 318 | 698828021C322479002363D5 /* NSArray+HYBUnicodeReadable.m in Sources */, 319 | 698827FD1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m in Sources */, 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | }; 323 | 698827E31C322425002363D5 /* Sources */ = { 324 | isa = PBXSourcesBuildPhase; 325 | buildActionMask = 2147483647; 326 | files = ( 327 | 698828081C32248D002363D5 /* NSDictionary+HYBUnicodeReadable.m in Sources */, 328 | 698827EC1C322425002363D5 /* demoUITests.m in Sources */, 329 | 698828031C322479002363D5 /* NSArray+HYBUnicodeReadable.m in Sources */, 330 | 698827FE1C32246A002363D5 /* NSSet+HYBUnicodeReadable.m in Sources */, 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | }; 334 | /* End PBXSourcesBuildPhase section */ 335 | 336 | /* Begin PBXTargetDependency section */ 337 | 698827DE1C322425002363D5 /* PBXTargetDependency */ = { 338 | isa = PBXTargetDependency; 339 | target = 698827C21C322425002363D5 /* demo */; 340 | targetProxy = 698827DD1C322425002363D5 /* PBXContainerItemProxy */; 341 | }; 342 | 698827E91C322425002363D5 /* PBXTargetDependency */ = { 343 | isa = PBXTargetDependency; 344 | target = 698827C21C322425002363D5 /* demo */; 345 | targetProxy = 698827E81C322425002363D5 /* PBXContainerItemProxy */; 346 | }; 347 | /* End PBXTargetDependency section */ 348 | 349 | /* Begin PBXVariantGroup section */ 350 | 698827CF1C322425002363D5 /* Main.storyboard */ = { 351 | isa = PBXVariantGroup; 352 | children = ( 353 | 698827D01C322425002363D5 /* Base */, 354 | ); 355 | name = Main.storyboard; 356 | sourceTree = ""; 357 | }; 358 | 698827D41C322425002363D5 /* LaunchScreen.storyboard */ = { 359 | isa = PBXVariantGroup; 360 | children = ( 361 | 698827D51C322425002363D5 /* Base */, 362 | ); 363 | name = LaunchScreen.storyboard; 364 | sourceTree = ""; 365 | }; 366 | /* End PBXVariantGroup section */ 367 | 368 | /* Begin XCBuildConfiguration section */ 369 | 698827EE1C322425002363D5 /* Debug */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ALWAYS_SEARCH_USER_PATHS = NO; 373 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 374 | CLANG_CXX_LIBRARY = "libc++"; 375 | CLANG_ENABLE_MODULES = YES; 376 | CLANG_ENABLE_OBJC_ARC = YES; 377 | CLANG_WARN_BOOL_CONVERSION = YES; 378 | CLANG_WARN_CONSTANT_CONVERSION = YES; 379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 380 | CLANG_WARN_EMPTY_BODY = YES; 381 | CLANG_WARN_ENUM_CONVERSION = YES; 382 | CLANG_WARN_INT_CONVERSION = YES; 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 384 | CLANG_WARN_UNREACHABLE_CODE = YES; 385 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 386 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 387 | COPY_PHASE_STRIP = NO; 388 | DEBUG_INFORMATION_FORMAT = dwarf; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | ENABLE_TESTABILITY = YES; 391 | GCC_C_LANGUAGE_STANDARD = gnu99; 392 | GCC_DYNAMIC_NO_PIC = NO; 393 | GCC_NO_COMMON_BLOCKS = YES; 394 | GCC_OPTIMIZATION_LEVEL = 0; 395 | GCC_PREPROCESSOR_DEFINITIONS = ( 396 | "DEBUG=1", 397 | "$(inherited)", 398 | ); 399 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 400 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 401 | GCC_WARN_UNDECLARED_SELECTOR = YES; 402 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 403 | GCC_WARN_UNUSED_FUNCTION = YES; 404 | GCC_WARN_UNUSED_VARIABLE = YES; 405 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 406 | MTL_ENABLE_DEBUG_INFO = YES; 407 | ONLY_ACTIVE_ARCH = YES; 408 | SDKROOT = iphoneos; 409 | }; 410 | name = Debug; 411 | }; 412 | 698827EF1C322425002363D5 /* Release */ = { 413 | isa = XCBuildConfiguration; 414 | buildSettings = { 415 | ALWAYS_SEARCH_USER_PATHS = NO; 416 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 417 | CLANG_CXX_LIBRARY = "libc++"; 418 | CLANG_ENABLE_MODULES = YES; 419 | CLANG_ENABLE_OBJC_ARC = YES; 420 | CLANG_WARN_BOOL_CONVERSION = YES; 421 | CLANG_WARN_CONSTANT_CONVERSION = YES; 422 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 423 | CLANG_WARN_EMPTY_BODY = YES; 424 | CLANG_WARN_ENUM_CONVERSION = YES; 425 | CLANG_WARN_INT_CONVERSION = YES; 426 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 427 | CLANG_WARN_UNREACHABLE_CODE = YES; 428 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 429 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 430 | COPY_PHASE_STRIP = NO; 431 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 432 | ENABLE_NS_ASSERTIONS = NO; 433 | ENABLE_STRICT_OBJC_MSGSEND = YES; 434 | GCC_C_LANGUAGE_STANDARD = gnu99; 435 | GCC_NO_COMMON_BLOCKS = YES; 436 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 437 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 438 | GCC_WARN_UNDECLARED_SELECTOR = YES; 439 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 440 | GCC_WARN_UNUSED_FUNCTION = YES; 441 | GCC_WARN_UNUSED_VARIABLE = YES; 442 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 443 | MTL_ENABLE_DEBUG_INFO = NO; 444 | SDKROOT = iphoneos; 445 | VALIDATE_PRODUCT = YES; 446 | }; 447 | name = Release; 448 | }; 449 | 698827F11C322425002363D5 /* Debug */ = { 450 | isa = XCBuildConfiguration; 451 | buildSettings = { 452 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 453 | INFOPLIST_FILE = demo/Info.plist; 454 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 455 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.demo; 456 | PRODUCT_NAME = "$(TARGET_NAME)"; 457 | }; 458 | name = Debug; 459 | }; 460 | 698827F21C322425002363D5 /* Release */ = { 461 | isa = XCBuildConfiguration; 462 | buildSettings = { 463 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 464 | INFOPLIST_FILE = demo/Info.plist; 465 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 466 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.demo; 467 | PRODUCT_NAME = "$(TARGET_NAME)"; 468 | }; 469 | name = Release; 470 | }; 471 | 698827F41C322425002363D5 /* Debug */ = { 472 | isa = XCBuildConfiguration; 473 | buildSettings = { 474 | BUNDLE_LOADER = "$(TEST_HOST)"; 475 | INFOPLIST_FILE = demoTests/Info.plist; 476 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 477 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.demoTests; 478 | PRODUCT_NAME = "$(TARGET_NAME)"; 479 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo.app/demo"; 480 | }; 481 | name = Debug; 482 | }; 483 | 698827F51C322425002363D5 /* Release */ = { 484 | isa = XCBuildConfiguration; 485 | buildSettings = { 486 | BUNDLE_LOADER = "$(TEST_HOST)"; 487 | INFOPLIST_FILE = demoTests/Info.plist; 488 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 489 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.demoTests; 490 | PRODUCT_NAME = "$(TARGET_NAME)"; 491 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo.app/demo"; 492 | }; 493 | name = Release; 494 | }; 495 | 698827F71C322425002363D5 /* Debug */ = { 496 | isa = XCBuildConfiguration; 497 | buildSettings = { 498 | INFOPLIST_FILE = demoUITests/Info.plist; 499 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 500 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.demoUITests; 501 | PRODUCT_NAME = "$(TARGET_NAME)"; 502 | TEST_TARGET_NAME = demo; 503 | USES_XCTRUNNER = YES; 504 | }; 505 | name = Debug; 506 | }; 507 | 698827F81C322425002363D5 /* Release */ = { 508 | isa = XCBuildConfiguration; 509 | buildSettings = { 510 | INFOPLIST_FILE = demoUITests/Info.plist; 511 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 512 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.demoUITests; 513 | PRODUCT_NAME = "$(TARGET_NAME)"; 514 | TEST_TARGET_NAME = demo; 515 | USES_XCTRUNNER = YES; 516 | }; 517 | name = Release; 518 | }; 519 | /* End XCBuildConfiguration section */ 520 | 521 | /* Begin XCConfigurationList section */ 522 | 698827BE1C322425002363D5 /* Build configuration list for PBXProject "demo" */ = { 523 | isa = XCConfigurationList; 524 | buildConfigurations = ( 525 | 698827EE1C322425002363D5 /* Debug */, 526 | 698827EF1C322425002363D5 /* Release */, 527 | ); 528 | defaultConfigurationIsVisible = 0; 529 | defaultConfigurationName = Release; 530 | }; 531 | 698827F01C322425002363D5 /* Build configuration list for PBXNativeTarget "demo" */ = { 532 | isa = XCConfigurationList; 533 | buildConfigurations = ( 534 | 698827F11C322425002363D5 /* Debug */, 535 | 698827F21C322425002363D5 /* Release */, 536 | ); 537 | defaultConfigurationIsVisible = 0; 538 | }; 539 | 698827F31C322425002363D5 /* Build configuration list for PBXNativeTarget "demoTests" */ = { 540 | isa = XCConfigurationList; 541 | buildConfigurations = ( 542 | 698827F41C322425002363D5 /* Debug */, 543 | 698827F51C322425002363D5 /* Release */, 544 | ); 545 | defaultConfigurationIsVisible = 0; 546 | }; 547 | 698827F61C322425002363D5 /* Build configuration list for PBXNativeTarget "demoUITests" */ = { 548 | isa = XCConfigurationList; 549 | buildConfigurations = ( 550 | 698827F71C322425002363D5 /* Debug */, 551 | 698827F81C322425002363D5 /* Release */, 552 | ); 553 | defaultConfigurationIsVisible = 0; 554 | }; 555 | /* End XCConfigurationList section */ 556 | }; 557 | rootObject = 698827BB1C322425002363D5 /* Project object */; 558 | } 559 | -------------------------------------------------------------------------------- /demo/demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/demo.xcodeproj/project.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/524429264/HYBUnicodeReadable/9fff70139aaa7860ffc0045bdc9296ed4f0cbdbf/demo/demo.xcodeproj/project.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /demo/demo.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /demo/demo.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/demo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /demo/demo.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | demo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 698827C21C322425002363D5 16 | 17 | primary 18 | 19 | 20 | 698827DB1C322425002363D5 21 | 22 | primary 23 | 24 | 25 | 698827E61C322425002363D5 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /demo/demo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /demo/demo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /demo/demo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /demo/demo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /demo/demo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /demo/demo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /demo/demo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /demo/demo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view, typically from a nib. 20 | 21 | NSString *str = @"我是转换成data格式的字符串"; 22 | NSData *dataString = [NSData dataWithBytes:str.UTF8String length:str.length]; 23 | NSDictionary *dataSet = @{@"key": @"字典转成data", 24 | @"key1": @"在set、数组、字典中嵌套"}; 25 | NSData *dataSetItem = [NSJSONSerialization dataWithJSONObject:dataSet 26 | options:NSJSONWritingPrettyPrinted 27 | error:nil]; 28 | 29 | NSMutableSet *set = [NSMutableSet setWithArray:@[@"可变集合", 30 | @"字典->不可变集合->可变集合", 31 | dataSetItem]]; 32 | NSDictionary *dict = @{@"name" : @"标哥的技术博客", 33 | @"title" : @"http://www.henishuo.com", 34 | @"count" : @(11), 35 | @"dataString" : dataString, 36 | @"results" : [NSSet setWithObjects:@"集合值1", @"集合值2", set , nil], 37 | @"summaries" : @[@"sm1", 38 | @"sm2", 39 | @{@"keysm": @{@"stkey": @"字典->数组->字典->字典"}}, 40 | dataSetItem], 41 | @"parameters" : @{@"key1" : @"value1", 42 | @"key2": @{@"key11" : @"value11", 43 | @"key12" : @[@"三层", @"字典->字典->数组"]}, 44 | @"key13": dataSetItem}, 45 | @"hasBug": @[@"YES",@"NO"], 46 | @"contact" : @[@"关注博客地址:http://www.henishuo.com", 47 | @"QQ群: 324400294", 48 | @"关注微博:标哥Jacky", 49 | @"关注GITHUB:CoderJackyHuang"]}; 50 | NSLog(@"%@", dict); 51 | } 52 | 53 | - (void)didReceiveMemoryWarning { 54 | [super didReceiveMemoryWarning]; 55 | // Dispose of any resources that can be recreated. 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /demo/demo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // demo 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/demoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /demo/demoTests/demoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // demoTests.m 3 | // demoTests 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface demoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation demoTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /demo/demoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /demo/demoUITests/demoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // demoUITests.m 3 | // demoUITests 4 | // 5 | // Created by huangyibiao on 15/12/29. 6 | // Copyright © 2015年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface demoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation demoUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/524429264/HYBUnicodeReadable/9fff70139aaa7860ffc0045bdc9296ed4f0cbdbf/screenshot.gif --------------------------------------------------------------------------------