Commit e36f45c6 authored by 汪洋's avatar 汪洋

Merge branch 'wangjun/dev_GMRefresh' into 'master'

升级MJRefresh到3.1.14



See merge request !3
parents 5ea6ee10 d0556687
...@@ -308,13 +308,16 @@ ...@@ -308,13 +308,16 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
); );
name = "[CP] Check Pods Manifest.lock"; name = "[CP] Check Pods Manifest.lock";
outputPaths = ( outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-GMRefresh_Tests-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
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"; 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";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
88C96FFAE5ACFCA8DAE2E535 /* [CP] Embed Pods Frameworks */ = { 88C96FFAE5ACFCA8DAE2E535 /* [CP] Embed Pods Frameworks */ = {
...@@ -323,9 +326,20 @@ ...@@ -323,9 +326,20 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-GMRefresh_Example/Pods-GMRefresh_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/GMCache/GMCache.framework",
"${BUILT_PRODUCTS_DIR}/GMPhobos/GMPhobos.framework",
"${BUILT_PRODUCTS_DIR}/GMRefresh/GMRefresh.framework",
"${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework",
"${BUILT_PRODUCTS_DIR}/TMCache/TMCache.framework",
); );
name = "[CP] Embed Pods Frameworks"; name = "[CP] Embed Pods Frameworks";
outputPaths = ( outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMCache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMPhobos.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMRefresh.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TMCache.framework",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
...@@ -383,13 +397,16 @@ ...@@ -383,13 +397,16 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
); );
name = "[CP] Check Pods Manifest.lock"; name = "[CP] Check Pods Manifest.lock";
outputPaths = ( outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-GMRefresh_Example-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
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"; 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";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
......
...@@ -3,10 +3,10 @@ PODS: ...@@ -3,10 +3,10 @@ PODS:
- TMCache (~> 2.1.0) - TMCache (~> 2.1.0)
- GMPhobos (0.3.7): - GMPhobos (0.3.7):
- GMCache (~> 0.1.1) - GMCache (~> 0.1.1)
- GMRefresh (0.1.5): - GMRefresh (0.1.6):
- GMPhobos - GMPhobos
- MJRefresh (~> 3.1.0) - MJRefresh (~> 3.1.14)
- MJRefresh (3.1.12) - MJRefresh (3.1.14.1)
- TMCache (2.1.0) - TMCache (2.1.0)
DEPENDENCIES: DEPENDENCIES:
...@@ -14,15 +14,15 @@ DEPENDENCIES: ...@@ -14,15 +14,15 @@ DEPENDENCIES:
EXTERNAL SOURCES: EXTERNAL SOURCES:
GMRefresh: GMRefresh:
:path: "../" :path: ../
SPEC CHECKSUMS: SPEC CHECKSUMS:
GMCache: 73855b613b9d7e34f4f37ad425e8b8153b760c04 GMCache: 73855b613b9d7e34f4f37ad425e8b8153b760c04
GMPhobos: 78912659a3f3587d0c2ea4ca469032e7e88e9592 GMPhobos: 78912659a3f3587d0c2ea4ca469032e7e88e9592
GMRefresh: d63b81fc0e627552965187046ef914042deb82e0 GMRefresh: dac465173bfb7e45f0b7dc5a4c195aed5daeeb91
MJRefresh: b96cdb21c4aa75a7b07654311ab2f315c497e806 MJRefresh: 238e6a37e2dba12160ee3b79f6d2a2b26abcab42
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
PODFILE CHECKSUM: 6b447183006b1a0e6da7bc6db007dd5df4f4fe65 PODFILE CHECKSUM: 6b447183006b1a0e6da7bc6db007dd5df4f4fe65
COCOAPODS: 1.2.1 COCOAPODS: 1.3.1
{ {
"name": "GMRefresh", "name": "GMRefresh",
"version": "0.1.5", "version": "0.1.6",
"summary": "基于MJRefresh做的下拉刷新,自动加载更多", "summary": "基于MJRefresh做的下拉刷新,自动加载更多",
"homepage": "http://git.gengmei.cc/gengmeiios/GMLibrary/GMRefresh", "homepage": "http://git.gengmei.cc/gengmeiios/GMLibrary/GMRefresh",
"license": "MIT", "license": "MIT",
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
}, },
"source": { "source": {
"git": "git@git.gengmei.cc:gengmeiios/GMRefresh.git", "git": "git@git.gengmei.cc:gengmeiios/GMRefresh.git",
"tag": "0.1.5" "tag": "0.1.6"
}, },
"platforms": { "platforms": {
"ios": "8.0" "ios": "8.0"
}, },
"dependencies": { "dependencies": {
"MJRefresh": [ "MJRefresh": [
"~> 3.1.0" "~> 3.1.14"
], ],
"GMPhobos": [ "GMPhobos": [
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
// 如果正在刷新,直接返回 // 如果正在刷新,直接返回
if (self.state == MJRefreshStateRefreshing) return; if (self.state == MJRefreshStateRefreshing) return;
_scrollViewOriginalInset = self.scrollView.contentInset; _scrollViewOriginalInset = self.scrollView.mj_inset;
// 当前的contentOffset // 当前的contentOffset
CGFloat currentOffsetY = self.scrollView.mj_offsetY; CGFloat currentOffsetY = self.scrollView.mj_offsetY;
......
...@@ -29,11 +29,11 @@ typedef NS_ENUM(NSInteger, MJRefreshState) { ...@@ -29,11 +29,11 @@ typedef NS_ENUM(NSInteger, MJRefreshState) {
}; };
/** 进入刷新状态的回调 */ /** 进入刷新状态的回调 */
typedef void (^MJRefreshComponentRefreshingBlock)(); typedef void (^MJRefreshComponentRefreshingBlock)(void);
/** 开始刷新后的回调(进入刷新状态后的回调) */ /** 开始刷新后的回调(进入刷新状态后的回调) */
typedef void (^MJRefreshComponentbeginRefreshingCompletionBlock)(); typedef void (^MJRefreshComponentbeginRefreshingCompletionBlock)(void);
/** 结束刷新后的回调 */ /** 结束刷新后的回调 */
typedef void (^MJRefreshComponentEndRefreshingCompletionBlock)(); typedef void (^MJRefreshComponentEndRefreshingCompletionBlock)(void);
/** 刷新控件的基类 */ /** 刷新控件的基类 */
@interface MJRefreshComponent : UIView @interface MJRefreshComponent : UIView
...@@ -59,16 +59,17 @@ typedef void (^MJRefreshComponentEndRefreshingCompletionBlock)(); ...@@ -59,16 +59,17 @@ typedef void (^MJRefreshComponentEndRefreshingCompletionBlock)();
#pragma mark - 刷新状态控制 #pragma mark - 刷新状态控制
/** 进入刷新状态 */ /** 进入刷新状态 */
- (void)beginRefreshing; - (void)beginRefreshing;
- (void)beginRefreshingWithCompletionBlock:(void (^)())completionBlock; - (void)beginRefreshingWithCompletionBlock:(void (^)(void))completionBlock;
/** 开始刷新后的回调(进入刷新状态后的回调) */ /** 开始刷新后的回调(进入刷新状态后的回调) */
@property (copy, nonatomic) MJRefreshComponentbeginRefreshingCompletionBlock beginRefreshingCompletionBlock; @property (copy, nonatomic) MJRefreshComponentbeginRefreshingCompletionBlock beginRefreshingCompletionBlock;
/** 结束刷新的回调 */ /** 结束刷新的回调 */
@property (copy, nonatomic) MJRefreshComponentEndRefreshingCompletionBlock endRefreshingCompletionBlock; @property (copy, nonatomic) MJRefreshComponentEndRefreshingCompletionBlock endRefreshingCompletionBlock;
/** 结束刷新状态 */ /** 结束刷新状态 */
- (void)endRefreshing; - (void)endRefreshing;
- (void)endRefreshingWithCompletionBlock:(void (^)())completionBlock; - (void)endRefreshingWithCompletionBlock:(void (^)(void))completionBlock;
/** 是否正在刷新 */ /** 是否正在刷新 */
- (BOOL)isRefreshing; @property (assign, nonatomic, readonly, getter=isRefreshing) BOOL refreshing;
//- (BOOL)isRefreshing;
/** 刷新状态 一般交给子类内部实现 */ /** 刷新状态 一般交给子类内部实现 */
@property (assign, nonatomic) MJRefreshState state; @property (assign, nonatomic) MJRefreshState state;
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
// 设置永远支持垂直弹簧效果 // 设置永远支持垂直弹簧效果
_scrollView.alwaysBounceVertical = YES; _scrollView.alwaysBounceVertical = YES;
// 记录UIScrollView最开始的contentInset // 记录UIScrollView最开始的contentInset
_scrollViewOriginalInset = _scrollView.contentInset; _scrollViewOriginalInset = _scrollView.mj_inset;
// 添加监听 // 添加监听
[self addObservers]; [self addObservers];
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
- (void)removeObservers - (void)removeObservers
{ {
[self.superview removeObserver:self forKeyPath:MJRefreshKeyPathContentOffset]; [self.superview removeObserver:self forKeyPath:MJRefreshKeyPathContentOffset];
[self.superview removeObserver:self forKeyPath:MJRefreshKeyPathContentSize];; [self.superview removeObserver:self forKeyPath:MJRefreshKeyPathContentSize];
[self.pan removeObserver:self forKeyPath:MJRefreshKeyPathPanState]; [self.pan removeObserver:self forKeyPath:MJRefreshKeyPathPanState];
self.pan = nil; self.pan = nil;
} }
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
} }
} }
- (void)beginRefreshingWithCompletionBlock:(void (^)())completionBlock - (void)beginRefreshingWithCompletionBlock:(void (^)(void))completionBlock
{ {
self.beginRefreshingCompletionBlock = completionBlock; self.beginRefreshingCompletionBlock = completionBlock;
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
self.state = MJRefreshStateIdle; self.state = MJRefreshStateIdle;
} }
- (void)endRefreshingWithCompletionBlock:(void (^)())completionBlock - (void)endRefreshingWithCompletionBlock:(void (^)(void))completionBlock
{ {
self.endRefreshingCompletionBlock = completionBlock; self.endRefreshingCompletionBlock = completionBlock;
...@@ -271,4 +271,4 @@ ...@@ -271,4 +271,4 @@
} }
return stringWidth; return stringWidth;
} }
@end @end
\ No newline at end of file
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
} }
// 跳转到下一个控制器时,contentInset可能会变 // 跳转到下一个控制器时,contentInset可能会变
_scrollViewOriginalInset = self.scrollView.contentInset; _scrollViewOriginalInset = self.scrollView.mj_inset;
// 当前的contentOffset // 当前的contentOffset
CGFloat offsetY = self.scrollView.mj_offsetY; CGFloat offsetY = self.scrollView.mj_offsetY;
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface UIScrollView (MJExtension) @interface UIScrollView (MJExtension)
@property (readonly, nonatomic) UIEdgeInsets mj_inset;
@property (assign, nonatomic) CGFloat mj_insetT; @property (assign, nonatomic) CGFloat mj_insetT;
@property (assign, nonatomic) CGFloat mj_insetB; @property (assign, nonatomic) CGFloat mj_insetB;
@property (assign, nonatomic) CGFloat mj_insetL; @property (assign, nonatomic) CGFloat mj_insetL;
......
...@@ -10,36 +10,66 @@ ...@@ -10,36 +10,66 @@
#import "UIScrollView+MJExtension.h" #import "UIScrollView+MJExtension.h"
#import <objc/runtime.h> #import <objc/runtime.h>
#define SYSTEM_VERSION_GREATER_NOT_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
@implementation UIScrollView (MJExtension) @implementation UIScrollView (MJExtension)
- (UIEdgeInsets)mj_inset
{
#ifdef __IPHONE_11_0
if (SYSTEM_VERSION_GREATER_NOT_LESS_THAN(@"11.0")) {
return self.adjustedContentInset;
}
#endif
return self.contentInset;
}
- (void)setMj_insetT:(CGFloat)mj_insetT - (void)setMj_insetT:(CGFloat)mj_insetT
{ {
UIEdgeInsets inset = self.contentInset; UIEdgeInsets inset = self.contentInset;
inset.top = mj_insetT; inset.top = mj_insetT;
#ifdef __IPHONE_11_0
if (SYSTEM_VERSION_GREATER_NOT_LESS_THAN(@"11.0")) {
inset.top -= (self.adjustedContentInset.top - self.contentInset.top);
}
#endif
self.contentInset = inset; self.contentInset = inset;
} }
- (CGFloat)mj_insetT - (CGFloat)mj_insetT
{ {
return self.contentInset.top; return self.mj_inset.top;
} }
- (void)setMj_insetB:(CGFloat)mj_insetB - (void)setMj_insetB:(CGFloat)mj_insetB
{ {
UIEdgeInsets inset = self.contentInset; UIEdgeInsets inset = self.contentInset;
inset.bottom = mj_insetB; inset.bottom = mj_insetB;
#ifdef __IPHONE_11_0
if (SYSTEM_VERSION_GREATER_NOT_LESS_THAN(@"11.0")) {
inset.bottom -= (self.adjustedContentInset.bottom - self.contentInset.bottom);
}
#endif
self.contentInset = inset; self.contentInset = inset;
} }
- (CGFloat)mj_insetB - (CGFloat)mj_insetB
{ {
return self.contentInset.bottom; return self.mj_inset.bottom;
} }
- (void)setMj_insetL:(CGFloat)mj_insetL - (void)setMj_insetL:(CGFloat)mj_insetL
{ {
UIEdgeInsets inset = self.contentInset; UIEdgeInsets inset = self.contentInset;
inset.left = mj_insetL; inset.left = mj_insetL;
#ifdef __IPHONE_11_0
if (SYSTEM_VERSION_GREATER_NOT_LESS_THAN(@"11.0")) {
inset.left -= (self.adjustedContentInset.left - self.contentInset.left);
}
#endif
self.contentInset = inset; self.contentInset = inset;
} }
...@@ -52,6 +82,11 @@ ...@@ -52,6 +82,11 @@
{ {
UIEdgeInsets inset = self.contentInset; UIEdgeInsets inset = self.contentInset;
inset.right = mj_insetR; inset.right = mj_insetR;
#ifdef __IPHONE_11_0
if (SYSTEM_VERSION_GREATER_NOT_LESS_THAN(@"11.0")) {
inset.right -= (self.adjustedContentInset.right - self.contentInset.right);
}
#endif
self.contentInset = inset; self.contentInset = inset;
} }
...@@ -108,3 +143,4 @@ ...@@ -108,3 +143,4 @@
return self.contentSize.height; return self.contentSize.height;
} }
@end @end
#pragma clang diagnostic pop
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
## Contents ## Contents
* Getting Started * Getting Started
* [Features【Support what kinds of controls to refresh】](#Support what kinds of controls to refresh) * [Features【Support what kinds of controls to refresh】](#Support_what_kinds_of_controls_to_refresh)
* [Installation【How to use MJRefresh】](#How to use MJRefresh) * [Installation【How to use MJRefresh】](#How_to_use_MJRefresh)
* [Who's using【More than hundreds of Apps are using MJRefresh】](#>More than hundreds of Apps are using MJRefresh) * [Who's using【More than hundreds of Apps are using MJRefresh】](#More_than_hundreds_of_Apps_are_using_MJRefresh)
* [Classes【The Class Structure Chart of MJRefresh】](#The Class Structure Chart of MJRefresh) * [Classes【The Class Structure Chart of MJRefresh】](#The_Class_Structure_Chart_of_MJRefresh)
* Comment API * Comment API
* [MJRefreshComponent.h](#MJRefreshComponent.h) * [MJRefreshComponent.h](#MJRefreshComponent.h)
* [MJRefreshHeader.h](#MJRefreshHeader.h) * [MJRefreshHeader.h](#MJRefreshHeader.h)
...@@ -15,30 +15,30 @@ ...@@ -15,30 +15,30 @@
* [MJRefreshAutoFooter.h](#MJRefreshAutoFooter.h) * [MJRefreshAutoFooter.h](#MJRefreshAutoFooter.h)
* Examples * Examples
* [Reference](#Reference) * [Reference](#Reference)
* [The drop-down refresh 01-Default](#The drop-down refresh 01-Default) * [The drop-down refresh 01-Default](#The_drop-down_refresh_01-Default)
* [The drop-down refresh 02-Animation image](#The drop-down refresh 02-Animation image) * [The drop-down refresh 02-Animation image](#The_drop-down_refresh_02-Animation_image)
* [The drop-down refresh 03-Hide the time](#The drop-down refresh 03-Hide the time) * [The drop-down refresh 03-Hide the time](#The_drop-down_refresh_03-Hide_the_time)
* [The drop-down refresh 04-Hide status and time](#The drop-down refresh 04-Hide status and time) * [The drop-down refresh 04-Hide status and time](#The_drop-down_refresh_04-Hide_status_and_time)
* [The drop-down refresh 05-DIY title](#The drop-down refresh 05-DIY title) * [The drop-down refresh 05-DIY title](#The_drop-down_refresh_05-DIY_title)
* [The drop-down refresh 06-DIY the control of refresh](#The drop-down refresh 06-DIY the control of refresh) * [The drop-down refresh 06-DIY the control of refresh](#The_drop-down_refresh_06-DIY_the_control_of_refresh)
* [The pull to refresh 01-Default](#The pull to refresh 01-Default) * [The pull to refresh 01-Default](#The_pull_to_refresh_01-Default)
* [The pull to refresh 02-Animation image](#The pull to refresh 02-Animation image) * [The pull to refresh 02-Animation image](#The_pull_to_refresh_02-Animation_image)
* [The pull to refresh 03-Hide the title of refresh status](#The pull to refresh 03-Hide the title of refresh status) * [The pull to refresh 03-Hide the title of refresh status](#The_pull_to_refresh_03-Hide_the_title_of_refresh_status)
* [The pull to refresh 04-All loaded](#The pull to refresh 04-All loaded) * [The pull to refresh 04-All loaded](#The_pull_to_refresh_04-All_loaded)
* [The pull to refresh 05-DIY title](#The pull to refresh 05-DIY title) * [The pull to refresh 05-DIY title](#The_pull_to_refresh_05-DIY_title)
* [The pull to refresh 06-Hidden After loaded](#The pull to refresh 06-Hidden After loaded) * [The pull to refresh 06-Hidden After loaded](#The_pull_to_refresh_06-Hidden_After_loaded)
* [The pull to refresh 07-Automatic back of the pull01](#上The pull to refresh 07-Automatic back of the pull01) * [The pull to refresh 07-Automatic back of the pull01](#The_pull_to_refresh_07-Automatic_back_of_the_pull01)
* [The pull to refresh 08-Automatic back of the pull02](#The pull to refresh 08-Automatic back of the pull02) * [The pull to refresh 08-Automatic back of the pull02](#The_pull_to_refresh_08-Automatic_back_of_the_pull02)
* [The pull to refresh 09-DIY the control of refresh(Automatic refresh)](#The pull to refresh 09-DIY the control of refresh(Automatic refresh)) * [The pull to refresh 09-DIY the control of refresh(Automatic refresh)](#The_pull_to_refresh_09-DIY_the_control_of_refresh(Automatic_refresh))
* [The pull to refresh 10-DIY the control of refresh(Automatic back)](#The pull to refresh 10-DIY the control of refresh(Automatic back)) * [The pull to refresh 10-DIY the control of refresh(Automatic back)](#The_pull_to_refresh_10-DIY_the_control_of_refresh(Automatic_back))
* [UICollectionView01-The pull and drop-down refresh](#UICollectionView01-The pull and drop-down refresh) * [UICollectionView01-The pull and drop-down refresh](#UICollectionView01-The_pull_and_drop-down_refresh)
* [UIWebView01-The drop-down refresh](#UIWebView01-The drop-down refresh) * [UIWebView01-The drop-down refresh](#UIWebView01-The_drop-down_refresh)
* [Hope](#Hope) * [Hope](#Hope)
## <a id="Support what kinds of controls to refresh"></a>Support what kinds of controls to refresh ## <a id="Support_what_kinds_of_controls_to_refresh"></a>Support what kinds of controls to refresh
* `UIScrollView``UITableView``UICollectionView``UIWebView` * `UIScrollView``UITableView``UICollectionView``UIWebView`
## <a id="How to use MJRefresh"></a>How to use MJRefresh ## <a id="How_to_use_MJRefresh"></a>How to use MJRefresh
* Installation with CocoaPods:`pod 'MJRefresh'` * Installation with CocoaPods:`pod 'MJRefresh'`
* Manual import: * Manual import:
* Drag All files in the `MJRefresh` folder to project * Drag All files in the `MJRefresh` folder to project
...@@ -53,11 +53,11 @@ UIScrollView+MJRefresh.h UIScrollView+MJRefresh.m ...@@ -53,11 +53,11 @@ UIScrollView+MJRefresh.h UIScrollView+MJRefresh.m
UIView+MJExtension.h UIView+MJExtension.m UIView+MJExtension.h UIView+MJExtension.m
``` ```
## <a id=">More than hundreds of Apps are using MJRefresh"></a>More than hundreds of Apps are using MJRefresh ## <a id="More_than_hundreds_of_Apps_are_using_MJRefresh"></a>More than hundreds of Apps are using MJRefresh
<img src="http://images0.cnblogs.com/blog2015/497279/201506/141212365041650.png" width="200" height="300"> <img src="http://images0.cnblogs.com/blog2015/497279/201506/141212365041650.png" width="200" height="300">
* More information of App can focus on:[M了个J-博客园](http://www.cnblogs.com/mjios/p/4409853.html) * More information of App can focus on:[M了个J-博客园](http://www.cnblogs.com/mjios/p/4409853.html)
## <a id="The Class Structure Chart of MJRefresh"></a>The Class Structure Chart of MJRefresh ## <a id="The_Class_Structure_Chart_of_MJRefresh"></a>The Class Structure Chart of MJRefresh
![](http://images0.cnblogs.com/blog2015/497279/201506/132232456139177.png) ![](http://images0.cnblogs.com/blog2015/497279/201506/132232456139177.png)
- `The class of red text` in the chart:You can use them directly - `The class of red text` in the chart:You can use them directly
- The drop-down refresh control types - The drop-down refresh control types
...@@ -150,7 +150,7 @@ UIView+MJExtension.h UIView+MJExtension.m ...@@ -150,7 +150,7 @@ UIView+MJExtension.h UIView+MJExtension.m
``` ```
<img src="http://images0.cnblogs.com/blog2015/497279/201506/141345470048120.png" width="30%" height="30%"> <img src="http://images0.cnblogs.com/blog2015/497279/201506/141345470048120.png" width="30%" height="30%">
## <a id="The drop-down refresh 01-Default"></a>The drop-down refresh 01-Default ## <a id="The_drop-down_refresh_01-Default"></a>The drop-down refresh 01-Default
```objc ```objc
self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
...@@ -165,7 +165,7 @@ self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingTarget:self r ...@@ -165,7 +165,7 @@ self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingTarget:self r
``` ```
![(下拉刷新01-普通)](http://images0.cnblogs.com/blog2015/497279/201506/141204343486151.gif) ![(下拉刷新01-普通)](http://images0.cnblogs.com/blog2015/497279/201506/141204343486151.gif)
## <a id="The drop-down refresh 02-Animation image"></a>The drop-down refresh 02-Animation image ## <a id="The_drop-down_refresh_02-Animation_image"></a>The drop-down refresh 02-Animation image
```objc ```objc
// Set the callback(一Once you enter the refresh status,then call the action of target,that is call [self loadNewData]) // Set the callback(一Once you enter the refresh status,then call the action of target,that is call [self loadNewData])
MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)]; MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];
...@@ -180,14 +180,14 @@ self.tableView.mj_header = header; ...@@ -180,14 +180,14 @@ self.tableView.mj_header = header;
``` ```
![(下拉刷新02-动画图片)](http://images0.cnblogs.com/blog2015/497279/201506/141204402238389.gif) ![(下拉刷新02-动画图片)](http://images0.cnblogs.com/blog2015/497279/201506/141204402238389.gif)
## <a id="The drop-down refresh 03-Hide the time"></a>The drop-down refresh 03-Hide the time ## <a id="The_drop-down_refresh_03-Hide_the_time"></a>The drop-down refresh 03-Hide the time
```objc ```objc
// Hide the time // Hide the time
header.lastUpdatedTimeLabel.hidden = YES; header.lastUpdatedTimeLabel.hidden = YES;
``` ```
![(下拉刷新03-隐藏时间)](http://images0.cnblogs.com/blog2015/497279/201506/141204456132944.gif) ![(下拉刷新03-隐藏时间)](http://images0.cnblogs.com/blog2015/497279/201506/141204456132944.gif)
## <a id="The drop-down refresh 04-Hide status and time"></a>The drop-down refresh 04-Hide status and time ## <a id="The_drop-down_refresh_04-Hide_status_and_time"></a>The drop-down refresh 04-Hide status and time
```objc ```objc
// Hide the time // Hide the time
header.lastUpdatedTimeLabel.hidden = YES; header.lastUpdatedTimeLabel.hidden = YES;
...@@ -197,7 +197,7 @@ header.stateLabel.hidden = YES; ...@@ -197,7 +197,7 @@ header.stateLabel.hidden = YES;
``` ```
![(下拉刷新04-隐藏状态和时间0)](http://images0.cnblogs.com/blog2015/497279/201506/141204508639539.gif) ![(下拉刷新04-隐藏状态和时间0)](http://images0.cnblogs.com/blog2015/497279/201506/141204508639539.gif)
## <a id="The drop-down refresh 05-DIY title"></a>The drop-down refresh 05-DIY title ## <a id="The_drop-down_refresh_05-DIY_title"></a>The drop-down refresh 05-DIY title
```objc ```objc
// Set title // Set title
[header setTitle:@"Pull down to refresh" forState:MJRefreshStateIdle]; [header setTitle:@"Pull down to refresh" forState:MJRefreshStateIdle];
...@@ -214,14 +214,14 @@ header.lastUpdatedTimeLabel.textColor = [UIColor blueColor]; ...@@ -214,14 +214,14 @@ header.lastUpdatedTimeLabel.textColor = [UIColor blueColor];
``` ```
![(下拉刷新05-自定义文字)](http://images0.cnblogs.com/blog2015/497279/201506/141204563633593.gif) ![(下拉刷新05-自定义文字)](http://images0.cnblogs.com/blog2015/497279/201506/141204563633593.gif)
## <a id="The drop-down refresh 06-DIY the control of refresh"></a>The drop-down refresh 06-DIY the control of refresh ## <a id="The_drop-down_refresh_06-DIY_the_control_of_refresh"></a>The drop-down refresh 06-DIY the control of refresh
```objc ```objc
self.tableView.mj_header = [MJDIYHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)]; self.tableView.mj_header = [MJDIYHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];
// Implementation reference to MJDIYHeader.h和MJDIYHeader.m // Implementation reference to MJDIYHeader.h和MJDIYHeader.m
``` ```
![(下拉刷新06-自定义刷新控件)](http://images0.cnblogs.com/blog2015/497279/201506/141205019261159.gif) ![(下拉刷新06-自定义刷新控件)](http://images0.cnblogs.com/blog2015/497279/201506/141205019261159.gif)
## <a id="The pull to refresh 01-Default"></a>The pull to refresh 01-Default ## <a id="The_pull_to_refresh_01-Default"></a>The pull to refresh 01-Default
```objc ```objc
self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
//Call this Block When enter the refresh status automatically //Call this Block When enter the refresh status automatically
...@@ -232,7 +232,7 @@ self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingTarget ...@@ -232,7 +232,7 @@ self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingTarget
``` ```
![(上拉刷新01-默认)](http://images0.cnblogs.com/blog2015/497279/201506/141205090047696.gif) ![(上拉刷新01-默认)](http://images0.cnblogs.com/blog2015/497279/201506/141205090047696.gif)
## <a id="The pull to refresh 02-Animation image"></a>The pull to refresh 02-Animation image ## <a id="The_pull_to_refresh_02-Animation_image"></a>The pull to refresh 02-Animation image
```objc ```objc
// Set the callback(Once you enter the refresh status,then call the action of target,that is call [self loadMoreData]) // Set the callback(Once you enter the refresh status,then call the action of target,that is call [self loadMoreData])
MJRefreshAutoGifFooter *footer = [MJRefreshAutoGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; MJRefreshAutoGifFooter *footer = [MJRefreshAutoGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];
...@@ -245,7 +245,7 @@ self.tableView.mj_footer = footer; ...@@ -245,7 +245,7 @@ self.tableView.mj_footer = footer;
``` ```
![(上拉刷新02-动画图片)](http://images0.cnblogs.com/blog2015/497279/201506/141205141445793.gif) ![(上拉刷新02-动画图片)](http://images0.cnblogs.com/blog2015/497279/201506/141205141445793.gif)
## <a id="The pull to refresh 03-Hide the title of refresh status"></a>The pull to refresh 03-Hide the title of refresh status ## <a id="The_pull_to_refresh_03-Hide_the_title_of_refresh_status"></a>The pull to refresh 03-Hide the title of refresh status
```objc ```objc
// Hide the title of refresh status // Hide the title of refresh status
footer.refreshingTitleHidden = YES; footer.refreshingTitleHidden = YES;
...@@ -253,14 +253,14 @@ footer.refreshingTitleHidden = YES; ...@@ -253,14 +253,14 @@ footer.refreshingTitleHidden = YES;
``` ```
![(上拉刷新03-隐藏刷新状态的文字)](http://images0.cnblogs.com/blog2015/497279/201506/141205200985774.gif) ![(上拉刷新03-隐藏刷新状态的文字)](http://images0.cnblogs.com/blog2015/497279/201506/141205200985774.gif)
## <a id="The pull to refresh 04-All loaded"></a>The pull to refresh 04-All loaded ## <a id="The_pull_to_refresh_04-All_loaded"></a>The pull to refresh 04-All loaded
```objc ```objc
//Become the status of NoMoreData //Become the status of NoMoreData
[footer noticeNoMoreData]; [footer noticeNoMoreData];
``` ```
![(上拉刷新04-全部加载完毕)](http://images0.cnblogs.com/blog2015/497279/201506/141205248634686.gif) ![(上拉刷新04-全部加载完毕)](http://images0.cnblogs.com/blog2015/497279/201506/141205248634686.gif)
## <a id="The pull to refresh 05-DIY title"></a>The pull to refresh 05-DIY title ## <a id="The_pull_to_refresh_05-DIY_title"></a>The pull to refresh 05-DIY title
```objc ```objc
// Set title // Set title
[footer setTitle:@"Click or drag up to refresh" forState:MJRefreshStateIdle]; [footer setTitle:@"Click or drag up to refresh" forState:MJRefreshStateIdle];
...@@ -275,20 +275,20 @@ footer.stateLabel.textColor = [UIColor blueColor]; ...@@ -275,20 +275,20 @@ footer.stateLabel.textColor = [UIColor blueColor];
``` ```
![(上拉刷新05-自定义文字)](http://images0.cnblogs.com/blog2015/497279/201506/141205295511153.gif) ![(上拉刷新05-自定义文字)](http://images0.cnblogs.com/blog2015/497279/201506/141205295511153.gif)
## <a id="The pull to refresh 06-Hidden After loaded"></a>The pull to refresh 06-Hidden After loaded ## <a id="The_pull_to_refresh_06-Hidden_After_loaded"></a>The pull to refresh 06-Hidden After loaded
```objc ```objc
//Hidden current control of the pull to refresh //Hidden current control of the pull to refresh
self.tableView.mj_footer.hidden = YES; self.tableView.mj_footer.hidden = YES;
``` ```
![(上拉刷新06-加载后隐藏)](http://images0.cnblogs.com/blog2015/497279/201506/141205343481821.gif) ![(上拉刷新06-加载后隐藏)](http://images0.cnblogs.com/blog2015/497279/201506/141205343481821.gif)
## <a id="The pull to refresh 07-Automatic back of the pull01"></a>The pull to refresh 07-Automatic back of the pull01 ## <a id="The_pull_to_refresh_07-Automatic_back_of_the_pull01"></a>The pull to refresh 07-Automatic back of the pull01
```objc ```objc
self.tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; self.tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];
``` ```
![(上拉刷新07-自动回弹的上拉01)](http://images0.cnblogs.com/blog2015/497279/201506/141205392239231.gif) ![(上拉刷新07-自动回弹的上拉01)](http://images0.cnblogs.com/blog2015/497279/201506/141205392239231.gif)
## <a id="The pull to refresh 08-Automatic back of the pull02"></a>The pull to refresh 08-Automatic back of the pull02 ## <a id="The_pull_to_refresh_08-Automatic_back_of_the_pull02"></a>The pull to refresh 08-Automatic back of the pull02
```objc ```objc
MJRefreshBackGifFooter *footer = [MJRefreshBackGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; MJRefreshBackGifFooter *footer = [MJRefreshBackGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];
...@@ -304,21 +304,21 @@ self.tableView.mj_footer = footer; ...@@ -304,21 +304,21 @@ self.tableView.mj_footer = footer;
``` ```
![(上拉刷新07-自动回弹的上拉02)](http://images0.cnblogs.com/blog2015/497279/201506/141205441443628.gif) ![(上拉刷新07-自动回弹的上拉02)](http://images0.cnblogs.com/blog2015/497279/201506/141205441443628.gif)
## <a id="The pull to refresh 09-DIY the control of refresh(Automatic refresh)"></a>The pull to refresh 09-DIY the control of refresh(Automatic refresh) ## <a id="The_pull_to_refresh_09-DIY_the_control_of_refresh(Automatic_refresh)"></a>The pull to refresh 09-DIY the control of refresh(Automatic refresh)
```objc ```objc
self.tableView.mj_footer = [MJDIYAutoFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; self.tableView.mj_footer = [MJDIYAutoFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];
// Implementation reference to MJDIYAutoFooter.h和MJDIYAutoFooter.m // Implementation reference to MJDIYAutoFooter.h和MJDIYAutoFooter.m
``` ```
![(上拉刷新09-自定义刷新控件(自动刷新))](http://images0.cnblogs.com/blog2015/497279/201506/141205500195866.gif) ![(上拉刷新09-自定义刷新控件(自动刷新))](http://images0.cnblogs.com/blog2015/497279/201506/141205500195866.gif)
## <a id="The pull to refresh 10-DIY the control of refresh(Automatic back)"></a>The pull to refresh 10-DIY the control of refresh(Automatic back) ## <a id="The_pull_to_refresh_10-DIY_the_control_of_refresh(Automatic_back)"></a>The pull to refresh 10-DIY the control of refresh(Automatic back)
```objc ```objc
self.tableView.mj_footer = [MJDIYBackFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; self.tableView.mj_footer = [MJDIYBackFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];
// Implementation reference to MJDIYBackFooter.h和MJDIYBackFooter.m // Implementation reference to MJDIYBackFooter.h和MJDIYBackFooter.m
``` ```
![(上拉刷新10-自定义刷新控件(自动回弹))](http://images0.cnblogs.com/blog2015/497279/201506/141205560666819.gif) ![(上拉刷新10-自定义刷新控件(自动回弹))](http://images0.cnblogs.com/blog2015/497279/201506/141205560666819.gif)
## <a id="UICollectionView01-The pull and drop-down refresh"></a>UICollectionView01-The pull and drop-down refresh ## <a id="UICollectionView01-The_pull_and_drop-down_refresh"></a>UICollectionView01-The pull and drop-down refresh
```objc ```objc
// The drop-down refresh // The drop-down refresh
self.collectionView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ self.collectionView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
...@@ -332,7 +332,7 @@ self.collectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingB ...@@ -332,7 +332,7 @@ self.collectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingB
``` ```
![(UICollectionView01-上下拉刷新)](http://images0.cnblogs.com/blog2015/497279/201506/141206021603758.gif) ![(UICollectionView01-上下拉刷新)](http://images0.cnblogs.com/blog2015/497279/201506/141206021603758.gif)
## <a id="UIWebView01-The drop-down refresh"></a>UIWebView01-The drop-down refresh ## <a id="UIWebView01-The_drop-down_refresh"></a>UIWebView01-The drop-down refresh
```objc ```objc
//Add the control of The drop-down refresh //Add the control of The drop-down refresh
self.webView.scrollView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ self.webView.scrollView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
......
...@@ -3,10 +3,10 @@ PODS: ...@@ -3,10 +3,10 @@ PODS:
- TMCache (~> 2.1.0) - TMCache (~> 2.1.0)
- GMPhobos (0.3.7): - GMPhobos (0.3.7):
- GMCache (~> 0.1.1) - GMCache (~> 0.1.1)
- GMRefresh (0.1.5): - GMRefresh (0.1.6):
- GMPhobos - GMPhobos
- MJRefresh (~> 3.1.0) - MJRefresh (~> 3.1.14)
- MJRefresh (3.1.12) - MJRefresh (3.1.14.1)
- TMCache (2.1.0) - TMCache (2.1.0)
DEPENDENCIES: DEPENDENCIES:
...@@ -14,15 +14,15 @@ DEPENDENCIES: ...@@ -14,15 +14,15 @@ DEPENDENCIES:
EXTERNAL SOURCES: EXTERNAL SOURCES:
GMRefresh: GMRefresh:
:path: "../" :path: ../
SPEC CHECKSUMS: SPEC CHECKSUMS:
GMCache: 73855b613b9d7e34f4f37ad425e8b8153b760c04 GMCache: 73855b613b9d7e34f4f37ad425e8b8153b760c04
GMPhobos: 78912659a3f3587d0c2ea4ca469032e7e88e9592 GMPhobos: 78912659a3f3587d0c2ea4ca469032e7e88e9592
GMRefresh: d63b81fc0e627552965187046ef914042deb82e0 GMRefresh: dac465173bfb7e45f0b7dc5a4c195aed5daeeb91
MJRefresh: b96cdb21c4aa75a7b07654311ab2f315c497e806 MJRefresh: 238e6a37e2dba12160ee3b79f6d2a2b26abcab42
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
PODFILE CHECKSUM: 6b447183006b1a0e6da7bc6db007dd5df4f4fe65 PODFILE CHECKSUM: 6b447183006b1a0e6da7bc6db007dd5df4f4fe65
COCOAPODS: 1.2.1 COCOAPODS: 1.3.1
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.1.5</string> <string>0.1.6</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>BNDL</string> <string>BNDL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.1.5</string> <string>0.1.6</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.1.12</string> <string>3.1.14</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ...@@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
install_framework() install_framework()
{ {
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
...@@ -23,9 +27,9 @@ install_framework() ...@@ -23,9 +27,9 @@ install_framework()
source="$(readlink "${source}")" source="$(readlink "${source}")"
fi fi
# use filter instead of exclude so missing patterns dont' throw errors # Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename local basename
basename="$(basename -s .framework "$1")" basename="$(basename -s .framework "$1")"
...@@ -54,6 +58,15 @@ install_framework() ...@@ -54,6 +58,15 @@ install_framework()
fi fi
} }
# Copies the dSYM of a vendored framework
install_dsym() {
local source="$1"
if [ -r "$source" ]; then
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}"
fi
}
# Signs a framework with the provided identity # Signs a framework with the provided identity
code_sign_if_enabled() { code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
...@@ -76,7 +89,7 @@ strip_invalid_archs() { ...@@ -76,7 +89,7 @@ strip_invalid_archs() {
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped="" stripped=""
for arch in $archs; do for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place # Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1 lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch" stripped="$stripped $arch"
...@@ -89,18 +102,18 @@ strip_invalid_archs() { ...@@ -89,18 +102,18 @@ strip_invalid_archs() {
if [[ "$CONFIGURATION" == "Debug" ]]; then if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/GMCache/GMCache.framework" install_framework "${BUILT_PRODUCTS_DIR}/GMCache/GMCache.framework"
install_framework "$BUILT_PRODUCTS_DIR/GMPhobos/GMPhobos.framework" install_framework "${BUILT_PRODUCTS_DIR}/GMPhobos/GMPhobos.framework"
install_framework "$BUILT_PRODUCTS_DIR/GMRefresh/GMRefresh.framework" install_framework "${BUILT_PRODUCTS_DIR}/GMRefresh/GMRefresh.framework"
install_framework "$BUILT_PRODUCTS_DIR/MJRefresh/MJRefresh.framework" install_framework "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework"
install_framework "$BUILT_PRODUCTS_DIR/TMCache/TMCache.framework" install_framework "${BUILT_PRODUCTS_DIR}/TMCache/TMCache.framework"
fi fi
if [[ "$CONFIGURATION" == "Release" ]]; then if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/GMCache/GMCache.framework" install_framework "${BUILT_PRODUCTS_DIR}/GMCache/GMCache.framework"
install_framework "$BUILT_PRODUCTS_DIR/GMPhobos/GMPhobos.framework" install_framework "${BUILT_PRODUCTS_DIR}/GMPhobos/GMPhobos.framework"
install_framework "$BUILT_PRODUCTS_DIR/GMRefresh/GMRefresh.framework" install_framework "${BUILT_PRODUCTS_DIR}/GMRefresh/GMRefresh.framework"
install_framework "$BUILT_PRODUCTS_DIR/MJRefresh/MJRefresh.framework" install_framework "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework"
install_framework "$BUILT_PRODUCTS_DIR/TMCache/TMCache.framework" install_framework "${BUILT_PRODUCTS_DIR}/TMCache/TMCache.framework"
fi fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait wait
......
...@@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt ...@@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
XCASSET_FILES=() XCASSET_FILES=()
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY}" in case "${TARGETED_DEVICE_FAMILY}" in
1,2) 1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
...@@ -44,29 +48,29 @@ EOM ...@@ -44,29 +48,29 @@ EOM
fi fi
case $RESOURCE_PATH in case $RESOURCE_PATH in
*.storyboard) *.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;; ;;
*.xib) *.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;; ;;
*.framework) *.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;; ;;
*.xcdatamodel) *.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;; ;;
*.xcdatamodeld) *.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;; ;;
*.xcmappingmodel) *.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;; ;;
*.xcassets) *.xcassets)
...@@ -74,7 +78,7 @@ EOM ...@@ -74,7 +78,7 @@ EOM
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;; ;;
*) *)
echo "$RESOURCE_PATH" echo "$RESOURCE_PATH" || true
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;; ;;
esac esac
......
...@@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ...@@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
install_framework() install_framework()
{ {
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
...@@ -23,9 +27,9 @@ install_framework() ...@@ -23,9 +27,9 @@ install_framework()
source="$(readlink "${source}")" source="$(readlink "${source}")"
fi fi
# use filter instead of exclude so missing patterns dont' throw errors # Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename local basename
basename="$(basename -s .framework "$1")" basename="$(basename -s .framework "$1")"
...@@ -54,6 +58,15 @@ install_framework() ...@@ -54,6 +58,15 @@ install_framework()
fi fi
} }
# Copies the dSYM of a vendored framework
install_dsym() {
local source="$1"
if [ -r "$source" ]; then
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}"
fi
}
# Signs a framework with the provided identity # Signs a framework with the provided identity
code_sign_if_enabled() { code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
...@@ -76,7 +89,7 @@ strip_invalid_archs() { ...@@ -76,7 +89,7 @@ strip_invalid_archs() {
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped="" stripped=""
for arch in $archs; do for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place # Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1 lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch" stripped="$stripped $arch"
......
...@@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt ...@@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
XCASSET_FILES=() XCASSET_FILES=()
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY}" in case "${TARGETED_DEVICE_FAMILY}" in
1,2) 1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
...@@ -44,29 +48,29 @@ EOM ...@@ -44,29 +48,29 @@ EOM
fi fi
case $RESOURCE_PATH in case $RESOURCE_PATH in
*.storyboard) *.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;; ;;
*.xib) *.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;; ;;
*.framework) *.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;; ;;
*.xcdatamodel) *.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;; ;;
*.xcdatamodeld) *.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;; ;;
*.xcmappingmodel) *.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;; ;;
*.xcassets) *.xcassets)
...@@ -74,7 +78,7 @@ EOM ...@@ -74,7 +78,7 @@ EOM
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;; ;;
*) *)
echo "$RESOURCE_PATH" echo "$RESOURCE_PATH" || true
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;; ;;
esac esac
......
...@@ -15,7 +15,7 @@ Pod::Spec.new do |s| ...@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.author = { "wangyang" => "wangyang@gmei.com" } s.author = { "wangyang" => "wangyang@gmei.com" }
s.source = { :git => "git@git.gengmei.cc:gengmeiios/GMRefresh.git", :tag => s.version.to_s } s.source = { :git => "git@git.gengmei.cc:gengmeiios/GMRefresh.git", :tag => s.version.to_s }
s.ios.deployment_target = '8.0' s.ios.deployment_target = '8.0'
s.dependency 'MJRefresh', '~> 3.1.0' s.dependency 'MJRefresh', '~> 3.1.14'
s.dependency 'GMPhobos' s.dependency 'GMPhobos'
s.source_files = 'GMRefresh/Classes/**/*' s.source_files = 'GMRefresh/Classes/**/*'
s.resource_bundles = { s.resource_bundles = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment