Merge remote-tracking branch 'origin/develop_01'

# Conflicts:
#	.DS_Store
This commit is contained in:
kai60 2019-11-20 09:55:09 +08:00
commit 057d0da045
2085 changed files with 33132 additions and 87326 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
</dict>
<dict/>
</plist>

BIN
Ifish/.DS_Store vendored

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,86 @@
//
// ABSBootingProtection.h
// AntilockBrakeSystem
//
// Created by 地风ElonChan on 16/5/16.
// Copyright © 2016年 Ali. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef void (^ABSBoolCompletionHandler)(BOOL succeeded, NSError *error);
typedef void (^ABSRepairBlock)(ABSBoolCompletionHandler completionHandler);
typedef void (^ABSReportBlock)(NSUInteger crashCounts);
typedef NS_ENUM(NSInteger, ABSBootingProtectionStatus) {
ABSBootingProtectionStatusNormal, /**< APP 启动正常 */
ABSBootingProtectionStatusNormalChecking, /**< 正在检测是否会在特定时间内是否会 Crash注意检测状态下“连续启动崩溃计数”个数小于或等于上限值 */
ABSBootingProtectionStatusNeedFix, /**< APP 出现连续启动 Crash需要采取修复措施 */
ABSBootingProtectionStatusFixing, /**< APP 出现连续启动 Crash正在修复中... */
};
/**
* crash
* `_crashOnLaunchTimeIntervalThreshold` crash `_continuousCrashOnLaunchNeedToReport` `_continuousCrashOnLaunchNeedToFix`
*/
@interface ABSBootingProtection : NSObject
/**
* crash
* App crash crash [ABSBootingProtection addCrashCountIfNeeded]
* `crashOnLaunchTimeIntervalThreshold`crash`continuousCrashOnLaunchNeedToReport``continuousCrashOnLaunchNeedToFix``crashOnLaunchTimeIntervalThreshold` crash
`reportBlock`
`repairtBlock` `[self setCrashCount:0]`
*/
- (void)launchContinuousCrashProtect;
/*!
* Crash的状态
*/
@property (nonatomic, assign, readonly) ABSBootingProtectionStatus bootingProtectionStatus;
/*!
*
*/
@property (nonatomic, assign, readonly) NSUInteger continuousCrashOnLaunchNeedToReport;
/*!
*
*/
@property (nonatomic, assign, readonly) NSUInteger continuousCrashOnLaunchNeedToFix;
/*!
* APP
*/
@property (nonatomic, assign, readonly) NSTimeInterval crashOnLaunchTimeIntervalThreshold;
/*!
* context block
*/
@property (nonatomic, copy, readonly) NSString *context;
/*!
* @details kCrashOnLaunchTimeIntervalThreshold秒内crashcontinuousCrashOnLaunchNeedToReport次则上报日志continuousCrashOnLaunchNeedToFix则启动修复程序 completion crashOnLaunchTimeIntervalThreshold crash kContinuousCrashOnLaunchCounterKey
* @param context context block
*/
- (instancetype)initWithContinuousCrashOnLaunchNeedToReport:(NSUInteger)continuousCrashOnLaunchNeedToReport
continuousCrashOnLaunchNeedToFix:(NSUInteger)continuousCrashOnLaunchNeedToFix
crashOnLaunchTimeIntervalThreshold:(NSTimeInterval)crashOnLaunchTimeIntervalThreshold
context:(NSString *)context;
/*!
*
*/
+ (ABSBootingProtectionStatus)bootingProtectionStatusWithContext:(NSString *)context continuousCrashOnLaunchNeedToFix:(NSUInteger)continuousCrashOnLaunchNeedToFix;
/*!
* crashCounts crash
*/
- (void)setReportBlock:(ABSReportBlock)reportBlock;
/*!
*
*/
- (void)setRepairBlock:(ABSRepairBlock)repairtBlock;
@end

View File

@ -0,0 +1,16 @@
//
// ABSUncaughtExceptionHandler.h
// AntilockBrakeSystem
//
// Created by 地风ElonChan on 16/5/16.
// Copyright © 2016年 Ali. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef void (^ABSUncaughtExceptionCallback)(NSException *exception);
@interface ABSUncaughtExceptionHandler : NSObject
+ (void)registerExceptionHandlerWithCallback:(ABSUncaughtExceptionCallback)callback;
@end

View File

@ -0,0 +1,24 @@
//
// ABSUtil.h
// AntilockBrakeSystem
//
// Created by 地风ElonChan on 16/5/16.
// Copyright © 2016年 Ali. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ABSUtil : NSObject
// 设置日志逻辑
+ (void)setLogger:(void (^)(NSString *))logger;
+ (void)Logger:(NSString *)log;
+ (BOOL)isValidString:(id)notValidString;
+ (BOOL)isWhiteListClass:(Class)class;
+ (void)deleteCacheWithfilePathsToRemove:(NSArray *)filePathsToRemove;
@end

View File

@ -0,0 +1,22 @@
//
// AlicloudHTTPDNSMini.h
// AlicloudUtils
//
// Created by ryan on 3/6/2016.
// Copyright © 2016 Ali. All rights reserved.
//
#ifndef AlicloudHTTPDNSMini_h
#define AlicloudHTTPDNSMini_h
#define HTTPDNSMINI_RESOLVED_NOTIFY @"HTTPDNSMiniResolvedNotify"
@interface AlicloudHTTPDNSMini : NSObject
+ (AlicloudHTTPDNSMini *)sharedInstance;
- (NSArray *)getIpsByHostAsync:(NSString *)host;
- (void)setPreResolveHosts:(NSArray *)hosts;
@end
#endif /* AlicloudHTTPDNSMini_h */

View File

@ -0,0 +1,106 @@
/*
* Copyright (c) 2000-2015 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
*
* Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
/*
* Copyright (c) 1980, 1986, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)route.h 8.3 (Berkeley) 4/19/94
* $FreeBSD: src/sys/net/route.h,v 1.36.2.1 2000/08/16 06:14:23 jayanth Exp $
*/
#ifndef AlicloudIPv6Adapter_h
#define AlicloudIPv6Adapter_h
#import <Foundation/Foundation.h>
@interface AlicloudIPv6Adapter : NSObject
+ (instancetype)getInstance;
/**
* IPv6-Only网络
*/
- (BOOL)isIPv6OnlyNetwork;
/**
* IPv6-Only网络的判定
*/
- (BOOL)reResolveIPv6OnlyStatus;
/**
IPv4 > IPv6地址转换\n
- IPv4地址无效
- IPv6-Only网络IPv6地址
- IPv6-Only网络
@param addr IPv4地址
@return v6地址
*/
- (NSString *)handleIpv4Address:(NSString *)addr;
/**
* IPv4地址
*/
- (BOOL)isIPv4Address:(NSString *)addr;
/**
* IPv6地址
*/
- (BOOL)isIPv6Address:(NSString *)addr;
@end
#endif /* AlicloudIPv6Adapter_h */

View File

@ -0,0 +1,61 @@
//
// AlicloudReachabilityManager.h
//
// Created by 亿刀 on 14-1-9.
// Edited by junmo on 15-5-16
// Copyright (c) 2014年 Twitter. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#define ALICLOUD_NETWOEK_STATUS_NOTIFY @"AlicloudNetworkStatusChangeNotify"
typedef enum {
AlicloudNotReachable = 0,
AlicloudReachableViaWiFi,
AlicloudReachableVia2G,
AlicloudReachableVia3G,
AlicloudReachableVia4G
} AlicloudNetworkStatus;
@interface AlicloudReachabilityManager : NSObject
/**
* Reachability单例对象
*/
+ (AlicloudReachabilityManager *)shareInstance;
/**
* Reachability单例对象netInfo实例netInfo对象的引用
* warn: netInfo多次实例化crash
*
*/
+ (AlicloudReachabilityManager *)shareInstanceWithNetInfo:(CTTelephonyNetworkInfo *)netInfo;
/**
* (线)
*/
- (AlicloudNetworkStatus)currentNetworkStatus;
/**
*
*/
- (AlicloudNetworkStatus)preNetworkStatus;
/**
* (线)
*/
- (BOOL)checkInternetConnection;
/**
* Wifi网络是否联通
*/
- (BOOL)isReachableViaWifi;
/**
*
*/
- (BOOL)isReachableViaWWAN;
@end

View File

@ -0,0 +1,68 @@
//
// AlicloudReport.h
// AlicloudUtils
//
// Created by ryan on 3/6/2016.
// Copyright © 2016 Ali. All rights reserved.
//
#ifndef AlicloudReport_h
#define AlicloudReport_h
extern const NSString *EXT_INFO_KEY_VERSION;
extern const NSString *EXT_INFO_KEY_PACKAGE;
// SDK标识
typedef NS_ENUM(NSInteger, AMSService) {
AMSMAN = 0,
AMSHTTPDNS,
AMSMPUSH,
AMSMAC,
AMSAPI,
AMSHOTFIX,
AMSFEEDBACK,
AMSIM
};
// 上报状态
typedef NS_ENUM(NSInteger, AMSReportStatus) {
AMS_UNREPORTED_STATUS,
AMS_REPORTED_STATUS
};
@interface AlicloudReport : NSObject
/**
*
*
@param tag SDK标识
*/
+ (void)statAsync:(AMSService)tag;
/**
*
*
@param tag SDK标识
@param extInfo { EXT_INFO_KEY_VERSION :"x.x.x", EXT_INFO_KEY_PACKAGE: "xxx"}
*/
+ (void)statAsync:(AMSService)tag extInfo:(NSDictionary *)extInfo;
/**
* SDK标识上报状态
*
@param tag SDK标识
@return
*/
+ (AMSReportStatus)getReportStatus:(AMSService)tag;
/**
*
*
@param tag SDK标识
@return YES NO
*/
+ (BOOL)isDeviceReported:(AMSService)tag;
@end
#endif /* AlicloudReport_h */

View File

@ -0,0 +1,44 @@
//
// AlicloudTracker.h
// AlicloudUtils
//
// Created by junmo on 2017/6/30.
// Copyright © 2017年 Ali. All rights reserved.
//
#ifndef AlicloudTracker_h
#define AlicloudTracker_h
@interface AlicloudTracker : NSObject
@property (nonatomic, copy) NSString *sdkId;
@property (nonatomic, copy) NSString *sdkVersion;
/**
Tracker的通用打点属性
@param key Key
@param value Value
*/
- (void)setGlobalProperty:(NSString *)key value:(NSString *)value;
/**
Tracker通用打点属性
@param key Key
*/
- (void)removeGlobalProperty:(NSString *)key;
/**
@param eventName
@param duration
@param properties
*/
- (void)sendCustomHit:(NSString *)eventName
duration:(long long)duration
properties:(NSDictionary *)properties;
@end
#endif /* AlicloudTracker_h */

View File

@ -0,0 +1,34 @@
//
// AlicloudTrackerManager.h
// AlicloudUtils
//
// Created by junmo on 2017/7/4.
// Copyright © 2017年 Ali. All rights reserved.
//
#ifndef AlicloudTrackerManager_h
#define AlicloudTrackerManager_h
#import "AlicloudTracker.h"
@interface AlicloudTrackerManager : NSObject
/**
UT
@return
*/
+ (instancetype)getInstance;
/**
SDK标识和版本号获取上报通道
@param sdkId SDK标识
@param version SDK版本号
@return
*/
- (AlicloudTracker *)getTrackerBySdkId:(NSString *)sdkId version:(NSString *)version;
@end
#endif /* AlicloudTrackerManager_h */

View File

@ -0,0 +1,27 @@
//
// AlicloudUtils.h
// AlicloudUtils
//
// Created by lingkun on 16/5/16.
// Copyright © 2016年 Ali. All rights reserved.
//
#import <UIKit/UIKit.h>
#define ALICLOUDUTILS_VERSION @"1.3.7"
// In this header, you should import all the public headers of your framework using statements like #import <AlicloudUtils/PublicHeader.h>
#import <AlicloudUtils/AlicloudReachabilityManager.h>
#import <AlicloudUtils/EMASSecurityModeManager.h>
#import <AlicloudUtils/EMASSecurityModeCommon.h>
#import <AlicloudUtils/AlicloudTrackerManager.h>
#import <AlicloudUtils/AlicloudIPv6Adapter.h>
#import <AlicloudUtils/AlicloudHTTPDNSMini.h>
#import <AlicloudUtils/AntilockBrakeSystem.h>
#import <AlicloudUtils/EMASBeaconService.h>
#import <AlicloudUtils/AlicloudTracker.h>
#import <AlicloudUtils/AlicloudReport.h>
#import <AlicloudUtils/EMASOptions.h>
#import <AlicloudUtils/EMASTools.h>
#import <AlicloudUtils/UtilLog.h>

View File

@ -0,0 +1,11 @@
//
// AntilockBrakeSystem.h
// AntilockBrakeSystem
//
// Created by 地风ElonChan on 16/5/16.
// Copyright © 2016年 Ali. All rights reserved.
//
#import "ABSUncaughtExceptionHandler.h"
#import "ABSBootingProtection.h"
#import "ABSUtil.h"

View File

@ -0,0 +1,45 @@
//
// EMASBeaconService.h
// AlicloudBeacon
//
// Created by junmo on 2017/7/6.
// Copyright © 2017年 junmo. All rights reserved.
//
#ifndef EMASBeaconService_h
#define EMASBeaconService_h
@interface EMASBeaconConfiguration : NSObject
- (instancetype)initWithData:(NSData *)data;
- (id)getConfigureItemByKey:(NSString *)key;
@end
typedef void (^AlicloudBeaconCallbackHandler)(BOOL res, NSError *error);
@interface EMASBeaconService : NSObject
- (instancetype)initWithAppKey:(NSString *)appKey
appSecret:(NSString *)appSecret
SDKVersion:(NSString *)SDKVersion
SDKID:(NSString *)SDKID;
- (instancetype)initWithAppKey:(NSString *)appKey
appSecret:(NSString *)appSecret
SDKVersion:(NSString *)SDKVersion
SDKID:(NSString *)SDKID
extension:(NSDictionary *)extension;
- (void)enableLog:(BOOL)enabled;
- (BOOL)isLogEnabled;
//- (void)getBeaconConfigByKey:(NSString *)key
// completionHandler:(void(^)(EMASBeaconConfiguration *configuration, NSError *error))completionHandler;
- (void)getBeaconConfigStringByKey:(NSString *)key
completionHandler:(void(^)(NSString *result, NSError *error))completionHandler;
@end
#endif /* EMASBeaconService_h */

View File

@ -0,0 +1,37 @@
//
// EMASOptions.h
// AlicloudUtils
//
// Created by junmo on 2018/3/16.
// Copyright © 2018年 Ali. All rights reserved.
//
#ifndef EMASOptions_h
#define EMASOptions_h
@interface EMASOptionSDKServiceItem : NSObject
@property (nonatomic, copy) NSString *sdkId;
@property (nonatomic, copy) NSString *version;
@property (nonatomic, assign) NSNumber *status;
@end
@interface EMASOptions : NSObject
@property (nonatomic, copy, readonly) NSString *emasAppKey;
@property (nonatomic, copy, readonly) NSString *emasAppSecret;
@property (nonatomic, copy, readonly) NSString *emasBundleId;
@property (nonatomic, copy, readonly) NSString *hotfixIdSecret;
@property (nonatomic, copy, readonly) NSString *hotfixRsaSecret;
@property (nonatomic, copy, readonly) NSString *tlogRsaSecret;
@property (nonatomic, copy, readonly) NSString *httpdnsAccountId;
@property (nonatomic, copy, readonly) NSString *httpdnsSecretKey;
+ (EMASOptions *)defaultOptions;
- (NSString *)optionByConfigKey:(NSString *)key;
- (EMASOptionSDKServiceItem *)sdkServiceItemForSdkId:(NSString *)sdkId;
@end
#endif /* EMASOptions_h */

View File

@ -0,0 +1,15 @@
//
// EMASSecurityModeCommon.h
// AlicloudUtils
//
// Created by junmo on 2018/3/11.
// Copyright © 2018年 Ali. All rights reserved.
//
#ifndef EMASSecurityModeCommon_h
#define EMASSecurityModeCommon_h
typedef void (^SDKCheckSuccessHandler)(void);
typedef void (^SDKCheckCrashHandler)(NSUInteger crashCount);
#endif /* EMASSecurityModeCommon_h */

View File

@ -0,0 +1,28 @@
//
// EMASSecurityModeManager.h
// AlicloudUtils
//
// Created by junmo on 2018/3/10.
// Copyright © 2018年 Ali. All rights reserved.
//
#ifndef EMASSecurityModeManager_h
#define EMASSecurityModeManager_h
#import "EMASSecurityModeCommon.h"
@interface EMASSecurityModeManager : NSObject
+ (instancetype)sharedInstance;
- (void)registerSDKComponentAndStartCheck:(NSString *)sdkId
sdkVersion:(NSString *)sdkVersion
appKey:(NSString *)appKey
appSecret:(NSString *)appSecret
sdkCrashThreshold:(NSUInteger)crashTimesThreshold
onSuccess:(SDKCheckSuccessHandler)successHandler
onCrash:(SDKCheckCrashHandler)crashHandler;
@end
#endif /* EMASSecurityModeManager_h */

View File

@ -0,0 +1,57 @@
//
// EMASTools.h
// AlicloudUtils
//
// Created by junmo on 2018/3/14.
// Copyright © 2018年 Ali. All rights reserved.
//
#ifndef EMASTools_h
#define EMASTools_h
#define EMAS_SYNC_EXECUTE_BY_KEY(key, executor)\
[EMASTools syncExecuteBlockByKey:key block:executor];\
#define EMAS_SYNC_EXECUTE_BY_QUEUE(queue, executor)\
[EMASTools syncExecuteBlockByQueue:queue block:executor];\
@interface EMASTools : NSObject
+ (BOOL)isValidString:(id)obj;
+ (BOOL)isValidDictionary:(id)obj;
+ (BOOL)isValidArray:(id)obj;
+ (NSString *)md5:(NSString *)str;
+ (NSString *)sha1:(NSString *)str;
+ (NSString *)hmacSha1:(NSString *)str key:(NSString *)key;
+ (NSString *)base64EncodedWithString:(NSString *)str;
+ (NSString *)base64DecodedWithString:(NSString *)base64Str;
+ (NSData *)aes128CBCEncrypt:(NSData *)data key:(NSData *)key iv:(char *)iv;
+ (NSString *)URLEncodedString:(NSString *)str;
+ (NSString *)convertObjectToJsonString:(id)obj;
+ (id)convertJsonStringToObject:(NSString *)jsonStr;
+ (id)convertJsonDataToObject:(NSData *)jsonData;
+ (NSString *)convertDateToGMT0String:(NSDate *)date;
+ (NSString *)convertDateToGMT8String:(NSDate *)date;
+ (void)swizzleClassMethod:(Class)cls originSEL:(SEL)originSEL swizzleSEL:(SEL)swizzleSEL;
+ (void)swizzleInstanceMethod:(Class)cls originSEL:(SEL)originSEL swizzleSEL:(SEL)swizzleSEL;
+ (BOOL)isIPv4Address:(NSString *)addr;
+ (BOOL)isIPv6Address:(NSString *)addr;
+ (dispatch_queue_t)createQueueIfNotExists:(NSString *)key;
+ (void)syncExecuteBlockByKey:(NSString *)key block:(void(^)(void))block;
+ (void)syncExecuteBlockByQueue:(dispatch_queue_t)queue block:(void(^)(void))block;
+ (NSString *)bundleIdForApp;
+ (NSString *)deviceBrand;
+ (NSString *)deviceModel;
+ (void)threadWaitForSec:(double)sec;
@end
#endif /* EMASTools_h */

View File

@ -0,0 +1,34 @@
//
// UtilLog.h
// AlicloudUtils
//
// Created by junmo on 16/11/24.
// Copyright © 2016年 Ali. All rights reserved.
//
#ifndef UtilLog_h
#define UtilLog_h
@interface UtilLog : NSObject
+ (void)enableLog;
+ (BOOL)isLogEnabled;
#define UtilLogD(tag, frmt, ...)\
if ([UtilLog isLogEnabled]) {\
NSLog(@"[%@]-[D]: %@", tag, [NSString stringWithFormat:(frmt), ##__VA_ARGS__]);\
}
#define UtilLogI(tag, frmt, ...)\
if ([UtilLog isLogEnabled]) {\
NSLog(@"[%@]-[I]: %@", tag, [NSString stringWithFormat:(frmt), ##__VA_ARGS__]);\
}
#define UtilLogE(tag, frmt, ...)\
if ([UtilLog isLogEnabled]) {\
NSLog(@"[%@]-[E]: %@", tag, [NSString stringWithFormat:(frmt), ##__VA_ARGS__]);\
}
@end
#endif /* UtilLog_h */

View File

@ -0,0 +1,6 @@
framework module AlicloudUtils {
umbrella header "AlicloudUtils.h"
export *
module * { export * }
}

View File

@ -0,0 +1,17 @@
//
// CCPSysMessage.h
// CloudPushSDK
//
// Created by wuxiang on 15/5/18.
// Copyright (c) 2015年 aliyun. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CCPSysMessage : NSObject
@property UInt8 messageType;// 消息类型
@property NSData *title; // 标题
@property NSData *body; // 内容
@end

View File

@ -0,0 +1,26 @@
//
// CloudPushCallbackResult.h
// CloudPushSDK
//
// Created by lingkun on 16/6/16.
// Copyright © 2016年 aliyun.mobileService. All rights reserved.
//
#ifndef CloudPushCallbackResult_h
#define CloudPushCallbackResult_h
@interface CloudPushCallbackResult : NSObject
@property(nonatomic, readonly) BOOL success;
@property(nonatomic, readonly, nullable) id data;
@property(nonatomic, readonly, nullable) NSError *error;
+ (nonnull instancetype)resultWithData:(nullable id)data;
+ (nonnull instancetype)resultWithError:(nullable NSError *)error;
@end
#endif /* CloudPushCallbackResult_h */

View File

@ -0,0 +1,184 @@
//
// CloudPushSDK.h
// CloudPushSDK
//
// Created by junmo on 16/7/26.
// Copyright © 2016年 aliyun.mobileService. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CCPSysMessage.h"
#import "MPGerneralDefinition.h"
/* SDK版本号 */
#define MPUSH_IOS_SDK_VERSION @"1.9.9"
@interface CloudPushSDK : NSObject
/**
Push SDK初始化
appKey/appSecret
@param callback
*/
+ (void)autoInit:(CallbackHandler)callback;
/**
* Push SDK初始化
*
* @param appKey appKey
* @param appSecret appSecret
* @param callback
*/
+ (void)asyncInit:(NSString *)appKey
appSecret:(NSString *)appSecret
callback:(CallbackHandler)callback;
/**
*
*/
+ (void)turnOnDebug;
/**
* deviceId (deviceId为推送系统的设备标识)
*
* @return deviceId
*/
+ (NSString *)getDeviceId;
/**
* SDK版本
*
* @return SDK版本
*/
+ (NSString *)getVersion;
/**
*
*
* @return
*/
+ (BOOL)isChannelOpened;
/**
* ACK到服务器
*
* @param userInfo
*/
+ (void)sendNotificationAck:(NSDictionary *)userInfo;
/**
* ACK到服务器 (App处于关闭状态时接收App)
* v1.8.1sendNotificationAck替代
* @param launchOptions
*/
+ (void)handleLaunching:(NSDictionary *)launchOptions DEPRECATED_MSG_ATTRIBUTE("Use 'sendNotificationAck:' instead");
/**
* ACK到服务器 (App处于开启状态时接收)
* v1.8.1sendNotificationAck替代
* @param userInfo
*/
+ (void)handleReceiveRemoteNotification:(NSDictionary *)userInfo DEPRECATED_MSG_ATTRIBUTE("Use 'sendNotificationAck:' instead");
/**
*
*
* @param account
* @param callback
*/
+ (void)bindAccount:(NSString *)account
withCallback:(CallbackHandler)callback;
/**
*
*
* @param callback
*/
+ (void)unbindAccount:(CallbackHandler)callback;
/**
*
* //target指定
* @param target 1 2 3
* @param tags
* @param alias target = 3
* @param callback
*/
+ (void)bindTag:(int)target
withTags:(NSArray *)tags
withAlias:(NSString *)alias
withCallback:(CallbackHandler)callback;
/**
*
* //target指定
* @param target 1 2 3
* @param tags
* @param alias target = 3
* @param callback
*/
+ (void)unbindTag:(int)target
withTags:(NSArray *)tags
withAlias:(NSString *)alias
withCallback:(CallbackHandler)callback;
/**
* callback的data中获取
*
* @param target 1
* @param callback
*/
+ (void)listTags:(int)target
withCallback:(CallbackHandler)callback;
/**
*
*
* @param alias
* @param callback
*/
+ (void)addAlias:(NSString *)alias
withCallback:(CallbackHandler)callback;
/**
*
* alias为nil or length = 0
* @param alias
* @param callback
*/
+ (void)removeAlias:(NSString *)alias
withCallback:(CallbackHandler)callback;
/**
* callback的data中获取
*
* @param callback
*/
+ (void)listAliases:(CallbackHandler)callback;
/**
* deviceToken
*
* @param deviceToken APNs服务器返回的deviceToken
*/
+ (void)registerDevice:(NSData *)deviceToken
withCallback:(CallbackHandler)callback;
/**
* APNs返回的deviceToken
*
* @return deviceToken
*/
+ (NSString *)getApnsDeviceToken;
/**
@param num badge数[0,99999]
@param callback
*/
+ (void)syncBadgeNum:(NSUInteger)num
withCallback:(CallbackHandler)callback;
@end

View File

@ -0,0 +1,28 @@
//
// MPGerneralDefinition.h
// CloudPushSDK
//
// Created by junmo on 16/10/11.
// Copyright © 2016年 aliyun.mobileService. All rights reserved.
//
#ifndef MPGerneralDefinition_h
#define MPGerneralDefinition_h
#import "CloudPushCallbackResult.h"
typedef void (^CallbackHandler)(CloudPushCallbackResult *res);
// 保证callback不为空且回调不在主线程上执行
#define NotNilCallback(funcName, paras)\
if (funcName) {\
if ([NSThread isMainThread]) {\
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\
funcName(paras);\
});\
} else {\
funcName(paras);\
}\
}
#endif /* MPGerneralDefinition_h */

View File

@ -0,0 +1,6 @@
framework module CloudPushSDK {
umbrella header "CloudPushSDK.h"
export *
module * { export * }
}

View File

@ -0,0 +1,55 @@
//
// UTDevice.h
//
//
// Created by Alvin on 4/21/13.
//
// 设备信息的分装类sdk合作开发需要用这个类提供的设备信息接口
// Version:utdid4all-1.1.0
#ifndef UTDIDDevice_h
#define UTDIDDevice_h
#import "AidProtocol.h"
@interface UTDevice : NSObject
/**
* @brief SDK生成的设备唯一标识.
*
* @warning :,,iOS6以及以下,.
*
* :utdid任意时刻都可以调用.
*
* @return 24.
*/
+(NSString *) utdid;
/**
* @brief AID.
*
* @warning :AID线线使{@link getAidAsync}AID
*
* :aid任意时刻都可以调用.
*
* @return AID.
*/
+(NSString *) aid:(NSString *)appName
token:(NSString *)token;
/**
* @brief AID.
*
* @warning :AIDAID
*
* :aidAsync任意时刻都可以调用.
*
*/
+(void) aidAsync:(NSString *)appName
token:(NSString *)token
aidDelegate:(id<AidProtocolDelegate>)aidDelegate;
@end
#endif

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17A405</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>UTDID</string>
<key>CFBundleIdentifier</key>
<string>Taobao.UTDID</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>UTDID</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.0.17-SNAPSHOT</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>15A372</string>
<key>DTPlatformName</key>
<string>iphoneos</string>
<key>DTPlatformVersion</key>
<string>11.0</string>
<key>DTSDKBuild</key>
<string>15A372</string>
<key>DTSDKName</key>
<string>iphoneos11.0</string>
<key>DTXcode</key>
<string>0900</string>
<key>DTXcodeBuild</key>
<string>9A235</string>
<key>MinimumOSVersion</key>
<string>4.3</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
</array>
</dict>
</plist>

Binary file not shown.

View File

@ -0,0 +1,49 @@
//
// AppMonitorSDK.h
// AppMonitorSDK
//
// Created by junzhan on 14-9-9.
// Copyright (c) 2014年 君展. All rights reserved.
// 接口类
#import <Foundation/Foundation.h>
#import "AppMonitorTable.h"
#import "AppMonitorAlarm.h"
#import "AppMonitorCounter.h"
#import "AppMonitorStat.h"
@interface AppMonitor : NSObject
+ (BOOL)isInit;
+ (BOOL) isUTInit;
+ (void) setUTInit;
+ (instancetype)sharedInstance;
/*
*
* @param jsonStr JSON串
*/
+ (void)setSamplingConfigWithJson:(NSString *)jsonStr;
/**
* 线API
*/
+ (void)disableSample;
/**
* ( 50%) [0~10000] (010000100%500050%)
*/
+ (void)setSampling:(NSString *)sampling;
////是否开启实时调试模式与UT同步
+ (BOOL)isTurnOnRealTimeDebug;
+ (NSString*)realTimeDebugUploadUrl;
+ (NSString*)realTimeDebugId;
+(void) turnOnAppMonitorRealtimeDebug:(NSDictionary *) pDict;
+(void) turnOffAppMonitorRealtimeDebug;
@end

View File

@ -0,0 +1,29 @@
//
// UT.h
// miniUTSDK
//
// Created by 宋军 on 15/5/19.
// Copyright (c) 2015年 ___SONGJUN___. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface UT : NSObject
////=====================================h5&Native接口=====================================
/**
* @brief h5&Native打通
*
* @warning :windwave封装aplus_wap.js调用
*
*
*
* @param dataDict aplus_wap.js采集的h5信息都通过该字典传进来,key(funcType)
* funcType=2001h5UT内部会调用
* pageEnter来处理funcType=2101ctrlClicked处理
*
*/
+(void) h5UT:(NSDictionary *) dataDict view:(UIView *) pView viewController:(UIViewController *) pViewController;
@end

View File

@ -0,0 +1,145 @@
//
// UTAnalytics.h
// miniUTInterface
//
// Created by 宋军 on 14-10-14.
// Copyright (c) 2014年 ___SONGJUN___. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "UTTracker.h"
#import "UTIRequestAuthentication.h"
#import "UTICrashCaughtListener.h"
@interface UTAnalytics : NSObject
+ (void) turnOnDev2;
/**
* plist读取appkey
*
* @return UTAnalytics单例
*
*/
+(UTAnalytics *) getInstance;
/**
* :app级appkey/appsecret对
*
*
* @param appKey app级的appkey
*
* @param secret app级的appsecret
*
*/
- (void)setAppKey:(NSString *)appKey secret:(NSString *)secret;
/**
* 1:appkey后utapp级的appkey
*
*
* @param appKey app级的appkey
*
* @param authocode ;nil时
*
*/
- (void)setAppKey4APP:(NSString *)appKey authcode:(NSString *)authcode;
/**
* 2:SDK级appkey/appsecret对
* !!!SDK级appkey(UTTracker *) getTracker:(NSString *) pTrackId将不起作用
* !!!app级appkey(UTTracker *) getTracker:(NSString *) pTrackId才会作用
*
* @param appKey SDK级的appkey
*
* @param secret SDK级的appsecret
*
*/
- (void)setAppKey4SDK:(NSString *)appKey secret:(NSString *)secret;
/**
* 3:appkey后utSDK级的appkey
* !!!SDK级appkey(UTTracker *) getTracker:(NSString *) pTrackId将不起作用
* !!!app级appkey(UTTracker *) getTracker:(NSString *) pTrackId才会作用
*
* @param appKey SDK级的appkey
*
* @param authocode ;nil时
*
*/
- (void)setAppKey4SDK:(NSString *)appKey authcode:(NSString *)authcode;
+ (void)setDailyEnvironment __deprecated;
/**
* :app级的appkey设置appversion
*
* @param pAppVersion app级的appversion
*
*/
-(void) setAppVersion:(NSString *) pAppVersion;
-(void) setChannel:(NSString *) pChannel;
-(void) updateUserAccount:(NSString *) pNick userid:(NSString *) pUserId;
-(void) userRegister:(NSString *) pUsernick;
-(void) updateSessionProperties:(NSDictionary *) pDict;
/**
* :UTTracker.
* app级的appkey,tracker对应app级的生产者
* sdk级的appkeytracker为空,appkey的对应生产者
*
* @return UTTracker
*
*/
-(UTTracker *) getDefaultTracker;
/**
* :trackid对应的UTTracker.
* app级appkey的前提下
*
* @param pTrackId app级的trackid
*
* @return trackid对应的UTTracker
*
*/
-(UTTracker *) getTracker:(NSString *) pTrackId;
/**
* :sdk级对应的UTTracker.
* sdk级的appkey的前提下
*
* @param pAppkey SDK级的appkey
*
* @return sdk级对应的UTTracker
*
*/
-(UTTracker *) getTracker4SDK:(NSString *) pAppkey;
-(void) turnOnDebug;
-(void) turnOnDev;
// 以下接口功能已废弃,接口保留
-(void) setRequestAuthentication:(id<UTIRequestAuthentication>) pRequestAuth __deprecated;
- (void)onCrashHandler;
-(void) turnOffCrashHandler;
-(void) setCrashCaughtListener:(id<UTICrashCaughtListener>) aListener;
@end

View File

@ -0,0 +1,143 @@
//
// UTTracker.h
// miniUTInterface
//
// Created by 宋军 on 14-10-14.
// Copyright (c) 2014年 ___SONGJUN___. All rights reserved.
//
#import <Foundation/Foundation.h>
//#import <UIKit/UIViewController.h>
//#import <UIKit/UIWebView.h>
@class UTDSDKInfo;
typedef enum _UTPageStatus{
UT_H5_IN_WebView//设置容器中的H5页面事件的eventid为2001,不设置默认为2006
} UTPageStatus;
@interface UTTracker : NSObject
@property (readonly,copy) UTDSDKInfo * mSdkinfo;
-(id) initWithTrackId:(NSString *) pTrackId __deprecated;
-(id) initWithAppKey:(NSString *) pAppkey
appsecret:(NSString *) pAppSecret
authcode:(NSString *) pAuthCode
securitySign:(BOOL) securitySign;
-(id) initWithTracker:(UTTracker *) pTracker trackid:(NSString *) pTrackId;
-(NSString *) getAppKey;
-(void) setGlobalProperty:(NSString *) pKey value:(NSString *) pValue;
-(void) removeGlobalProperty:(NSString *) pKey;
-(NSString *) getGlobalProperty:(NSString *) pKey;
-(void) send:(NSDictionary *) pLogDict;
#pragma mark 页面埋点
/**
* @brief .
*
* @param pPageObject ,viewcontroller指针
*
* @warning :1.pageDisAppear配对使用,
* 2.:updatePageName > NSStringFromClass(pObject.class)
*
* :viewcontroller页面,viewDidAppear函数内调用
*/
-(void) pageAppear:(id) pPageObject;
/**
* @brief .
*
* @param pPageObject ,viewcontroller指针
* @param pPageName ,Page_Detail
*
* @warning :1.pageDisAppear配对使用,
* 2.:updatePageName > pPageName > NSStringFromClass(pObject.class)
* pageAppear时已知页面名称,使
* :viewcontroller页面,viewDidAppear函数内调用
*/
-(void) pageAppear:(id) pPageObject withPageName:(NSString *) pPageName;
/**
* @brief .
*
* @param pPageObject ,viewcontroller指针
*
* @warning :pageAppear配对使用,
*
* :viewcontroller页面,viewDidDisAppear函数内调用
*/
-(void) pageDisAppear:(id) pPageObject;
/**
* @brief .
*
* @param pPageObject ,viewcontroller指针
* @param pProperties ,kv对
*
* @warning :pageDisAppear之前调用
*
* :pageDisAppear之前调用即可
*/
-(void) updatePageProperties:(id) pPageObject properties:(NSDictionary *) pProperties;
/**
* @brief .
*
* @param pProperties ,kv对
*
* @warning :pageAppear之前调用,
*
* :pageAppear之前调用
*/
-(void) updateNextPageProperties:(NSDictionary *) pProperties;
#pragma mark 页面埋点的辅助函数
/**
* @brief .
*
* @param pPageObject ,viewcontroller指针
* @param pPageName
*
* @warning :pageAppear时还未知页面名称,使
*
* :pageDisAppear之前调用
*/
-(void) updatePageName:(id) pPageObject pageName:(NSString *) pPageName;
/**
* @brief url.
*
* @param pPageObject ,viewcontroller指针
* @param pUrl url
*
* @warning :url塞给对应的viewcontroller
*
* :pageDisAppear之前调用
*/
-(void) updatePageUrl:(id) pPageObject url:(NSURL *) pUrl;
/**
* @brief .
*
* @param pPageObject ,viewcontroller指针
* @param aStatus enum类型
*
* @warning :,退
*
* :pageAppear之前调用
*/
-(void) updatePageStatus:(id) pPageObject status:(UTPageStatus) aStatus;
-(void) skipPage:(id) pPageObject;
- (void) ctrlClicked:(NSString *)controlName onPage:(NSObject *) pageName args:(NSDictionary *) dict;
@end

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17A405</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>UTMini</string>
<key>CFBundleIdentifier</key>
<string>com.taobao.junzhan.UTMini</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>UTMini</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.2.0.2-appkeys-SNAPSHOT</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>15A372</string>
<key>DTPlatformName</key>
<string>iphoneos</string>
<key>DTPlatformVersion</key>
<string>11.0</string>
<key>DTSDKBuild</key>
<string>15A372</string>
<key>DTSDKName</key>
<string>iphoneos11.0</string>
<key>DTXcode</key>
<string>0900</string>
<key>DTXcodeBuild</key>
<string>9A235</string>
<key>MinimumOSVersion</key>
<string>5.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
</array>
</dict>
</plist>

Some files were not shown because too many files have changed in this diff Show More