Commit eab6bb69 authored by jz's avatar jz

改为动态库

parent 2f74da55
......@@ -326,8 +326,7 @@
"${PODS_ROOT}/Target Support Files/Pods-GMBase_Example/Pods-GMBase_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
"${BUILT_PRODUCTS_DIR}/EVReflection/EVReflection.framework",
"${BUILT_PRODUCTS_DIR}/GM-Swift-Observable/GM_Swift_Observable.framework",
"${BUILT_PRODUCTS_DIR}/GMBase/GMBase.framework",
"${BUILT_PRODUCTS_DIR}/GMCache/GMCache.framework",
"${BUILT_PRODUCTS_DIR}/GMFoundation/GMFoundation.framework",
"${BUILT_PRODUCTS_DIR}/GMHud/GMHud.framework",
......@@ -343,7 +342,6 @@
"${BUILT_PRODUCTS_DIR}/MagicalRecord/MagicalRecord.framework",
"${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework",
"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
"${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework",
"${BUILT_PRODUCTS_DIR}/TMCache/TMCache.framework",
"${BUILT_PRODUCTS_DIR}/UITableView+FDTemplateLayoutCell/UITableView_FDTemplateLayoutCell.framework",
);
......@@ -351,8 +349,7 @@
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EVReflection.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GM_Swift_Observable.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMBase.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMCache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMFoundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMHud.framework",
......@@ -368,7 +365,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MagicalRecord.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TMCache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/UITableView_FDTemplateLayoutCell.framework",
);
......@@ -575,7 +571,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "GMBase/GMBase_Example-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$GMBase-Swift.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
WRAPPER_EXTENSION = app;
......@@ -598,7 +593,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "GMBase/GMBase_Example-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$GMBase-Swift.h";
SWIFT_VERSION = 4.0;
WRAPPER_EXTENSION = app;
};
......
......@@ -3,18 +3,18 @@ inhibit_all_warnings!
platform :ios, '9.0'
#open source
source 'https://github.com/CocoaPods/Specs.git'
#our company
#sour company
source 'git@git.wanmeizhensuo.com:gengmeiios/GMSpecs.git'
target 'GMBase_Example' do
pod 'GMBase', :path => '../'
pod 'SnapKit', '4.0.0'
# pod 'GMKit', :path => '../../GMKit'
# pod 'SnapKit', '4.0.0'
pod 'GMShareSDK', '0.2.1'
# pod 'GMBaseSwift', :path => '../../GMBaseSwift'
pod 'GMBaseSwift', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMBaseSwift.git', :commit => '116868d'
pod 'GMPhobos', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git', :commit => '2fc748a4f501d350f5a75dff23fc33952e7a2f95'
# pod 'GMPhobos', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git', :commit => '2fc748a4f501d350f5a75dff23fc33952e7a2f95'
target 'GMBase_Tests' do
inherit! :search_paths
......@@ -24,6 +24,8 @@ end
post_install do |installer|
# workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
......
......@@ -18,12 +18,7 @@ PODS:
- BDOpenSDKKit (1.0.0)
- DouyinOpenSDK (1.4.1):
- BDOpenSDKKit (~> 1.0.0)
- EVReflection (5.10.0):
- EVReflection/Core (= 5.10.0)
- EVReflection/Core (5.10.0)
- GM-Swift-Observable (4.0.1)
- GMBase (1.1.9):
- GMBaseSwift
- GMBase (1.2.0):
- GMFoundation
- GMHud
- GMJSONModel
......@@ -35,71 +30,62 @@ PODS:
- MBProgressHUD
- SDWebImage
- "UITableView+FDTemplateLayoutCell (= 1.4)"
- GMBaseSwift (3.4.1):
- EVReflection (= 5.10.0)
- GM-Swift-Observable
- GMHud
- GMKit
- GMNetworking
- GMPhobos
- GMRefresh
- SnapKit (= 4.0.0)
- GMCache (1.0.1):
- TMCache (= 2.1.0)
- GMFoundation (1.0.8)
- GMHud (1.0.3):
- MBProgressHUD (= 0.9.2)
- GMJSONModel (1.7.4)
- GMKit (1.2.6):
- GMKit/Category (= 1.2.6)
- GMKit/Color (= 1.2.6)
- GMKit/Constant (= 1.2.6)
- GMKit/FDFullscreenPopGesture (= 1.2.6)
- GMKit/Kit (= 1.2.6)
- GMKit/Protocol (= 1.2.6)
- GMKit (1.3.2):
- GMKit/Category (= 1.3.2)
- GMKit/Color (= 1.3.2)
- GMKit/Constant (= 1.3.2)
- GMKit/FDFullscreenPopGesture (= 1.3.2)
- GMKit/Kit (= 1.3.2)
- GMKit/Protocol (= 1.3.2)
- GMPhobos
- Masonry
- SDWebImage
- SnapKit
- GMKit/Category (1.2.6):
- GMKit/Color (= 1.2.6)
- GMKit/Constant (= 1.2.6)
- GMKit/Protocol (= 1.2.6)
- GMKit/Category (1.3.2):
- GMKit/Color (= 1.3.2)
- GMKit/Constant (= 1.3.2)
- GMKit/Protocol (= 1.3.2)
- GMPhobos
- Masonry
- SDWebImage
- SnapKit
- GMKit/Color (1.2.6):
- GMKit/Color (1.3.2):
- GMPhobos
- Masonry
- SDWebImage
- SnapKit
- GMKit/Constant (1.2.6):
- GMKit/Constant (1.3.2):
- GMPhobos
- Masonry
- SDWebImage
- SnapKit
- GMKit/FDFullscreenPopGesture (1.2.6):
- GMKit/FDFullscreenPopGesture (1.3.2):
- GMPhobos
- Masonry
- SDWebImage
- SnapKit
- GMKit/Kit (1.2.6):
- GMKit/Category (= 1.2.6)
- GMKit/Color (= 1.2.6)
- GMKit/Constant (= 1.2.6)
- GMKit/Protocol (= 1.2.6)
- GMKit/Kit (1.3.2):
- GMKit/Category (= 1.3.2)
- GMKit/Color (= 1.3.2)
- GMKit/Constant (= 1.3.2)
- GMKit/Protocol (= 1.3.2)
- GMPhobos
- Masonry
- SDWebImage
- SnapKit
- GMKit/Protocol (1.2.6):
- GMKit/Protocol (1.3.2):
- GMPhobos
- Masonry
- SDWebImage
- SnapKit
- GMNetService (1.0.2):
- AFNetworking (= 3.1.0)
- GMNetworking (4.0.7):
- Alamofire (= 4.7.0)
- GMPhobos (2.0.7):
- GMPhobos (2.1.4):
- GMCache
- MagicalRecord
- MJExtension
- GMRefresh (1.0.4):
- GMRefresh (1.0.10):
- GMPhobos
- MJRefresh
- GMShareSDK (0.2.1):
......@@ -117,12 +103,11 @@ PODS:
- MagicalRecord/Core (2.3.2)
- Masonry (1.1.0)
- MBProgressHUD (0.9.2)
- MJExtension (3.2.1)
- MJExtension (3.2.2)
- MJRefresh (3.4.3)
- SDWebImage (5.8.0):
- SDWebImage/Core (= 5.8.0)
- SDWebImage/Core (5.8.0)
- SnapKit (4.0.0)
- TMCache (2.1.0)
- "UITableView+FDTemplateLayoutCell (1.4)"
- WechatOpenSDK (1.8.6.2)
......@@ -130,14 +115,10 @@ PODS:
DEPENDENCIES:
- GMBase (from `../`)
- "GMBaseSwift (from `git@git.wanmeizhensuo.com:gengmeiios/GMBaseSwift.git`, commit `116868d`)"
- "GMPhobos (from `git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git`, commit `2fc748a4f501d350f5a75dff23fc33952e7a2f95`)"
- GMShareSDK (= 0.2.1)
- SnapKit (= 4.0.0)
SPEC REPOS:
"git@git.wanmeizhensuo.com:gengmeiios/GMSpecs.git":
- GM-Swift-Observable
- GMCache
- GMFoundation
- GMHud
......@@ -145,6 +126,7 @@ SPEC REPOS:
- GMKit
- GMNetService
- GMNetworking
- GMPhobos
- GMRefresh
- GMShareSDK
https://github.com/CocoaPods/Specs.git:
......@@ -152,14 +134,12 @@ SPEC REPOS:
- Alamofire
- BDOpenSDKKit
- DouyinOpenSDK
- EVReflection
- MagicalRecord
- Masonry
- MBProgressHUD
- MJExtension
- MJRefresh
- SDWebImage
- SnapKit
- TMCache
- "UITableView+FDTemplateLayoutCell"
- WechatOpenSDK
......@@ -168,52 +148,34 @@ SPEC REPOS:
EXTERNAL SOURCES:
GMBase:
:path: "../"
GMBaseSwift:
:commit: 116868d
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMBaseSwift.git"
GMPhobos:
:commit: 2fc748a4f501d350f5a75dff23fc33952e7a2f95
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git"
CHECKOUT OPTIONS:
GMBaseSwift:
:commit: 116868d
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMBaseSwift.git"
GMPhobos:
:commit: 2fc748a4f501d350f5a75dff23fc33952e7a2f95
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git"
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
Alamofire: 907e0a98eb68cdb7f9d1f541a563d6ac5dc77b25
BDOpenSDKKit: 3fb530ce73f85a7d6ee69e7fd3d9158444c5bd09
DouyinOpenSDK: 5ba83de22963ba7a3ba70c8ff11dfcb2885ecc2b
EVReflection: 1abc1a81927ab0d30170238cf9b79bff489e9728
GM-Swift-Observable: 756d8fc13638b9faa68cb10266b2ffb47a911595
GMBase: d726ac9c04aa7653088f03512e67c2af9262a9f8
GMBaseSwift: fb846fbbfd7c6fb82af2909b0d730edfdc572ba6
GMBase: 496c965793168fa0aa579d962a768467f36bcb1d
GMCache: b78d8e46db864405e91d226ce640cc80d966c611
GMFoundation: e9f7fd9c6e5f133e09009b0ee5de4fce60ac5682
GMHud: 18d41f4900a204f27be14e9504fcee2060ae3b2c
GMJSONModel: 5e81a98de668e9f93cf6ff77869f77b0d1a806be
GMKit: ff2a77a9b85e13b4de333ec5eeb10b1ffef09756
GMKit: acc124a9e844ec1ce8300a6b9a8c3e26159f5963
GMNetService: 7c69e7981b4fac29657fad5fc86a0c453196b862
GMNetworking: 592b9b71f2a7d92203483276158ce3139ac789d2
GMPhobos: 115e2608cdebcccf445bf95766fee25a4b62153d
GMRefresh: c01ff8de5ada92e1362602fb6991f99124b7dbe3
GMPhobos: b4e16c162df6618c6f7d10f4649a5f32920961fd
GMRefresh: 11497a660eb14b1fda443bfe682910e0cc6031f4
GMShareSDK: a0725e2848d043aec84e787f6d233ac1546c1661
MagicalRecord: 53bed74b4323b930992a725be713e53b37d19755
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
MJExtension: 635f2c663dcb1bf76fa4b715b2570a5710aec545
MJExtension: d9b9c74cbdeb724c1e9ecbb157b318276e62e876
MJRefresh: 53e3e3219f204425ee6d3e62e8733d3295944cd6
SDWebImage: 84000f962cbfa70c07f19d2234cbfcf5d779b5dc
SnapKit: a42d492c16e80209130a3379f73596c3454b7694
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
"UITableView+FDTemplateLayoutCell": 234e1582bcc4e18461af91155123bb96538ed030
WechatOpenSDK: 8b3ba4239193d1112205c139c94e21934e8f369a
Weibo_SDK: 5a4d08f7e1fedbb635435e4585c8c0439c7da089
PODFILE CHECKSUM: 6ac1e6d23702f1381ddc1b0064ddfa7267a6141e
PODFILE CHECKSUM: 1b114dc329311cb9f6fc222d6307aef289098f91
COCOAPODS: 1.9.3
......@@ -6,7 +6,7 @@ Pod::Spec.new do |s|
s.license = '仅限北京更美互动信息科技有限公司内部使用'
s.author = { 'wangyang' => 'wangyang@gmei.com' }
s.source = { :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMBase.git', :tag => s.version.to_s }
s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
s.source_files = 'GMBase/Classes/**/*'
s.dependency 'GMRefresh'
......@@ -21,8 +21,8 @@ Pod::Spec.new do |s|
# s.dependency 'GMShareSDK'
s.dependency 'GMFoundation'
s.dependency 'GMNetworking'
s.dependency 'GMBaseSwift'
# s.dependency 'GMBaseSwift'
s.swift_version = '4.0'
s.static_framework = true
# s.swift_version = '4.0'
# s.static_framework = true
end
//
// GMCalendarEventManager.swift
// Gengmei
//
// Created by 汪俊 on 16/7/4.
// Copyright © 2016年 更美互动信息科技有限公司. All rights reserved.
//
import UIKit
//import GMBaseSwift
import EventKit
public typealias CalendarAuthorizationAllowedBlock = () -> Void
@objcMembers
public class GMCalendarEventManager: NSObject {
public var authorizationAllowed: CalendarAuthorizationAllowedBlock?
public var eventStore = EKEventStore()
public override init() {
super.init()
//请求授权
let status = EKEventStore.authorizationStatus(for: .event)
if status == .notDetermined {
eventStore.requestAccess(to: .event, completion: { (allowed, _) in
if allowed {
print("allowed")
if self.authorizationAllowed != nil {
self.authorizationAllowed!()
}
} else {
print("not allowed")
}
})
} else if status == .restricted || status == .denied {
showAlertcontrolle()
}
}
/**
添加日历事件
- author: wangjun 07-07-2016 in 6.1.0
- parameter title: 事件的标题
- parameter startDate: 开始时间
- parameter endDate: 结束时间`
- parameter triggerTime: 提醒事件
- parameter url: 跳转到美购详情页面的地址
*/
public func addEvent(_ title: String = "", startDate: TimeInterval, endDate: TimeInterval, serviceId: String, url: String) {
let timeZone = TimeZone.current
let deltaTime = timeZone.secondsFromGMT()
let event = EKEvent(eventStore: eventStore)
let gengmeiTitle = "更美App秒杀: " + title
event.title = gengmeiTitle
event.startDate = Date(timeIntervalSince1970: startDate - TimeInterval(deltaTime))
event.endDate = Date(timeIntervalSince1970: endDate - TimeInterval(deltaTime))
event.calendar = eventStore.defaultCalendarForNewEvents
event.notes = url
//计算出秒杀提醒时间,开始前3分钟
var triggerTime = Date(timeIntervalSince1970: startDate)
triggerTime = triggerTime.addingTimeInterval(-180 - TimeInterval(deltaTime))
let alarm = EKAlarm(absoluteDate: triggerTime)
event.addAlarm(alarm)
do {
try eventStore.save(event, span: .thisEvent)
//将event的id 保存到本地
UserDefaults.standard.set(event.eventIdentifier, forKey: serviceId)
UserDefaults.standard.synchronize()
} catch {
print("error show")
}
}
/**
通过标题删除日历事件
- author: wangjun 07-07-2016 in 6.1.0
- parameter title: 事件的标题
*/
public func removeEvent(_ serviceId: String) {
//取出对应的event eventId
guard let eventId = (UserDefaults.standard.object(forKey: serviceId)) as? String else {
return
}
let event = eventStore.event(withIdentifier: eventId)
do {
if event != nil {
try eventStore.remove(event!, span: .thisEvent)
}
} catch {
print("error")
}
}
/**
判断用户是够开启日历服务
- author: wangjun
- date: 16-07-04 18:07:22 07-04-2016 in 6.1.0
*/
public func checkAuthorized() -> Bool {
return EKEventStore.authorizationStatus(for: .event) == .authorized
}
/**
提醒用户开启日历服务的alert
- author: wangjun 07-07-2016 in 6.1.0
*/
public func showAlertcontrolle() {
let status = EKEventStore.authorizationStatus(for: .event)
if status == .authorized {
return
} else {
let alert = UIAlertController(title: "", message: "未授权日历权限,可能导致无法成功提醒哟,快去开启设置吧", preferredStyle: .alert)
let actionA = UIAlertAction(title: "取消", style: .cancel) { (_) in}
alert.addAction(actionA)
let actionB = UIAlertAction(title: "去设置", style: .default) { (_) in
if #available(iOS 10.0, *) {
UIApplication.shared.open(URL(string: UIApplicationOpenSettingsURLString)!, options: [:], completionHandler: nil)
} else {
UIApplication.shared.openURL(URL(string: UIApplicationOpenSettingsURLString)!)
}
}
alert.addAction(actionB)
GMBaseTool.getCurrentViewController().present(alert, animated: true, completion: nil)
}
}
}
//
// GMLiveWelfareView.h
// Gengmei
//
// Created by 汪俊 on 2017/3/30.
// Copyright © 2017年 更美互动信息科技有限公司. All rights reserved.
//
#import "GMImageView.h"
#import "GMInstallmentView.h"
#import "GMInsuranceView.h"
//#import "Gengmei-Swift.h"
@class AllLayoutButton;
@class GMLiveWelfareView;
@class GMAdLabel;
@protocol GMLiveWelfareViewDelegate <NSObject>
- (void)didSelectedWelfareView:(GMLiveWelfareView *)welFareView;
- (void)didClickedHospitalDetailButton:(AllLayoutButton *)button;
@end
/**
直播和回放页面的美购
*/
@interface GMLiveWelfareView : GMView
@property (nonatomic , strong) GMView *welfareContainer;
/** @brief 美购大图片 */
@property (nonatomic , strong) GMImageView *bigIconImage;
/** @brief 预付价 */
@property (nonatomic , strong) GMImageView *yufuImage;
/** @brief 已售完 */
@property (nonatomic , strong) GMImageView *sallOutImage;
/** @brief 美购标题 */
@property (nonatomic , strong) GMLabel *welfareTitle;
/** @brief 美购简介 */
@property (nonatomic , strong) GMAdLabel *welfareContent;
/** @brief 更美价 */
@property (nonatomic , strong) GMLabel *gengmeiPrice;
/** @brief 市场价 */
@property (nonatomic , strong) GMLabel *marketPrice;
/** @brief 删除线 */
@property (nonatomic , strong) GMLabel *deleteLabel;
/** @brief 人民币(元/元起) */
@property (nonatomic , strong) GMLabel *yuanLabel;
/** @brief 预付款标签 */
@property (nonatomic , strong) GMLabel *yufuLabel;
/** @brief 申请数 */
@property (nonatomic , strong) GMLabel *applyNumber;
/** @brief 剩余多少个*/
@property (nonatomic , strong) GMLabel *surplusLabel;
/** @brief 城市 */
@property (nonatomic , strong) GMLabel *cityLabel;
/** @brief 医生 */
@property (nonatomic , strong) GMLabel *doctorLabel;
/** @brief 机构 */
@property (nonatomic , strong) GMLabel *hospitalLabel;
/**状态栏背景*/
@property (nonatomic, strong) GMView *statusBG;
/** @brief */
@property (nonatomic , strong) UIView *surplusBG;
/** @brief 秒杀价图片*/
@property (nonatomic , strong) GMImageView *seckillIcon;
/** seckill是否隐藏*/
@property (nonatomic, assign) BOOL isSeckillHidden;
/**
展示推广label
@author wangjun 16-08-01 in 6.3.0
*/
@property (nonatomic, assign) BOOL showPromotion;
/**
分期提示
*/
//@property (nonatomic, strong) GMInstallmentView *installmentView;
/**
保险提示
*/
//@property (nonatomic, strong) GMInsuranceView *insuranceView;
/**
是否展示推分期
*/
//@property (nonatomic, assign) BOOL showInstallment;
/**
是否展示保险
*/
//@property (nonatomic, assign) BOOL showInsurance;
@property (nonatomic , strong) UIImageView *hospitalBg;
@property (nonatomic, weak) id<GMLiveWelfareViewDelegate> delegate;
- (void)show;
- (void)hide;
@end
This diff is collapsed.
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