集成httpdns

This commit is contained in:
kai60 2022-01-17 11:40:56 +08:00
parent 7b7faab5ce
commit f63f7d216c
82 changed files with 2789 additions and 13 deletions

View File

@ -2275,6 +2275,13 @@
C024B7AF2379668B00509424 /* NSMutableString+AvoidCrash.h in Headers */ = {isa = PBXBuildFile; fileRef = C024B79B2379668B00509424 /* NSMutableString+AvoidCrash.h */; };
C024B7B02379668B00509424 /* NSMutableAttributedString+AvoidCrash.h in Headers */ = {isa = PBXBuildFile; fileRef = C024B79C2379668B00509424 /* NSMutableAttributedString+AvoidCrash.h */; };
C024B7B12379668B00509424 /* NSMutableArray+AvoidCrash.h in Headers */ = {isa = PBXBuildFile; fileRef = C024B79D2379668B00509424 /* NSMutableArray+AvoidCrash.h */; };
C02D9E502794011100BBBF8D /* EMASRest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C02D9E492794011100BBBF8D /* EMASRest.framework */; };
C02D9E512794011100BBBF8D /* AlicloudSender.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C02D9E4A2794011100BBBF8D /* AlicloudSender.framework */; };
C02D9E522794011200BBBF8D /* UTDID.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C02D9E4B2794011100BBBF8D /* UTDID.framework */; };
C02D9E532794011200BBBF8D /* AlicloudBeacon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C02D9E4C2794011100BBBF8D /* AlicloudBeacon.framework */; };
C02D9E542794011200BBBF8D /* AlicloudUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C02D9E4D2794011100BBBF8D /* AlicloudUtils.framework */; };
C02D9E552794011300BBBF8D /* UTMini.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C02D9E4E2794011100BBBF8D /* UTMini.framework */; };
C02D9E562794011300BBBF8D /* AlicloudHttpDNS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C02D9E4F2794011100BBBF8D /* AlicloudHttpDNS.framework */; };
C02ED596249E3B7300CAC37D /* InfoByImageViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = C02ED594249E3B7300CAC37D /* InfoByImageViewController.h */; };
C02ED597249E3B7300CAC37D /* InfoByImageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C02ED595249E3B7300CAC37D /* InfoByImageViewController.m */; };
C072196A253AE2290065CF17 /* IfishP2PPlayBackListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0721969253AE2290065CF17 /* IfishP2PPlayBackListViewController.xib */; };
@ -5747,6 +5754,13 @@
C024B79B2379668B00509424 /* NSMutableString+AvoidCrash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableString+AvoidCrash.h"; sourceTree = "<group>"; };
C024B79C2379668B00509424 /* NSMutableAttributedString+AvoidCrash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableAttributedString+AvoidCrash.h"; sourceTree = "<group>"; };
C024B79D2379668B00509424 /* NSMutableArray+AvoidCrash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+AvoidCrash.h"; sourceTree = "<group>"; };
C02D9E492794011100BBBF8D /* EMASRest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = EMASRest.framework; sourceTree = "<group>"; };
C02D9E4A2794011100BBBF8D /* AlicloudSender.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AlicloudSender.framework; sourceTree = "<group>"; };
C02D9E4B2794011100BBBF8D /* UTDID.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = UTDID.framework; sourceTree = "<group>"; };
C02D9E4C2794011100BBBF8D /* AlicloudBeacon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AlicloudBeacon.framework; sourceTree = "<group>"; };
C02D9E4D2794011100BBBF8D /* AlicloudUtils.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AlicloudUtils.framework; sourceTree = "<group>"; };
C02D9E4E2794011100BBBF8D /* UTMini.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = UTMini.framework; sourceTree = "<group>"; };
C02D9E4F2794011100BBBF8D /* AlicloudHttpDNS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AlicloudHttpDNS.framework; sourceTree = "<group>"; };
C02ED594249E3B7300CAC37D /* InfoByImageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InfoByImageViewController.h; sourceTree = "<group>"; };
C02ED595249E3B7300CAC37D /* InfoByImageViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InfoByImageViewController.m; sourceTree = "<group>"; };
C0721969253AE2290065CF17 /* IfishP2PPlayBackListViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IfishP2PPlayBackListViewController.xib; sourceTree = "<group>"; };
@ -6139,6 +6153,7 @@
buildActionMask = 2147483647;
files = (
CB484CF122B87D250075F050 /* libresolv.tbd in Frameworks */,
88C6861C1EA61000004CDFD9 /* libsqlite3.0.tbd in Frameworks */,
18C54F202350541500DF4E7D /* AlibabaAuthSDK.framework in Frameworks */,
88C686401EA611AE004CDFD9 /* libsqlite3.tbd in Frameworks */,
3D4AFF5F21F34E1C0053BAA0 /* libstdc++.tbd in Frameworks */,
@ -6151,6 +6166,7 @@
8857E43C1ECBE53A004A3D75 /* libc++.tbd in Frameworks */,
18C54F2A2350541500DF4E7D /* SGNoCaptcha.framework in Frameworks */,
88C686581EA61298004CDFD9 /* AudioToolbox.framework in Frameworks */,
C02D9E522794011200BBBF8D /* UTDID.framework in Frameworks */,
18C54F2C2350541500DF4E7D /* SGSecurityBody.framework in Frameworks */,
88C6865A1EA612A6004CDFD9 /* AssetsLibrary.framework in Frameworks */,
88C686601EA612DE004CDFD9 /* Accelerate.framework in Frameworks */,
@ -6162,6 +6178,7 @@
18C54F232350541500DF4E7D /* SecurityGuardSDK.framework in Frameworks */,
3D1C50B0221A9EDF0096AE43 /* YMsgBox.a in Frameworks */,
88C686501EA61259004CDFD9 /* CoreLocation.framework in Frameworks */,
C02D9E532794011200BBBF8D /* AlicloudBeacon.framework in Frameworks */,
18C54F262350541500DF4E7D /* SGMain.framework in Frameworks */,
88C6864E1EA6124B004CDFD9 /* CoreVideo.framework in Frameworks */,
88C6864C1EA6123B004CDFD9 /* CoreTelephony.framework in Frameworks */,
@ -6176,6 +6193,7 @@
C0F0400C23756F3C00B61D3B /* ExternalAccessory.framework in Frameworks */,
88C686441EA611DC004CDFD9 /* libc++abi.tbd in Frameworks */,
3D1C50B3221A9EDF0096AE43 /* YTheNaviBar.a in Frameworks */,
C02D9E502794011100BBBF8D /* EMASRest.framework in Frameworks */,
18C54F272350541500DF4E7D /* AlibcTradeCommon.framework in Frameworks */,
88C6863C1EA6116C004CDFD9 /* libxml2.tbd in Frameworks */,
88C6863A1EA61149004CDFD9 /* MapKit.framework in Frameworks */,
@ -6194,16 +6212,18 @@
88C686241EA61081004CDFD9 /* MediaToolbox.framework in Frameworks */,
88C686221EA6106E004CDFD9 /* MediaPlayer.framework in Frameworks */,
88C686201EA61057004CDFD9 /* libbz2.1.0.tbd in Frameworks */,
C02D9E552794011300BBBF8D /* UTMini.framework in Frameworks */,
88C6861E1EA61041004CDFD9 /* libicucore.tbd in Frameworks */,
88C6861C1EA61000004CDFD9 /* libsqlite3.0.tbd in Frameworks */,
88C6861A1EA60FD6004CDFD9 /* VideoToolbox.framework in Frameworks */,
3D1C50B5221A9EDF0096AE43 /* YSlider.a in Frameworks */,
C02D9E512794011100BBBF8D /* AlicloudSender.framework in Frameworks */,
88C686181EA60EDA004CDFD9 /* MessageUI.framework in Frameworks */,
88C686161EA60EB3004CDFD9 /* CoreText.framework in Frameworks */,
18C54F212350541500DF4E7D /* AlibcTradeSDK.framework in Frameworks */,
88C686141EA60EA9004CDFD9 /* WebKit.framework in Frameworks */,
CB8B646C230FAD340032EB24 /* Bugly.framework in Frameworks */,
88C686011EA603A8004CDFD9 /* UShareUI.framework in Frameworks */,
C02D9E562794011300BBBF8D /* AlicloudHttpDNS.framework in Frameworks */,
88C685F91EA603A8004CDFD9 /* libSocialWeChat.a in Frameworks */,
CB48209B2335CB2300A50C92 /* GWP2P.framework in Frameworks */,
3DD7AB4B21E2F2FB0064856A /* libzbar.a in Frameworks */,
@ -6215,6 +6235,7 @@
883E7BCE1EA5FA1A00ED5D89 /* SMS_SDK.framework in Frameworks */,
88C685F71EA603A8004CDFD9 /* libWeiboSDK.a in Frameworks */,
881671BE1EA5DE2B00BEBF23 /* UMComNetwork.framework in Frameworks */,
C02D9E542794011200BBBF8D /* AlicloudUtils.framework in Frameworks */,
88C685F41EA603A8004CDFD9 /* TencentOpenAPI.framework in Frameworks */,
88C685FC1EA603A8004CDFD9 /* UMSocialCore.framework in Frameworks */,
18C54F252350541500DF4E7D /* AlibcTradeBiz.framework in Frameworks */,
@ -12067,6 +12088,7 @@
88F5EEE81D48D04100CC7CAF /* libs */ = {
isa = PBXGroup;
children = (
C02D9E482794011100BBBF8D /* HTTPDNS */,
C0EA883E23AF61D6003DC53B /* SDWebImage3.8.2 */,
C024B7892379668B00509424 /* AvoidCrash */,
CB484CE822B76DEC0075F050 /* GWP2PSDK */,
@ -12286,6 +12308,20 @@
path = AvoidCrash;
sourceTree = "<group>";
};
C02D9E482794011100BBBF8D /* HTTPDNS */ = {
isa = PBXGroup;
children = (
C02D9E492794011100BBBF8D /* EMASRest.framework */,
C02D9E4A2794011100BBBF8D /* AlicloudSender.framework */,
C02D9E4B2794011100BBBF8D /* UTDID.framework */,
C02D9E4C2794011100BBBF8D /* AlicloudBeacon.framework */,
C02D9E4D2794011100BBBF8D /* AlicloudUtils.framework */,
C02D9E4E2794011100BBBF8D /* UTMini.framework */,
C02D9E4F2794011100BBBF8D /* AlicloudHttpDNS.framework */,
);
path = HTTPDNS;
sourceTree = "<group>";
};
C0837A54244FF5500034FEC5 /* EGOCache */ = {
isa = PBXGroup;
children = (
@ -15860,6 +15896,7 @@
"$(PROJECT_DIR)/Ifish/Bugly",
"$(PROJECT_DIR)/Ifish/ALiBCTrade/Frameworks",
"$(PROJECT_DIR)/Ifish/SDWebImage3.8.2",
"$(PROJECT_DIR)/Ifish/HTTPDNS",
);
GCC_PREFIX_HEADER = "Ifish/Ifish-Prefix.pch";
HEADER_SEARCH_PATHS = "";
@ -15904,7 +15941,7 @@
"$(PROJECT_DIR)/Ifish/controllers/IfishYooseeFile/IfishYsooseeNewLib/libAVCtrlIOS/libAVCtrl",
"$(PROJECT_DIR)/Ifish/controllers/IfishYooseeFile/IfishYsooseeNewLib/libAVCtrl",
);
MARKETING_VERSION = 5.1.19;
MARKETING_VERSION = 5.1.20;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"-ObjC",
@ -15978,6 +16015,7 @@
"$(PROJECT_DIR)/Ifish/Bugly",
"$(PROJECT_DIR)/Ifish/ALiBCTrade/Frameworks",
"$(PROJECT_DIR)/Ifish/SDWebImage3.8.2",
"$(PROJECT_DIR)/Ifish/HTTPDNS",
);
GCC_PREFIX_HEADER = "Ifish/Ifish-Prefix.pch";
HEADER_SEARCH_PATHS = "";
@ -16022,7 +16060,7 @@
"$(PROJECT_DIR)/Ifish/controllers/IfishYooseeFile/IfishYsooseeNewLib/libAVCtrlIOS/libAVCtrl",
"$(PROJECT_DIR)/Ifish/controllers/IfishYooseeFile/IfishYsooseeNewLib/libAVCtrl",
);
MARKETING_VERSION = 5.1.19;
MARKETING_VERSION = 5.1.20;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"-ObjC",

BIN
Ifish/.DS_Store vendored

Binary file not shown.

View File

@ -53,6 +53,8 @@
#define UMCommunity_APPKEY @"569f530fe0f55a3e9a002502"
#define UMCommunity_SECRET @"462384e695d18d287ee46c423c5dce34"
#define HTTPDNS_ACCOUNTID 139960
#define HTTPDNS_SECRET @"9ff868c992944f68a2a8929bc09e9f41"
//appkey
#import "UMSocialWechatHandler.h"
@ -85,7 +87,9 @@
#import <AlibcTradeSDK/AlibcTradeSDK.h>
#import "IfishADTimerViewController.h"
#import "AvoidCrash.h"
@interface AppDelegate ()
#import <AlicloudHttpDNS/AlicloudHttpDNS.h>
@interface AppDelegate ()<HttpDNSDegradationDelegate,HttpdnsLoggerProtocol>
@property(nonatomic,strong)ICSDrawerController*ics;
@property(nonatomic)NSString*downloadAddress;
@ -174,6 +178,9 @@
if (data != nil) {
[self sendExceptionLogWithData:data path:dataPath];
}*/
[self setupHTTPDNS];
#ifdef __OPTIMIZE__
[AvoidCrash becomeEffective];
#endif
@ -377,6 +384,70 @@ if (kScreenSize.height>480) {
return YES;
}
#pragma mark - mark dns
-(void)setupHTTPDNS
{
HttpDnsService *httpdns = [[HttpDnsService alloc] initWithAccountID:HTTPDNS_ACCOUNTID];
// HTTPDNS
[httpdns setDelegateForDegradationFilter:self];
// IP
[httpdns setExpiredIPEnabled:YES];
// HTTPDNS Log线
[httpdns setLogEnabled:YES];
[httpdns setLogHandler:self];
/*
* HTTPDNS(HTTP/HTTPS)HTTP
* SDKHTTPCFNetworkATS
*/
//[httpdns setHTTPSRequestEnabled:YES];
// edited
NSArray *preResolveHosts = @[DOMAIN_NAME];
// NSArray* preResolveHosts = @[@"pic1cdn.igetget.com"];
//
[httpdns setPreResolveHosts:preResolveHosts];
[httpdns setTimeoutInterval:15];
httpdns=[HttpDnsService sharedInstance];
__block NSString*ip = [httpdns getIpByHostAsync:DOMAIN_NAME];
if (ip.length)
{
DOMAIN_NAME=ip;
}
else
{
dispatch_queue_t queue= dispatch_queue_create("dns", DISPATCH_QUEUE_CONCURRENT);
dispatch_semaphore_t sema =dispatch_semaphore_create(0);
dispatch_async(queue, ^{
while (!ip) {
ip = [httpdns getIpByHostAsync:DOMAIN_NAME];
if (ip)
{
dispatch_semaphore_signal(sema);
break;
}
}
});
dispatch_semaphore_wait(sema, dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1*NSEC_PER_SEC)));
if (ip.length)
{
DOMAIN_NAME=ip;
}
}
}
- (BOOL)shouldDegradeHTTPDNS:(NSString *)hostName;
{
return NO;
}
- (void)log:(NSString *)logStr;
{
NSLog(@"dnsLog:%@",logStr);
}
//toast
-(void)setUpToastView{

Binary file not shown.

View File

@ -0,0 +1,13 @@
//
// AlicloudBeacon.h
// AlicloudBeacon
//
// Created by chenyilong on 12/10/2017.
// Copyright © 2017 alibaba. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <AlicloudBeacon/AlicloudBeaconService.h>

View File

@ -0,0 +1,41 @@
//
// AlicloudBeaconService.h
// AlicloudBeacon
//
// Created by junmo on 2017/7/6.
// Copyright © 2017年 junmo. All rights reserved.
//
#ifndef AlicloudBeaconService_h
#define AlicloudBeaconService_h
@interface AlicloudBeaconConfiguration : NSObject
- (instancetype)initWithData:(NSData *)data;
- (id)getConfigureItemByKey:(NSString *)key;
@end
typedef void (^AlicloudBeaconCallbackHandler)(BOOL res, NSError *error);
@interface AlicloudBeaconService : 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)getBeaconConfigStringByKey:(NSString *)key
completionHandler:(void(^)(NSString *result, NSError *error))completionHandler;
@end
#endif /* AlicloudBeaconService_h */

View File

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

View File

@ -0,0 +1,27 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#import <Foundation/Foundation.h>
static NSString *const HTTPDNS_IOS_SDK_VERSION = @"2.0.5";
#import <Foundation/Foundation.h>
#import "HttpdnsLoggerDelegate.h"
#import "HttpdnsServiceProvider.h"
#import "HttpdnsDegradationDelegate.h"

View File

@ -0,0 +1,29 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifndef HttpdnsDegradationDelegate_h
#define HttpdnsDegradationDelegate_h
@protocol HttpDNSDegradationDelegate <NSObject>
- (BOOL)shouldDegradeHTTPDNS:(NSString *)hostName;
@end
#endif /* HttpdnsDegradationDelegate_h */

View File

@ -0,0 +1,20 @@
//
// HttpdnsLoggerProtocol.h
// AlicloudHttpDNS
//
// Created by junmo on 2018/12/19.
// Copyright © 2018年 alibaba-inc.com. All rights reserved.
//
#ifndef HttpdnsLoggerProtocol_h
#define HttpdnsLoggerProtocol_h
#import <Foundation/Foundation.h>
@protocol HttpdnsLoggerProtocol <NSObject>
- (void)log:(NSString *)logStr;
@end
#endif /* HttpdnsLoggerProtocol_h */

View File

@ -0,0 +1,184 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#import <Foundation/Foundation.h>
#import "HttpdnsDegradationDelegate.h"
#import "HttpdnsLoggerDelegate.h"
#define ALICLOUD_HTTPDNS_DEPRECATED(explain) __attribute__((deprecated(explain)))
extern NSString *const ALICLOUDHDNS_IPV4;
extern NSString *const ALICLOUDHDNS_IPV6;
typedef NS_ENUM(NSUInteger, AlicloudHttpDNS_IPType) {
AlicloudHttpDNS_IPTypeV4, //ipv4
AlicloudHttpDNS_IPTypeV6, //ipv6
AlicloudHttpDNS_IPTypeV64, //ipv4 + ipv6
};
@interface HttpDnsService: NSObject
@property (nonatomic, assign, readonly) int accountID;
@property (nonatomic, copy, readonly) NSString *secretKey;
@property (nonatomic, weak, setter=setDelegateForDegradationFilter:) id<HttpDNSDegradationDelegate> delegate;
@property (nonatomic, assign) NSTimeInterval timeoutInterval;
- (instancetype)autoInit;
- (instancetype)initWithAccountID:(int)accountID;
/*!
* @brief
* @details HTTPDNS Account ID secretKey
* Account ID secretKey
*
* @param accountID HTTPDNS Account ID
* @param secretKey secretKey
*/
- (instancetype)initWithAccountID:(int)accountID secretKey:(NSString *)secretKey;
/*!
* @brief App
* @param authCurrentTime
* @details `(NSUInteger)[[NSDate date] timeIntervalSince1970]`
* @attention APP APP
*/
- (void)setAuthCurrentTime:(NSUInteger)authCurrentTime;
+ (instancetype)sharedInstance;
/// 设置持久化缓存功能
/// @param enable YES: 开启 NO: 关闭
- (void)setCachedIPEnabled:(BOOL)enable;
/// 是否允许 HTTPDNS 返回 TTL 过期域名的 ip ,建议允许(默认不允许)
/// @param enable YES: 开启 NO: 关闭
- (void)setExpiredIPEnabled:(BOOL)enable;
/// * 设置 HTTPDNS 域名解析请求类型 ( HTTP / HTTPS )
/// 若不调用该接口,默认为 HTTP 请求。
/// HTTP 请求基于底层 CFNetwork 实现,不受 ATS 限制;
/// @param enable YES: HTTPS请求 NO: HTTP请求
- (void)setHTTPSRequestEnabled:(BOOL)enable;
/// 设置 region 节点,调用后,会按照 region 更新服务IP
/// @param region region为节点可设置海外region
- (void)setRegion:(NSString *)region;
/// 域名预解析 (ipv4)
/// 选择性的预先向 HTTPDNS SDK 中注册您后续可能会使用到的域名,以便 SDK 提前解析,减少后续解析域名时请求的时延
/// @param hosts 预解析列表数组
- (void)setPreResolveHosts:(NSArray *)hosts;
/// 域名预解析
/// @param hosts 域名
/// @param ipType 4: ipv4; 6: ipv6; 64: ipv4+ipv6
- (void)setPreResolveHosts:(NSArray *)hosts queryIPType:(AlicloudHttpDNS_IPType)ipType;
/// 本地日志 log 开关
/// @param enable YES: 打开 NO: 关闭
- (void)setLogEnabled:(BOOL)enable;
/// 设置网络切换时是否自动跟新所有域名解析结果
/// 如果打开此开关,在网络切换时,会自动刷新所有域名的解析结果,但会产生一定流量消耗
/// @param enable YES: 开启 NO: 关闭
- (void)setPreResolveAfterNetworkChanged:(BOOL)enable;
/// 设置IP俳优规则
/// @param IPRankingDatasource 设置对应域名的端口号
/// @{host: port}
- (void)setIPRankingDatasource:(NSDictionary<NSString *, NSNumber *> *)IPRankingDatasource;
/// 设置是否 开启 IPv6 结果解析
/// 开启后调用 getIPv6ByHostAsync: 接口使用
///【注意】开启 IPv6 结果解析后SDK在 IPv6-Only 网络环境下,对 IPv4 解析结果不再自动转换为 IPv6 地址, getIpsByHostAsync:返回 IPv4 地址getIPv6ByHostAsync:返回 IPv6 地址
/// @param enable YES: 开启 NO: 关闭
- (void)enableIPv6:(BOOL)enable;
/// 是否允许通过 CNCopyCurrentNetworkInfo 获取wifi ssid bssid
/// @param enable YES: 开启 NO: 关闭 ,默认关闭
- (void)enableNetworkInfo:(BOOL)enable;
/// 获取用于用户追踪的 sessionId
/// sessionId为随机生成长度为 12 位App 生命周期内保持不变
/// 为了排查可能的解析问题,需要您将 sessionId 和解析出的 IP 一起记录在日志中
/// 请参考: 解析异常排查之 “会话追踪方案” https://help.aliyun.com/document_detail/100530.html
- (NSString *)getSessionId;
/// 获取域名对应的IP单IP
/// @param host 域名
- (NSString *)getIpByHostAsync:(NSString *)host;
/// 获取域名对应的IP数组多IP
/// @param host 域名
- (NSArray *)getIpsByHostAsync:(NSString *)host;
/// 获取域名对应格式化后的IP (针对ipv6)
/// @param host 域名
- (NSString *)getIpByHostAsyncInURLFormat:(NSString *)host;
/// 获取域名对应的ipv6, 单IP 需要开启ipv6 开关 enableIPv6
/// @param host 域名
- (NSString *)getIPv6ByHostAsync:(NSString *)host;
/// 获取域名对应的ipv6数组, 多IP 需要开启ipv6 开关 enableIPv6
/// @param host 域名
- (NSArray *)getIPv6sByHostAsync:(NSString *)host;
/// 同时获取ipv4 ipv6的IP 需要开启ipv6 开关 enableIPv6
/// @param host 域名
/// @result 返回字典类型结构
/// {
/// ALICLOUDHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// ALICLOUDHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// }
- (NSDictionary <NSString *, NSArray *>*)getIPv4_v6ByHostAsync:(NSString *)host;
/// 清除指定host缓存内存+沙盒数据库)
/// @param hostArray 需要清除的host域名数组。如果需要清空全部数据传nil或者空数组即可
- (void)cleanHostCache:(NSArray <NSString *>*)hostArray;
/// 设置日志输出回调
- (void)setLogHandler:(id<HttpdnsLoggerProtocol>)logHandler;
- (void)setSdnsGlobalParams:(NSDictionary<NSString *, NSString *> *)params;
- (void)clearSdnsGlobalParams;
- (NSDictionary *)getIpsByHostAsync:(NSString *)host withParams:(NSDictionary<NSString *, NSString *> *)params withCacheKey:(NSString *)cacheKey;
@end
@interface HttpDnsService (HttpdnsDeprecated)
- (void)setAccountID:(int)accountID ALICLOUD_HTTPDNS_DEPRECATED("Deprecated in v1.5.2. Use -[HttpDnsService initWithAccountID:] instead.");
@end

View File

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

Binary file not shown.

View File

@ -0,0 +1,30 @@
//
// AlicloudSender.h
// AlicloudSender
//
// Created by sky on 2021/1/25.
// Copyright © 2021 aliyun. All rights reserved.
//
#import <Foundation/Foundation.h>
#define ALICLOUDRESTSEND_VERSION @"1.0.0.3"
//! Project version number for AlicloudSender.
FOUNDATION_EXPORT double AlicloudSenderVersionNumber;
//! Project version string for AlicloudSender.
FOUNDATION_EXPORT const unsigned char AlicloudSenderVersionString[];
NS_ASSUME_NONNULL_BEGIN
@interface AlicloudSender : NSObject
+ (instancetype)shareInstance;
- (void)sendEvent:(NSString *)event appKey:(NSString *)appkey sdkId:(NSString *)sdkId sdkVersion:(NSString *)sdkVersion extParams:(NSDictionary *)extParams;
@end
NS_ASSUME_NONNULL_END

View File

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

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.9-m1"
// 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,38 @@
//
// 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 *appmonitorRsaSecret;
@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 */

Binary file not shown.

View File

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

Binary file not shown.

View File

@ -0,0 +1,18 @@
//
// EMASRest.h
// EMASRest
//
// Created by sky on 2020/6/11.
// Copyright © 2020 aliyun. All rights reserved.
//
#import <Foundation/Foundation.h>
#define ALICLOUD_EMAS_REST_IOS_SDK_VERSION @"11.1.1.2"
#import <EMASRest/EMASRestConfiguration.h>
#import <EMASRest/EMASRestCacheConfig.h>
#import <EMASRest/EMASRestManager.h>
#import <EMASRest/EMASRestManager.h>
#import <EMASRest/EMASRestSendService+MultiChannel.h>
#import <EMASRest/EMASRestSendService.h>

View File

@ -0,0 +1,33 @@
//
// EMASRestCacheConfig.h
// AlicloudCommonAnalytics
//
// Created by sky on 2020/7/27.
//
#import <Foundation/Foundation.h>
#import "EMASRestConfiguration.h"
NS_ASSUME_NONNULL_BEGIN
@interface EMASRestCacheConfig : NSObject
@property (nonatomic, assign) int memoryCacheSizeLimit; // 内存size限制
@property (nonatomic, assign) int memoryCacheCountLimit; // 日志条数限制
@property (nonatomic, assign) BOOL memoryCacheSwitch; // 内存缓存开关
@property (nonatomic, assign) BOOL diskCacheSwitch; // 磁盘缓存开关
@property (nonatomic, strong) NSString *cacheName; // 缓存标识,默认为common
// 缓存标识,对应一个实例。
// dataUploadHost+appkey+cacheName共同确认一个实例
@property (nonatomic, strong) NSString *cacheKey;
@property (nonatomic, strong) EMASRestConfiguration *restConfig;
// 是否有效
- (BOOL)isValid;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,36 @@
//
// EMASRestConfiguration.h
// EMASRest
//
// Created by qiulibin on 16/11/12.
// Copyright © 2016年 Taobao lnc. All rights reserved.
//
#ifndef EMASRestConfiguration_h
#define EMASRestConfiguration_h
#import <Foundation/Foundation.h>
//用于返回追加的保留字段信息
@protocol EMASRestReservesProviderProtocol <NSObject>
- (NSDictionary<NSString*, NSString*>*)reserveInfoDictionary;
@end
@interface EMASRestConfiguration : NSObject
@property(nonatomic, copy) NSString * channel;
@property(nonatomic, copy) NSString * appkey;
@property(nonatomic, copy) NSString * secret;
@property(nonatomic, copy) NSString * userId;
@property(nonatomic, copy) NSString * usernick;
@property(nonatomic, copy) NSString * appVersion;
@property(nonatomic, copy) NSString * country;
@property(nonatomic, copy) NSString * dataUploadScheme; // http or https
@property(nonatomic, copy) NSString * dataUploadHost; // data upload host
@end
#endif /* EMASRestConfiguration_h */

View File

@ -0,0 +1,32 @@
//
// TBDevice2.h
//
//
// Created by Alvin on 4/21/13.
//
// 设备信息的分装类
#ifndef EMASRestDevice_h
#define EMASRestDevice_h
#import <sys/socket.h>
#import <sys/sysctl.h>
#import <net/if.h>
#import <net/if_dl.h>
#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonDigest.h>
#import <CommonCrypto/CommonHMAC.h>
#import "EMASRestDeviceInfo.h"
@interface EMASRestDevice : NSObject
// 获取设备信息:部分信息的变化性,因此这里需要提供一个 持久配置模块,用于支持这类数据
+ (EMASRestDeviceInfo *)getDevice;
// 获取Mac地址
+ (NSString *)macAddress;
@end
#endif

View File

@ -0,0 +1,37 @@
//
// TBDevice.h
//
//
// Created by Alvin on 4/21/13.
//
// 设备信息存储的元类
#ifndef EMASRestDeviceInfo_h
#define EMASRestDeviceInfo_h
#import <Foundation/Foundation.h>
@interface EMASRestDeviceInfo : NSObject
@property(readwrite,strong) NSString * mAppVersion;
@property(readwrite,strong) NSString * mOsName;
@property(readwrite,strong) NSString * mUtdid;
@property(readwrite,strong) NSString * mImei;
@property(readwrite,strong) NSString * mImsi;
@property(readwrite,strong) NSString * mBrand;
@property(readwrite,strong) NSString * mCpu;
@property(readwrite,strong) NSString * mDeviceId;
@property(readwrite,strong) NSString * mDeviceModel;
@property(readwrite,strong) NSString * mResolution;
@property(readwrite,strong) NSString * mCarrier;
@property(readwrite,strong) NSString * mAccess;
@property(readwrite,strong) NSString * mAccessSubType;
@property(readwrite,strong) NSString * mCountry;
@property(readwrite,strong) NSString * mLanguage;
@property(readwrite,strong) NSString * mOsVersion;
//@property(readwrite,strong) NSString * mDebugId;
@end
#endif

View File

@ -0,0 +1,24 @@
//
// EMASRest.h
// EMASRest
//
// Created by sky on 2020/6/11.
// Copyright © 2020 aliyun. All rights reserved.
//
#import "EMASRestCacheConfig.h"
@interface EMASRestManager : NSObject
+ (void)turnOnDebug;
// 添加rest配置
+ (void)addRestCacheConfigs:(EMASRestCacheConfig *)config;
/**
* 30K
*/
+ (void)sendLogAsyncWithConfiguration:(EMASRestCacheConfig *)config aPageName:(NSObject *)aPageName eventId:(int) aEventId arg1:(NSString*) aArg1 arg2:(NSString*) aArg2 arg3:(NSString*) aArg3 args:(NSDictionary *) aArgs;
@end

View File

@ -0,0 +1,16 @@
//
// UTMd5.h
//
#import <Foundation/Foundation.h>
@interface EMASRestMd5 : NSObject
+ (NSString *)md5StrForData:(NSData *)data;
+ (NSData *)md5ForData:(NSData *)data;
+ (NSString *)md5StrForNSString:(NSString *) str;
@end

View File

@ -0,0 +1,29 @@
//
// EMASRestSendService+MultiChannel.h
// AlicloudCommonAnalytics
//
// Created by sky on 2020/6/11.
// Copyright © 2020 aliyun. All rights reserved.
//
#import "EMASRestSendService.h"
#import "EMASRestConfiguration.h"
NS_ASSUME_NONNULL_BEGIN
@interface EMASRestSendService (MultiChannel)
/**
* 30K
*/
+ (void)sendLogAsyncWithConfiguration:(EMASRestConfiguration*)configuration aPageName:(NSObject *)aPageName eventId:(int) aEventId arg1:(NSString*) aArg1 arg2:(NSString*) aArg2 arg3:(NSString*) aArg3 args:(NSDictionary *) aArgs;
/**
* 30K
*/
+ (BOOL)sendLogSyncWithConfiguration:(EMASRestConfiguration*)configuration aPageName:(NSObject *)aPageName eventId:(int) aEventId arg1:(NSString *) aArg1 arg2:(NSString *) aArg2 arg3:(NSString *) aArg3 args:(NSDictionary *) aArgs;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,57 @@
//
// EMASRestSendService.h
// EMASRest
//
// Created by qiulibin on 16/11/12.
// Copyright © 2016年 Taobao lnc. All rights reserved.
//
#ifndef EMASRestSendService_h
#define EMASRestSendService_h
#import <Foundation/Foundation.h>
#import "EMASRestConfiguration.h"
@interface EMASRestSendService : NSObject
//From数据链路打通需求由一休SDK调用, 文档https://yuque.antfin-inc.com/ubmgda/lh1gwa/dffuy5
@property (nonatomic, copy) NSString* utabtest;
@property (nonatomic, copy) NSString* utabtestpage;
@property (nonatomic, weak) id<EMASRestReservesProviderProtocol> reserveProvider;
+ (EMASRestSendService*)shareInstance;
/**
*
* TBCrashReporter的业务才需要进行配置
* @param config ,
* @return appkey是必填参数
*/
- (BOOL)configBasicParamWithTBConfiguration:(EMASRestConfiguration*)config;
/**
*
* @return nil
*/
- (EMASRestConfiguration*)obtainConfiguration;
/**
* 30K
*/
-(BOOL)sendLogSync:(NSObject*)aPageName eventId:(int) aEventId arg1:(NSString*) aArg1 arg2:(NSString*) aArg2 arg3:(NSString*) aArg3 args:(NSDictionary *) aArgs;
/**
* 30K
*/
-(void)sendLogAsync:(NSObject*)aPageName eventId:(int) aEventId arg1:(NSString*) aArg1 arg2:(NSString*) aArg2 arg3:(NSString*) aArg3 args:(NSDictionary *) aArgs;
/**
* url传输()30K
*/
- (NSData *) sendLogWithUrl:(NSString*)url PageName:(NSObject *)aPageName eventId:(int) aEventId arg1:(NSString *) aArg1 arg2:(NSString *) aArg2 arg3:(NSString *) aArg3 args:(NSDictionary *) aArgs;
@end
#endif /* EMASRestSendService_h */

View File

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

View File

@ -0,0 +1,24 @@
//
// AidProtocol.h
// UtdidSDK
//
// Created by ALLEN on 14-12-22.
// Copyright (c) 2014年 Alvin. All rights reserved.
//
#ifndef AidProtocol_h
#define AidProtocol_h
#define EVENT_REQUEST_STARTED 1000
#define EVENT_REQUEST_SUCCESS 1001
#define EVENT_REQUEST_FAILED 1002
#define EVENT_NETWORK_ERROR 1003
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol AidProtocolDelegate <NSObject>
@required
- (void) onAidEventChanged:(NSInteger)eventId
aid:(NSString *)aid;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@ -0,0 +1,13 @@
//
// UTDIDPublic.h
// UTDID
//
// Created by ljianfeng on 2019/8/1.
// Copyright © 2019 Alvin. All rights reserved.
//
#ifndef UTDID_h
#define UTDID_h
#import <UTDID/UTDevice.h>
#import <UTDID/AidProtocol.h>
#endif /* UTDIDPublic_h */

View File

@ -0,0 +1,56 @@
//
// UTDevice.h
//
//
// Created by Alvin on 4/21/13.
//
// 设备信息的分装类sdk合作开发需要用这个类提供的设备信息接口
// Version:1.5.0-AU
#ifndef UTDIDDevice_h
#define UTDIDDevice_h
#import <Foundation/Foundation.h>
@protocol AidProtocolDelegate;
NS_ASSUME_NONNULL_BEGIN
@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
NS_ASSUME_NONNULL_END
#endif

View File

@ -0,0 +1,51 @@
<?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>19G73</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>UTDID</string>
<key>CFBundleIdentifier</key>
<string>com.alibaba.UTDID-AU</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.5.0.90-SNAPSHOT</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>17B102</string>
<key>DTPlatformName</key>
<string>iphoneos</string>
<key>DTPlatformVersion</key>
<string>13.2</string>
<key>DTSDKBuild</key>
<string>17B102</string>
<key>DTSDKName</key>
<string>iphoneos13.2</string>
<key>DTXcode</key>
<string>1120</string>
<key>DTXcodeBuild</key>
<string>11B500</string>
<key>MinimumOSVersion</key>
<string>7.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
</dict>
</plist>

View File

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

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,52 @@
//
// AppMonitorAlarm.h
// AppMonitor
//
// Created by junzhan on 14-9-15.
// Copyright (c) 2014年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AppMonitorBase.h"
@interface AppMonitorAlarm : AppMonitorBase
/**
*
*
* @param page ,iOS要相同. :,; "业务名_页面名"("业务名"); . Shop_Detail, Shop_List
* @param monitorPoint ,iOS要相同,@
*
*/
+ (void)commitSuccessWithPage:(NSString *)page monitorPoint:(NSString *)monitorPoint;
/**
*
*
* @param page ,iOS要相同. :,; "业务名_页面名"("业务名"); . Shop_Detail, Shop_List
* @param monitorPoint ,iOS要相同,@
* @param errorCode MTOP请求则传MTOP的错误码,,便
* @param errorMsg MTOP请求则传MTOP的错误信息, , 便
*/
+ (void)commitFailWithPage:(NSString *)page monitorPoint:(NSString *)monitorPoint errorCode:(NSString *)errorCode errorMsg:(NSString *)errorMsg;
/**
*
*
* @param page ,iOS要相同. :,; "业务名_页面名"("业务名"); . Shop_Detail, Shop_List
* @param monitorPoint ,iOS要相同,@
* @arg
*/
+ (void)commitSuccessWithPage:(NSString *)page monitorPoint:(NSString *)monitorPoint arg:(NSString *)arg;
/**
*
*
* @param page ,iOS要相同. :,; "业务名_页面名"("业务名"); . Shop_Detail, Shop_List
* @param monitorPoint ,iOS要相同,@
* @param errorCode MTOP请求则传MTOP的错误码,,便
* @param errorMsg MTOP请求则传MTOP的错误信息, , 便
* @arg
*/
+ (void)commitFailWithPage:(NSString *)page monitorPoint:(NSString *)monitorPoint errorCode:(NSString *)errorCode errorMsg:(NSString *)errorMsg arg:(NSString *)arg;
@end

View File

@ -0,0 +1,27 @@
//
// AppMonitorBase.h
// AppMonitor
//
// Created by junzhan on 14-10-14.
// Copyright (c) 2014年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface AppMonitorBase : NSObject
/**
* UT间隔时间().300, -1.
*/
+ (void)setWriteLogInterval:(NSInteger)writeLogInterval;
+ (NSInteger)writeLogInterval;
/**
* appmonitor的日志立刻强制写入本地(UT)使@
*/
+ (void)flushAllLog;
@end

View File

@ -0,0 +1,35 @@
//
// AppMonitorCounter.h
// AppMonitor
//
// Created by junzhan on 14-10-14.
// Copyright (c) 2014年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AppMonitorBase.h"
@interface AppMonitorCounter : AppMonitorBase
/**
* .commit会累加一次countvalue也会累加
*
*
* @param page
* @param monitorPoint
* @param value
*/
+ (void)commitWithPage:(NSString *)page monitorPoint:(NSString *)monitorPoint value:(double)value;
/**
* .commit会累加一次countvalue也会累加
*
*
* @param page
* @param monitorPoint
* @param value
* @param arg
*/
+ (void)commitWithPage:(NSString *)page monitorPoint:(NSString *)monitorPoint value:(double)value arg:(NSString *)arg;
@end

View File

@ -0,0 +1,25 @@
//
// AppMonitorDimension.h
// AppMonitor
//
// Created by christ.yuj on 15/2/15.
// Copyright (c) 2015年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
*
*
*/
@interface AppMonitorDimension : NSObject
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *constantValue;
- (instancetype)initWithName:(NSString *)name;
- (instancetype)initWithName:(NSString *)name constantValue:(NSString *)constantValue;
@end

View File

@ -0,0 +1,56 @@
//
// AppMonitorDimensionSet.h
// AppMonitor
//
// Created by christ.yuj on 15/2/15.
// Copyright (c) 2015年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AppMonitorDimensionValueSet.h"
#import "AppMonitorDimension.h"
@interface AppMonitorDimensionSet : NSObject
/**
*
*
* @param array NSString类型的数组 string为Name;
* @return
*/
+ (instancetype)setWithArray:(NSArray *)array;
- (BOOL)valid:(AppMonitorDimensionValueSet*)dimensionValues;
/**
*
*
* @param dimension
* @return
*/
- (void)addDimension:(AppMonitorDimension *)dimension;
/**
*
*
* @param name
* @return
*/
- (void)addDimensionWithName:(NSString *)name;
/**
*
*
* @param name
* @return
*/
- (AppMonitorDimension *)dimensionForName:(NSString *)name;
- (NSMutableOrderedSet *)dimensions;
/**
*
*
* @param dimensionValues key为维度名称value为内容
*/
- (void)setConstantValue:(AppMonitorDimensionValueSet *)dimensionValues;
@end

View File

@ -0,0 +1,26 @@
//
// AppMonitorDimensionValueSet.h
// AppMonitor
//
// Created by christ.yuj on 15/2/15.
// Copyright (c) 2015年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
*/
@interface AppMonitorDimensionValueSet : NSObject<NSCopying>
- (instancetype)initWithDictionary:(NSDictionary *)dictionary;
/**
*
*/
@property (nonatomic, strong) NSMutableDictionary *dict;
- (void)setValue:(NSString *)value forName:(NSString *)name;
- (BOOL)containValueForName:(NSString *)name;
- (NSString *)valueForName:(NSString *)name;
@end

View File

@ -0,0 +1,28 @@
//
// AppMonitorMeasure.h
// AppMonitor
//
// Created by christ.yuj on 15/2/15.
// Copyright (c) 2015年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AppMonitorMeasureValue.h"
/**
*
*
*/
@interface AppMonitorMeasure : NSObject
@property (nonatomic, copy) NSString *name;
@property (nonatomic, strong) NSNumber *constantValue;
@property (nonatomic, strong) NSNumber *min;
@property (nonatomic, strong) NSNumber *max;
- (instancetype)initWithName:(NSString *)name;
- (instancetype)initWithName:(NSString *)name constantValue:(NSNumber *)constantValue;
- (instancetype)initWithName:(NSString *)name constantValue:(NSNumber *)constantValue min:(NSNumber *)min max:(NSNumber *)max;
- (void)setRangeWithMin:(NSNumber *)min max:(NSNumber *)max;
- (BOOL)valid:(AppMonitorMeasureValue *)measureValue;
@end

View File

@ -0,0 +1,61 @@
//
// AppMonitorMeasureSet.h
// AppMonitor
//
// Created by christ.yuj on 15/2/15.
// Copyright (c) 2015年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AppMonitorMeasure.h"
#import "AppMonitorMeasureValueSet.h"
@interface AppMonitorMeasureSet : NSObject
/**
*
*
* @param array NSString类型的数组 string为Name;
* @return
*/
+ (instancetype)setWithArray:(NSArray *)array;
- (BOOL)valid:(NSString*)module MonitorPoint:(NSString*)monitorpoint measureValues:(AppMonitorMeasureValueSet *)measureValues;
/**
*
*
* @param measure
* @return
*/
- (void)addMeasure:(AppMonitorMeasure *)measure;
/**
*
*
* @param name
* @return
*/
- (void)addMeasureWithName:(NSString *)name;
/**
*
*
* @param name
* @return
*/
- (AppMonitorMeasure *)measureForName:(NSString *)name;
/**
*
*
* @return
*/
- (NSMutableOrderedSet *)measures;
/**
*
*
* @param measureValues key为指标名称value为内容
*/
- (void)setConstantValue:(AppMonitorMeasureValueSet *)measureValues;
@end

View File

@ -0,0 +1,33 @@
//
// AppMonitorMeasureValue.h
// AppMonitor
//
// Created by christ.yuj on 15/2/15.
// Copyright (c) 2015年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
*
*
*/
@interface AppMonitorMeasureValue : NSObject
/**
*
*/
@property (nonatomic, assign) BOOL isFinish;
@property (nonatomic, strong) NSNumber * offset;
@property (nonatomic, strong) NSNumber * value;
- (instancetype)initWithValue:(NSNumber *)value;
- (instancetype)initWithValue:(NSNumber *)value offset:(NSNumber *)offset;
- (void)merge:(AppMonitorMeasureValue *)measureValue;
//为了json序列化
- (NSDictionary *)jsonDict;
//json反序列化
- (instancetype)initWithDictionary:(NSDictionary *)dictionary;
@end

View File

@ -0,0 +1,38 @@
//
// AppMonitorMeasureValueSet.h
// AppMonitor
//
// Created by christ.yuj on 15/2/15.
// Copyright (c) 2015年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AppMonitorMeasureValue.h"
@interface AppMonitorMeasureValueSet : NSObject<NSCopying>
- (instancetype)initWithDictionary:(NSDictionary *)dictionary;
/**
*
*
* @param name
* @param value
* @return
*/
- (void)setDoubleValue:(double)value forName:(NSString *)name;
- (void)setValue:(AppMonitorMeasureValue *)value forName:(NSString *)name;
- (BOOL)containValueForName:(NSString *)name;
- (AppMonitorMeasureValue *)valueForName:(NSString *)name;
/**
*
*
* @param measureValueSet
* name就对MeasureValue做加操作
*/
- (void)merge:(AppMonitorMeasureValueSet*)measureValueSet;
- (NSDictionary *)jsonDict;
@end

View File

@ -0,0 +1,117 @@
//
// AppMonitorStat.h
// AppMonitor
//
// Created by christ.yuj on 15/3/10.
// Copyright (c) 2015年 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AppMonitorBase.h"
#import "AppMonitorMeasureSet.h"
#import "AppMonitorDimensionSet.h"
@interface AppMonitorStatTransaction :NSObject
- (void)beginWithMeasureName:(NSString *)measureName;
- (void)endWithMeasureName:(NSString *)measureName;
@end
@interface AppMonitorStat : AppMonitorBase
/**
*
* @param module
* @param monitorPoint
* @param measures
*/
+ (void)registerWithModule:(NSString *)module monitorPoint:(NSString *)monitorPoint measureSet:(AppMonitorMeasureSet *)measures;
/**
*
* @param module
* @param monitorPoint
* @param measures
* @param dimemsions
*/
+ (void)registerWithModule:(NSString *)module monitorPoint:(NSString *)monitorPoint measureSet:(AppMonitorMeasureSet *)measures dimensionSet:(AppMonitorDimensionSet *)dimensions;
/**
*
* @param module
* @param monitorPoint
* @param measures
* @param isCommitDetail YESNO
*/
+ (void)registerWithModule:(NSString *)module monitorPoint:(NSString *)monitorPoint measureSet:(AppMonitorMeasureSet *)measures isCommitDetail:(BOOL)detail;
/**
*
* @param module
* @param monitorPoint
* @param measures
* @param dimemsions
* @param isCommitDetail YESNO
*/
+ (void)registerWithModule:(NSString *)module monitorPoint:(NSString *)monitorPoint measureSet:(AppMonitorMeasureSet *)measures dimensionSet:(AppMonitorDimensionSet *)dimensions isCommitDetail:(BOOL)detail;
/**
*
* @param module
* @param monitorPoint Page+monitorPoint必须唯一
* @param dimensionValues
* @param measureValues
*/
+ (void)commitWithModule:(NSString*) module monitorPoint:(NSString *)monitorPoint dimensionValueSet:(AppMonitorDimensionValueSet *)dimensionValues measureValueSet:(AppMonitorMeasureValueSet *)measureValues;
/**
*
* @param module
* @param monitorPoint Page+monitorPoint必须唯一
* @param dimensionValues
* @param value
*/
+ (void)commitWithModule:(NSString*) module monitorPoint:(NSString *)monitorPoint dimensionValueSet:(AppMonitorDimensionValueSet *)dimensionValues value:(double)value;
/**
*
* @param module
* @param monitorPoint Page+monitorPoint必须唯一
* @param value
*/
+ (void)commitWithModule:(NSString*) module monitorPoint:(NSString *)monitorPoint value:(double)value;
/**
*,线UI加载渲染<br/>
*线,使beginTransaction-endTransaction方法对
* @param module
* @param monitorPoint module+monitorPoint必须唯一
*/
+ (void)beginWithModule:(NSString *)module monitorPoint:(NSString *)monitorPoint measureName:(NSString *)measureName;
/**
*线UI加载渲染<br/>
*线,使beginTransaction-endTransaction方法对
* @param module
* @param monitorPoint module+monitorPoint必须唯一
*/
+ (void)endWithModule:(NSString *)module monitorPoint:(NSString *)monitorPoint measureName:(NSString *)measureName;
/**
* ,begin-end方法对来统计耗时指标的值
*
* @param module
* @param monitorPoint
* @return
*/
+ (AppMonitorStatTransaction *)createTransactionWithModule:(NSString *)module monitorPoint:(NSString *)monitorPoint;
@end

View File

@ -0,0 +1,56 @@
//
// AppMonitorStat2.h
// AppMonitor
//
// Created by sugar on 7/8/15.
// Copyright (c) 2015 君展. All rights reserved.
//
#import <Foundation/Foundation.h>
/////////////////////////////////////////////////////////
// 数据格式以下图为例:
// 启动性能 - 启动时间监控
// 启动方式 | cpu | 机型 | 网络类型| 总计
// ----------------------------------
// 冷启动耗时 |arm7 | 4s | 2G | 5s 约束2-10
// 热启动耗时 |arm7s| 5s | 4G | 3s 约束1-3
// step 1: 创建一个模块空间monitorForScheme
// step 2: 在空间下面创建表
// step 3: 添加对应的值的约束,不在约束范围内的点将一噪点方式上报
// step 4: 更新表数据
//
/////////////////////////////////////////////////////////
@interface AppMonitorTable : NSObject
// BEGIN Add by 玄叶
+ (void)registerWithModule:(NSString *)module monitorPoint:(NSString *)monitorPoint columns:(NSArray *)cols rows:(NSArray * )rows aggregate:(BOOL)aggregate;
+ (void)addConstraintWithModule:(NSString *)module monitorPoint:(NSString *)monitorPoint name:(NSString *)name min:(double)min max:(double)max defaultValue:(double)value;
+ (BOOL)commitWithModule:(NSString *)module monitorPoint:(NSString *)monitorPoint columns:(NSDictionary *)cols rows:(NSDictionary *)rows;
// END
// 创建一个表的模块空间
+ (instancetype)monitorForScheme:(NSString *)scheme tableName:(NSString *)tableName;
// 新建一张表, 行,列,数据是否聚合
- (void)registerTableWithRows:(NSArray * )rows columns:(NSArray *)cols aggregate:(BOOL)yn;
// 添加约束
- (void)addConstraintWithName:(NSString *)name range:(NSRange)range defaultValue:(NSNumber *)number;
// 添加约束
- (void)addConstraintWithName:(NSString *)name min:(double)min max:(double)max defaultValue:(double)value;
// 更新表 行的名字,列的名字,行的数据,列的数据
- (BOOL)updateTableForColumns:(NSDictionary *)cols rows:(NSDictionary *)rows;
// 更新表,不区分行列名字。此接口不允许行列同名,性能偏低,慎用!
- (BOOL)updateTableWithDictionary:(NSDictionary *)dict;
@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,16 @@
//
// BaseRequestAuthentication.h
// miniUTInterface
//
// Created by 宋军 on 14-10-17.
// Copyright (c) 2014年 ___SONGJUN___. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "UTIRequestAuthentication.h"
@interface UTBaseRequestAuthentication : NSObject<UTIRequestAuthentication>
-(id) initWithAppKey:(NSString *) pAppKey appSecret:(NSString *) pSecret;
@end

View File

@ -0,0 +1,19 @@
//
// UTCustomHitBuilder.h
// miniUTInterface
//
// Created by 宋军 on 14-10-17.
// Copyright (c) 2014年 ___SONGJUN___. All rights reserved.
//
#import "UTHitBuilder.h"
@interface UTCustomHitBuilder : UTHitBuilder
-(void) setEventLabel:(NSString *) pEventId;
-(void) setEventPage:(NSString *) pPageName;
-(void) setDurationOnEvent:(long long) durationOnEvent;
@end

View File

@ -0,0 +1,21 @@
//
// UTBaseMapBuilder.h
// miniUTInterface
//
// Created by 宋军 on 14-10-14.
// Copyright (c) 2014年 ___SONGJUN___. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface UTHitBuilder : NSObject
-(NSDictionary *) build;
-(void) setProperty:(NSString *) pKey value:(NSString *) pValue;
-(void) setProperties:(NSDictionary *) pPageProperties;
@end

View File

@ -0,0 +1,15 @@
//
// UTICrashCaughtListener.h
// miniUTInterface
//
// Created by 宋军 on 14/10/28.
// Copyright (c) 2014年 ___SONGJUN___. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol UTICrashCaughtListener <NSObject>
-(NSDictionary *) onCrashCaught:(NSString *) pCrashReason CallStack:(NSString *)callStack;
@end

View File

@ -0,0 +1,17 @@
//
// IRequestAuthentication.h
// miniUTInterface
//
// Created by 宋军 on 14-10-17.
// Copyright (c) 2014年 ___SONGJUN___. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol UTIRequestAuthentication <NSObject>
-(NSString *) getAppKey;
-(NSString *) getSign:(NSString*) pToBeSignStr;
@end

View File

@ -0,0 +1,25 @@
//
// UTOirginalCustomHitBuilder.h
// miniUTInterface
//
// Created by 宋军 on 14/10/28.
// Copyright (c) 2014年 ___SONGJUN___. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "UTHitBuilder.h"
@interface UTOirginalCustomHitBuilder : UTHitBuilder
-(void) setPageName:(NSString *) pPage;
-(void) setEventId:(NSString *) pEventId;
-(void) setArg1:(NSString *) pArg1;
-(void) setArg2:(NSString *) pArg2;
-(void) setArg3:(NSString *) pArg3;
-(void) setArgs:(NSDictionary *) pArgs;
@end

View File

@ -0,0 +1,19 @@
//
// UTMapBuilder.h
// miniUTInterface
//
// Created by 宋军 on 14-10-14.
// Copyright (c) 2014年 ___SONGJUN___. All rights reserved.
//
#import "UTHitBuilder.h"
@interface UTPageHitBuilder : UTHitBuilder
-(void) setPageName:(NSString *) pPageName;
-(void) setReferPage:(NSString *) pReferPageName;
-(void) setDurationOnPage:(long long ) durationTimeOnPage;
@end

View File

@ -0,0 +1,16 @@
//
// SecuritySDKRequestAuthentication.h
// miniUTInterface
//
// Created by 宋军 on 14-10-17.
// Copyright (c) 2014年 ___SONGJUN___. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "UTIRequestAuthentication.h"
@interface UTSecuritySDKRequestAuthentication : NSObject<UTIRequestAuthentication>
-(id) initWithAppKey:(NSString *) pAppKey;
@end

View File

@ -0,0 +1,24 @@
//
// UTTeamWork.h
// UTMini
//
// Created by ljianfeng on 2019/9/29.
// Copyright © 2019 alibaba. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface UTTeamWork : NSObject
/**
* @brief https上传域名
*
* @param url https上传域名https://开头
*
* @warning :UT之前调用(setAppkey之前)
*/
+ (void)setHttpsUploadUrl:(NSString *)url;
@end
NS_ASSUME_NONNULL_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>18D109</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>16B91</string>
<key>DTPlatformName</key>
<string>iphoneos</string>
<key>DTPlatformVersion</key>
<string>12.1</string>
<key>DTSDKBuild</key>
<string>16B91</string>
<key>DTSDKName</key>
<string>iphoneos12.1</string>
<key>DTXcode</key>
<string>1010</string>
<key>DTXcodeBuild</key>
<string>10B61</string>
<key>MinimumOSVersion</key>
<string>5.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
</array>
</dict>
</plist>

Binary file not shown.

View File

@ -142,10 +142,11 @@ alpha:1.0]
//#define SOCKETPORT @"www.zhangxinyanv5.top"
// 云 @"app.ifish7.com"
static NSString* DOMAIN_NAME =@"app.ifish7.com";
//正式环境
#define SOCKETPORT @"app.ifish7.com"
#define JIEKOUPORT @"https://app.ifish7.com"
#define JIEKOUPORTHTTP @"https://app.ifish7.com"
#define SOCKETPORT DOMAIN_NAME
#define JIEKOUPORT [NSString stringWithFormat:@"https://%@",DOMAIN_NAME]
#define JIEKOUPORTHTTP [NSString stringWithFormat:@"https://%@",DOMAIN_NAME]
//测试环境
//#define SOCKETPORT @"test.ifish7.com:9955"
//#define JIEKOUPORT @"http://139.196.24.156:7080"
@ -497,14 +498,14 @@ alpha:1.0]
pageSize
@return <#return value description#>
*/
#define Push_Message_Url JIEKOUPORT @"/api/pageList/pushListInf.do"
#define Push_Message_Url [NSString stringWithFormat:@"%@/api/pageList/pushListInf.do",JIEKOUPORT]
//删除消息
#define Push_Message_Delete_Url JIEKOUPORT @"/api/updateUser/deleteMessages.do"
#define Push_Message_Delete_Url [NSString stringWithFormat:@"%@/api/updateUser/deleteMessages.do",JIEKOUPORT]
//绑定设备
#define Push_BindDevice_Url JIEKOUPORT @"/api/updateUser/bindDevice.do"
#define Push_BindDevice_Url [NSString stringWithFormat:@"%@/api/updateUser/bindDevice.do",JIEKOUPORT]
//用户消息已读
#define Push_Message_Readed JIEKOUPORT @"/api/updateUser/userMessageIsRead.do"
#define Push_Message_Readed [NSString stringWithFormat:@"%@/api/updateUser/userMessageIsRead.do",JIEKOUPORT]
//用户未读消息个数
#define Push_Message_UnReadCount JIEKOUPORT @"/api/updateUser/userMessageNoReadCount.do"
#define Push_Message_UnReadCount [NSString stringWithFormat:@"%@/api/updateUser/userMessageNoReadCount.do",JIEKOUPORT]
/*=====================add V4.9.8=======================================*/
#endif /* Define_h */

View File

@ -25,7 +25,7 @@
// CFShow((__bridge CFTypeRef)(infoDic));
NSString *app_Version=[infoDic objectForKey:@"CFBundleShortVersionString"];
NSLog(@"app_Version%@",app_Version);
app_Version=@"4.7.19";
app_Version=@"4.7.20";
NSString *versionStr = [NSString stringWithFormat:@"v%@",app_Version];
NSString *buildVersion = [infoDic objectForKey:@"CFBundleVersion"];
if (buildVersion.length > 0) {