├── README.md
├── DownloadFontOnline.xcodeproj
├── xcuserdata
│ └── ad-ios.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── DownloadFontOnline.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── ad-ios.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── DownloadFontOnline.xccheckout
└── project.pbxproj
├── DownloadFontOnline
├── ViewController.h
├── AppDelegate.h
├── main.m
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── ViewController.m
├── Info.plist
├── FontManager.h
├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.xib
├── AppDelegate.m
└── FontManager.m
└── DownloadFontOnlineTests
├── Info.plist
└── DownloadFontOnlineTests.m
/README.md:
--------------------------------------------------------------------------------
1 | # 在线下载字体
2 |
3 | 使用时请先阅读头文件中的说明,否则可能下载不成功。
4 |
--------------------------------------------------------------------------------
/DownloadFontOnline.xcodeproj/xcuserdata/ad-ios.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/DownloadFontOnline.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DownloadFontOnline.xcodeproj/project.xcworkspace/xcuserdata/ad-ios.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cgwangding/DownloadFontOnline/HEAD/DownloadFontOnline.xcodeproj/project.xcworkspace/xcuserdata/ad-ios.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DownloadFontOnline/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DownloadFontOnline
4 | //
5 | // Created by AD-iOS on 15/7/31.
6 | // Copyright (c) 2015年 Adinnet. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/DownloadFontOnline/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DownloadFontOnline
4 | //
5 | // Created by AD-iOS on 15/7/31.
6 | // Copyright (c) 2015年 Adinnet. 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 |
--------------------------------------------------------------------------------
/DownloadFontOnline/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DownloadFontOnline
4 | //
5 | // Created by AD-iOS on 15/7/31.
6 | // Copyright (c) 2015年 Adinnet. 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 |
--------------------------------------------------------------------------------
/DownloadFontOnline.xcodeproj/xcuserdata/ad-ios.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DownloadFontOnline.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DCC998B71B6B5174000C2F79
16 |
17 | primary
18 |
19 |
20 | DCC998D01B6B5174000C2F79
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DownloadFontOnline/Images.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 | }
--------------------------------------------------------------------------------
/DownloadFontOnlineTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.wddev.$(PRODUCT_NAME:rfc1034identifier)
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 |
--------------------------------------------------------------------------------
/DownloadFontOnlineTests/DownloadFontOnlineTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // DownloadFontOnlineTests.m
3 | // DownloadFontOnlineTests
4 | //
5 | // Created by AD-iOS on 15/7/31.
6 | // Copyright (c) 2015年 Adinnet. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface DownloadFontOnlineTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation DownloadFontOnlineTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/DownloadFontOnline/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // DownloadFontOnline
4 | //
5 | // Created by AD-iOS on 15/7/31.
6 | // Copyright (c) 2015年 Adinnet. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "FontManager.h"
11 |
12 | @interface ViewController ()
13 | {
14 |
15 | UILabel *label;
16 |
17 | }
18 | @end
19 |
20 | @implementation ViewController
21 |
22 | - (void)viewDidLoad {
23 | [super viewDidLoad];
24 | // Do any additional setup after loading the view, typically from a nib.
25 | label = [[UILabel alloc]initWithFrame:CGRectMake(0, 100, 320, 40)];
26 | label.textAlignment = NSTextAlignmentCenter;
27 | label.text = @"字体测试 字体测试 字体测试字体测试 字体测试";
28 | label.font = [UIFont fontWithName:@"STXingkai-SC-Light" size:20];
29 | [self.view addSubview:label];
30 | [[FontManager sharedManager]downloadFontWithPostScriptName:@"STXingkai-SC-Light" fontSize:20 complete:^(UIFont *font) {
31 |
32 | label.font = font;
33 |
34 |
35 | } failure:^(NSError *error) {
36 |
37 | }];
38 |
39 | }
40 |
41 | - (void)didReceiveMemoryWarning {
42 | [super didReceiveMemoryWarning];
43 | // Dispose of any resources that can be recreated.
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/DownloadFontOnline/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.wddev.$(PRODUCT_NAME:rfc1034identifier)
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 |
--------------------------------------------------------------------------------
/DownloadFontOnline/FontManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // FontManager.h
3 | // DownloadFontOnline
4 | //
5 | // Created by AD-iOS on 15/7/31.
6 | // Copyright (c) 2015年 Adinnet. All rights reserved.
7 | //
8 |
9 | /**
10 | * ReadMe>>>>>>>>>>>看这看这>>>>>>>>>>>>>>>>>>>>>>:
11 | * 由于下载的时候需要使用字体的PostScript名称。
12 | * PostScript名称可以Mac 系统自带的 字体册 功能中查找。
13 | * LaunchPad->其他->字体册->选中需要的字体->command + i
14 | * 在字体册右边即可找到PostScript名称。
15 | */
16 |
17 | #import
18 |
19 | #import
20 |
21 | @interface FontManager : NSObject
22 |
23 | + (instancetype)sharedManager;
24 |
25 | /**
26 | * 动态检测下载对应的PostScriptName的字体,必须是苹果支持的才行
27 | *
28 | * @param fontName 字体的PostScriptName
29 | * @param fontSize 字体大小
30 | * @param complete 完成时的回调
31 | * @param failure 失败时回调
32 | */
33 | - (void)downloadFontWithPostScriptName:(NSString*)fontName fontSize:(CGFloat)fontSize complete:(void (^)(UIFont *font))complete failure:(void (^)(NSError *error))failure;
34 |
35 | /**
36 | * 动态检测下载对应的PostScriptName的字体,必须是苹果支持的才行
37 | *
38 | * @param fontName 字体的PostScriptName
39 | * @param fontSize 字体大小
40 | * @param progress 下载进度
41 | * @param complete 完成时的回调
42 | * @param failure 失败时回调
43 | */
44 | - (void)downloadFontWithPostScriptName:(NSString*)fontName fontSize:(CGFloat)fontSize progress:(void (^)(CGFloat progress))progress complete:(void (^)(UIFont *font))complete failure:(void (^)(NSError *error))failure;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/DownloadFontOnline/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 |
--------------------------------------------------------------------------------
/DownloadFontOnline.xcodeproj/project.xcworkspace/xcshareddata/DownloadFontOnline.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 56898D55-2463-4797-94C1-B23A94250ED0
9 | IDESourceControlProjectName
10 | DownloadFontOnline
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | A434F5AA1A4BBD54F745B033B797F1D1A7B7C743
14 | https://github.com/cgwangding/DownloadFontOnline.git
15 |
16 | IDESourceControlProjectPath
17 | DownloadFontOnline.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | A434F5AA1A4BBD54F745B033B797F1D1A7B7C743
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/cgwangding/DownloadFontOnline.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | A434F5AA1A4BBD54F745B033B797F1D1A7B7C743
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | A434F5AA1A4BBD54F745B033B797F1D1A7B7C743
36 | IDESourceControlWCCName
37 | DownloadFontOnline
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/DownloadFontOnline/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // DownloadFontOnline
4 | //
5 | // Created by AD-iOS on 15/7/31.
6 | // Copyright (c) 2015年 Adinnet. 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 |
--------------------------------------------------------------------------------
/DownloadFontOnline/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/DownloadFontOnline.xcodeproj/xcuserdata/ad-ios.xcuserdatad/xcschemes/DownloadFontOnline.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/DownloadFontOnline/FontManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // FontManager.m
3 | // DownloadFontOnline
4 | //
5 | // Created by AD-iOS on 15/7/31.
6 | // Copyright (c) 2015年 Adinnet. All rights reserved.
7 | //
8 |
9 | #import "FontManager.h"
10 | #import
11 |
12 | @implementation FontManager
13 |
14 | + (instancetype)sharedManager
15 | {
16 | static FontManager *manager = nil;
17 | static dispatch_once_t onceToken;
18 | dispatch_once(&onceToken, ^{
19 | manager = [[FontManager alloc]init];
20 | });
21 | return manager;
22 | }
23 |
24 |
25 | - (BOOL)isFontDownloaded:(NSString *)fontName
26 | {
27 | #warning 每次重新启动应用时,系统都会自动重新匹配字体,所以,就算下载过该字体,应用启动时该方法仍会返回NO
28 | UIFont *aFont = [UIFont fontWithName:fontName size:12.0];
29 | if (aFont && ([aFont.fontName compare:fontName] == NSOrderedSame || [aFont.familyName compare:fontName] == NSOrderedSame)) {
30 | return YES;
31 | }
32 | return NO;
33 | }
34 |
35 |
36 | - (void)downloadFontWithPostScriptName:(NSString*)fontName fontSize:(CGFloat)fontSize complete:(void (^)(UIFont *font))complete failure:(void (^)(NSError *error))failure
37 | {
38 | [self downloadFontWithPostScriptName:fontName fontSize:fontSize progress:nil complete:complete failure:failure];
39 | }
40 |
41 | - (void)downloadFontWithPostScriptName:(NSString*)fontName fontSize:(CGFloat)fontSize progress:(void (^)(CGFloat progress))progress complete:(void (^)(UIFont *font))complete failure:(void (^)(NSError *error))failure
42 | {
43 | if ([self isFontDownloaded:fontName]) {
44 | NSLog(@"字体已下载");
45 | dispatch_async(dispatch_get_main_queue(), ^{
46 | UIFont *font = [UIFont fontWithName:fontName size:fontSize];
47 | complete(font);
48 | });
49 | return;
50 | }
51 |
52 | // 用字体的PostScript名字创建一个Dictionary
53 | NSMutableDictionary *attrs = [NSMutableDictionary dictionaryWithObjectsAndKeys:fontName,kCTFontNameAttribute, nil];
54 | // 创建一个字体描述对象CTFontDescriptorRef
55 | CTFontDescriptorRef desc = CTFontDescriptorCreateWithAttributes((__bridge CFDictionaryRef)attrs);
56 | // 将字体描述对象放到一个NSMutableArray中
57 | NSMutableArray *descs = [NSMutableArray array];
58 | [descs addObject:(__bridge id)desc];
59 | CFRelease(desc);
60 |
61 | __block BOOL errorDuringDownload = NO;
62 |
63 | CTFontDescriptorMatchFontDescriptorsWithProgressHandler((__bridge CFArrayRef)descs, NULL, ^bool(CTFontDescriptorMatchingState state, CFDictionaryRef progressParameter) {
64 |
65 | CGFloat progressValue = [[(__bridge NSDictionary*)progressParameter objectForKey:(id)kCTFontDescriptorMatchingPercentage] floatValue];
66 |
67 | switch (state) {
68 | case kCTFontDescriptorMatchingDidBegin:
69 | NSLog(@"字体已经匹配");
70 | break;
71 | case kCTFontDescriptorMatchingDidFinish:
72 | if (!errorDuringDownload) {
73 | NSLog(@"字体%@ 下载完成",fontName);
74 | // NSLog(@"%@",(__bridge NSDictionary*)progressParameter);
75 | dispatch_async(dispatch_get_main_queue(), ^{
76 | //更新UI
77 | UIFont *font = [UIFont fontWithName:fontName size:fontSize];
78 | complete(font);
79 | });
80 | }
81 | break;
82 | case kCTFontDescriptorMatchingWillBeginDownloading:
83 | NSLog(@"字体开始下载");
84 | break;
85 | case kCTFontDescriptorMatchingDidFinishDownloading:
86 | {
87 | NSLog(@"字体下载完成");
88 | dispatch_async(dispatch_get_main_queue(), ^{
89 | //更新UI
90 | UIFont *font = [UIFont fontWithName:fontName size:fontSize];
91 | complete(font);
92 | });
93 | }
94 | break;
95 | case kCTFontDescriptorMatchingDownloading:
96 | {
97 | NSLog(@"下载进度 %.0f%%",progressValue);
98 | dispatch_async(dispatch_get_main_queue(), ^{
99 | if (progress) {
100 | progress(progressValue);
101 | }
102 | });
103 | }
104 | break;
105 | case kCTFontDescriptorMatchingDidFailWithError:
106 | {
107 | NSString *errorMessage = nil;
108 | NSError *error = [(__bridge NSDictionary *)progressParameter objectForKey:(id)kCTFontDescriptorMatchingError];
109 | if (error != nil) {
110 | errorMessage = [error description];
111 | } else {
112 | errorMessage = @"ERROR MESSAGE IS NOT AVAILABLE!";
113 | }
114 | // 设置标志
115 | errorDuringDownload = YES;
116 | NSLog(@"下载错误: %@", errorMessage);
117 | dispatch_async(dispatch_get_main_queue(), ^{
118 | if (failure) {
119 | failure(error);
120 | }
121 | });
122 |
123 | }
124 | break;
125 | default:
126 | break;
127 | }
128 |
129 | return @YES;
130 | });
131 | }
132 |
133 | @end
134 |
--------------------------------------------------------------------------------
/DownloadFontOnline.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | DCC998BE1B6B5174000C2F79 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DCC998BD1B6B5174000C2F79 /* main.m */; };
11 | DCC998C11B6B5174000C2F79 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DCC998C01B6B5174000C2F79 /* AppDelegate.m */; };
12 | DCC998C41B6B5174000C2F79 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DCC998C31B6B5174000C2F79 /* ViewController.m */; };
13 | DCC998C71B6B5174000C2F79 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DCC998C51B6B5174000C2F79 /* Main.storyboard */; };
14 | DCC998C91B6B5174000C2F79 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DCC998C81B6B5174000C2F79 /* Images.xcassets */; };
15 | DCC998CC1B6B5174000C2F79 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = DCC998CA1B6B5174000C2F79 /* LaunchScreen.xib */; };
16 | DCC998D81B6B5174000C2F79 /* DownloadFontOnlineTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DCC998D71B6B5174000C2F79 /* DownloadFontOnlineTests.m */; };
17 | DCC998E31B6B5592000C2F79 /* FontManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DCC998E21B6B5592000C2F79 /* FontManager.m */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | DCC998D21B6B5174000C2F79 /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = DCC998B01B6B5174000C2F79 /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = DCC998B71B6B5174000C2F79;
26 | remoteInfo = DownloadFontOnline;
27 | };
28 | /* End PBXContainerItemProxy section */
29 |
30 | /* Begin PBXFileReference section */
31 | DCC998B81B6B5174000C2F79 /* DownloadFontOnline.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DownloadFontOnline.app; sourceTree = BUILT_PRODUCTS_DIR; };
32 | DCC998BC1B6B5174000C2F79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
33 | DCC998BD1B6B5174000C2F79 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
34 | DCC998BF1B6B5174000C2F79 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
35 | DCC998C01B6B5174000C2F79 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
36 | DCC998C21B6B5174000C2F79 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
37 | DCC998C31B6B5174000C2F79 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
38 | DCC998C61B6B5174000C2F79 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
39 | DCC998C81B6B5174000C2F79 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
40 | DCC998CB1B6B5174000C2F79 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
41 | DCC998D11B6B5174000C2F79 /* DownloadFontOnlineTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DownloadFontOnlineTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
42 | DCC998D61B6B5174000C2F79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
43 | DCC998D71B6B5174000C2F79 /* DownloadFontOnlineTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DownloadFontOnlineTests.m; sourceTree = ""; };
44 | DCC998E11B6B5592000C2F79 /* FontManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontManager.h; sourceTree = ""; };
45 | DCC998E21B6B5592000C2F79 /* FontManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FontManager.m; sourceTree = ""; };
46 | /* End PBXFileReference section */
47 |
48 | /* Begin PBXFrameworksBuildPhase section */
49 | DCC998B51B6B5174000C2F79 /* Frameworks */ = {
50 | isa = PBXFrameworksBuildPhase;
51 | buildActionMask = 2147483647;
52 | files = (
53 | );
54 | runOnlyForDeploymentPostprocessing = 0;
55 | };
56 | DCC998CE1B6B5174000C2F79 /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | );
61 | runOnlyForDeploymentPostprocessing = 0;
62 | };
63 | /* End PBXFrameworksBuildPhase section */
64 |
65 | /* Begin PBXGroup section */
66 | DCC998AF1B6B5174000C2F79 = {
67 | isa = PBXGroup;
68 | children = (
69 | DCC998BA1B6B5174000C2F79 /* DownloadFontOnline */,
70 | DCC998D41B6B5174000C2F79 /* DownloadFontOnlineTests */,
71 | DCC998B91B6B5174000C2F79 /* Products */,
72 | );
73 | sourceTree = "";
74 | };
75 | DCC998B91B6B5174000C2F79 /* Products */ = {
76 | isa = PBXGroup;
77 | children = (
78 | DCC998B81B6B5174000C2F79 /* DownloadFontOnline.app */,
79 | DCC998D11B6B5174000C2F79 /* DownloadFontOnlineTests.xctest */,
80 | );
81 | name = Products;
82 | sourceTree = "";
83 | };
84 | DCC998BA1B6B5174000C2F79 /* DownloadFontOnline */ = {
85 | isa = PBXGroup;
86 | children = (
87 | DCC998E11B6B5592000C2F79 /* FontManager.h */,
88 | DCC998E21B6B5592000C2F79 /* FontManager.m */,
89 | DCC998BF1B6B5174000C2F79 /* AppDelegate.h */,
90 | DCC998C01B6B5174000C2F79 /* AppDelegate.m */,
91 | DCC998C21B6B5174000C2F79 /* ViewController.h */,
92 | DCC998C31B6B5174000C2F79 /* ViewController.m */,
93 | DCC998C51B6B5174000C2F79 /* Main.storyboard */,
94 | DCC998C81B6B5174000C2F79 /* Images.xcassets */,
95 | DCC998CA1B6B5174000C2F79 /* LaunchScreen.xib */,
96 | DCC998BB1B6B5174000C2F79 /* Supporting Files */,
97 | );
98 | path = DownloadFontOnline;
99 | sourceTree = "";
100 | };
101 | DCC998BB1B6B5174000C2F79 /* Supporting Files */ = {
102 | isa = PBXGroup;
103 | children = (
104 | DCC998BC1B6B5174000C2F79 /* Info.plist */,
105 | DCC998BD1B6B5174000C2F79 /* main.m */,
106 | );
107 | name = "Supporting Files";
108 | sourceTree = "";
109 | };
110 | DCC998D41B6B5174000C2F79 /* DownloadFontOnlineTests */ = {
111 | isa = PBXGroup;
112 | children = (
113 | DCC998D71B6B5174000C2F79 /* DownloadFontOnlineTests.m */,
114 | DCC998D51B6B5174000C2F79 /* Supporting Files */,
115 | );
116 | path = DownloadFontOnlineTests;
117 | sourceTree = "";
118 | };
119 | DCC998D51B6B5174000C2F79 /* Supporting Files */ = {
120 | isa = PBXGroup;
121 | children = (
122 | DCC998D61B6B5174000C2F79 /* Info.plist */,
123 | );
124 | name = "Supporting Files";
125 | sourceTree = "";
126 | };
127 | /* End PBXGroup section */
128 |
129 | /* Begin PBXNativeTarget section */
130 | DCC998B71B6B5174000C2F79 /* DownloadFontOnline */ = {
131 | isa = PBXNativeTarget;
132 | buildConfigurationList = DCC998DB1B6B5174000C2F79 /* Build configuration list for PBXNativeTarget "DownloadFontOnline" */;
133 | buildPhases = (
134 | DCC998B41B6B5174000C2F79 /* Sources */,
135 | DCC998B51B6B5174000C2F79 /* Frameworks */,
136 | DCC998B61B6B5174000C2F79 /* Resources */,
137 | );
138 | buildRules = (
139 | );
140 | dependencies = (
141 | );
142 | name = DownloadFontOnline;
143 | productName = DownloadFontOnline;
144 | productReference = DCC998B81B6B5174000C2F79 /* DownloadFontOnline.app */;
145 | productType = "com.apple.product-type.application";
146 | };
147 | DCC998D01B6B5174000C2F79 /* DownloadFontOnlineTests */ = {
148 | isa = PBXNativeTarget;
149 | buildConfigurationList = DCC998DE1B6B5174000C2F79 /* Build configuration list for PBXNativeTarget "DownloadFontOnlineTests" */;
150 | buildPhases = (
151 | DCC998CD1B6B5174000C2F79 /* Sources */,
152 | DCC998CE1B6B5174000C2F79 /* Frameworks */,
153 | DCC998CF1B6B5174000C2F79 /* Resources */,
154 | );
155 | buildRules = (
156 | );
157 | dependencies = (
158 | DCC998D31B6B5174000C2F79 /* PBXTargetDependency */,
159 | );
160 | name = DownloadFontOnlineTests;
161 | productName = DownloadFontOnlineTests;
162 | productReference = DCC998D11B6B5174000C2F79 /* DownloadFontOnlineTests.xctest */;
163 | productType = "com.apple.product-type.bundle.unit-test";
164 | };
165 | /* End PBXNativeTarget section */
166 |
167 | /* Begin PBXProject section */
168 | DCC998B01B6B5174000C2F79 /* Project object */ = {
169 | isa = PBXProject;
170 | attributes = {
171 | LastUpgradeCheck = 0640;
172 | ORGANIZATIONNAME = Adinnet;
173 | TargetAttributes = {
174 | DCC998B71B6B5174000C2F79 = {
175 | CreatedOnToolsVersion = 6.4;
176 | };
177 | DCC998D01B6B5174000C2F79 = {
178 | CreatedOnToolsVersion = 6.4;
179 | TestTargetID = DCC998B71B6B5174000C2F79;
180 | };
181 | };
182 | };
183 | buildConfigurationList = DCC998B31B6B5174000C2F79 /* Build configuration list for PBXProject "DownloadFontOnline" */;
184 | compatibilityVersion = "Xcode 3.2";
185 | developmentRegion = English;
186 | hasScannedForEncodings = 0;
187 | knownRegions = (
188 | en,
189 | Base,
190 | );
191 | mainGroup = DCC998AF1B6B5174000C2F79;
192 | productRefGroup = DCC998B91B6B5174000C2F79 /* Products */;
193 | projectDirPath = "";
194 | projectRoot = "";
195 | targets = (
196 | DCC998B71B6B5174000C2F79 /* DownloadFontOnline */,
197 | DCC998D01B6B5174000C2F79 /* DownloadFontOnlineTests */,
198 | );
199 | };
200 | /* End PBXProject section */
201 |
202 | /* Begin PBXResourcesBuildPhase section */
203 | DCC998B61B6B5174000C2F79 /* Resources */ = {
204 | isa = PBXResourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | DCC998C71B6B5174000C2F79 /* Main.storyboard in Resources */,
208 | DCC998CC1B6B5174000C2F79 /* LaunchScreen.xib in Resources */,
209 | DCC998C91B6B5174000C2F79 /* Images.xcassets in Resources */,
210 | );
211 | runOnlyForDeploymentPostprocessing = 0;
212 | };
213 | DCC998CF1B6B5174000C2F79 /* Resources */ = {
214 | isa = PBXResourcesBuildPhase;
215 | buildActionMask = 2147483647;
216 | files = (
217 | );
218 | runOnlyForDeploymentPostprocessing = 0;
219 | };
220 | /* End PBXResourcesBuildPhase section */
221 |
222 | /* Begin PBXSourcesBuildPhase section */
223 | DCC998B41B6B5174000C2F79 /* Sources */ = {
224 | isa = PBXSourcesBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | DCC998C41B6B5174000C2F79 /* ViewController.m in Sources */,
228 | DCC998C11B6B5174000C2F79 /* AppDelegate.m in Sources */,
229 | DCC998E31B6B5592000C2F79 /* FontManager.m in Sources */,
230 | DCC998BE1B6B5174000C2F79 /* main.m in Sources */,
231 | );
232 | runOnlyForDeploymentPostprocessing = 0;
233 | };
234 | DCC998CD1B6B5174000C2F79 /* Sources */ = {
235 | isa = PBXSourcesBuildPhase;
236 | buildActionMask = 2147483647;
237 | files = (
238 | DCC998D81B6B5174000C2F79 /* DownloadFontOnlineTests.m in Sources */,
239 | );
240 | runOnlyForDeploymentPostprocessing = 0;
241 | };
242 | /* End PBXSourcesBuildPhase section */
243 |
244 | /* Begin PBXTargetDependency section */
245 | DCC998D31B6B5174000C2F79 /* PBXTargetDependency */ = {
246 | isa = PBXTargetDependency;
247 | target = DCC998B71B6B5174000C2F79 /* DownloadFontOnline */;
248 | targetProxy = DCC998D21B6B5174000C2F79 /* PBXContainerItemProxy */;
249 | };
250 | /* End PBXTargetDependency section */
251 |
252 | /* Begin PBXVariantGroup section */
253 | DCC998C51B6B5174000C2F79 /* Main.storyboard */ = {
254 | isa = PBXVariantGroup;
255 | children = (
256 | DCC998C61B6B5174000C2F79 /* Base */,
257 | );
258 | name = Main.storyboard;
259 | sourceTree = "";
260 | };
261 | DCC998CA1B6B5174000C2F79 /* LaunchScreen.xib */ = {
262 | isa = PBXVariantGroup;
263 | children = (
264 | DCC998CB1B6B5174000C2F79 /* Base */,
265 | );
266 | name = LaunchScreen.xib;
267 | sourceTree = "";
268 | };
269 | /* End PBXVariantGroup section */
270 |
271 | /* Begin XCBuildConfiguration section */
272 | DCC998D91B6B5174000C2F79 /* Debug */ = {
273 | isa = XCBuildConfiguration;
274 | buildSettings = {
275 | ALWAYS_SEARCH_USER_PATHS = NO;
276 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
277 | CLANG_CXX_LIBRARY = "libc++";
278 | CLANG_ENABLE_MODULES = YES;
279 | CLANG_ENABLE_OBJC_ARC = YES;
280 | CLANG_WARN_BOOL_CONVERSION = YES;
281 | CLANG_WARN_CONSTANT_CONVERSION = YES;
282 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
283 | CLANG_WARN_EMPTY_BODY = YES;
284 | CLANG_WARN_ENUM_CONVERSION = YES;
285 | CLANG_WARN_INT_CONVERSION = YES;
286 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
287 | CLANG_WARN_UNREACHABLE_CODE = YES;
288 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
289 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
290 | COPY_PHASE_STRIP = NO;
291 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
292 | ENABLE_STRICT_OBJC_MSGSEND = YES;
293 | GCC_C_LANGUAGE_STANDARD = gnu99;
294 | GCC_DYNAMIC_NO_PIC = NO;
295 | GCC_NO_COMMON_BLOCKS = YES;
296 | GCC_OPTIMIZATION_LEVEL = 0;
297 | GCC_PREPROCESSOR_DEFINITIONS = (
298 | "DEBUG=1",
299 | "$(inherited)",
300 | );
301 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
302 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
303 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
304 | GCC_WARN_UNDECLARED_SELECTOR = YES;
305 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
306 | GCC_WARN_UNUSED_FUNCTION = YES;
307 | GCC_WARN_UNUSED_VARIABLE = YES;
308 | IPHONEOS_DEPLOYMENT_TARGET = 8.4;
309 | MTL_ENABLE_DEBUG_INFO = YES;
310 | ONLY_ACTIVE_ARCH = YES;
311 | SDKROOT = iphoneos;
312 | };
313 | name = Debug;
314 | };
315 | DCC998DA1B6B5174000C2F79 /* Release */ = {
316 | isa = XCBuildConfiguration;
317 | buildSettings = {
318 | ALWAYS_SEARCH_USER_PATHS = NO;
319 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
320 | CLANG_CXX_LIBRARY = "libc++";
321 | CLANG_ENABLE_MODULES = YES;
322 | CLANG_ENABLE_OBJC_ARC = YES;
323 | CLANG_WARN_BOOL_CONVERSION = YES;
324 | CLANG_WARN_CONSTANT_CONVERSION = YES;
325 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
326 | CLANG_WARN_EMPTY_BODY = YES;
327 | CLANG_WARN_ENUM_CONVERSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
330 | CLANG_WARN_UNREACHABLE_CODE = YES;
331 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
332 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
333 | COPY_PHASE_STRIP = NO;
334 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
335 | ENABLE_NS_ASSERTIONS = NO;
336 | ENABLE_STRICT_OBJC_MSGSEND = YES;
337 | GCC_C_LANGUAGE_STANDARD = gnu99;
338 | GCC_NO_COMMON_BLOCKS = YES;
339 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
340 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
341 | GCC_WARN_UNDECLARED_SELECTOR = YES;
342 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
343 | GCC_WARN_UNUSED_FUNCTION = YES;
344 | GCC_WARN_UNUSED_VARIABLE = YES;
345 | IPHONEOS_DEPLOYMENT_TARGET = 8.4;
346 | MTL_ENABLE_DEBUG_INFO = NO;
347 | SDKROOT = iphoneos;
348 | VALIDATE_PRODUCT = YES;
349 | };
350 | name = Release;
351 | };
352 | DCC998DC1B6B5174000C2F79 /* Debug */ = {
353 | isa = XCBuildConfiguration;
354 | buildSettings = {
355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
356 | INFOPLIST_FILE = DownloadFontOnline/Info.plist;
357 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
358 | PRODUCT_NAME = "$(TARGET_NAME)";
359 | };
360 | name = Debug;
361 | };
362 | DCC998DD1B6B5174000C2F79 /* Release */ = {
363 | isa = XCBuildConfiguration;
364 | buildSettings = {
365 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
366 | INFOPLIST_FILE = DownloadFontOnline/Info.plist;
367 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
368 | PRODUCT_NAME = "$(TARGET_NAME)";
369 | };
370 | name = Release;
371 | };
372 | DCC998DF1B6B5174000C2F79 /* Debug */ = {
373 | isa = XCBuildConfiguration;
374 | buildSettings = {
375 | BUNDLE_LOADER = "$(TEST_HOST)";
376 | FRAMEWORK_SEARCH_PATHS = (
377 | "$(SDKROOT)/Developer/Library/Frameworks",
378 | "$(inherited)",
379 | );
380 | GCC_PREPROCESSOR_DEFINITIONS = (
381 | "DEBUG=1",
382 | "$(inherited)",
383 | );
384 | INFOPLIST_FILE = DownloadFontOnlineTests/Info.plist;
385 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
386 | PRODUCT_NAME = "$(TARGET_NAME)";
387 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DownloadFontOnline.app/DownloadFontOnline";
388 | };
389 | name = Debug;
390 | };
391 | DCC998E01B6B5174000C2F79 /* Release */ = {
392 | isa = XCBuildConfiguration;
393 | buildSettings = {
394 | BUNDLE_LOADER = "$(TEST_HOST)";
395 | FRAMEWORK_SEARCH_PATHS = (
396 | "$(SDKROOT)/Developer/Library/Frameworks",
397 | "$(inherited)",
398 | );
399 | INFOPLIST_FILE = DownloadFontOnlineTests/Info.plist;
400 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
401 | PRODUCT_NAME = "$(TARGET_NAME)";
402 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DownloadFontOnline.app/DownloadFontOnline";
403 | };
404 | name = Release;
405 | };
406 | /* End XCBuildConfiguration section */
407 |
408 | /* Begin XCConfigurationList section */
409 | DCC998B31B6B5174000C2F79 /* Build configuration list for PBXProject "DownloadFontOnline" */ = {
410 | isa = XCConfigurationList;
411 | buildConfigurations = (
412 | DCC998D91B6B5174000C2F79 /* Debug */,
413 | DCC998DA1B6B5174000C2F79 /* Release */,
414 | );
415 | defaultConfigurationIsVisible = 0;
416 | defaultConfigurationName = Release;
417 | };
418 | DCC998DB1B6B5174000C2F79 /* Build configuration list for PBXNativeTarget "DownloadFontOnline" */ = {
419 | isa = XCConfigurationList;
420 | buildConfigurations = (
421 | DCC998DC1B6B5174000C2F79 /* Debug */,
422 | DCC998DD1B6B5174000C2F79 /* Release */,
423 | );
424 | defaultConfigurationIsVisible = 0;
425 | };
426 | DCC998DE1B6B5174000C2F79 /* Build configuration list for PBXNativeTarget "DownloadFontOnlineTests" */ = {
427 | isa = XCConfigurationList;
428 | buildConfigurations = (
429 | DCC998DF1B6B5174000C2F79 /* Debug */,
430 | DCC998E01B6B5174000C2F79 /* Release */,
431 | );
432 | defaultConfigurationIsVisible = 0;
433 | };
434 | /* End XCConfigurationList section */
435 | };
436 | rootObject = DCC998B01B6B5174000C2F79 /* Project object */;
437 | }
438 |
--------------------------------------------------------------------------------