Commit 9c9b204aaa9fd69cf0a12113e071a08484c20757

Authored by zhangxiaowen
1 parent 2c2ac483

no message

Showing 185 changed files with 1640 additions and 2 deletions
CNLivePreloadResources.podspec 0 → 100644
  1 +#
  2 +# Be sure to run `pod lib lint CNLivePreloadResources.podspec' to ensure this is a
  3 +# valid spec before submitting.
  4 +#
  5 +# Any lines starting with a # are optional, but their use is encouraged
  6 +# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
  7 +#
  8 +
  9 +Pod::Spec.new do |s|
  10 + s.name = 'CNLivePreloadResources'
  11 + s.version = '0.0.1'
  12 + s.summary = 'Preload Resources.'
  13 +
  14 +# This description is used to generate tags and improve search results.
  15 +# * Think: What does it do? Why did you write it? What is the focus?
  16 +# * Try to keep it short, snappy and to the point.
  17 +# * Write the description between the DESC delimiters below.
  18 +# * Finally, don't worry about the indent, CocoaPods strips it!
  19 +
  20 + s.description = <<-DESC
  21 +TODO: Add long description of the pod here.
  22 + DESC
  23 +
  24 + s.homepage = 'http://bj.gitlab.cnlive.com/ios-team/CNLivePreloadResources'
  25 + # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  26 + s.license = { :type => 'MIT', :file => 'LICENSE' }
  27 + s.author = { '153993236@qq.com' => 'zhangxiaowen@cnlive.com' }
  28 + s.source = { :git => 'http://bj.gitlab.cnlive.com/ios-team/CNLivePreloadResources.git', :tag => s.version.to_s }
  29 + # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
  30 +
  31 + s.ios.deployment_target = '9.0'
  32 +
  33 + s.source_files = 'CNLivePreloadResources/Classes/**/*'
  34 + s.resource_bundles = {
  35 + 'CNLivePreloadResources' => ['CNLivePreloadResources/Assets/CNLivePreloadResources.bundle']
  36 + }
  37 + # s.resource_bundles = {
  38 + # 'CNLivePreloadResources' => ['CNLivePreloadResources/Assets/*.png']
  39 + # }
  40 +
  41 + # s.public_header_files = 'Pod/Classes/**/*.h'
  42 + # s.frameworks = 'UIKit', 'MapKit'
  43 + # s.dependency 'AFNetworking', '~> 2.3'
  44 +end
... ...
CNLivePreloadResources/Assets/.gitkeep 0 → 100644
CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load0.png 0 → 100644

2.12 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load1.png 0 → 100644

2.19 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load10.png 0 → 100644

2.3 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load11.png 0 → 100644

2.32 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load12.png 0 → 100644

2.28 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load13.png 0 → 100644

2.25 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load14.png 0 → 100644

2.23 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load15.png 0 → 100644

2.17 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load16.png 0 → 100644

2.17 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load17.png 0 → 100644

2.12 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load18.png 0 → 100644

2.1 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load19.png 0 → 100644

2.1 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load2.png 0 → 100644

2.23 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load20.png 0 → 100644

2.11 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load21.png 0 → 100644

2.12 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load22.png 0 → 100644

2.11 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load23.png 0 → 100644

2.12 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load24.png 0 → 100644

2.12 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load25.png 0 → 100644

2.12 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load26.png 0 → 100644

2.12 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load27.png 0 → 100644

2.12 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load28.png 0 → 100644

2.12 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load29.png 0 → 100644

2.12 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load3.png 0 → 100644

2.26 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load4.png 0 → 100644

2.27 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load5.png 0 → 100644

2.31 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load6.png 0 → 100644

2.33 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load7.png 0 → 100644

2.35 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load8.png 0 → 100644

2.32 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/activity_load9.png 0 → 100644

2.29 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_0@2x.png 0 → 100755

8.13 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_100@2x.png 0 → 100755

8.45 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_101@2x.png 0 → 100755

8.59 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_102@2x.png 0 → 100755

8.62 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_103@2x.png 0 → 100755

7.69 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_104@2x.png 0 → 100755

7.6 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_105@2x.png 0 → 100755

8.49 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_106@2x.png 0 → 100755

7.71 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_107@2x.png 0 → 100755

8.35 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_108@2x.png 0 → 100755

8.31 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_109@2x.png 0 → 100755

7.83 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_10@2x.png 0 → 100755

8.35 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_110@2x.png 0 → 100755

8.51 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_111@2x.png 0 → 100755

5.86 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_112@2x.png 0 → 100755

7.07 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_113@2x.png 0 → 100755

8.3 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_114@2x.png 0 → 100755

8.32 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_115@2x.png 0 → 100755

8.81 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_116@2x.png 0 → 100755

8.8 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_117@2x.png 0 → 100755

8.58 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_118@2x.png 0 → 100755

8.61 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_119@2x.png 0 → 100755

8.87 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_11@2x.png 0 → 100755

8.23 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_120@2x.png 0 → 100755

8.19 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_121@2x.png 0 → 100755

9.02 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_122@2x.png 0 → 100755

8.3 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_123@2x.png 0 → 100755

8.96 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_124@2x.png 0 → 100755

6.24 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_125@2x.png 0 → 100755

6.24 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_126@2x.png 0 → 100755

5.37 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_12@2x.png 0 → 100755

8.75 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_13@2x.png 0 → 100755

7.89 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_14@2x.png 0 → 100755

8.6 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_15@2x.png 0 → 100755

7.71 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_16@2x.png 0 → 100755

7.46 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_17@2x.png 0 → 100755

8.37 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_18@2x.png 0 → 100755

8.16 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_19@2x.png 0 → 100755

8.27 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_1@2x.png 0 → 100755

8.53 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_20@2x.png 0 → 100755

7.92 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_21@2x.png 0 → 100755

8.32 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_22@2x.png 0 → 100755

7.9 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_23@2x.png 0 → 100755

8.63 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_24@2x.png 0 → 100755

8.42 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_25@2x.png 0 → 100755

8.53 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_26@2x.png 0 → 100755

8.64 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_27@2x.png 0 → 100755

7.75 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_28@2x.png 0 → 100755

8.17 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_29@2x.png 0 → 100755

7.03 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_2@2x.png 0 → 100755

8.15 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_30@2x.png 0 → 100755

8.4 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_31@2x.png 0 → 100755

8.72 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_32@2x.png 0 → 100755

8.46 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_33@2x.png 0 → 100755

8.61 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_34@2x.png 0 → 100755

8.86 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_35@2x.png 0 → 100755

8.31 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_36@2x.png 0 → 100755

7.32 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_37@2x.png 0 → 100755

6.79 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_38@2x.png 0 → 100755

8.94 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_39@2x.png 0 → 100755

7.98 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_3@2x.png 0 → 100755

8.3 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_40@2x.png 0 → 100755

8.44 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_41@2x.png 0 → 100755

8.49 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_42@2x.png 0 → 100755

8.3 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_43@2x.png 0 → 100755

8.31 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_44@2x.png 0 → 100755

8.11 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_45@2x.png 0 → 100755

8.02 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_46@2x.png 0 → 100755

8.06 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_47@2x.png 0 → 100755

7.8 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_48@2x.png 0 → 100755

8.13 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_49@2x.png 0 → 100755

7.73 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_4@2x.png 0 → 100755

8.64 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_50@2x.png 0 → 100755

8.42 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_51@2x.png 0 → 100755

7.99 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_52@2x.png 0 → 100755

8.03 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_53@2x.png 0 → 100755

8.63 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_54@2x.png 0 → 100755

8.41 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_55@2x.png 0 → 100755

6.77 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_56@2x.png 0 → 100755

7.27 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_57@2x.png 0 → 100755

7.37 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_58@2x.png 0 → 100755

7.07 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_59@2x.png 0 → 100755

7.17 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_5@2x.png 0 → 100755

8.28 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_60@2x.png 0 → 100755

7.15 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_61@2x.png 0 → 100755

7.76 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_62@2x.png 0 → 100755

7.58 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_63@2x.png 0 → 100755

6.84 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_64@2x.png 0 → 100755

6.43 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_65@2x.png 0 → 100755

6.13 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_66@2x.png 0 → 100755

6.41 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_67@2x.png 0 → 100755

6.99 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_68@2x.png 0 → 100755

7.82 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_69@2x.png 0 → 100755

5.71 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_6@2x.png 0 → 100755

7.76 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_70@2x.png 0 → 100755

6.45 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_71@2x.png 0 → 100755

6.32 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_72@2x.png 0 → 100755

7.65 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_73@2x.png 0 → 100755

7.71 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_74@2x.png 0 → 100755

6.75 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_75@2x.png 0 → 100755

7.88 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_76@2x.png 0 → 100755

8.3 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_77@2x.png 0 → 100755

7.2 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_78@2x.png 0 → 100644

4.37 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_79@2x.png 0 → 100755

6.55 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_7@2x.png 0 → 100755

8.69 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_80@2x.png 0 → 100755

6.59 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_81@2x.png 0 → 100755

7.81 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_82@2x.png 0 → 100755

7.78 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_83@2x.png 0 → 100755

7.35 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_84@2x.png 0 → 100755

7.05 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_85@2x.png 0 → 100755

7.51 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_86@2x.png 0 → 100755

6.88 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_87@2x.png 0 → 100755

7.25 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_88@2x.png 0 → 100755

6.8 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_89@2x.png 0 → 100755

7.88 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_8@2x.png 0 → 100755

8.23 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_90@2x.png 0 → 100755

8.26 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_91@2x.png 0 → 100755

8.52 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_92@2x.png 0 → 100755

7.86 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_93@2x.png 0 → 100755

8.82 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_94@2x.png 0 → 100755

8.66 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_95@2x.png 0 → 100755

7.58 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_96@2x.png 0 → 100755

8.17 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_97@2x.png 0 → 100755

7.32 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_98@2x.png 0 → 100755

7.05 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_99@2x.png 0 → 100755

8.14 KB

CNLivePreloadResources/Assets/CNLivePreloadResources.bundle/smiley_9@2x.png 0 → 100755

8.58 KB

CNLivePreloadResources/Classes/.gitkeep 0 → 100644
CNLivePreloadResources/Classes/CNLivePreloadManager.h 0 → 100644
  1 +//
  2 +// CNLivePreloadManager.h
  3 +// CNLivePrefetchManager_Example
  4 +//
  5 +// Created by CNLive-zxw on 2019/8/2.
  6 +// Copyright © 2019 153993236@qq.com. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import "CNLivePreloadModel.h"
  11 +
  12 +NS_ASSUME_NONNULL_BEGIN
  13 +
  14 +@interface CNLivePreloadManager : NSObject
  15 +
  16 +#pragma mark - 针对具体业务
  17 +/**
  18 +* 预加载全部资源
  19 +* 在 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; 方法中调用
  20 +*/
  21 ++ (void)preloadAllResources;
  22 +
  23 +
  24 +/**
  25 + * 预加载
  26 + */
  27 ++ (CNLivePreloadModel *)preloadModelForType:(CNLivePreloadType)type;
  28 ++ (NSArray<UIImage *> *)preloadImagesForType:(CNLivePreloadType)type;
  29 +
  30 +
  31 +/**
  32 + * 预加载刷新图片
  33 + */
  34 ++ (CNLivePreloadModel *)preloadModelForRefreshImage;
  35 ++ (NSArray<UIImage *> *)preloadImagesForRefreshImage;
  36 +
  37 +
  38 +/**
  39 + * 预加载Gif表情封面
  40 + */
  41 ++ (CNLivePreloadModel *)preloadModelForGifCover;
  42 ++ (NSArray<UIImage *> *)preloadImagesForGifCover;
  43 +
  44 +
  45 +/**
  46 + * 预加载Emotion表情
  47 + */
  48 ++ (CNLivePreloadModel *)preloadModelForEmotion;
  49 ++ (NSArray<UIImage *> *)preloadImagesForEmotion;
  50 +
  51 +
  52 +@end
  53 +
  54 +NS_ASSUME_NONNULL_END
... ...
CNLivePreloadResources/Classes/CNLivePreloadManager.m 0 → 100644
  1 +//
  2 +// XWPrefetchManager.m
  3 +// XWPrefetchManager_Example
  4 +//
  5 +// Created by CNLive-zxw on 2019/8/2.
  6 +// Copyright © 2019 153993236@qq.com. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLivePreloadManager.h"
  10 +
  11 +NSString *const AppEmotionString = @"0-[微笑];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-[憨笑];29-[大兵];30-[奋斗];31-[咒骂];32-[疑问];33-[嘘];34-[晕];35-[折磨];36-[衰];37-[骷髅];38-[敲打];39-[再见];40-[擦汗];41-[抠鼻];42-[鼓掌];43-[糗大了];44-[坏笑];45-[左哼哼];46-[右哼哼];47-[哈欠];48-[鄙视];49-[委屈];50-[快哭了];51-[阴险];52-[亲亲];53-[吓];54-[可怜];55-[菜刀];56-[西瓜];57-[啤酒];58-[篮球];59-[乒乓];60-[咖啡];61-[饭];62-[猪头];63-[玫瑰];64-[凋谢];65-[示爱];66-[爱心];67-[心碎];68-[蛋糕];69-[闪电];70-[炸弹];71-[刀];72-[足球];73-[瓢虫];74-[便便];75-[月亮];76-[太阳];77-[礼物];78-[拥抱];79-[强];80-[弱];81-[握手];82-[胜利];83-[抱拳];84-[勾引];85-[拳头];86-[差劲];87-[爱你];88-[NO];89-[OK];90-[爱情];91-[飞吻];92-[跳跳];93-[发抖];94-[怄火];95-[转圈];96-[磕头];97-[回头];98-[跳绳];99-[挥手];100-[激动];101-[街舞];102-[献吻];103-[左太极];104-[右太极];105-[嘿哈];106-[捂脸];107-[奸笑];108-[机智];109-[皱眉];110-[耶];111-[红包];112-[鸡];113-[生病];114-[震惊];115-[金钱];116-[懵圈];117-[大眼];118-[保密];119-[宝宝];120-[装死];121-[666];122-[笑哭];123-[热];124-[比心];125-[送口红];126-[矿泉水]";
  12 +
  13 +static NSMutableDictionary *resources;
  14 +
  15 +@implementation CNLivePreloadManager
  16 +
  17 +/**
  18 + * 预加载全部资源
  19 + */
  20 ++ (void)preloadAllResources{
  21 + __weak typeof(self) weakSelf = self;
  22 + dispatch_async(dispatch_get_global_queue(0, 0), ^{
  23 + __strong typeof(weakSelf) strongSelf = weakSelf;
  24 + // 刷新图片
  25 + [strongSelf preloadModelForRefreshImage];
  26 + // Gif封面
  27 + [strongSelf preloadModelForGifCover];
  28 + // Emotion表情
  29 + [strongSelf preloadModelForEmotion];
  30 +
  31 + });
  32 +}
  33 +
  34 +/**
  35 + * 预加载
  36 + */
  37 ++ (CNLivePreloadModel *)preloadModelForType:(CNLivePreloadType)type{
  38 + switch (type) {
  39 + case CNLivePreloadRefreshImage://刷新图片
  40 + {
  41 + [self preloadModelForRefreshImage];
  42 + }
  43 + break;
  44 +
  45 + case CNLivePreloadGifCover://Gif封面图片
  46 + {
  47 + [self preloadModelForGifCover];
  48 + }
  49 + break;
  50 +
  51 + case CNLivePreloadEmotion://Emotion表情
  52 + {
  53 + [self preloadModelForEmotion];
  54 + }
  55 + break;
  56 +
  57 + }
  58 + return nil;
  59 +
  60 +}
  61 ++ (NSArray<UIImage *> *)preloadImagesForType:(CNLivePreloadType)type{
  62 + switch (type) {
  63 + case CNLivePreloadRefreshImage://刷新图片
  64 + {
  65 + [self preloadImagesForRefreshImage];
  66 + }
  67 + break;
  68 +
  69 + case CNLivePreloadGifCover://Gif封面图片
  70 + {
  71 + [self preloadImagesForGifCover];
  72 + }
  73 + break;
  74 +
  75 + case CNLivePreloadEmotion://Emotion表情
  76 + {
  77 + [self preloadImagesForEmotion];
  78 + }
  79 + break;
  80 +
  81 + }
  82 + return nil;
  83 +
  84 +}
  85 +
  86 +#pragma mark - 刷新图片
  87 +/**
  88 + * 预加载刷新图片
  89 + */
  90 ++ (CNLivePreloadModel *)preloadModelForRefreshImage {
  91 + NSMutableArray<NSString *> *names = [[NSMutableArray alloc] init];
  92 + for (int i = 0; i < 30; i++) {
  93 + [names addObject:[NSString stringWithFormat:@"activity_load%d",i]];
  94 +
  95 + }
  96 + CNLivePreloadModel *model = [CNLivePreloadManager preloadModelForPreloadId:@"RefreshImage" type:CNLiveResourceImage imageNames:names];
  97 + return model;
  98 +
  99 +}
  100 ++ (NSArray<UIImage *> *)preloadImagesForRefreshImage{
  101 + CNLivePreloadModel *model = [CNLivePreloadManager preloadModelForRefreshImage];
  102 + return model.images;
  103 +
  104 +}
  105 +
  106 +#pragma mark - Gif封面
  107 +/**
  108 + * 预加载Gif封面
  109 + */
  110 ++ (CNLivePreloadModel *)preloadModelForGifCover{
  111 + NSMutableArray<NSString *> *names = [[NSMutableArray alloc] init];
  112 + for (int i = 0; i < 30; i++) {
  113 + [names addObject:[NSString stringWithFormat:@"activity_load%d",i]];
  114 +
  115 + }
  116 + CNLivePreloadModel *model = [CNLivePreloadManager preloadModelForPreloadId:@"GifCover" type:CNLiveResourceImage imageNames:names];
  117 + return model;
  118 +
  119 +}
  120 ++ (NSArray<UIImage *> *)preloadImagesForGifCover{
  121 + CNLivePreloadModel *model = [CNLivePreloadManager preloadModelForGifCover];
  122 + return model.images;
  123 +
  124 +}
  125 +
  126 +#pragma mark - Emotion
  127 +/**
  128 + * 预加载Emotion表情
  129 + */
  130 ++ (CNLivePreloadModel *)preloadModelForEmotion {
  131 + //本地Emotion的名字
  132 + NSArray<NSString *> *array = [AppEmotionString componentsSeparatedByString:@";"];
  133 + NSMutableArray<NSString *> *names = [[NSMutableArray alloc] init];
  134 + for (NSString *str in array) {
  135 + NSArray<NSString *> *item = [str componentsSeparatedByString:@"-"];
  136 + [names addObject:[NSString stringWithFormat:@"smiley_%@", item.firstObject]];
  137 + }
  138 + CNLivePreloadModel *model = [CNLivePreloadManager preloadModelForPreloadId:@"Emotion" type:CNLiveResourceImage imageNames:names];
  139 + return model;
  140 +
  141 +}
  142 ++ (NSArray<UIImage *> *)preloadImagesForEmotion{
  143 + CNLivePreloadModel *model = [CNLivePreloadManager preloadModelForEmotion];
  144 + return model.images;
  145 +
  146 +}
  147 +
  148 +#pragma mark - 私有方法
  149 ++ (CNLivePreloadModel *)preloadModelForPreloadId:(NSString *)preloadId type:(CNLiveResourceType)type imageNames:(NSArray<NSString *> *)imageNames {
  150 + if (resources) {// resources存在
  151 + CNLivePreloadModel *model = resources[preloadId];
  152 + if(model){// model存在
  153 + if (!model.isLoadFailed) {//全部加载成功
  154 + return model;
  155 + }else{
  156 + if(!model.isLoading) {
  157 + [self asyncLoadResources:model type:type];
  158 + }
  159 + return model;
  160 + }
  161 +
  162 + }
  163 + }
  164 +
  165 + CNLivePreloadModel *model = [[CNLivePreloadModel alloc]init];
  166 + model.isLoading = NO;
  167 + model.ID = preloadId;
  168 + NSMutableArray<CNLiveResourceModel *> *models = [[NSMutableArray alloc] init];
  169 +
  170 + for (int i = 0; i < imageNames.count; i++) {
  171 + CNLiveResourceModel *model = [[CNLiveResourceModel alloc]init];
  172 + model.name = imageNames[i];
  173 + model.type = CNLiveResourceGif;
  174 + [models addObject:model];
  175 + }
  176 + model.models = [NSArray arrayWithArray:models];
  177 + if(resources){
  178 + [resources setValue:model forKey:preloadId];
  179 +
  180 + }else{
  181 + resources = [NSMutableDictionary dictionaryWithObject:model forKey:preloadId];
  182 +
  183 + }
  184 +
  185 + [self asyncLoadResources:model type:type];
  186 +
  187 + return model;
  188 +}
  189 +
  190 +/**
  191 + * 在子线程预加载
  192 + *
  193 + * @param model 模型
  194 + * @param type 资源类型
  195 + *
  196 + */
  197 ++ (void)asyncLoadResources:(CNLivePreloadModel *)model type:(CNLiveResourceType)type{
  198 + model.isLoading = YES;
  199 + dispatch_async(dispatch_get_global_queue(0, 0), ^{
  200 + NSMutableArray<UIImage *> *images = [[NSMutableArray alloc] init];
  201 + for (CNLiveResourceModel *resourceModel in model.models) {
  202 + if (resourceModel.image == nil) {
  203 + UIImage *image = nil;
  204 + switch (type) {
  205 + case CNLiveResourceImage:
  206 + {
  207 + image = [CNLivePreloadManager cn_getImageName:resourceModel.name bundle:@"CNLivePreloadResources.bundle/CNLivePreloadResources" targetClass:[CNLivePreloadManager class]];
  208 + }
  209 + break;
  210 +
  211 + case CNLiveResourceGif:
  212 + {
  213 + image = [CNLivePreloadManager cn_getImageName:resourceModel.name bundle:@"CNLivePreloadResources.bundle/CNLivePreloadResources" targetClass:[CNLivePreloadManager class]];
  214 + }
  215 + break;
  216 +
  217 + }
  218 + if (image == nil) {
  219 + model.isLoadFailed = YES;
  220 + }
  221 + else{
  222 + resourceModel.image = image;
  223 + [images addObject:image];
  224 + model.isLoadFailed = NO;
  225 + }
  226 + }
  227 + }
  228 + model.images = [NSArray arrayWithArray:images];
  229 + model.isLoading = NO;
  230 + });
  231 +
  232 +}
  233 +
  234 +/**
  235 + * 创建图片
  236 + *
  237 + * @param imageName 图片名字
  238 + * @param bundlePath 图片所在的bundle名字
  239 + * @param targetClass 类和bundle的同级目录
  240 + * @return 返回UIImage
  241 + */
  242 ++ (UIImage *)cn_getImageName:(NSString *)imageName bundle:(NSString *)bundlePath targetClass:(Class)targetClass{
  243 + NSBundle *bundle = [NSBundle bundleForClass:targetClass];
  244 + NSURL *url = [bundle URLForResource:bundlePath withExtension:@"bundle"];
  245 + NSBundle *targetBundle = [NSBundle bundleWithURL:url];
  246 + UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil];
  247 + return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
  248 +
  249 +}
  250 +
  251 +@end
... ...
CNLivePreloadResources/Classes/CNLivePreloadModel.h 0 → 100644
  1 +//
  2 +// CNLivePreloadModel.h
  3 +// CNLivePreloadModel_Example
  4 +//
  5 +// Created by CNLive-zxw on 2019/8/2.
  6 +// Copyright © 2019 153993236@qq.com. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import <UIKit/UIKit.h>
  11 +
  12 +NS_ASSUME_NONNULL_BEGIN
  13 +//加载类型
  14 +typedef NS_ENUM(NSInteger, CNLivePreloadType) {
  15 + CNLivePreloadRefreshImage, // 动画图片
  16 + CNLivePreloadGifCover, // Gif封面
  17 + CNLivePreloadEmotion // Emotion
  18 +
  19 +};
  20 +
  21 +//资源类型
  22 +typedef NS_ENUM(NSInteger, CNLiveResourceType) {
  23 + CNLiveResourceImage, // 动画图片
  24 + CNLiveResourceGif // Gif
  25 +
  26 +};
  27 +
  28 +@interface CNLiveResourceModel : NSObject
  29 +// 标识
  30 +@property (nonatomic, copy) NSString *ID;
  31 +// 名字
  32 +@property (nonatomic, copy) NSString *name;
  33 +// 路径
  34 +@property (nonatomic, copy) NSString *path;
  35 +// 描述
  36 +@property (nonatomic, copy) NSString *desc;
  37 +// UIImage
  38 +@property (nonatomic, strong) UIImage *image;
  39 +// 类型
  40 +@property (nonatomic, assign) CNLiveResourceType type;
  41 +
  42 +@end
  43 +
  44 +@interface CNLivePreloadModel : NSObject
  45 +// 是否存在加载失败
  46 +@property (nonatomic, assign) BOOL isLoadFailed;
  47 +// 是否正在加载
  48 +@property (nonatomic, assign) BOOL isLoading;
  49 +// 标识
  50 +@property (nonatomic, copy) NSString *ID;
  51 +// UIImage
  52 +@property (nonatomic, strong) NSArray *images;
  53 +@property (nonatomic, strong) NSArray<CNLiveResourceModel *> *models;
  54 +
  55 +// 类型
  56 +@property (nonatomic, assign) CNLivePreloadType type;
  57 +
  58 +@end
  59 +
  60 +NS_ASSUME_NONNULL_END
... ...
CNLivePreloadResources/Classes/CNLivePreloadModel.m 0 → 100644
  1 +//
  2 +// CNLivePreloadModel.m
  3 +// CNLivePreloadModel_Example
  4 +//
  5 +// Created by CNLive-zxw on 2019/8/2.
  6 +// Copyright © 2019 153993236@qq.com. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLivePreloadModel.h"
  10 +
  11 +@implementation CNLivePreloadModel
  12 +
  13 +
  14 +
  15 +@end
  16 +
  17 +
  18 +@implementation CNLiveResourceModel
  19 +
  20 +
  21 +
  22 +@end
... ...
Example/CNLivePreloadResources.xcodeproj/project.pbxproj 0 → 100644
  1 +// !$*UTF8*$!
  2 +{
  3 + archiveVersion = 1;
  4 + classes = {
  5 + };
  6 + objectVersion = 46;
  7 + objects = {
  8 +
  9 +/* Begin PBXBuildFile section */
  10 + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
  11 + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
  12 + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
  13 + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; };
  14 + 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; };
  15 + 6003F59E195388D20070C39A /* CNLiveAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* CNLiveAppDelegate.m */; };
  16 + 6003F5A7195388D20070C39A /* CNLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* CNLiveViewController.m */; };
  17 + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; };
  18 + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; };
  19 + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
  20 + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
  21 + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
  22 + 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
  23 + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
  24 + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
  25 + ACD3D203672F64D4CD4DC051 /* Pods_CNLivePreloadResources_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44219DD640D786CE6C530143 /* Pods_CNLivePreloadResources_Tests.framework */; };
  26 + B1EE5A1020E366F4EF1E78B7 /* Pods_CNLivePreloadResources_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDD8D057B7FAB38C66198FA7 /* Pods_CNLivePreloadResources_Example.framework */; };
  27 +/* End PBXBuildFile section */
  28 +
  29 +/* Begin PBXContainerItemProxy section */
  30 + 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = {
  31 + isa = PBXContainerItemProxy;
  32 + containerPortal = 6003F582195388D10070C39A /* Project object */;
  33 + proxyType = 1;
  34 + remoteGlobalIDString = 6003F589195388D20070C39A;
  35 + remoteInfo = CNLivePreloadResources;
  36 + };
  37 +/* End PBXContainerItemProxy section */
  38 +
  39 +/* Begin PBXFileReference section */
  40 + 44219DD640D786CE6C530143 /* Pods_CNLivePreloadResources_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLivePreloadResources_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
  41 + 6003F58A195388D20070C39A /* CNLivePreloadResources_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLivePreloadResources_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
  42 + 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
  43 + 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
  44 + 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
  45 + 6003F595195388D20070C39A /* CNLivePreloadResources-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CNLivePreloadResources-Info.plist"; sourceTree = "<group>"; };
  46 + 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
  47 + 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
  48 + 6003F59B195388D20070C39A /* CNLivePreloadResources-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CNLivePreloadResources-Prefix.pch"; sourceTree = "<group>"; };
  49 + 6003F59C195388D20070C39A /* CNLiveAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveAppDelegate.h; sourceTree = "<group>"; };
  50 + 6003F59D195388D20070C39A /* CNLiveAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveAppDelegate.m; sourceTree = "<group>"; };
  51 + 6003F5A5195388D20070C39A /* CNLiveViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveViewController.h; sourceTree = "<group>"; };
  52 + 6003F5A6195388D20070C39A /* CNLiveViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveViewController.m; sourceTree = "<group>"; };
  53 + 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
  54 + 6003F5AE195388D20070C39A /* CNLivePreloadResources_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CNLivePreloadResources_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
  55 + 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
  56 + 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
  57 + 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
  58 + 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
  59 + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
  60 + 6D37428277024D723D94F5EC /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
  61 + 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
  62 + 7614F52749A67B562D6CF7DE /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
  63 + 86A7B2B7A2FD37F42B01F26B /* Pods-CNLivePreloadResources_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLivePreloadResources_Example.release.xcconfig"; path = "Target Support Files/Pods-CNLivePreloadResources_Example/Pods-CNLivePreloadResources_Example.release.xcconfig"; sourceTree = "<group>"; };
  64 + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
  65 + 9154F49F037C37485694A538 /* Pods-CNLivePreloadResources_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLivePreloadResources_Example.debug.xcconfig"; path = "Target Support Files/Pods-CNLivePreloadResources_Example/Pods-CNLivePreloadResources_Example.debug.xcconfig"; sourceTree = "<group>"; };
  66 + 972B4FC9804A7B3A98246C10 /* Pods-CNLivePreloadResources_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLivePreloadResources_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNLivePreloadResources_Tests/Pods-CNLivePreloadResources_Tests.release.xcconfig"; sourceTree = "<group>"; };
  67 + 9A46724DB8B91D741F72A0CF /* Pods-CNLivePreloadResources_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLivePreloadResources_Tests.debug.xcconfig"; path = "Target Support Files/Pods-CNLivePreloadResources_Tests/Pods-CNLivePreloadResources_Tests.debug.xcconfig"; sourceTree = "<group>"; };
  68 + CDD8D057B7FAB38C66198FA7 /* Pods_CNLivePreloadResources_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLivePreloadResources_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
  69 + D4A06B27D7BF10DA5C94E480 /* CNLivePreloadResources.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLivePreloadResources.podspec; path = ../CNLivePreloadResources.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
  70 +/* End PBXFileReference section */
  71 +
  72 +/* Begin PBXFrameworksBuildPhase section */
  73 + 6003F587195388D20070C39A /* Frameworks */ = {
  74 + isa = PBXFrameworksBuildPhase;
  75 + buildActionMask = 2147483647;
  76 + files = (
  77 + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
  78 + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
  79 + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
  80 + B1EE5A1020E366F4EF1E78B7 /* Pods_CNLivePreloadResources_Example.framework in Frameworks */,
  81 + );
  82 + runOnlyForDeploymentPostprocessing = 0;
  83 + };
  84 + 6003F5AB195388D20070C39A /* Frameworks */ = {
  85 + isa = PBXFrameworksBuildPhase;
  86 + buildActionMask = 2147483647;
  87 + files = (
  88 + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
  89 + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
  90 + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
  91 + ACD3D203672F64D4CD4DC051 /* Pods_CNLivePreloadResources_Tests.framework in Frameworks */,
  92 + );
  93 + runOnlyForDeploymentPostprocessing = 0;
  94 + };
  95 +/* End PBXFrameworksBuildPhase section */
  96 +
  97 +/* Begin PBXGroup section */
  98 + 39AC6190EABFBFB0A5CA7EA3 /* Pods */ = {
  99 + isa = PBXGroup;
  100 + children = (
  101 + 9154F49F037C37485694A538 /* Pods-CNLivePreloadResources_Example.debug.xcconfig */,
  102 + 86A7B2B7A2FD37F42B01F26B /* Pods-CNLivePreloadResources_Example.release.xcconfig */,
  103 + 9A46724DB8B91D741F72A0CF /* Pods-CNLivePreloadResources_Tests.debug.xcconfig */,
  104 + 972B4FC9804A7B3A98246C10 /* Pods-CNLivePreloadResources_Tests.release.xcconfig */,
  105 + );
  106 + path = Pods;
  107 + sourceTree = "<group>";
  108 + };
  109 + 6003F581195388D10070C39A = {
  110 + isa = PBXGroup;
  111 + children = (
  112 + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */,
  113 + 6003F593195388D20070C39A /* Example for CNLivePreloadResources */,
  114 + 6003F5B5195388D20070C39A /* Tests */,
  115 + 6003F58C195388D20070C39A /* Frameworks */,
  116 + 6003F58B195388D20070C39A /* Products */,
  117 + 39AC6190EABFBFB0A5CA7EA3 /* Pods */,
  118 + );
  119 + sourceTree = "<group>";
  120 + };
  121 + 6003F58B195388D20070C39A /* Products */ = {
  122 + isa = PBXGroup;
  123 + children = (
  124 + 6003F58A195388D20070C39A /* CNLivePreloadResources_Example.app */,
  125 + 6003F5AE195388D20070C39A /* CNLivePreloadResources_Tests.xctest */,
  126 + );
  127 + name = Products;
  128 + sourceTree = "<group>";
  129 + };
  130 + 6003F58C195388D20070C39A /* Frameworks */ = {
  131 + isa = PBXGroup;
  132 + children = (
  133 + 6003F58D195388D20070C39A /* Foundation.framework */,
  134 + 6003F58F195388D20070C39A /* CoreGraphics.framework */,
  135 + 6003F591195388D20070C39A /* UIKit.framework */,
  136 + 6003F5AF195388D20070C39A /* XCTest.framework */,
  137 + CDD8D057B7FAB38C66198FA7 /* Pods_CNLivePreloadResources_Example.framework */,
  138 + 44219DD640D786CE6C530143 /* Pods_CNLivePreloadResources_Tests.framework */,
  139 + );
  140 + name = Frameworks;
  141 + sourceTree = "<group>";
  142 + };
  143 + 6003F593195388D20070C39A /* Example for CNLivePreloadResources */ = {
  144 + isa = PBXGroup;
  145 + children = (
  146 + 6003F59C195388D20070C39A /* CNLiveAppDelegate.h */,
  147 + 6003F59D195388D20070C39A /* CNLiveAppDelegate.m */,
  148 + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */,
  149 + 6003F5A5195388D20070C39A /* CNLiveViewController.h */,
  150 + 6003F5A6195388D20070C39A /* CNLiveViewController.m */,
  151 + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */,
  152 + 6003F5A8195388D20070C39A /* Images.xcassets */,
  153 + 6003F594195388D20070C39A /* Supporting Files */,
  154 + );
  155 + name = "Example for CNLivePreloadResources";
  156 + path = CNLivePreloadResources;
  157 + sourceTree = "<group>";
  158 + };
  159 + 6003F594195388D20070C39A /* Supporting Files */ = {
  160 + isa = PBXGroup;
  161 + children = (
  162 + 6003F595195388D20070C39A /* CNLivePreloadResources-Info.plist */,
  163 + 6003F596195388D20070C39A /* InfoPlist.strings */,
  164 + 6003F599195388D20070C39A /* main.m */,
  165 + 6003F59B195388D20070C39A /* CNLivePreloadResources-Prefix.pch */,
  166 + );
  167 + name = "Supporting Files";
  168 + sourceTree = "<group>";
  169 + };
  170 + 6003F5B5195388D20070C39A /* Tests */ = {
  171 + isa = PBXGroup;
  172 + children = (
  173 + 6003F5BB195388D20070C39A /* Tests.m */,
  174 + 6003F5B6195388D20070C39A /* Supporting Files */,
  175 + );
  176 + path = Tests;
  177 + sourceTree = "<group>";
  178 + };
  179 + 6003F5B6195388D20070C39A /* Supporting Files */ = {
  180 + isa = PBXGroup;
  181 + children = (
  182 + 6003F5B7195388D20070C39A /* Tests-Info.plist */,
  183 + 6003F5B8195388D20070C39A /* InfoPlist.strings */,
  184 + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */,
  185 + );
  186 + name = "Supporting Files";
  187 + sourceTree = "<group>";
  188 + };
  189 + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = {
  190 + isa = PBXGroup;
  191 + children = (
  192 + D4A06B27D7BF10DA5C94E480 /* CNLivePreloadResources.podspec */,
  193 + 7614F52749A67B562D6CF7DE /* README.md */,
  194 + 6D37428277024D723D94F5EC /* LICENSE */,
  195 + );
  196 + name = "Podspec Metadata";
  197 + sourceTree = "<group>";
  198 + };
  199 +/* End PBXGroup section */
  200 +
  201 +/* Begin PBXNativeTarget section */
  202 + 6003F589195388D20070C39A /* CNLivePreloadResources_Example */ = {
  203 + isa = PBXNativeTarget;
  204 + buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLivePreloadResources_Example" */;
  205 + buildPhases = (
  206 + BB0F02E788A576F77311F460 /* [CP] Check Pods Manifest.lock */,
  207 + 6003F586195388D20070C39A /* Sources */,
  208 + 6003F587195388D20070C39A /* Frameworks */,
  209 + 6003F588195388D20070C39A /* Resources */,
  210 + 21A9417F549E54D5F8D1EAD1 /* [CP] Embed Pods Frameworks */,
  211 + );
  212 + buildRules = (
  213 + );
  214 + dependencies = (
  215 + );
  216 + name = CNLivePreloadResources_Example;
  217 + productName = CNLivePreloadResources;
  218 + productReference = 6003F58A195388D20070C39A /* CNLivePreloadResources_Example.app */;
  219 + productType = "com.apple.product-type.application";
  220 + };
  221 + 6003F5AD195388D20070C39A /* CNLivePreloadResources_Tests */ = {
  222 + isa = PBXNativeTarget;
  223 + buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLivePreloadResources_Tests" */;
  224 + buildPhases = (
  225 + A12378FE42B1165EFEE012D7 /* [CP] Check Pods Manifest.lock */,
  226 + 6003F5AA195388D20070C39A /* Sources */,
  227 + 6003F5AB195388D20070C39A /* Frameworks */,
  228 + 6003F5AC195388D20070C39A /* Resources */,
  229 + );
  230 + buildRules = (
  231 + );
  232 + dependencies = (
  233 + 6003F5B4195388D20070C39A /* PBXTargetDependency */,
  234 + );
  235 + name = CNLivePreloadResources_Tests;
  236 + productName = CNLivePreloadResourcesTests;
  237 + productReference = 6003F5AE195388D20070C39A /* CNLivePreloadResources_Tests.xctest */;
  238 + productType = "com.apple.product-type.bundle.unit-test";
  239 + };
  240 +/* End PBXNativeTarget section */
  241 +
  242 +/* Begin PBXProject section */
  243 + 6003F582195388D10070C39A /* Project object */ = {
  244 + isa = PBXProject;
  245 + attributes = {
  246 + CLASSPREFIX = CNLive;
  247 + LastUpgradeCheck = 0720;
  248 + ORGANIZATIONNAME = "153993236@qq.com";
  249 + TargetAttributes = {
  250 + 6003F5AD195388D20070C39A = {
  251 + TestTargetID = 6003F589195388D20070C39A;
  252 + };
  253 + };
  254 + };
  255 + buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLivePreloadResources" */;
  256 + compatibilityVersion = "Xcode 3.2";
  257 + developmentRegion = English;
  258 + hasScannedForEncodings = 0;
  259 + knownRegions = (
  260 + en,
  261 + Base,
  262 + );
  263 + mainGroup = 6003F581195388D10070C39A;
  264 + productRefGroup = 6003F58B195388D20070C39A /* Products */;
  265 + projectDirPath = "";
  266 + projectRoot = "";
  267 + targets = (
  268 + 6003F589195388D20070C39A /* CNLivePreloadResources_Example */,
  269 + 6003F5AD195388D20070C39A /* CNLivePreloadResources_Tests */,
  270 + );
  271 + };
  272 +/* End PBXProject section */
  273 +
  274 +/* Begin PBXResourcesBuildPhase section */
  275 + 6003F588195388D20070C39A /* Resources */ = {
  276 + isa = PBXResourcesBuildPhase;
  277 + buildActionMask = 2147483647;
  278 + files = (
  279 + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */,
  280 + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */,
  281 + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */,
  282 + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */,
  283 + );
  284 + runOnlyForDeploymentPostprocessing = 0;
  285 + };
  286 + 6003F5AC195388D20070C39A /* Resources */ = {
  287 + isa = PBXResourcesBuildPhase;
  288 + buildActionMask = 2147483647;
  289 + files = (
  290 + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */,
  291 + );
  292 + runOnlyForDeploymentPostprocessing = 0;
  293 + };
  294 +/* End PBXResourcesBuildPhase section */
  295 +
  296 +/* Begin PBXShellScriptBuildPhase section */
  297 + 21A9417F549E54D5F8D1EAD1 /* [CP] Embed Pods Frameworks */ = {
  298 + isa = PBXShellScriptBuildPhase;
  299 + buildActionMask = 2147483647;
  300 + files = (
  301 + );
  302 + inputFileListPaths = (
  303 + );
  304 + inputPaths = (
  305 + "${PODS_ROOT}/Target Support Files/Pods-CNLivePreloadResources_Example/Pods-CNLivePreloadResources_Example-frameworks.sh",
  306 + "${BUILT_PRODUCTS_DIR}/CNLivePreloadResources/CNLivePreloadResources.framework",
  307 + );
  308 + name = "[CP] Embed Pods Frameworks";
  309 + outputFileListPaths = (
  310 + );
  311 + outputPaths = (
  312 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLivePreloadResources.framework",
  313 + );
  314 + runOnlyForDeploymentPostprocessing = 0;
  315 + shellPath = /bin/sh;
  316 + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLivePreloadResources_Example/Pods-CNLivePreloadResources_Example-frameworks.sh\"\n";
  317 + showEnvVarsInLog = 0;
  318 + };
  319 + A12378FE42B1165EFEE012D7 /* [CP] Check Pods Manifest.lock */ = {
  320 + isa = PBXShellScriptBuildPhase;
  321 + buildActionMask = 2147483647;
  322 + files = (
  323 + );
  324 + inputFileListPaths = (
  325 + );
  326 + inputPaths = (
  327 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  328 + "${PODS_ROOT}/Manifest.lock",
  329 + );
  330 + name = "[CP] Check Pods Manifest.lock";
  331 + outputFileListPaths = (
  332 + );
  333 + outputPaths = (
  334 + "$(DERIVED_FILE_DIR)/Pods-CNLivePreloadResources_Tests-checkManifestLockResult.txt",
  335 + );
  336 + runOnlyForDeploymentPostprocessing = 0;
  337 + shellPath = /bin/sh;
  338 + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
  339 + showEnvVarsInLog = 0;
  340 + };
  341 + BB0F02E788A576F77311F460 /* [CP] Check Pods Manifest.lock */ = {
  342 + isa = PBXShellScriptBuildPhase;
  343 + buildActionMask = 2147483647;
  344 + files = (
  345 + );
  346 + inputFileListPaths = (
  347 + );
  348 + inputPaths = (
  349 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  350 + "${PODS_ROOT}/Manifest.lock",
  351 + );
  352 + name = "[CP] Check Pods Manifest.lock";
  353 + outputFileListPaths = (
  354 + );
  355 + outputPaths = (
  356 + "$(DERIVED_FILE_DIR)/Pods-CNLivePreloadResources_Example-checkManifestLockResult.txt",
  357 + );
  358 + runOnlyForDeploymentPostprocessing = 0;
  359 + shellPath = /bin/sh;
  360 + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
  361 + showEnvVarsInLog = 0;
  362 + };
  363 +/* End PBXShellScriptBuildPhase section */
  364 +
  365 +/* Begin PBXSourcesBuildPhase section */
  366 + 6003F586195388D20070C39A /* Sources */ = {
  367 + isa = PBXSourcesBuildPhase;
  368 + buildActionMask = 2147483647;
  369 + files = (
  370 + 6003F59E195388D20070C39A /* CNLiveAppDelegate.m in Sources */,
  371 + 6003F5A7195388D20070C39A /* CNLiveViewController.m in Sources */,
  372 + 6003F59A195388D20070C39A /* main.m in Sources */,
  373 + );
  374 + runOnlyForDeploymentPostprocessing = 0;
  375 + };
  376 + 6003F5AA195388D20070C39A /* Sources */ = {
  377 + isa = PBXSourcesBuildPhase;
  378 + buildActionMask = 2147483647;
  379 + files = (
  380 + 6003F5BC195388D20070C39A /* Tests.m in Sources */,
  381 + );
  382 + runOnlyForDeploymentPostprocessing = 0;
  383 + };
  384 +/* End PBXSourcesBuildPhase section */
  385 +
  386 +/* Begin PBXTargetDependency section */
  387 + 6003F5B4195388D20070C39A /* PBXTargetDependency */ = {
  388 + isa = PBXTargetDependency;
  389 + target = 6003F589195388D20070C39A /* CNLivePreloadResources_Example */;
  390 + targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */;
  391 + };
  392 +/* End PBXTargetDependency section */
  393 +
  394 +/* Begin PBXVariantGroup section */
  395 + 6003F596195388D20070C39A /* InfoPlist.strings */ = {
  396 + isa = PBXVariantGroup;
  397 + children = (
  398 + 6003F597195388D20070C39A /* en */,
  399 + );
  400 + name = InfoPlist.strings;
  401 + sourceTree = "<group>";
  402 + };
  403 + 6003F5B8195388D20070C39A /* InfoPlist.strings */ = {
  404 + isa = PBXVariantGroup;
  405 + children = (
  406 + 6003F5B9195388D20070C39A /* en */,
  407 + );
  408 + name = InfoPlist.strings;
  409 + sourceTree = "<group>";
  410 + };
  411 + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = {
  412 + isa = PBXVariantGroup;
  413 + children = (
  414 + 71719F9E1E33DC2100824A3D /* Base */,
  415 + );
  416 + name = LaunchScreen.storyboard;
  417 + sourceTree = "<group>";
  418 + };
  419 +/* End PBXVariantGroup section */
  420 +
  421 +/* Begin XCBuildConfiguration section */
  422 + 6003F5BD195388D20070C39A /* Debug */ = {
  423 + isa = XCBuildConfiguration;
  424 + buildSettings = {
  425 + ALWAYS_SEARCH_USER_PATHS = NO;
  426 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  427 + CLANG_CXX_LIBRARY = "libc++";
  428 + CLANG_ENABLE_MODULES = YES;
  429 + CLANG_ENABLE_OBJC_ARC = YES;
  430 + CLANG_WARN_BOOL_CONVERSION = YES;
  431 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  432 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  433 + CLANG_WARN_EMPTY_BODY = YES;
  434 + CLANG_WARN_ENUM_CONVERSION = YES;
  435 + CLANG_WARN_INT_CONVERSION = YES;
  436 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  437 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  438 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  439 + COPY_PHASE_STRIP = NO;
  440 + ENABLE_TESTABILITY = YES;
  441 + GCC_C_LANGUAGE_STANDARD = gnu99;
  442 + GCC_DYNAMIC_NO_PIC = NO;
  443 + GCC_OPTIMIZATION_LEVEL = 0;
  444 + GCC_PREPROCESSOR_DEFINITIONS = (
  445 + "DEBUG=1",
  446 + "$(inherited)",
  447 + );
  448 + GCC_SYMBOLS_PRIVATE_EXTERN = NO;
  449 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  450 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  451 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  452 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  453 + GCC_WARN_UNUSED_FUNCTION = YES;
  454 + GCC_WARN_UNUSED_VARIABLE = YES;
  455 + IPHONEOS_DEPLOYMENT_TARGET = 9.3;
  456 + ONLY_ACTIVE_ARCH = YES;
  457 + SDKROOT = iphoneos;
  458 + TARGETED_DEVICE_FAMILY = "1,2";
  459 + };
  460 + name = Debug;
  461 + };
  462 + 6003F5BE195388D20070C39A /* Release */ = {
  463 + isa = XCBuildConfiguration;
  464 + buildSettings = {
  465 + ALWAYS_SEARCH_USER_PATHS = NO;
  466 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  467 + CLANG_CXX_LIBRARY = "libc++";
  468 + CLANG_ENABLE_MODULES = YES;
  469 + CLANG_ENABLE_OBJC_ARC = YES;
  470 + CLANG_WARN_BOOL_CONVERSION = YES;
  471 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  472 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  473 + CLANG_WARN_EMPTY_BODY = YES;
  474 + CLANG_WARN_ENUM_CONVERSION = YES;
  475 + CLANG_WARN_INT_CONVERSION = YES;
  476 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  477 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  478 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  479 + COPY_PHASE_STRIP = YES;
  480 + ENABLE_NS_ASSERTIONS = NO;
  481 + GCC_C_LANGUAGE_STANDARD = gnu99;
  482 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  483 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  484 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  485 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  486 + GCC_WARN_UNUSED_FUNCTION = YES;
  487 + GCC_WARN_UNUSED_VARIABLE = YES;
  488 + IPHONEOS_DEPLOYMENT_TARGET = 9.3;
  489 + SDKROOT = iphoneos;
  490 + TARGETED_DEVICE_FAMILY = "1,2";
  491 + VALIDATE_PRODUCT = YES;
  492 + };
  493 + name = Release;
  494 + };
  495 + 6003F5C0195388D20070C39A /* Debug */ = {
  496 + isa = XCBuildConfiguration;
  497 + baseConfigurationReference = 9154F49F037C37485694A538 /* Pods-CNLivePreloadResources_Example.debug.xcconfig */;
  498 + buildSettings = {
  499 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  500 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  501 + GCC_PREFIX_HEADER = "CNLivePreloadResources/CNLivePreloadResources-Prefix.pch";
  502 + INFOPLIST_FILE = "CNLivePreloadResources/CNLivePreloadResources-Info.plist";
  503 + MODULE_NAME = ExampleApp;
  504 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  505 + PRODUCT_NAME = "$(TARGET_NAME)";
  506 + SWIFT_VERSION = 4.0;
  507 + WRAPPER_EXTENSION = app;
  508 + };
  509 + name = Debug;
  510 + };
  511 + 6003F5C1195388D20070C39A /* Release */ = {
  512 + isa = XCBuildConfiguration;
  513 + baseConfigurationReference = 86A7B2B7A2FD37F42B01F26B /* Pods-CNLivePreloadResources_Example.release.xcconfig */;
  514 + buildSettings = {
  515 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  516 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  517 + GCC_PREFIX_HEADER = "CNLivePreloadResources/CNLivePreloadResources-Prefix.pch";
  518 + INFOPLIST_FILE = "CNLivePreloadResources/CNLivePreloadResources-Info.plist";
  519 + MODULE_NAME = ExampleApp;
  520 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  521 + PRODUCT_NAME = "$(TARGET_NAME)";
  522 + SWIFT_VERSION = 4.0;
  523 + WRAPPER_EXTENSION = app;
  524 + };
  525 + name = Release;
  526 + };
  527 + 6003F5C3195388D20070C39A /* Debug */ = {
  528 + isa = XCBuildConfiguration;
  529 + baseConfigurationReference = 9A46724DB8B91D741F72A0CF /* Pods-CNLivePreloadResources_Tests.debug.xcconfig */;
  530 + buildSettings = {
  531 + BUNDLE_LOADER = "$(TEST_HOST)";
  532 + FRAMEWORK_SEARCH_PATHS = (
  533 + "$(PLATFORM_DIR)/Developer/Library/Frameworks",
  534 + "$(inherited)",
  535 + "$(DEVELOPER_FRAMEWORKS_DIR)",
  536 + );
  537 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  538 + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch";
  539 + GCC_PREPROCESSOR_DEFINITIONS = (
  540 + "DEBUG=1",
  541 + "$(inherited)",
  542 + );
  543 + INFOPLIST_FILE = "Tests/Tests-Info.plist";
  544 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  545 + PRODUCT_NAME = "$(TARGET_NAME)";
  546 + SWIFT_VERSION = 4.0;
  547 + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLivePreloadResources_Example.app/CNLivePreloadResources_Example";
  548 + WRAPPER_EXTENSION = xctest;
  549 + };
  550 + name = Debug;
  551 + };
  552 + 6003F5C4195388D20070C39A /* Release */ = {
  553 + isa = XCBuildConfiguration;
  554 + baseConfigurationReference = 972B4FC9804A7B3A98246C10 /* Pods-CNLivePreloadResources_Tests.release.xcconfig */;
  555 + buildSettings = {
  556 + BUNDLE_LOADER = "$(TEST_HOST)";
  557 + FRAMEWORK_SEARCH_PATHS = (
  558 + "$(PLATFORM_DIR)/Developer/Library/Frameworks",
  559 + "$(inherited)",
  560 + "$(DEVELOPER_FRAMEWORKS_DIR)",
  561 + );
  562 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  563 + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch";
  564 + INFOPLIST_FILE = "Tests/Tests-Info.plist";
  565 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  566 + PRODUCT_NAME = "$(TARGET_NAME)";
  567 + SWIFT_VERSION = 4.0;
  568 + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLivePreloadResources_Example.app/CNLivePreloadResources_Example";
  569 + WRAPPER_EXTENSION = xctest;
  570 + };
  571 + name = Release;
  572 + };
  573 +/* End XCBuildConfiguration section */
  574 +
  575 +/* Begin XCConfigurationList section */
  576 + 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLivePreloadResources" */ = {
  577 + isa = XCConfigurationList;
  578 + buildConfigurations = (
  579 + 6003F5BD195388D20070C39A /* Debug */,
  580 + 6003F5BE195388D20070C39A /* Release */,
  581 + );
  582 + defaultConfigurationIsVisible = 0;
  583 + defaultConfigurationName = Release;
  584 + };
  585 + 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLivePreloadResources_Example" */ = {
  586 + isa = XCConfigurationList;
  587 + buildConfigurations = (
  588 + 6003F5C0195388D20070C39A /* Debug */,
  589 + 6003F5C1195388D20070C39A /* Release */,
  590 + );
  591 + defaultConfigurationIsVisible = 0;
  592 + defaultConfigurationName = Release;
  593 + };
  594 + 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLivePreloadResources_Tests" */ = {
  595 + isa = XCConfigurationList;
  596 + buildConfigurations = (
  597 + 6003F5C3195388D20070C39A /* Debug */,
  598 + 6003F5C4195388D20070C39A /* Release */,
  599 + );
  600 + defaultConfigurationIsVisible = 0;
  601 + defaultConfigurationName = Release;
  602 + };
  603 +/* End XCConfigurationList section */
  604 + };
  605 + rootObject = 6003F582195388D10070C39A /* Project object */;
  606 +}
... ...
Example/CNLivePreloadResources.xcodeproj/xcshareddata/xcschemes/CNLivePreloadResources-Example.xcscheme 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + LastUpgradeVersion = "0720"
  4 + version = "1.3">
  5 + <BuildAction
  6 + parallelizeBuildables = "YES"
  7 + buildImplicitDependencies = "YES">
  8 + <BuildActionEntries>
  9 + <BuildActionEntry
  10 + buildForTesting = "YES"
  11 + buildForRunning = "YES"
  12 + buildForProfiling = "YES"
  13 + buildForArchiving = "YES"
  14 + buildForAnalyzing = "YES">
  15 + <BuildableReference
  16 + BuildableIdentifier = "primary"
  17 + BlueprintIdentifier = "6003F589195388D20070C39A"
  18 + BuildableName = "CNLivePreloadResources_Example.app"
  19 + BlueprintName = "CNLivePreloadResources_Example"
  20 + ReferencedContainer = "container:CNLivePreloadResources.xcodeproj">
  21 + </BuildableReference>
  22 + </BuildActionEntry>
  23 + </BuildActionEntries>
  24 + </BuildAction>
  25 + <TestAction
  26 + buildConfiguration = "Debug"
  27 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  28 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  29 + shouldUseLaunchSchemeArgsEnv = "YES">
  30 + <Testables>
  31 + <TestableReference
  32 + skipped = "NO">
  33 + <BuildableReference
  34 + BuildableIdentifier = "primary"
  35 + BlueprintIdentifier = "6003F5AD195388D20070C39A"
  36 + BuildableName = "CNLivePreloadResources_Tests.xctest"
  37 + BlueprintName = "CNLivePreloadResources_Tests"
  38 + ReferencedContainer = "container:CNLivePreloadResources.xcodeproj">
  39 + </BuildableReference>
  40 + </TestableReference>
  41 + </Testables>
  42 + <MacroExpansion>
  43 + <BuildableReference
  44 + BuildableIdentifier = "primary"
  45 + BlueprintIdentifier = "6003F589195388D20070C39A"
  46 + BuildableName = "CNLivePreloadResources_Example.app"
  47 + BlueprintName = "CNLivePreloadResources_Example"
  48 + ReferencedContainer = "container:CNLivePreloadResources.xcodeproj">
  49 + </BuildableReference>
  50 + </MacroExpansion>
  51 + <AdditionalOptions>
  52 + </AdditionalOptions>
  53 + </TestAction>
  54 + <LaunchAction
  55 + buildConfiguration = "Debug"
  56 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  57 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  58 + launchStyle = "0"
  59 + useCustomWorkingDirectory = "NO"
  60 + ignoresPersistentStateOnLaunch = "NO"
  61 + debugDocumentVersioning = "YES"
  62 + debugServiceExtension = "internal"
  63 + allowLocationSimulation = "YES">
  64 + <BuildableProductRunnable
  65 + runnableDebuggingMode = "0">
  66 + <BuildableReference
  67 + BuildableIdentifier = "primary"
  68 + BlueprintIdentifier = "6003F589195388D20070C39A"
  69 + BuildableName = "CNLivePreloadResources_Example.app"
  70 + BlueprintName = "CNLivePreloadResources_Example"
  71 + ReferencedContainer = "container:CNLivePreloadResources.xcodeproj">
  72 + </BuildableReference>
  73 + </BuildableProductRunnable>
  74 + <AdditionalOptions>
  75 + </AdditionalOptions>
  76 + </LaunchAction>
  77 + <ProfileAction
  78 + buildConfiguration = "Release"
  79 + shouldUseLaunchSchemeArgsEnv = "YES"
  80 + savedToolIdentifier = ""
  81 + useCustomWorkingDirectory = "NO"
  82 + debugDocumentVersioning = "YES">
  83 + <BuildableProductRunnable
  84 + runnableDebuggingMode = "0">
  85 + <BuildableReference
  86 + BuildableIdentifier = "primary"
  87 + BlueprintIdentifier = "6003F589195388D20070C39A"
  88 + BuildableName = "CNLivePreloadResources_Example.app"
  89 + BlueprintName = "CNLivePreloadResources_Example"
  90 + ReferencedContainer = "container:CNLivePreloadResources.xcodeproj">
  91 + </BuildableReference>
  92 + </BuildableProductRunnable>
  93 + </ProfileAction>
  94 + <AnalyzeAction
  95 + buildConfiguration = "Debug">
  96 + </AnalyzeAction>
  97 + <ArchiveAction
  98 + buildConfiguration = "Release"
  99 + revealArchiveInOrganizer = "YES">
  100 + </ArchiveAction>
  101 +</Scheme>
... ...
Example/CNLivePreloadResources/Base.lproj/LaunchScreen.storyboard 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
  3 + <device id="retina4_7" orientation="portrait">
  4 + <adaptation id="fullscreen"/>
  5 + </device>
  6 + <dependencies>
  7 + <deployment identifier="iOS"/>
  8 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
  9 + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
  10 + </dependencies>
  11 + <scenes>
  12 + <!--View Controller-->
  13 + <scene sceneID="EHf-IW-A2E">
  14 + <objects>
  15 + <viewController id="01J-lp-oVM" sceneMemberID="viewController">
  16 + <layoutGuides>
  17 + <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
  18 + <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
  19 + </layoutGuides>
  20 + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
  21 + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
  22 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  23 + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  24 + </view>
  25 + </viewController>
  26 + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
  27 + </objects>
  28 + <point key="canvasLocation" x="53" y="375"/>
  29 + </scene>
  30 + </scenes>
  31 +</document>
... ...
Example/CNLivePreloadResources/Base.lproj/Main.storyboard 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="whP-gf-Uak">
  3 + <device id="retina4_7" orientation="portrait">
  4 + <adaptation id="fullscreen"/>
  5 + </device>
  6 + <dependencies>
  7 + <deployment identifier="iOS"/>
  8 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
  9 + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
  10 + </dependencies>
  11 + <scenes>
  12 + <!--View Controller-->
  13 + <scene sceneID="wQg-tq-qST">
  14 + <objects>
  15 + <viewController id="whP-gf-Uak" customClass="CNLiveViewController" sceneMemberID="viewController">
  16 + <layoutGuides>
  17 + <viewControllerLayoutGuide type="top" id="uEw-UM-LJ8"/>
  18 + <viewControllerLayoutGuide type="bottom" id="Mvr-aV-6Um"/>
  19 + </layoutGuides>
  20 + <view key="view" contentMode="scaleToFill" id="TpU-gO-2f1">
  21 + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
  22 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  23 + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  24 + </view>
  25 + </viewController>
  26 + <placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/>
  27 + </objects>
  28 + <point key="canvasLocation" x="305" y="433"/>
  29 + </scene>
  30 + </scenes>
  31 +</document>
... ...
Example/CNLivePreloadResources/CNLiveAppDelegate.h 0 → 100644
  1 +//
  2 +// CNLiveAppDelegate.h
  3 +// CNLivePreloadResources
  4 +//
  5 +// Created by 153993236@qq.com on 08/09/2019.
  6 +// Copyright (c) 2019 153993236@qq.com. All rights reserved.
  7 +//
  8 +
  9 +@import UIKit;
  10 +
  11 +@interface CNLiveAppDelegate : UIResponder <UIApplicationDelegate>
  12 +
  13 +@property (strong, nonatomic) UIWindow *window;
  14 +
  15 +@end
... ...
Example/CNLivePreloadResources/CNLiveAppDelegate.m 0 → 100644
  1 +//
  2 +// CNLiveAppDelegate.m
  3 +// CNLivePreloadResources
  4 +//
  5 +// Created by 153993236@qq.com on 08/09/2019.
  6 +// Copyright (c) 2019 153993236@qq.com. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLiveAppDelegate.h"
  10 +#import "CNLivePreloadManager.h"
  11 +
  12 +@implementation CNLiveAppDelegate
  13 +
  14 +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  15 +{
  16 + // Override point for customization after application launch.
  17 + [CNLivePreloadManager preloadAllResources];
  18 +// NSArray *add = [CNLivePreloadManager preloadImagesForRefreshImage];
  19 +
  20 + return YES;
  21 +}
  22 +
  23 +- (void)applicationWillResignActive:(UIApplication *)application
  24 +{
  25 + // 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.
  26 + // 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.
  27 +}
  28 +
  29 +- (void)applicationDidEnterBackground:(UIApplication *)application
  30 +{
  31 + // 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.
  32 + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
  33 +}
  34 +
  35 +- (void)applicationWillEnterForeground:(UIApplication *)application
  36 +{
  37 + // 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.
  38 +}
  39 +
  40 +- (void)applicationDidBecomeActive:(UIApplication *)application
  41 +{
  42 + // 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.
  43 +}
  44 +
  45 +- (void)applicationWillTerminate:(UIApplication *)application
  46 +{
  47 + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
  48 +}
  49 +
  50 +@end
... ...
Example/CNLivePreloadResources/CNLivePreloadResources-Info.plist 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>CFBundleDevelopmentRegion</key>
  6 + <string>en</string>
  7 + <key>CFBundleDisplayName</key>
  8 + <string>${PRODUCT_NAME}</string>
  9 + <key>CFBundleExecutable</key>
  10 + <string>${EXECUTABLE_NAME}</string>
  11 + <key>CFBundleIdentifier</key>
  12 + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  13 + <key>CFBundleInfoDictionaryVersion</key>
  14 + <string>6.0</string>
  15 + <key>CFBundleName</key>
  16 + <string>${PRODUCT_NAME}</string>
  17 + <key>CFBundlePackageType</key>
  18 + <string>APPL</string>
  19 + <key>CFBundleShortVersionString</key>
  20 + <string>1.0</string>
  21 + <key>CFBundleSignature</key>
  22 + <string>????</string>
  23 + <key>CFBundleVersion</key>
  24 + <string>1.0</string>
  25 + <key>LSRequiresIPhoneOS</key>
  26 + <true/>
  27 + <key>UILaunchStoryboardName</key>
  28 + <string>LaunchScreen</string>
  29 + <key>UIMainStoryboardFile</key>
  30 + <string>Main</string>
  31 + <key>UIRequiredDeviceCapabilities</key>
  32 + <array>
  33 + <string>armv7</string>
  34 + </array>
  35 + <key>UISupportedInterfaceOrientations</key>
  36 + <array>
  37 + <string>UIInterfaceOrientationPortrait</string>
  38 + <string>UIInterfaceOrientationLandscapeLeft</string>
  39 + <string>UIInterfaceOrientationLandscapeRight</string>
  40 + </array>
  41 + <key>UISupportedInterfaceOrientations~ipad</key>
  42 + <array>
  43 + <string>UIInterfaceOrientationPortrait</string>
  44 + <string>UIInterfaceOrientationPortraitUpsideDown</string>
  45 + <string>UIInterfaceOrientationLandscapeLeft</string>
  46 + <string>UIInterfaceOrientationLandscapeRight</string>
  47 + </array>
  48 +</dict>
  49 +</plist>
... ...
Example/CNLivePreloadResources/CNLivePreloadResources-Prefix.pch 0 → 100644
  1 +//
  2 +// Prefix header
  3 +//
  4 +// The contents of this file are implicitly included at the beginning of every source file.
  5 +//
  6 +
  7 +#import <Availability.h>
  8 +
  9 +#ifndef __IPHONE_5_0
  10 +#warning "This project uses features only available in iOS SDK 5.0 and later."
  11 +#endif
  12 +
  13 +#ifdef __OBJC__
  14 + @import UIKit;
  15 + @import Foundation;
  16 +#endif
... ...
Example/CNLivePreloadResources/CNLiveViewController.h 0 → 100644
  1 +//
  2 +// CNLiveViewController.h
  3 +// CNLivePreloadResources
  4 +//
  5 +// Created by 153993236@qq.com on 08/09/2019.
  6 +// Copyright (c) 2019 153993236@qq.com. All rights reserved.
  7 +//
  8 +
  9 +@import UIKit;
  10 +
  11 +@interface CNLiveViewController : UIViewController
  12 +
  13 +@end
... ...
Example/CNLivePreloadResources/CNLiveViewController.m 0 → 100644
  1 +//
  2 +// CNLiveViewController.m
  3 +// CNLivePreloadResources
  4 +//
  5 +// Created by 153993236@qq.com on 08/09/2019.
  6 +// Copyright (c) 2019 153993236@qq.com. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLiveViewController.h"
  10 +#import "CNLivePreloadManager.h"
  11 +
  12 +@interface CNLiveViewController ()
  13 +
  14 +@end
  15 +
  16 +@implementation CNLiveViewController
  17 +
  18 +- (void)viewDidLoad
  19 +{
  20 + [super viewDidLoad];
  21 + // Do any additional setup after loading the view, typically from a nib.
  22 + UIImageView *image1 = [[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 100, 30)];
  23 + [self.view addSubview:image1];
  24 +
  25 + UIImageView *image2 = [[UIImageView alloc]initWithFrame:CGRectMake(100, 200, 30, 30)];
  26 + [self.view addSubview:image2];
  27 +
  28 +
  29 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  30 + NSArray *add1 = [CNLivePreloadManager preloadImagesForRefreshImage];
  31 +// NSMutableArray *images = [[NSMutableArray alloc] init];
  32 +// for(CNLivePreloadModel *model in add){
  33 +// [images addObject:model.image];
  34 +// }
  35 +//
  36 + image1.animationImages = add1;//将序列帧数组赋给UIImageView的animationImages属性
  37 + image1.animationDuration = 1.0;//设置动画时间
  38 + image1.animationRepeatCount = 0;//设置动画次数 0 表示无限
  39 + [image1 startAnimating];//开始播放动
  40 +
  41 + NSArray *add2 = [CNLivePreloadManager preloadImagesForEmotion];
  42 + image2.image = add2[2];
  43 + });
  44 +}
  45 +
  46 +- (void)didReceiveMemoryWarning
  47 +{
  48 + [super didReceiveMemoryWarning];
  49 + // Dispose of any resources that can be recreated.
  50 +}
  51 +
  52 +@end
... ...
Example/CNLivePreloadResources/Images.xcassets/AppIcon.appiconset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "iphone",
  5 + "size" : "20x20",
  6 + "scale" : "2x"
  7 + },
  8 + {
  9 + "idiom" : "iphone",
  10 + "size" : "20x20",
  11 + "scale" : "3x"
  12 + },
  13 + {
  14 + "idiom" : "iphone",
  15 + "size" : "29x29",
  16 + "scale" : "2x"
  17 + },
  18 + {
  19 + "idiom" : "iphone",
  20 + "size" : "29x29",
  21 + "scale" : "3x"
  22 + },
  23 + {
  24 + "idiom" : "iphone",
  25 + "size" : "40x40",
  26 + "scale" : "2x"
  27 + },
  28 + {
  29 + "idiom" : "iphone",
  30 + "size" : "40x40",
  31 + "scale" : "3x"
  32 + },
  33 + {
  34 + "idiom" : "iphone",
  35 + "size" : "60x60",
  36 + "scale" : "2x"
  37 + },
  38 + {
  39 + "idiom" : "iphone",
  40 + "size" : "60x60",
  41 + "scale" : "3x"
  42 + },
  43 + {
  44 + "idiom" : "ipad",
  45 + "size" : "20x20",
  46 + "scale" : "1x"
  47 + },
  48 + {
  49 + "idiom" : "ipad",
  50 + "size" : "20x20",
  51 + "scale" : "2x"
  52 + },
  53 + {
  54 + "idiom" : "ipad",
  55 + "size" : "29x29",
  56 + "scale" : "1x"
  57 + },
  58 + {
  59 + "idiom" : "ipad",
  60 + "size" : "29x29",
  61 + "scale" : "2x"
  62 + },
  63 + {
  64 + "idiom" : "ipad",
  65 + "size" : "40x40",
  66 + "scale" : "1x"
  67 + },
  68 + {
  69 + "idiom" : "ipad",
  70 + "size" : "40x40",
  71 + "scale" : "2x"
  72 + },
  73 + {
  74 + "idiom" : "ipad",
  75 + "size" : "76x76",
  76 + "scale" : "1x"
  77 + },
  78 + {
  79 + "idiom" : "ipad",
  80 + "size" : "76x76",
  81 + "scale" : "2x"
  82 + },
  83 + {
  84 + "idiom" : "ipad",
  85 + "size" : "83.5x83.5",
  86 + "scale" : "2x"
  87 + },
  88 + {
  89 + "idiom" : "ios-marketing",
  90 + "size" : "1024x1024",
  91 + "scale" : "1x"
  92 + }
  93 + ],
  94 + "info" : {
  95 + "version" : 1,
  96 + "author" : "xcode"
  97 + }
  98 +}
... ...
Example/CNLivePreloadResources/en.lproj/InfoPlist.strings 0 → 100644
  1 +/* Localized versions of Info.plist keys */
  2 +
... ...
Example/CNLivePreloadResources/main.m 0 → 100644
  1 +//
  2 +// main.m
  3 +// CNLivePreloadResources
  4 +//
  5 +// Created by 153993236@qq.com on 08/09/2019.
  6 +// Copyright (c) 2019 153993236@qq.com. All rights reserved.
  7 +//
  8 +
  9 +@import UIKit;
  10 +#import "CNLiveAppDelegate.h"
  11 +
  12 +int main(int argc, char * argv[])
  13 +{
  14 + @autoreleasepool {
  15 + return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLiveAppDelegate class]));
  16 + }
  17 +}
... ...
Example/Podfile 0 → 100644
  1 +use_frameworks!
  2 +
  3 +platform :ios, '9.0'
  4 +
  5 +target 'CNLivePreloadResources_Example' do
  6 + pod 'CNLivePreloadResources', :path => '../'
  7 +
  8 + target 'CNLivePreloadResources_Tests' do
  9 + inherit! :search_paths
  10 +
  11 +
  12 + end
  13 +end
... ...
Example/Tests/Tests-Info.plist 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>CFBundleDevelopmentRegion</key>
  6 + <string>en</string>
  7 + <key>CFBundleExecutable</key>
  8 + <string>${EXECUTABLE_NAME}</string>
  9 + <key>CFBundleIdentifier</key>
  10 + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  11 + <key>CFBundleInfoDictionaryVersion</key>
  12 + <string>6.0</string>
  13 + <key>CFBundlePackageType</key>
  14 + <string>BNDL</string>
  15 + <key>CFBundleShortVersionString</key>
  16 + <string>1.0</string>
  17 + <key>CFBundleSignature</key>
  18 + <string>????</string>
  19 + <key>CFBundleVersion</key>
  20 + <string>1</string>
  21 +</dict>
  22 +</plist>
... ...
Example/Tests/Tests-Prefix.pch 0 → 100644
  1 +// The contents of this file are implicitly included at the beginning of every test case source file.
  2 +
  3 +#ifdef __OBJC__
  4 +
  5 +
  6 +
  7 +#endif
... ...
Example/Tests/Tests.m 0 → 100644
  1 +//
  2 +// CNLivePreloadResourcesTests.m
  3 +// CNLivePreloadResourcesTests
  4 +//
  5 +// Created by 153993236@qq.com on 08/09/2019.
  6 +// Copyright (c) 2019 153993236@qq.com. All rights reserved.
  7 +//
  8 +
  9 +@import XCTest;
  10 +
  11 +@interface Tests : XCTestCase
  12 +
  13 +@end
  14 +
  15 +@implementation Tests
  16 +
  17 +- (void)setUp
  18 +{
  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 +{
  25 + // Put teardown code here. This method is called after the invocation of each test method in the class.
  26 + [super tearDown];
  27 +}
  28 +
  29 +- (void)testExample
  30 +{
  31 + XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
  32 +}
  33 +
  34 +@end
  35 +
... ...
Example/Tests/en.lproj/InfoPlist.strings 0 → 100644
  1 +/* Localized versions of Info.plist keys */
  2 +
... ...
1   -CNLivePreloadResources
2 1 \ No newline at end of file
  2 +Copyright (c) 2019 153993236@qq.com <zhangxiaowen@cnlive.com>
  3 +
  4 +Permission is hereby granted, free of charge, to any person obtaining a copy
  5 +of this software and associated documentation files (the "Software"), to deal
  6 +in the Software without restriction, including without limitation the rights
  7 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8 +copies of the Software, and to permit persons to whom the Software is
  9 +furnished to do so, subject to the following conditions:
  10 +
  11 +The above copyright notice and this permission notice shall be included in
  12 +all copies or substantial portions of the Software.
  13 +
  14 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20 +THE SOFTWARE.
... ...
README.md
1   -CNLivePreloadResources
2 1 \ No newline at end of file
  2 +# CNLivePreloadResources
  3 +
  4 +[![CI Status](https://img.shields.io/travis/153993236@qq.com/CNLivePreloadResources.svg?style=flat)](https://travis-ci.org/153993236@qq.com/CNLivePreloadResources)
  5 +[![Version](https://img.shields.io/cocoapods/v/CNLivePreloadResources.svg?style=flat)](https://cocoapods.org/pods/CNLivePreloadResources)
  6 +[![License](https://img.shields.io/cocoapods/l/CNLivePreloadResources.svg?style=flat)](https://cocoapods.org/pods/CNLivePreloadResources)
  7 +[![Platform](https://img.shields.io/cocoapods/p/CNLivePreloadResources.svg?style=flat)](https://cocoapods.org/pods/CNLivePreloadResources)
  8 +
  9 +## Example
  10 +
  11 +To run the example project, clone the repo, and run `pod install` from the Example directory first.
  12 +
  13 +## Requirements
  14 +
  15 +## Installation
  16 +
  17 +CNLivePreloadResources is available through [CocoaPods](https://cocoapods.org). To install
  18 +it, simply add the following line to your Podfile:
  19 +
  20 +```ruby
  21 +pod 'CNLivePreloadResources'
  22 +```
  23 +
  24 +## Author
  25 +
  26 +153993236@qq.com, zhangxiaowen@cnlive.com
  27 +
  28 +## License
  29 +
  30 +CNLivePreloadResources is available under the MIT license. See the LICENSE file for more info.
... ...
_Pods.xcodeproj 0 → 120000
  1 +Example/Pods/Pods.xcodeproj
0 2 \ No newline at end of file
... ...