Commit fdd3e041 by GuoJianPeng

update

parent 3b19ef05
//
// ASCellularSignalMonitor.h
// CRMNetDetect
//
// Created by 坚鹏 on 2024/10/14.
//
#import <Foundation/Foundation.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger,ASCellularType)
{
ASCellularTypeUnknown = 0,
ASCellularType2G,
ASCellularType3G,
ASCellularType4G,
ASCellularType5G API_AVAILABLE(ios(14.1))//iPhone12以上系列
};
typedef NS_ENUM(NSInteger,ASCelluarSignalStrength){
ASCelluarSignalStrengthUnknown = 0,
ASCelluarSignalStrengthStrong,
ASCelluarSignalStrengthWeak
};
@interface ASCellularService : NSObject
- (NSString*)accessTypeValue;
- (ASCellularType)accessType;
- (ASCelluarSignalStrength)signalStrength;
- (ASCelluarSignalStrength)signalStrengthEvaluatedForType:(ASCellularType)type;
@end
NS_ASSUME_NONNULL_END
//
// ASCellularSignalMonitor.m
// CRMNetDetect
//
// Created by 坚鹏 on 2024/10/14.
//
#import "ASCellularService.h"
@implementation ASCellularService
-(NSString *)accessTypeValue
{
CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
NSString *radioAccessTechnology = nil;
if (@available(iOS 12.0, *)) {
// iOS 12 及以上版本,获取当前网络类型
NSDictionary *serviceRadioAccessTech = [networkInfo serviceCurrentRadioAccessTechnology];
radioAccessTechnology = serviceRadioAccessTech.allValues.firstObject;
} else {
// iOS 12 以下,直接获取当前网络类型
radioAccessTechnology = networkInfo.currentRadioAccessTechnology;
}
return radioAccessTechnology;
}
-(ASCellularType)accessType
{
ASCellularType type = ASCellularTypeUnknown;
NSString * value = [self accessTypeValue];
NSArray * secondGValues = @[
CTRadioAccessTechnologyEdge,CTRadioAccessTechnologyGPRS
];
if([secondGValues containsObject:value]){return ASCellularType2G;}
NSArray * threeGValues = @[
CTRadioAccessTechnologyHSDPA,CTRadioAccessTechnologyHSUPA,
CTRadioAccessTechnologyWCDMA,CTRadioAccessTechnologyCDMA1x
];
if([threeGValues containsObject:value]){return ASCellularType3G;}
else if ([value isEqualToString:CTRadioAccessTechnologyLTE]){
return ASCellularType4G;
}else{
if (@available(iOS 14.1, *)) {
NSArray * fiveGValues = @[
CTRadioAccessTechnologyNRNSA,CTRadioAccessTechnologyNR
];
if([fiveGValues containsObject:value]){return ASCellularType5G;}
}
}
return type;
}
-(ASCelluarSignalStrength)signalStrength
{
ASCellularType type = [self accessType];
return [self signalStrengthEvaluatedForType:type];
}
-(ASCelluarSignalStrength)signalStrengthEvaluatedForType:(ASCellularType)type
{
if (@available(iOS 14.1, *)) {
if(type == ASCellularType5G){
return ASCelluarSignalStrengthStrong;
}
}else if (type == ASCellularType4G){
return ASCelluarSignalStrengthStrong;
}else if (type == ASCellularType3G || type == ASCellularType2G){
return ASCelluarSignalStrengthWeak;
}else{
return ASCelluarSignalStrengthUnknown;
}
return ASCelluarSignalStrengthUnknown;
}
@end
//
// ASIPService.h
// CRMNetDetect
//
// Created by 坚鹏 on 2024/10/15.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger,ASIPType)
{
ASIPTypeUnknown = 0,
ASIPTypeWiFi,//Wifi
ASIPTypeCelluar,//蜂窝
ASIPTypeVPN,//VPN
ASIPTypeEthernet,//以太
ASIPTypeLo0,//本地环回
ASIPTypeBridge0,//热点
};
@interface ASIPEntity : NSObject
@property(nonatomic,copy,readonly)NSString*value;
@property(nonatomic,assign,readonly)ASIPType type;
@property(nonatomic,assign,readonly)BOOL isIpv4;
@property(nonatomic,assign,readonly)BOOL isIpv6;
@property(nonatomic,assign,readonly)BOOL isPrivateIP;//是否局域网私有IP
@property(nonatomic,assign,readonly)BOOL isLinkLocalIP;//是否自分配IP,169.254开头
@end
@interface ASIPService : NSObject
- (void)updateAvailableIPList;
- (BOOL)usingVPN;
//ipv4+ipv6可能同时启用
- (NSArray<NSString*>* _Nullable)getWiFiIP;
//ipv4+ipv6可能同时启用或多sim卡
- (NSArray<NSString*>*_Nullable)getCelluarIP;
@property(nonatomic,strong,readonly,nullable)NSArray<ASIPEntity*>*availableIPList;
@end
NS_ASSUME_NONNULL_END
//
// ASIPService.m
// CRMNetDetect
//
// Created by 坚鹏 on 2024/10/15.
//
#import "ASIPService.h"
#include <ifaddrs.h>
#include <arpa/inet.h>
#include <net/if.h>
@interface ASIPEntity()
- (instancetype)initWithInterfaceName:(NSString*)name ip:(NSString*)ip isIpv6:(BOOL)isIpv6;
@end
@implementation ASIPService
-(void)updateAvailableIPList
{
struct ifaddrs *interfaces = NULL;
struct ifaddrs *temp_addr = NULL;
int successCode = 0;
if(getifaddrs(&interfaces)!=successCode){
return;
}
temp_addr = interfaces;
NSMutableArray * newIPList = @[].mutableCopy;
while (temp_addr != NULL) {
BOOL isUsed = (temp_addr->ifa_flags & IFF_UP);
BOOL isIpv4 = (temp_addr->ifa_addr->sa_family == AF_INET);
BOOL isIpv6 = (temp_addr->ifa_addr->sa_family == AF_INET6);
if(!isUsed || (!isIpv4 && !isIpv6)){
temp_addr = temp_addr->ifa_next;
continue;
}//只处理启用的ipv4或ipv6接口.
NSString *interfaceName = [NSString stringWithUTF8String:temp_addr->ifa_name];
NSString *ipAddress = nil;
if(isIpv4){
ipAddress = [NSString stringWithUTF8String:inet_ntoa(((struct sockaddr_in *)temp_addr->ifa_addr)->sin_addr)];
}else{
char addrBuffer[INET6_ADDRSTRLEN];
const struct sockaddr_in6 *sockaddr_ipv6 = (const struct sockaddr_in6 *)temp_addr->ifa_addr;
inet_ntop(AF_INET6, &sockaddr_ipv6->sin6_addr, addrBuffer, sizeof(addrBuffer));
ipAddress = [NSString stringWithUTF8String:addrBuffer];
}
temp_addr = temp_addr->ifa_next;
[newIPList addObject:[[ASIPEntity alloc]initWithInterfaceName:interfaceName ip:ipAddress isIpv6:isIpv6]];
}
freeifaddrs(interfaces);
_availableIPList = newIPList;
}
-(NSArray<NSString *> *)getWiFiIP
{
NSMutableArray * list;
for (ASIPEntity * ipEntity in _availableIPList) {
if(ipEntity.type == ASIPTypeWiFi){
if(!list){list = @[].mutableCopy;}
[list addObject:ipEntity.value];
}
}
return list;
}
-(NSArray<NSString *> *)getCelluarIP
{
NSMutableArray * list;
for (ASIPEntity * ipEntity in _availableIPList) {
if(ipEntity.type == ASIPTypeCelluar){
if(!list){list = @[].mutableCopy;}
[list addObject:ipEntity.value];
}
}
return list;
}
-(BOOL)usingVPN
{
for (ASIPEntity * ipEntity in _availableIPList) {
if(ipEntity.type == ASIPTypeVPN){return true;}
}
return false;
}
@end
@implementation ASIPEntity
{
NSString*_interfaceName;
}
-(instancetype)initWithInterfaceName:(NSString *)name ip:(NSString *)ip isIpv6:(BOOL)isIpv6{
if(self = [super init]){
_interfaceName = name;
_value = ip;
if(isIpv6){_isIpv6 = true;}else{_isIpv4 = true;}
_type = [self _convertTypeFromInterfaceName:name];
_isPrivateIP = [self isPrivateIP:_value];
_isLinkLocalIP = _isIpv6?[self isIPv6LinkLocalAddress:ip]:[ip hasPrefix:@"169.254"];
}return self;
}
- (ASIPType)_convertTypeFromInterfaceName:(NSString*)name
{
if([name isEqualToString:@"en0"]){return ASIPTypeWiFi;}
else if ([name isEqualToString:@"pdp_ip0"]){return ASIPTypeCelluar;}
else if ([name hasPrefix:@"utun"]){return ASIPTypeVPN;}
else if ([name hasPrefix:@"en"]){return ASIPTypeEthernet;}
else if ([name hasPrefix:@"lo0"]){return ASIPTypeLo0;}
else if ([name hasPrefix:@"bridge0"]){return ASIPTypeBridge0;}
else{return ASIPTypeUnknown;}
}
-(BOOL)isPrivateIP:(NSString*)value
{
if(_isIpv6){
return [self isIPv6PrivateAddress:value];
}
//判断ipv4
NSArray *privateRanges = @[
@"10.",
@"172.16.", @"172.17.", @"172.18.", @"172.19.", @"172.20.",
@"172.21.", @"172.22.", @"172.23.", @"172.24.", @"172.25.",
@"172.26.", @"172.27.", @"172.28.", @"172.29.", @"172.30.",
@"172.31.",
@"192.168."
];
return [privateRanges containsObject:value];
}
// 判断 IPv6 地址是否为 Link-Local 地址
- (BOOL)isIPv6LinkLocalAddress:(NSString *)ipAddress {
return [ipAddress hasPrefix:@"fe80"];
}
// 判断 IPv6 地址是否为私有 IP 地址(Unique Local Address, ULA)
- (BOOL)isIPv6PrivateAddress:(NSString *)ipAddress {
return [ipAddress hasPrefix:@"fc00"] || [ipAddress hasPrefix:@"fd00"];
}
-(NSString *)description
{
return [NSString stringWithFormat:@"IP:%@,interface:%@",_value,_interfaceName];
}
@end
//
// ASPingService.h
// CRMNetDetect
//
// Created by 坚鹏 on 2024/10/15.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class ASPingService;
@protocol ASPingServiceDelegate <NSObject>
- (void)pingService:(ASPingService*)service pingingWithDuration:(NSTimeInterval)millionSeconds seq:(uint16_t)seq;//正常收到回调
- (void)pingService:(ASPingService*)service pingTimeout:(uint16_t)seq;//ping超时,可能来自自身控制,也可能来自icmp通知.
- (void)pingService:(ASPingService*)service tmporaryErrorHappens:(NSError*)error seq:(uint16_t)seq;//可恢复的错误,后续会继续ping
@optional
- (void)pingingServiceDidStart:(ASPingService*)service;//[调用starts]成功
- (void)pingService:(ASPingService*)service failedToStartWithError:(NSError*)error;//调用[starts]失败
- (void)pingService:(ASPingService*)service stopWithError:(NSError*_Nullable)error;//ping终止,error为空时则为正常终止.
@end
@interface ASPingService : NSObject
- (instancetype)initWithDelegate:(id<ASPingServiceDelegate>)delegate;
- (void)starts;
- (void)stops;
@property(nonatomic,assign)BOOL usingICMPv6;//大陆的v6支持有限,一般不建议开启.
@property(nonatomic,weak,readonly)id<ASPingServiceDelegate>delegate;
@property(nonatomic,assign,readonly)BOOL isPinging;
@property(nonatomic,copy)NSString * targetHost;
@property(nonatomic,assign)NSInteger pingCount;//默认为1即只ping一次。
@property(nonatomic,assign)NSTimeInterval timeoutSeconds;//默认为3s,超出3s收不到当次ping回调,则取消当次ping,就算后续收到回调也ignore;不建议设置过低.
@end
NS_ASSUME_NONNULL_END
//
// ASPingService.m
// CRMNetDetect
//
// Created by 坚鹏 on 2024/10/15.
//
#import "ASPingService.h"
#import <CRMNetDetect/ASSimplePing.h>
#import <sys/time.h>
static uint16_t KASPingNotStartedSeq = -1;
@interface ASPingService()<ASSimplePingDelegate>
@end
@implementation ASPingService
{
ASSimplePing *_samplePing;
NSTimeInterval _startPingTime;
uint16_t _pingingSeq;
}
-(instancetype)initWithDelegate:(id<ASPingServiceDelegate>)delegate{
if (self = [super init]) {
_delegate = delegate;
_pingCount = 1;
_timeoutSeconds = 3;
_pingingSeq = KASPingNotStartedSeq;
}return self;
}
-(void)starts
{
if(_isPinging){
if([self.delegate respondsToSelector:@selector(pingService:failedToStartWithError:)]){
[self.delegate pingService:self failedToStartWithError:[self _createErrorWithMsg:@"Pinging Aready!"]];
}
return;
}
NSAssert(_targetHost, @"target host could not be nil.");
NSAssert(_pingCount >=1, @"Ping count could not smaller than 1");
NSAssert(_timeoutSeconds >=1, @"Ping timeout could not smaller than 1");
_isPinging = true;
_samplePing = [[ASSimplePing alloc] initWithHostName:_targetHost];
_samplePing.delegate = self;
_samplePing.addressStyle = _usingICMPv6?ASSimplePingAddressStyleICMPv6:ASSimplePingAddressStyleICMPv4;
if([self.delegate respondsToSelector:@selector(pingingServiceDidStart:)]){
[self.delegate pingingServiceDidStart:self];
}
NSLog(@"PING %@:",_targetHost);
[_samplePing start];
}
-(void)stops
{
if(!_samplePing){
return;
}
NSLog(@"stops ping service");
[_samplePing stop];
_samplePing = nil;
_pingingSeq = KASPingNotStartedSeq;
_isPinging = false;
[NSObject cancelPreviousPerformRequestsWithTarget:self];
}
- (NSError*)_createErrorWithMsg:(NSString*)msg
{
return [NSError errorWithDomain:@"ASPingServiceErrorDomain" code:0 userInfo:@{NSLocalizedDescriptionKey:msg}];
}
- (void)_sendPingOnce
{
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(_gotManulyTimeoutNotification) object:nil];
_pingingSeq ++;
if(_pingingSeq >= _pingCount){
[self stops];
if([self.delegate respondsToSelector:@selector(pingService:stopWithError:)]){
[self.delegate pingService:self stopWithError:nil];
}
return;
}
[self performSelector:@selector(_gotManulyTimeoutNotification) withObject:nil afterDelay:self.timeoutSeconds];
_startPingTime = [self _getCurrentMicroSeconds];
[_samplePing sendPingWithData:nil];
NSLog(@"did send next ping and current count is %hu",_pingingSeq);
}
- (void)_gotManulyTimeoutNotification
{
NSLog(@"Request timeout for icmp_seq %hu",_pingingSeq);
//当次ping超时
if([self.delegate respondsToSelector:@selector(pingService:pingTimeout:)]){
[self.delegate pingService:self pingTimeout:_pingingSeq];
}
//开启下次ping
[self _sendPingOnce];
}
- (NSTimeInterval)_getCurrentMicroSeconds
{
struct timeval time;
gettimeofday(&time,NULL);
return time.tv_usec;
}
- (NSTimeInterval)_getPingTimePastMicroSeconds
{
NSTimeInterval now = [self _getCurrentMicroSeconds];
if(now < _startPingTime){
return (1000000 + now - _startPingTime)/1000;
}
return (now - _startPingTime)/1000;
}
#pragma mark - ASSimplePingDelegate
- (void)simplePing:(ASSimplePing *)pinger didStartWithAddress:(NSData *)address
{
[self _sendPingOnce];
}
- (void)simplePing:(ASSimplePing *)pinger didFailWithError:(NSError *)error
{
BOOL isTimeoutCase = ([error.domain isEqualToString:NSPOSIXErrorDomain]&&error.code ==ETIMEDOUT);
if(isTimeoutCase){
[self _gotManulyTimeoutNotification];//按照手动超时的方式处理.
}else{
[self stops];
if([self.delegate respondsToSelector:@selector(pingService:stopWithError:)]){
[self.delegate pingService:self stopWithError:nil];
}
}
}
- (void)simplePing:(ASSimplePing *)pinger didSendPacket:(NSData *)packet sequenceNumber:(uint16_t)sequenceNumber
{
// NSLog(@"did send ping seq:%hu",sequenceNumber);
}
- (void)simplePing:(ASSimplePing *)pinger didFailToSendPacket:(NSData *)packet sequenceNumber:(uint16_t)sequenceNumber error:(NSError *)error
{
NSLog(@"did failed to send ping");
if([self.delegate respondsToSelector:@selector(pingService:tmporaryErrorHappens:seq:)]){
[self.delegate pingService:self tmporaryErrorHappens:error seq:_pingingSeq];
}
[self _sendPingOnce];//resend again.
}
- (void)simplePing:(ASSimplePing *)pinger didReceivePingResponsePacket:(NSData *)packet sequenceNumber:(uint16_t)sequenceNumber
{
if(sequenceNumber == _pingingSeq){
NSTimeInterval duration = [self _getPingTimePastMicroSeconds];
NSLog(@"%ld bytes from %@: icmp_seq=%hu time=%.3f ms",packet.length,_targetHost,sequenceNumber,duration);
[self.delegate pingService:self pingingWithDuration:duration seq:sequenceNumber];
[self _sendPingOnce];
}else{
NSLog(@"got outdate sequenceNumber:%hu",sequenceNumber);
}
}
- (void)simplePing:(ASSimplePing *)pinger didReceiveUnexpectedPacket:(NSData *)packet
{
NSLog(@"did failed to send ping");
if([self.delegate respondsToSelector:@selector(pingService:tmporaryErrorHappens:seq:)]){
[self.delegate pingService:self tmporaryErrorHappens:[self _createErrorWithMsg:@"ReceiveUnexpectedPacket"] seq:_pingingSeq];
}
[self _sendPingOnce];//ignore,send again.
}
@end
//
// ASReachability.h
// CRMNetDetect
//
// Created by 坚鹏 on 2024/10/14.
//
#import <Foundation/Foundation.h>
#import <CRMNetDetect/ASCellularService.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger,ASReachabilityStatus){
ASReachabilityStatusUnknown = 0,
ASReachabilityStatusNotReachable,
ASReachabilityStatusWWAN,
ASReachabilityStatusWifi
};
@class ASReachability;
@protocol ASReachabilityDelegate <NSObject>
- (void)reachabilityBecomesNotReachable:(ASReachability*)ability;
- (void)reachabilityChangedToWiFi:(ASReachability*)ability;
- (void)reachabilityChangedToWWAN:(ASReachability*)ability
type:(ASCellularType)type signalStrength:(ASCelluarSignalStrength)strength;
@end
@interface ASReachability : NSObject
- (instancetype)initWithDelegate:(id<ASReachabilityDelegate>)delegate;
- (void)startsObserving;
- (void)stopObserving;
@property(nonatomic,copy,nullable)NSString * host;
@property(nonatomic,assign,readonly)ASReachabilityStatus status;
@property(nonatomic,weak,readonly)id<ASReachabilityDelegate>delegate;
@end
NS_ASSUME_NONNULL_END
//
// ASReachability.m
// CRMNetDetect
//
// Created by 坚鹏 on 2024/10/14.
//
#import "ASReachability.h"
#import <SystemConfiguration/SystemConfiguration.h>
#import <netinet/in.h>
@interface ASReachability()
@property(nonatomic,strong,nullable)ASCellularService * celluarService;
@property (nonatomic) SCNetworkReachabilityRef reachabilityRef;
@end
@implementation ASReachability
-(instancetype)initWithDelegate:(id<ASReachabilityDelegate>)delegate
{
if(self = [super init]){
_delegate = delegate;
}return self;
}
-(void)startsObserving
{
if(_reachabilityRef){
return;
}
self.reachabilityRef = [self _createHostReachabilityRef]?:[self _createInternetReachabilityRef];
if(!_reachabilityRef){
NSLog(@"Could not create reachabilityRef");
return;
}
// 初始化时检查网络状态
[self checkCurrentNetworkStatus];
SCNetworkReachabilityContext context = {0, (__bridge void *)(self), NULL, NULL, NULL};
SCNetworkReachabilitySetCallback(self.reachabilityRef, ReachabilityCallback, &context);
SCNetworkReachabilityScheduleWithRunLoop(self.reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopCommonModes);
}
-(void)stopObserving
{
if (_reachabilityRef) {
SCNetworkReachabilityUnscheduleFromRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopCommonModes);
CFRelease(_reachabilityRef);
_reachabilityRef = NULL;
}
}
// 网络状态变化回调函数
static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info) {
ASReachability *monitor = (__bridge ASReachability *)info;
[monitor handleNetworkChangeWithFlags:flags];
}
- (void)checkCurrentNetworkStatus {
SCNetworkReachabilityFlags flags;
if (SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) {
[self handleNetworkChangeWithFlags:flags];
} else {
NSLog(@"Failed to retrieve network status");
}
}
// 处理网络状态变化
- (void)handleNetworkChangeWithFlags:(SCNetworkReachabilityFlags)flags {
BOOL isReachable = (flags & kSCNetworkReachabilityFlagsReachable);
BOOL needsConnection = (flags & kSCNetworkReachabilityFlagsConnectionRequired);
if (isReachable && !needsConnection) {
NSLog(@"Network is reachable");
// 进一步检查网络类型
[self detectConnectionTypeWithFlags:flags];
} else {
BOOL isTransient = (flags & kSCNetworkReachabilityFlagsTransientConnection);
BOOL interventionRequired = (flags & kSCNetworkReachabilityFlagsInterventionRequired);
// 网络不可达处理
if (isReachable && interventionRequired) {
NSLog(@"Network requires user intervention (e.g., Wi-Fi login)");
} else if (isReachable && isTransient) {
NSLog(@"Network connection is transient (e.g., dial-up or other temporary connection)");
} else {
NSLog(@"Network is not reachable");
}
_status = ASReachabilityStatusNotReachable;
[self.delegate reachabilityBecomesNotReachable:self];
}
}
// 检测当前的网络连接类型(Wi-Fi 或 蜂窝)
- (void)detectConnectionTypeWithFlags:(SCNetworkReachabilityFlags)flags {
if ((flags & kSCNetworkReachabilityFlagsIsWWAN) != 0) {
// 通过蜂窝网络连接
if(!_celluarService){_celluarService = [ASCellularService new];}
ASCellularType type = _celluarService.accessType;
NSLog(@"Connected via Cellular of %ld",type);
_status = ASReachabilityStatusWifi;
[self.delegate reachabilityChangedToWWAN:self type:type signalStrength:[_celluarService signalStrengthEvaluatedForType:type]];
} else {
// 通过Wi-Fi或其他网络连接
NSLog(@"Connected via Wi-Fi");
_status = ASReachabilityStatusWWAN;
[self.delegate reachabilityChangedToWiFi:self];
}
}
-(void)dealloc
{
[self stopObserving];
}
#pragma mark - Privates
- (SCNetworkReachabilityRef _Nullable)_createHostReachabilityRef
{
return _host ? SCNetworkReachabilityCreateWithName(NULL, _host.UTF8String) : nil;
}
- (SCNetworkReachabilityRef _Nullable)_createInternetReachabilityRef{
struct sockaddr_in6 ipv6Address;
memset(&ipv6Address, 0, sizeof(ipv6Address));
ipv6Address.sin6_len = sizeof(ipv6Address);
ipv6Address.sin6_family = AF_INET6;
SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&ipv6Address);
if(ref){return ref;}//优先使用ipv6地址
struct sockaddr_in ipv4Address;
memset(&ipv4Address, 0, sizeof(ipv4Address));
ipv4Address.sin_len = sizeof(ipv4Address);
ipv4Address.sin_family = AF_INET;
ref = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&ipv4Address);
return ref;
}
@end
/*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
An object wrapper around the low-level BSD Sockets ping function.
*/
@import Foundation;
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
#include <AssertMacros.h> // for __Check_Compile_Time
NS_ASSUME_NONNULL_BEGIN
@protocol ASSimplePingDelegate;
/*! Controls the IP address version used by SimplePing instances.
*/
typedef NS_ENUM(NSInteger, ASSimplePingAddressStyle) {
ASSimplePingAddressStyleAny, ///< Use the first IPv4 or IPv6 address found; the default.
ASSimplePingAddressStyleICMPv4, ///< Use the first IPv4 address found.
ASSimplePingAddressStyleICMPv6 ///< Use the first IPv6 address found.
};
/*! An object wrapper around the low-level BSD Sockets ping function.
* \details To use the class create an instance, set the delegate and call `-start`
* to start the instance on the current run loop. If things go well you'll soon get the
* `-simplePing:didStartWithAddress:` delegate callback. From there you can can call
* `-sendPingWithData:` to send a ping and you'll receive the
* `-simplePing:didReceivePingResponsePacket:sequenceNumber:` and
* `-simplePing:didReceiveUnexpectedPacket:` delegate callbacks as ICMP packets arrive.
*
* The class can be used from any thread but the use of any single instance must be
* confined to a specific thread and that thread must run its run loop.
*/
@interface ASSimplePing : NSObject
- (instancetype)init NS_UNAVAILABLE;
/*! Initialise the object to ping the specified host.
* \param hostName The DNS name of the host to ping; an IPv4 or IPv6 address in string form will
* work here.
* \returns The initialised object.
*/
- (instancetype)initWithHostName:(NSString *)hostName NS_DESIGNATED_INITIALIZER;
/*! A copy of the value passed to `-initWithHostName:`.
*/
@property (nonatomic, copy, readonly) NSString * hostName;
/*! The delegate for this object.
* \details Delegate callbacks are schedule in the default run loop mode of the run loop of the
* thread that calls `-start`.
*/
@property (nonatomic, weak, readwrite, nullable) id<ASSimplePingDelegate> delegate;
/*! Controls the IP address version used by the object.
* \details You should set this value before starting the object.
*/
@property (nonatomic, assign, readwrite) ASSimplePingAddressStyle addressStyle;
/*! The address being pinged.
* \details The contents of the NSData is a (struct sockaddr) of some form. The
* value is nil while the object is stopped and remains nil on start until
* `-simplePing:didStartWithAddress:` is called.
*/
@property (nonatomic, copy, readonly, nullable) NSData * hostAddress;
/*! The address family for `hostAddress`, or `AF_UNSPEC` if that's nil.
*/
@property (nonatomic, assign, readonly) sa_family_t hostAddressFamily;
/*! The identifier used by pings by this object.
* \details When you create an instance of this object it generates a random identifier
* that it uses to identify its own pings.
*/
@property (nonatomic, assign, readonly) uint16_t identifier;
/*! The next sequence number to be used by this object.
* \details This value starts at zero and increments each time you send a ping (safely
* wrapping back to zero if necessary). The sequence number is included in the ping,
* allowing you to match up requests and responses, and thus calculate ping times and
* so on.
*/
@property (nonatomic, assign, readonly) uint16_t nextSequenceNumber;
/*! Starts the object.
* \details You should set up the delegate and any ping parameters before calling this.
*
* If things go well you'll soon get the `-simplePing:didStartWithAddress:` delegate
* callback, at which point you can start sending pings (via `-sendPingWithData:`) and
* will start receiving ICMP packets (either ping responses, via the
* `-simplePing:didReceivePingResponsePacket:sequenceNumber:` delegate callback, or
* unsolicited ICMP packets, via the `-simplePing:didReceiveUnexpectedPacket:` delegate
* callback).
*
* If the object fails to start, typically because `hostName` doesn't resolve, you'll get
* the `-simplePing:didFailWithError:` delegate callback.
*
* It is not correct to start an already started object.
*/
- (void)start;
/*! Sends a ping packet containing the specified data.
* \details Sends an actual ping.
*
* The object must be started when you call this method and, on starting the object, you must
* wait for the `-simplePing:didStartWithAddress:` delegate callback before calling it.
* \param data Some data to include in the ping packet, after the ICMP header, or nil if you
* want the packet to include a standard 56 byte payload (resulting in a standard 64 byte
* ping).
*/
- (void)sendPingWithData:(nullable NSData *)data;
/*! Stops the object.
* \details You should call this when you're done pinging.
*
* It's safe to call this on an object that's stopped.
*/
- (void)stop;
@end
/*! A delegate protocol for the SimplePing class.
*/
@protocol ASSimplePingDelegate <NSObject>
@optional
/*! A SimplePing delegate callback, called once the object has started up.
* \details This is called shortly after you start the object to tell you that the
* object has successfully started. On receiving this callback, you can call
* `-sendPingWithData:` to send pings.
*
* If the object didn't start, `-simplePing:didFailWithError:` is called instead.
* \param pinger The object issuing the callback.
* \param address The address that's being pinged; at the time this delegate callback
* is made, this will have the same value as the `hostAddress` property.
*/
- (void)simplePing:(ASSimplePing *)pinger didStartWithAddress:(NSData *)address;
/*! A SimplePing delegate callback, called if the object fails to start up.
* \details This is called shortly after you start the object to tell you that the
* object has failed to start. The most likely cause of failure is a problem
* resolving `hostName`.
*
* By the time this callback is called, the object has stopped (that is, you don't
* need to call `-stop` yourself).
* \param pinger The object issuing the callback.
* \param error Describes the failure.
*/
- (void)simplePing:(ASSimplePing *)pinger didFailWithError:(NSError *)error;
/*! A SimplePing delegate callback, called when the object has successfully sent a ping packet.
* \details Each call to `-sendPingWithData:` will result in either a
* `-simplePing:didSendPacket:sequenceNumber:` delegate callback or a
* `-simplePing:didFailToSendPacket:sequenceNumber:error:` delegate callback (unless you
* stop the object before you get the callback). These callbacks are currently delivered
* synchronously from within `-sendPingWithData:`, but this synchronous behaviour is not
* considered API.
* \param pinger The object issuing the callback.
* \param packet The packet that was sent; this includes the ICMP header (`ICMPHeader`) and the
* data you passed to `-sendPingWithData:` but does not include any IP-level headers.
* \param sequenceNumber The ICMP sequence number of that packet.
*/
- (void)simplePing:(ASSimplePing *)pinger didSendPacket:(NSData *)packet sequenceNumber:(uint16_t)sequenceNumber;
/*! A SimplePing delegate callback, called when the object fails to send a ping packet.
* \details Each call to `-sendPingWithData:` will result in either a
* `-simplePing:didSendPacket:sequenceNumber:` delegate callback or a
* `-simplePing:didFailToSendPacket:sequenceNumber:error:` delegate callback (unless you
* stop the object before you get the callback). These callbacks are currently delivered
* synchronously from within `-sendPingWithData:`, but this synchronous behaviour is not
* considered API.
* \param pinger The object issuing the callback.
* \param packet The packet that was not sent; see `-simplePing:didSendPacket:sequenceNumber:`
* for details.
* \param sequenceNumber The ICMP sequence number of that packet.
* \param error Describes the failure.
*/
- (void)simplePing:(ASSimplePing *)pinger didFailToSendPacket:(NSData *)packet sequenceNumber:(uint16_t)sequenceNumber error:(NSError *)error;
/*! A SimplePing delegate callback, called when the object receives a ping response.
* \details If the object receives an ping response that matches a ping request that it
* sent, it informs the delegate via this callback. Matching is primarily done based on
* the ICMP identifier, although other criteria are used as well.
* \param pinger The object issuing the callback.
* \param packet The packet received; this includes the ICMP header (`ICMPHeader`) and any data that
* follows that in the ICMP message but does not include any IP-level headers.
* \param sequenceNumber The ICMP sequence number of that packet.
*/
- (void)simplePing:(ASSimplePing *)pinger didReceivePingResponsePacket:(NSData *)packet sequenceNumber:(uint16_t)sequenceNumber;
/*! A SimplePing delegate callback, called when the object receives an unmatched ICMP message.
* \details If the object receives an ICMP message that does not match a ping request that it
* sent, it informs the delegate via this callback. The nature of ICMP handling in a
* BSD kernel makes this a common event because, when an ICMP message arrives, it is
* delivered to all ICMP sockets.
*
* IMPORTANT: This callback is especially common when using IPv6 because IPv6 uses ICMP
* for important network management functions. For example, IPv6 routers periodically
* send out Router Advertisement (RA) packets via Neighbor Discovery Protocol (NDP), which
* is implemented on top of ICMP.
*
* For more on matching, see the discussion associated with
* `-simplePing:didReceivePingResponsePacket:sequenceNumber:`.
* \param pinger The object issuing the callback.
* \param packet The packet received; this includes the ICMP header (`ICMPHeader`) and any data that
* follows that in the ICMP message but does not include any IP-level headers.
*/
- (void)simplePing:(ASSimplePing *)pinger didReceiveUnexpectedPacket:(NSData *)packet;
@end
NS_ASSUME_NONNULL_END
/*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
An object wrapper around the low-level BSD Sockets ping function.
*/
#import "ASSimplePing.h"
#pragma mark * ICMP On-The-Wire Format
/*! Describes the on-the-wire header format for an ICMP ping.
* \details This defines the header structure of ping packets on the wire. Both IPv4 and
* IPv6 use the same basic structure.
*
* This is declared in the header because clients of SimplePing might want to use
* it parse received ping packets.
*/
struct ICMPHeader {
uint8_t type;
uint8_t code;
uint16_t checksum;
uint16_t identifier;
uint16_t sequenceNumber;
// data...
};
typedef struct ICMPHeader ICMPHeader;
__Check_Compile_Time(sizeof(ICMPHeader) == 8);
__Check_Compile_Time(offsetof(ICMPHeader, type) == 0);
__Check_Compile_Time(offsetof(ICMPHeader, code) == 1);
__Check_Compile_Time(offsetof(ICMPHeader, checksum) == 2);
__Check_Compile_Time(offsetof(ICMPHeader, identifier) == 4);
__Check_Compile_Time(offsetof(ICMPHeader, sequenceNumber) == 6);
enum {
ICMPv4TypeEchoRequest = 8, ///< The ICMP `type` for a ping request; in this case `code` is always 0.
ICMPv4TypeEchoReply = 0 ///< The ICMP `type` for a ping response; in this case `code` is always 0.
};
enum {
ICMPv6TypeEchoRequest = 128, ///< The ICMP `type` for a ping request; in this case `code` is always 0.
ICMPv6TypeEchoReply = 129 ///< The ICMP `type` for a ping response; in this case `code` is always 0.
};
#pragma mark * IPv4 and ICMPv4 On-The-Wire Format
/*! Describes the on-the-wire header format for an IPv4 packet.
* \details This defines the header structure of IPv4 packets on the wire. We need
* this in order to skip this header in the IPv4 case, where the kernel passes
* it to us for no obvious reason.
*/
struct IPv4Header {
uint8_t versionAndHeaderLength;
uint8_t differentiatedServices;
uint16_t totalLength;
uint16_t identification;
uint16_t flagsAndFragmentOffset;
uint8_t timeToLive;
uint8_t protocol;
uint16_t headerChecksum;
uint8_t sourceAddress[4];
uint8_t destinationAddress[4];
// options...
// data...
};
typedef struct IPv4Header IPv4Header;
__Check_Compile_Time(sizeof(IPv4Header) == 20);
__Check_Compile_Time(offsetof(IPv4Header, versionAndHeaderLength) == 0);
__Check_Compile_Time(offsetof(IPv4Header, differentiatedServices) == 1);
__Check_Compile_Time(offsetof(IPv4Header, totalLength) == 2);
__Check_Compile_Time(offsetof(IPv4Header, identification) == 4);
__Check_Compile_Time(offsetof(IPv4Header, flagsAndFragmentOffset) == 6);
__Check_Compile_Time(offsetof(IPv4Header, timeToLive) == 8);
__Check_Compile_Time(offsetof(IPv4Header, protocol) == 9);
__Check_Compile_Time(offsetof(IPv4Header, headerChecksum) == 10);
__Check_Compile_Time(offsetof(IPv4Header, sourceAddress) == 12);
__Check_Compile_Time(offsetof(IPv4Header, destinationAddress) == 16);
/*! Calculates an IP checksum.
* \details This is the standard BSD checksum code, modified to use modern types.
* \param buffer A pointer to the data to checksum.
* \param bufferLen The length of that data.
* \returns The checksum value, in network byte order.
*/
static uint16_t in_cksum(const void *buffer, size_t bufferLen) {
//
size_t bytesLeft;
int32_t sum;
const uint16_t * cursor;
union {
uint16_t us;
uint8_t uc[2];
} last;
uint16_t answer;
bytesLeft = bufferLen;
sum = 0;
cursor = buffer;
/*
* Our algorithm is simple, using a 32 bit accumulator (sum), we add
* sequential 16 bit words to it, and at the end, fold back all the
* carry bits from the top 16 bits into the lower 16 bits.
*/
while (bytesLeft > 1) {
sum += *cursor;
cursor += 1;
bytesLeft -= 2;
}
/* mop up an odd byte, if necessary */
if (bytesLeft == 1) {
last.uc[0] = * (const uint8_t *) cursor;
last.uc[1] = 0;
sum += last.us;
}
/* add back carry outs from top 16 bits to low 16 bits */
sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */
sum += (sum >> 16); /* add carry */
answer = (uint16_t) ~sum; /* truncate to 16 bits */
return answer;
}
#pragma mark * SimplePing
@interface ASSimplePing ()
// read/write versions of public properties
@property (nonatomic, copy, readwrite, nullable) NSData * hostAddress;
@property (nonatomic, assign, readwrite ) uint16_t nextSequenceNumber;
// private properties
/*! True if nextSequenceNumber has wrapped from 65535 to 0.
*/
@property (nonatomic, assign, readwrite) BOOL nextSequenceNumberHasWrapped;
/*! A host object for name-to-address resolution.
*/
@property (nonatomic, strong, readwrite, nullable) CFHostRef host __attribute__ ((NSObject));
/*! A socket object for ICMP send and receive.
*/
@property (nonatomic, strong, readwrite, nullable) CFSocketRef socket __attribute__ ((NSObject));
@end
@implementation ASSimplePing
- (instancetype)initWithHostName:(NSString *)hostName {
NSParameterAssert(hostName != nil);
self = [super init];
if (self != nil) {
self->_hostName = [hostName copy];
self->_identifier = (uint16_t) arc4random();
}
return self;
}
- (void)dealloc {
[self stop];
// Double check that -stop took care of _host and _socket.
assert(self->_host == NULL);
assert(self->_socket == NULL);
}
- (sa_family_t)hostAddressFamily {
sa_family_t result;
result = AF_UNSPEC;
if ( (self.hostAddress != nil) && (self.hostAddress.length >= sizeof(struct sockaddr)) ) {
result = ((const struct sockaddr *) self.hostAddress.bytes)->sa_family;
}
return result;
}
/*! Shuts down the pinger object and tell the delegate about the error.
* \param error Describes the failure.
*/
- (void)didFailWithError:(NSError *)error {
id<ASSimplePingDelegate> strongDelegate;
assert(error != nil);
// We retain ourselves temporarily because it's common for the delegate method
// to release its last reference to us, which causes -dealloc to be called here.
// If we then reference self on the return path, things go badly. I don't think
// that happens currently, but I've got into the habit of doing this as a
// defensive measure.
CFAutorelease( CFBridgingRetain( self ));
[self stop];
strongDelegate = self.delegate;
if ( (strongDelegate != nil) && [strongDelegate respondsToSelector:@selector(simplePing:didFailWithError:)] ) {
[strongDelegate simplePing:self didFailWithError:error];
}
}
/*! Shuts down the pinger object and tell the delegate about the error.
* \details This converts the CFStreamError to an NSError and then call through to
* -didFailWithError: to do the real work.
* \param streamError Describes the failure.
*/
- (void)didFailWithHostStreamError:(CFStreamError)streamError {
NSDictionary * userInfo;
NSError * error;
if (streamError.domain == kCFStreamErrorDomainNetDB) {
userInfo = @{(id) kCFGetAddrInfoFailureKey: @(streamError.error)};
} else {
userInfo = nil;
}
error = [NSError errorWithDomain:(NSString *) kCFErrorDomainCFNetwork code:kCFHostErrorUnknown userInfo:userInfo];
[self didFailWithError:error];
}
/*! Builds a ping packet from the supplied parameters.
* \param type The packet type, which is different for IPv4 and IPv6.
* \param payload Data to place after the ICMP header.
* \param requiresChecksum Determines whether a checksum is calculated (IPv4) or not (IPv6).
* \returns A ping packet suitable to be passed to the kernel.
*/
- (NSData *)pingPacketWithType:(uint8_t)type payload:(NSData *)payload requiresChecksum:(BOOL)requiresChecksum {
NSMutableData * packet;
ICMPHeader * icmpPtr;
packet = [NSMutableData dataWithLength:sizeof(*icmpPtr) + payload.length];
assert(packet != nil);
icmpPtr = packet.mutableBytes;
icmpPtr->type = type;
icmpPtr->code = 0;
icmpPtr->checksum = 0;
icmpPtr->identifier = OSSwapHostToBigInt16(self.identifier);
icmpPtr->sequenceNumber = OSSwapHostToBigInt16(self.nextSequenceNumber);
memcpy(&icmpPtr[1], [payload bytes], [payload length]);
if (requiresChecksum) {
// The IP checksum routine returns a 16-bit number that's already in correct byte order
// (due to wacky 1's complement maths), so we just put it into the packet as a 16-bit unit.
icmpPtr->checksum = in_cksum(packet.bytes, packet.length);
}
return packet;
}
- (void)sendPingWithData:(NSData *)data {
int err;
NSData * payload;
NSData * packet;
ssize_t bytesSent;
id<ASSimplePingDelegate> strongDelegate;
// data may be nil
NSParameterAssert(self.hostAddress != nil); // gotta wait for -simplePing:didStartWithAddress:
// Construct the ping packet.
payload = data;
if (payload == nil) {
payload = [[NSString stringWithFormat:@"%28zd bottles of beer on the wall", (ssize_t) 99 - (size_t) (self.nextSequenceNumber % 100) ] dataUsingEncoding:NSASCIIStringEncoding];
assert(payload != nil);
// Our dummy payload is sized so that the resulting ICMP packet, including the ICMPHeader, is
// 64-bytes, which makes it easier to recognise our packets on the wire.
assert([payload length] == 56);
}
switch (self.hostAddressFamily) {
case AF_INET: {
packet = [self pingPacketWithType:ICMPv4TypeEchoRequest payload:payload requiresChecksum:YES];
} break;
case AF_INET6: {
packet = [self pingPacketWithType:ICMPv6TypeEchoRequest payload:payload requiresChecksum:NO];
} break;
default: {
assert(NO);
} break;
}
assert(packet != nil);
// Send the packet.
if (self.socket == NULL) {
bytesSent = -1;
err = EBADF;
} else {
bytesSent = sendto(
CFSocketGetNative(self.socket),
packet.bytes,
packet.length,
0,
self.hostAddress.bytes,
(socklen_t) self.hostAddress.length
);
err = 0;
if (bytesSent < 0) {
err = errno;
}
}
// Handle the results of the send.
strongDelegate = self.delegate;
if ( (bytesSent > 0) && (((NSUInteger) bytesSent) == packet.length) ) {
// Complete success. Tell the client.
if ( (strongDelegate != nil) && [strongDelegate respondsToSelector:@selector(simplePing:didSendPacket:sequenceNumber:)] ) {
[strongDelegate simplePing:self didSendPacket:packet sequenceNumber:self.nextSequenceNumber];
}
} else {
NSError * error;
// Some sort of failure. Tell the client.
if (err == 0) {
err = ENOBUFS; // This is not a hugely descriptor error, alas.
}
error = [NSError errorWithDomain:NSPOSIXErrorDomain code:err userInfo:nil];
if ( (strongDelegate != nil) && [strongDelegate respondsToSelector:@selector(simplePing:didFailToSendPacket:sequenceNumber:error:)] ) {
[strongDelegate simplePing:self didFailToSendPacket:packet sequenceNumber:self.nextSequenceNumber error:error];
}
}
self.nextSequenceNumber += 1;
if (self.nextSequenceNumber == 0) {
self.nextSequenceNumberHasWrapped = YES;
}
}
/*! Calculates the offset of the ICMP header within an IPv4 packet.
* \details In the IPv4 case the kernel returns us a buffer that includes the
* IPv4 header. We're not interested in that, so we have to skip over it.
* This code does a rough check of the IPv4 header and, if it looks OK,
* returns the offset of the ICMP header.
* \param packet The IPv4 packet, as returned to us by the kernel.
* \returns The offset of the ICMP header, or NSNotFound.
*/
+ (NSUInteger)icmpHeaderOffsetInIPv4Packet:(NSData *)packet {
// Returns the offset of the ICMPv4Header within an IP packet.
NSUInteger result;
const struct IPv4Header * ipPtr;
size_t ipHeaderLength;
result = NSNotFound;
if (packet.length >= (sizeof(IPv4Header) + sizeof(ICMPHeader))) {
ipPtr = (const IPv4Header *) packet.bytes;
if ( ((ipPtr->versionAndHeaderLength & 0xF0) == 0x40) && // IPv4
( ipPtr->protocol == IPPROTO_ICMP ) ) {
ipHeaderLength = (ipPtr->versionAndHeaderLength & 0x0F) * sizeof(uint32_t);
if (packet.length >= (ipHeaderLength + sizeof(ICMPHeader))) {
result = ipHeaderLength;
}
}
}
return result;
}
/*! Checks whether the specified sequence number is one we sent.
* \param sequenceNumber The incoming sequence number.
* \returns YES if the sequence number looks like one we sent.
*/
- (BOOL)validateSequenceNumber:(uint16_t)sequenceNumber {
if (self.nextSequenceNumberHasWrapped) {
// If the sequence numbers have wrapped that we can't reliably check
// whether this is a sequence number we sent. Rather, we check to see
// whether the sequence number is within the last 120 sequence numbers
// we sent. Note that the uint16_t subtraction here does the right
// thing regardless of the wrapping.
//
// Why 120? Well, if we send one ping per second, 120 is 2 minutes, which
// is the standard "max time a packet can bounce around the Internet" value.
return ((uint16_t) (self.nextSequenceNumber - sequenceNumber)) < (uint16_t) 120;
} else {
return sequenceNumber < self.nextSequenceNumber;
}
}
/*! Checks whether an incoming IPv4 packet looks like a ping response.
* \details This routine modifies this `packet` data! It does this for two reasons:
*
* * It needs to zero out the `checksum` field of the ICMPHeader in order to do
* its checksum calculation.
*
* * It removes the IPv4 header from the front of the packet.
* \param packet The IPv4 packet, as returned to us by the kernel.
* \param sequenceNumberPtr A pointer to a place to start the ICMP sequence number.
* \returns YES if the packet looks like a reasonable IPv4 ping response.
*/
- (BOOL)validatePing4ResponsePacket:(NSMutableData *)packet sequenceNumber:(uint16_t *)sequenceNumberPtr {
BOOL result;
NSUInteger icmpHeaderOffset;
ICMPHeader * icmpPtr;
uint16_t receivedChecksum;
uint16_t calculatedChecksum;
result = NO;
icmpHeaderOffset = [[self class] icmpHeaderOffsetInIPv4Packet:packet];
if (icmpHeaderOffset != NSNotFound) {
icmpPtr = (struct ICMPHeader *) (((uint8_t *) packet.mutableBytes) + icmpHeaderOffset);
receivedChecksum = icmpPtr->checksum;
icmpPtr->checksum = 0;
calculatedChecksum = in_cksum(icmpPtr, packet.length - icmpHeaderOffset);
icmpPtr->checksum = receivedChecksum;
if (receivedChecksum == calculatedChecksum) {
if ( (icmpPtr->type == ICMPv4TypeEchoReply) && (icmpPtr->code == 0) ) {
if ( OSSwapBigToHostInt16(icmpPtr->identifier) == self.identifier ) {
uint16_t sequenceNumber;
sequenceNumber = OSSwapBigToHostInt16(icmpPtr->sequenceNumber);
if ([self validateSequenceNumber:sequenceNumber]) {
// Remove the IPv4 header off the front of the data we received, leaving us with
// just the ICMP header and the ping payload.
[packet replaceBytesInRange:NSMakeRange(0, icmpHeaderOffset) withBytes:NULL length:0];
*sequenceNumberPtr = sequenceNumber;
result = YES;
}
}
}
}
}
return result;
}
/*! Checks whether an incoming IPv6 packet looks like a ping response.
* \param packet The IPv6 packet, as returned to us by the kernel; note that this routine
* could modify this data but does not need to in the IPv6 case.
* \param sequenceNumberPtr A pointer to a place to start the ICMP sequence number.
* \returns YES if the packet looks like a reasonable IPv4 ping response.
*/
- (BOOL)validatePing6ResponsePacket:(NSMutableData *)packet sequenceNumber:(uint16_t *)sequenceNumberPtr {
BOOL result;
const ICMPHeader * icmpPtr;
result = NO;
if (packet.length >= sizeof(*icmpPtr)) {
icmpPtr = packet.bytes;
// In the IPv6 case we don't check the checksum because that's hard (we need to
// cook up an IPv6 pseudo header and we don't have the ingredients) and unnecessary
// (the kernel has already done this check).
if ( (icmpPtr->type == ICMPv6TypeEchoReply) && (icmpPtr->code == 0) ) {
if ( OSSwapBigToHostInt16(icmpPtr->identifier) == self.identifier ) {
uint16_t sequenceNumber;
sequenceNumber = OSSwapBigToHostInt16(icmpPtr->sequenceNumber);
if ([self validateSequenceNumber:sequenceNumber]) {
*sequenceNumberPtr = sequenceNumber;
result = YES;
}
}
}
}
return result;
}
/*! Checks whether an incoming packet looks like a ping response.
* \param packet The packet, as returned to us by the kernel; note that may end up modifying
* this data.
* \param sequenceNumberPtr A pointer to a place to start the ICMP sequence number.
* \returns YES if the packet looks like a reasonable IPv4 ping response.
*/
- (BOOL)validatePingResponsePacket:(NSMutableData *)packet sequenceNumber:(uint16_t *)sequenceNumberPtr {
BOOL result;
switch (self.hostAddressFamily) {
case AF_INET: {
result = [self validatePing4ResponsePacket:packet sequenceNumber:sequenceNumberPtr];
} break;
case AF_INET6: {
result = [self validatePing6ResponsePacket:packet sequenceNumber:sequenceNumberPtr];
} break;
default: {
assert(NO);
result = NO;
} break;
}
return result;
}
/*! Reads data from the ICMP socket.
* \details Called by the socket handling code (SocketReadCallback) to process an ICMP
* message waiting on the socket.
*/
- (void)readData {
int err;
struct sockaddr_storage addr;
socklen_t addrLen;
ssize_t bytesRead;
void * buffer;
enum { kBufferSize = 65535 };
// 65535 is the maximum IP packet size, which seems like a reasonable bound
// here (plus it's what <x-man-page://8/ping> uses).
buffer = malloc(kBufferSize);
assert(buffer != NULL);
// Actually read the data. We use recvfrom(), and thus get back the source address,
// but we don't actually do anything with it. It would be trivial to pass it to
// the delegate but we don't need it in this example.
addrLen = sizeof(addr);
bytesRead = recvfrom(CFSocketGetNative(self.socket), buffer, kBufferSize, 0, (struct sockaddr *) &addr, &addrLen);
err = 0;
if (bytesRead < 0) {
err = errno;
}
// Process the data we read.
if (bytesRead > 0) {
NSMutableData * packet;
id<ASSimplePingDelegate> strongDelegate;
uint16_t sequenceNumber;
packet = [NSMutableData dataWithBytes:buffer length:(NSUInteger) bytesRead];
assert(packet != nil);
// We got some data, pass it up to our client.
strongDelegate = self.delegate;
if ( [self validatePingResponsePacket:packet sequenceNumber:&sequenceNumber] ) {
if ( (strongDelegate != nil) && [strongDelegate respondsToSelector:@selector(simplePing:didReceivePingResponsePacket:sequenceNumber:)] ) {
[strongDelegate simplePing:self didReceivePingResponsePacket:packet sequenceNumber:sequenceNumber];
}
} else {
if ( (strongDelegate != nil) && [strongDelegate respondsToSelector:@selector(simplePing:didReceiveUnexpectedPacket:)] ) {
[strongDelegate simplePing:self didReceiveUnexpectedPacket:packet];
}
}
} else {
// We failed to read the data, so shut everything down.
if (err == 0) {
err = EPIPE;
}
[self didFailWithError:[NSError errorWithDomain:NSPOSIXErrorDomain code:err userInfo:nil]];
}
free(buffer);
// Note that we don't loop back trying to read more data. Rather, we just
// let CFSocket call us again.
}
/*! The callback for our CFSocket object.
* \details This simply routes the call to our `-readData` method.
* \param s See the documentation for CFSocketCallBack.
* \param type See the documentation for CFSocketCallBack.
* \param address See the documentation for CFSocketCallBack.
* \param data See the documentation for CFSocketCallBack.
* \param info See the documentation for CFSocketCallBack; this is actually a pointer to the
* 'owning' object.
*/
static void SocketReadCallback(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) {
// This C routine is called by CFSocket when there's data waiting on our
// ICMP socket. It just redirects the call to Objective-C code.
ASSimplePing * obj;
obj = (__bridge ASSimplePing *) info;
assert([obj isKindOfClass:[ASSimplePing class]]);
#pragma unused(s)
assert(s == obj.socket);
#pragma unused(type)
assert(type == kCFSocketReadCallBack);
#pragma unused(address)
assert(address == nil);
#pragma unused(data)
assert(data == nil);
[obj readData];
}
/*! Starts the send and receive infrastructure.
* \details This is called once we've successfully resolved `hostName` in to
* `hostAddress`. It's responsible for setting up the socket for sending and
* receiving pings.
*/
- (void)startWithHostAddress {
int err;
int fd;
assert(self.hostAddress != nil);
// Open the socket.
fd = -1;
err = 0;
switch (self.hostAddressFamily) {
case AF_INET: {
fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP);
if (fd < 0) {
err = errno;
}
} break;
case AF_INET6: {
fd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6);
if (fd < 0) {
err = errno;
}
} break;
default: {
err = EPROTONOSUPPORT;
} break;
}
if (err != 0) {
[self didFailWithError:[NSError errorWithDomain:NSPOSIXErrorDomain code:err userInfo:nil]];
} else {
CFSocketContext context = {0, (__bridge void *)(self), NULL, NULL, NULL};
CFRunLoopSourceRef rls;
id<ASSimplePingDelegate> strongDelegate;
// Wrap it in a CFSocket and schedule it on the runloop.
self.socket = (CFSocketRef) CFAutorelease( CFSocketCreateWithNative(NULL, fd, kCFSocketReadCallBack, SocketReadCallback, &context) );
assert(self.socket != NULL);
// The socket will now take care of cleaning up our file descriptor.
assert( CFSocketGetSocketFlags(self.socket) & kCFSocketCloseOnInvalidate );
fd = -1;
rls = CFSocketCreateRunLoopSource(NULL, self.socket, 0);
assert(rls != NULL);
CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopDefaultMode);
CFRelease(rls);
strongDelegate = self.delegate;
if ( (strongDelegate != nil) && [strongDelegate respondsToSelector:@selector(simplePing:didStartWithAddress:)] ) {
[strongDelegate simplePing:self didStartWithAddress:self.hostAddress];
}
}
assert(fd == -1);
}
/*! Processes the results of our name-to-address resolution.
* \details Called by our CFHost resolution callback (HostResolveCallback) when host
* resolution is complete. We just latch the first appropriate address and kick
* off the send and receive infrastructure.
*/
- (void)hostResolutionDone {
Boolean resolved;
NSArray * addresses;
// Find the first appropriate address.
addresses = (__bridge NSArray *) CFHostGetAddressing(self.host, &resolved);
if ( resolved && (addresses != nil) ) {
resolved = false;
for (NSData * address in addresses) {
const struct sockaddr * addrPtr;
addrPtr = (const struct sockaddr *) address.bytes;
if ( address.length >= sizeof(struct sockaddr) ) {
switch (addrPtr->sa_family) {
case AF_INET: {
if (self.addressStyle != ASSimplePingAddressStyleICMPv6) {
self.hostAddress = address;
resolved = true;
}
} break;
case AF_INET6: {
if (self.addressStyle != ASSimplePingAddressStyleICMPv4) {
self.hostAddress = address;
resolved = true;
}
} break;
}
}
if (resolved) {
break;
}
}
}
// We're done resolving, so shut that down.
[self stopHostResolution];
// If all is OK, start the send and receive infrastructure, otherwise stop.
if (resolved) {
[self startWithHostAddress];
} else {
[self didFailWithError:[NSError errorWithDomain:(NSString *)kCFErrorDomainCFNetwork code:kCFHostErrorHostNotFound userInfo:nil]];
}
}
/*! The callback for our CFHost object.
* \details This simply routes the call to our `-hostResolutionDone` or
* `-didFailWithHostStreamError:` methods.
* \param theHost See the documentation for CFHostClientCallBack.
* \param typeInfo See the documentation for CFHostClientCallBack.
* \param error See the documentation for CFHostClientCallBack.
* \param info See the documentation for CFHostClientCallBack; this is actually a pointer to
* the 'owning' object.
*/
static void HostResolveCallback(CFHostRef theHost, CFHostInfoType typeInfo, const CFStreamError *error, void *info) {
// This C routine is called by CFHost when the host resolution is complete.
// It just redirects the call to the appropriate Objective-C method.
ASSimplePing * obj;
obj = (__bridge ASSimplePing *) info;
assert([obj isKindOfClass:[ASSimplePing class]]);
#pragma unused(theHost)
assert(theHost == obj.host);
#pragma unused(typeInfo)
assert(typeInfo == kCFHostAddresses);
if ( (error != NULL) && (error->domain != 0) ) {
[obj didFailWithHostStreamError:*error];
} else {
[obj hostResolutionDone];
}
}
- (void)start {
Boolean success;
CFHostClientContext context = {0, (__bridge void *)(self), NULL, NULL, NULL};
CFStreamError streamError;
assert(self.host == NULL);
assert(self.hostAddress == nil);
self.host = (CFHostRef) CFAutorelease( CFHostCreateWithName(NULL, (__bridge CFStringRef) self.hostName) );
assert(self.host != NULL);
CFHostSetClient(self.host, HostResolveCallback, &context);
CFHostScheduleWithRunLoop(self.host, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
success = CFHostStartInfoResolution(self.host, kCFHostAddresses, &streamError);
if ( ! success ) {
[self didFailWithHostStreamError:streamError];
}
}
/*! Stops the name-to-address resolution infrastructure.
*/
- (void)stopHostResolution {
// Shut down the CFHost.
if (self.host != NULL) {
CFHostSetClient(self.host, NULL, NULL);
CFHostUnscheduleFromRunLoop(self.host, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
self.host = NULL;
}
}
/*! Stops the send and receive infrastructure.
*/
- (void)stopSocket {
if (self.socket != NULL) {
CFSocketInvalidate(self.socket);
self.socket = NULL;
}
}
- (void)stop {
[self stopHostResolution];
[self stopSocket];
// Junk the host address on stop. If the client calls -start again, we'll
// re-resolve the host name.
self.hostAddress = NULL;
}
@end
//
// CRMNetDetectService.h
// CRMNetDetect
//
// Created by 坚鹏 on 2024/10/14.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger,CRMNetSignalLevel){
CRMNetSignalLevelUnknown = 0,
CRMNetSignalLevelStrong,
CRMNetSignalLevelWeak
};
@class CRMNetDetectService;
@protocol CRMNetDetectServiceDelegate <NSObject>
- (void)netDetect:(CRMNetDetectService*)service signalLevelChanged:(CRMNetSignalLevel)level;
@end
@interface CRMNetDetectService : NSObject
/**
* @return 是否检测中的标识,在调用[startsDetecting]后为true,初始状态或[stopDetecting]后为false
**/
- (BOOL)isDetectStarted;
/**
* @brief 启动网络探测,探测结果通过delegate通知.
**/
- (void)startsDetecting;
/**
* @brief 停止网络探测.
**/
- (void)stopDetecting;
@end
NS_ASSUME_NONNULL_END
//
// CRMNetDetectService.m
// CRMNetDetect
//
// Created by 坚鹏 on 2024/10/14.
//
#import "CRMNetDetectService.h"
@implementation CRMNetDetectService
@end
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:CRMNetDetect.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
...@@ -7,8 +7,10 @@ ...@@ -7,8 +7,10 @@
// //
@import UIKit; @import UIKit;
#import <CRMNetDetect/ASReachability.h>
#import <CRMNetDetect/ASPingService.h>
@interface ASAppDelegate : UIResponder <UIApplicationDelegate> @interface ASAppDelegate : UIResponder <UIApplicationDelegate,ASReachabilityDelegate,ASPingServiceDelegate>
@property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) UIWindow *window;
......
...@@ -7,12 +7,28 @@ ...@@ -7,12 +7,28 @@
// //
#import "ASAppDelegate.h" #import "ASAppDelegate.h"
#import "ASIPService.h"
@implementation ASAppDelegate @implementation ASAppDelegate
{
ASReachability * _reachability;
ASPingService *_pingService;
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{ {
// Override point for customization after application launch. // Override point for customization after application launch.
ASIPService*service = [ASIPService new];
[service updateAvailableIPList];
NSLog(@"当前网络下\n%@",service.availableIPList);
_reachability = [[ASReachability alloc] initWithDelegate:self];
[_reachability startsObserving];
_pingService = [[ASPingService alloc] initWithDelegate:self];
_pingService.pingCount = 10;
_pingService.timeoutSeconds = 2;
_pingService.targetHost = @"ebank.sdb.com.cn";
[_pingService starts];
return YES; return YES;
} }
...@@ -43,4 +59,39 @@ ...@@ -43,4 +59,39 @@
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
} }
- (void)reachabilityBecomesNotReachable:(nonnull ASReachability *)ability {
}
- (void)reachabilityChangedToWWAN:(nonnull ASReachability *)ability type:(ASCellularType)type signalStrength:(ASCelluarSignalStrength)strength {
ASIPService*service = [ASIPService new];
[service updateAvailableIPList];
NSLog(@"celluar ip:%@",service.getCelluarIP);
}
- (void)reachabilityChangedToWiFi:(nonnull ASReachability *)ability {
ASIPService*service = [ASIPService new];
[service updateAvailableIPList];
NSLog(@"wifi ip:%@",service.getWiFiIP);
}
- (void)pingService:(nonnull ASPingService *)service pingTimeout:(uint16_t)seq {
}
- (void)pingService:(nonnull ASPingService *)service pingingWithDuration:(NSTimeInterval)millionSeconds seq:(uint16_t)seq {
}
- (void)pingService:(nonnull ASPingService *)service tmporaryErrorHappens:(nonnull NSError *)error seq:(uint16_t)seq {
}
-(void)pingService:(ASPingService *)service stopWithError:(NSError *)error
{
if(![service.targetHost isEqualToString:@"svinvy.com"]){
_pingService.targetHost = @"svinvy.com";
[_pingService starts];
}
}
@end @end
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
// //
#import "ASViewController.h" #import "ASViewController.h"
struct IPV4Header{
uint8_t na;
};
typedef struct IPV4Header ASIPV4Header;
@interface ASViewController () @interface ASViewController ()
@end @end
......
PODS:
- CRMNetDetect (0.1.0)
DEPENDENCIES:
- CRMNetDetect (from `../`)
EXTERNAL SOURCES:
CRMNetDetect:
:path: "../"
SPEC CHECKSUMS:
CRMNetDetect: bfcefd1bdbfe5c6882b53814a550a8a8f840e082
PODFILE CHECKSUM: ab41865aadda21067563b5d42c8b495684c3026e
COCOAPODS: 1.12.1
{
"name": "CRMNetDetect",
"version": "0.1.0",
"summary": "A short description of CRMNetDetect.",
"description": "TODO: Add long description of the pod here.",
"homepage": "https://github.com/guojianpeng@svinvy.com/CRMNetDetect",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"guojianpeng@svinvy.com": "svinvy@gmail.com"
},
"source": {
"git": "https://github.com/guojianpeng@svinvy.com/CRMNetDetect.git",
"tag": "0.1.0"
},
"platforms": {
"ios": "10.0"
},
"source_files": "CRMNetDetect/Classes/**/*"
}
PODS:
- CRMNetDetect (0.1.0)
DEPENDENCIES:
- CRMNetDetect (from `../`)
EXTERNAL SOURCES:
CRMNetDetect:
:path: "../"
SPEC CHECKSUMS:
CRMNetDetect: bfcefd1bdbfe5c6882b53814a550a8a8f840e082
PODFILE CHECKSUM: ab41865aadda21067563b5d42c8b495684c3026e
COCOAPODS: 1.12.1
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
14B1BBF16840A4AF860A81C40CBCB82C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; };
2AB593F171395205C5A99821C0B22D8F /* ASSimplePing.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A487D78B1D97C8B191DE7B102F04EEC /* ASSimplePing.h */; settings = {ATTRIBUTES = (Public, ); }; };
34E4979A2E09D56AEE25338C1A247E85 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; };
438AF190B68A1A8D9ABA19022F576D30 /* ASReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 11474C2A40738BAE0FEE04111EED6C95 /* ASReachability.m */; };
58742F2B879F3D68E8FCE527B08E136B /* Pods-CRMNetDetect_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BC43E13B2A1648689CA85FB31051D1FF /* Pods-CRMNetDetect_Tests-dummy.m */; };
61F90CA4FB55C90EBF5134119705263E /* CRMNetDetectService.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D006BBD2C21CCDCF7FE0C276841936C /* CRMNetDetectService.h */; settings = {ATTRIBUTES = (Public, ); }; };
623939AC658561C434479B886DD5662D /* ASCellularService.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C1B4E7942F11EABCAE22F4E597AC85A /* ASCellularService.m */; };
6BAB483D908688F6AA6A0FE36B1516F5 /* ASPingService.m in Sources */ = {isa = PBXBuildFile; fileRef = 16FFE157E602089D4130A354B86096B8 /* ASPingService.m */; };
8829ACD127840ADB7B9C72B32C642400 /* CRMNetDetectService.m in Sources */ = {isa = PBXBuildFile; fileRef = B25BEC9BAC2DB213981541992DF7DB77 /* CRMNetDetectService.m */; };
8F3E67C1A21A5B977A7B28C231B41CD3 /* CRMNetDetect-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C2BAD2AB8E644F3028A21511F82B055F /* CRMNetDetect-dummy.m */; };
9710E06143A85CB0FFA5DC59D3C43759 /* CRMNetDetect-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0280AE64150F71E17ACB1861FAFB4677 /* CRMNetDetect-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
9711466938C63585D137E3D757119F52 /* ASCellularService.h in Headers */ = {isa = PBXBuildFile; fileRef = 324C6F6ABD1F72D13001DC0ED4264766 /* ASCellularService.h */; settings = {ATTRIBUTES = (Public, ); }; };
9E86D4BF69F9197E677C369D7BA6A2DE /* Pods-CRMNetDetect_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A78ACED08D358EF03D3B7DCEAA3FE17 /* Pods-CRMNetDetect_Example-dummy.m */; };
9F71F2E4C224953A4062549398DA4EAB /* ASPingService.h in Headers */ = {isa = PBXBuildFile; fileRef = CB8C42BC071E94373663B9D026EFCB5B /* ASPingService.h */; settings = {ATTRIBUTES = (Public, ); }; };
A3E9EE2F05C8E5C188A3600D755FEF82 /* ASIPService.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C453B5CF9A91A76BD7EDF81805DA480 /* ASIPService.h */; settings = {ATTRIBUTES = (Public, ); }; };
A43355FFDCB23FEAA78B812DE4CA2332 /* ASIPService.m in Sources */ = {isa = PBXBuildFile; fileRef = FE5540603C1ECD73D35BACEAF6C3E94F /* ASIPService.m */; };
C7C82325F37C2FFDB19E9EEA2C443D07 /* Pods-CRMNetDetect_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 186EEDB427E8CA1149F1C265614A192D /* Pods-CRMNetDetect_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
C80E53489F66A8DD4827FA9C81245091 /* ASSimplePing.m in Sources */ = {isa = PBXBuildFile; fileRef = FC6E8CF83AD06F3683AE816413B83C72 /* ASSimplePing.m */; };
C9EF77E2EB2F64F2B9A9B87581EB1E41 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; };
E9A11907AA90CADF1213F162F76E3884 /* Pods-CRMNetDetect_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7553B02EF8159F88857455120A6E09FC /* Pods-CRMNetDetect_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
F32040B7DCE2AC900E3CEACB9278F3AB /* ASReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = E8D8000D3C380367CCE618D607F4D6BF /* ASReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
2B72EB97E8F061F6B7ADEB90E54B56E7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = A15DBD8B0E93908127568265727CF1A6;
remoteInfo = CRMNetDetect;
};
7075D6E43A5669225682E7E00FD0A732 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 5F9B27A55448F371B87234C2ABC2B1F0;
remoteInfo = "Pods-CRMNetDetect_Example";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
0280AE64150F71E17ACB1861FAFB4677 /* CRMNetDetect-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CRMNetDetect-umbrella.h"; sourceTree = "<group>"; };
0E8C5FF400ECFBE78269A7B8B41C58F1 /* CRMNetDetect-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CRMNetDetect-Info.plist"; sourceTree = "<group>"; };
11474C2A40738BAE0FEE04111EED6C95 /* ASReachability.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASReachability.m; path = CRMNetDetect/Classes/ASReachability.m; sourceTree = "<group>"; };
16FFE157E602089D4130A354B86096B8 /* ASPingService.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASPingService.m; path = CRMNetDetect/Classes/ASPingService.m; sourceTree = "<group>"; };
186EEDB427E8CA1149F1C265614A192D /* Pods-CRMNetDetect_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-CRMNetDetect_Example-umbrella.h"; sourceTree = "<group>"; };
1A487D78B1D97C8B191DE7B102F04EEC /* ASSimplePing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASSimplePing.h; path = CRMNetDetect/Classes/ASSimplePing.h; sourceTree = "<group>"; };
1C453B5CF9A91A76BD7EDF81805DA480 /* ASIPService.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASIPService.h; path = CRMNetDetect/Classes/ASIPService.h; sourceTree = "<group>"; };
20FAFD359BCB1B046D43AFB541C52903 /* CRMNetDetect */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CRMNetDetect; path = CRMNetDetect.framework; sourceTree = BUILT_PRODUCTS_DIR; };
249FC6845EF9F3486FC0E98C949002DC /* Pods-CRMNetDetect_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CRMNetDetect_Example-acknowledgements.plist"; sourceTree = "<group>"; };
2A78ACED08D358EF03D3B7DCEAA3FE17 /* Pods-CRMNetDetect_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-CRMNetDetect_Example-dummy.m"; sourceTree = "<group>"; };
2DF9AF2B76F5E7EE09777B102CEAF275 /* CRMNetDetect.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = CRMNetDetect.podspec; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
324C6F6ABD1F72D13001DC0ED4264766 /* ASCellularService.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASCellularService.h; path = CRMNetDetect/Classes/ASCellularService.h; sourceTree = "<group>"; };
41C21C0E979FABAD3562C7FA07958C99 /* CRMNetDetect.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CRMNetDetect.modulemap; sourceTree = "<group>"; };
4219201D388FC8DD2B605FF87AA91A1C /* CRMNetDetect.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CRMNetDetect.debug.xcconfig; sourceTree = "<group>"; };
5D006BBD2C21CCDCF7FE0C276841936C /* CRMNetDetectService.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CRMNetDetectService.h; path = CRMNetDetect/Classes/CRMNetDetectService.h; sourceTree = "<group>"; };
6402D858A3698838D279BFD4D96E85EB /* Pods-CRMNetDetect_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-CRMNetDetect_Example-acknowledgements.markdown"; sourceTree = "<group>"; };
64B293762EE2AFE00ECA3792BCE256C3 /* Pods-CRMNetDetect_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CRMNetDetect_Tests-Info.plist"; sourceTree = "<group>"; };
73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
7553B02EF8159F88857455120A6E09FC /* Pods-CRMNetDetect_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-CRMNetDetect_Tests-umbrella.h"; sourceTree = "<group>"; };
7855F1FE5AB2BC9EC87F0E77CF9B5D2D /* Pods-CRMNetDetect_Tests */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-CRMNetDetect_Tests"; path = Pods_CRMNetDetect_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
78E575167A6F0271FDD952DBB5682C8C /* Pods-CRMNetDetect_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-CRMNetDetect_Example-frameworks.sh"; sourceTree = "<group>"; };
7C1B4E7942F11EABCAE22F4E597AC85A /* ASCellularService.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASCellularService.m; path = CRMNetDetect/Classes/ASCellularService.m; sourceTree = "<group>"; };
89229355210BC0CA6D3D8BF572D1C51B /* Pods-CRMNetDetect_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-CRMNetDetect_Tests.modulemap"; sourceTree = "<group>"; };
9D2A0FFFFFA3D084D8BB354D35A94B3D /* Pods-CRMNetDetect_Example */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-CRMNetDetect_Example"; path = Pods_CRMNetDetect_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
9EC2E9CEE4C472DC6E5F5D139652C2D7 /* Pods-CRMNetDetect_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CRMNetDetect_Example.release.xcconfig"; sourceTree = "<group>"; };
A410666D2F14440EE4573B9FD919E2D1 /* Pods-CRMNetDetect_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CRMNetDetect_Tests.release.xcconfig"; sourceTree = "<group>"; };
A9F25A90DBB10220C04350169342C3AF /* CRMNetDetect.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CRMNetDetect.release.xcconfig; sourceTree = "<group>"; };
ACE1A140E22833FA3FDF933754BC2B64 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = "<group>"; };
B0B563F8B99ABAB3F9546A82AE5D5194 /* Pods-CRMNetDetect_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-CRMNetDetect_Tests-acknowledgements.markdown"; sourceTree = "<group>"; };
B25BEC9BAC2DB213981541992DF7DB77 /* CRMNetDetectService.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CRMNetDetectService.m; path = CRMNetDetect/Classes/CRMNetDetectService.m; sourceTree = "<group>"; };
B32524E44CDF1EF61A537141C79E97A5 /* Pods-CRMNetDetect_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CRMNetDetect_Example.debug.xcconfig"; sourceTree = "<group>"; };
BC43E13B2A1648689CA85FB31051D1FF /* Pods-CRMNetDetect_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-CRMNetDetect_Tests-dummy.m"; sourceTree = "<group>"; };
C2BAD2AB8E644F3028A21511F82B055F /* CRMNetDetect-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CRMNetDetect-dummy.m"; sourceTree = "<group>"; };
C4ECF0070DAC1A794BA7BD296C38003A /* Pods-CRMNetDetect_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CRMNetDetect_Tests.debug.xcconfig"; sourceTree = "<group>"; };
C87CBDF7C9D6564E83FF515597F8FD41 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = "<group>"; };
CA264FEEA78EC9757ED9BD7060FDB76D /* Pods-CRMNetDetect_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CRMNetDetect_Example-Info.plist"; sourceTree = "<group>"; };
CB8C42BC071E94373663B9D026EFCB5B /* ASPingService.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASPingService.h; path = CRMNetDetect/Classes/ASPingService.h; sourceTree = "<group>"; };
D88628C237CC1612A2ED3B7A44495D4F /* CRMNetDetect-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CRMNetDetect-prefix.pch"; sourceTree = "<group>"; };
E8D8000D3C380367CCE618D607F4D6BF /* ASReachability.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ASReachability.h; path = CRMNetDetect/Classes/ASReachability.h; sourceTree = "<group>"; };
F0D50D828266A69AE323AA3AEDADD89A /* Pods-CRMNetDetect_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CRMNetDetect_Tests-acknowledgements.plist"; sourceTree = "<group>"; };
F81C5CF683443FFC42D9E1228D7B5A62 /* Pods-CRMNetDetect_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-CRMNetDetect_Example.modulemap"; sourceTree = "<group>"; };
FC6E8CF83AD06F3683AE816413B83C72 /* ASSimplePing.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASSimplePing.m; path = CRMNetDetect/Classes/ASSimplePing.m; sourceTree = "<group>"; };
FE5540603C1ECD73D35BACEAF6C3E94F /* ASIPService.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ASIPService.m; path = CRMNetDetect/Classes/ASIPService.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
08AFB816AAA99EBEA2CBE54F2B11BD66 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
34E4979A2E09D56AEE25338C1A247E85 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
3DD85B014EA060818946223A44AE7A6C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
14B1BBF16840A4AF860A81C40CBCB82C /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8A65980E9F25C34E692E9DE39E742A12 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C9EF77E2EB2F64F2B9A9B87581EB1E41 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
31D45604078021110917CBDE1B864EF6 /* Products */ = {
isa = PBXGroup;
children = (
20FAFD359BCB1B046D43AFB541C52903 /* CRMNetDetect */,
9D2A0FFFFFA3D084D8BB354D35A94B3D /* Pods-CRMNetDetect_Example */,
7855F1FE5AB2BC9EC87F0E77CF9B5D2D /* Pods-CRMNetDetect_Tests */,
);
name = Products;
sourceTree = "<group>";
};
42E1548B2B378E7510A22441E13A1256 /* CRMNetDetect */ = {
isa = PBXGroup;
children = (
324C6F6ABD1F72D13001DC0ED4264766 /* ASCellularService.h */,
7C1B4E7942F11EABCAE22F4E597AC85A /* ASCellularService.m */,
1C453B5CF9A91A76BD7EDF81805DA480 /* ASIPService.h */,
FE5540603C1ECD73D35BACEAF6C3E94F /* ASIPService.m */,
CB8C42BC071E94373663B9D026EFCB5B /* ASPingService.h */,
16FFE157E602089D4130A354B86096B8 /* ASPingService.m */,
E8D8000D3C380367CCE618D607F4D6BF /* ASReachability.h */,
11474C2A40738BAE0FEE04111EED6C95 /* ASReachability.m */,
1A487D78B1D97C8B191DE7B102F04EEC /* ASSimplePing.h */,
FC6E8CF83AD06F3683AE816413B83C72 /* ASSimplePing.m */,
5D006BBD2C21CCDCF7FE0C276841936C /* CRMNetDetectService.h */,
B25BEC9BAC2DB213981541992DF7DB77 /* CRMNetDetectService.m */,
70928ABBB977D7B739CDA6BCE788745B /* Pod */,
B0B85C3D043C7BEC82EBD83A61C89CA6 /* Support Files */,
);
name = CRMNetDetect;
path = ../..;
sourceTree = "<group>";
};
578452D2E740E91742655AC8F1636D1F /* iOS */ = {
isa = PBXGroup;
children = (
73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */,
);
name = iOS;
sourceTree = "<group>";
};
5B8392D1CB740EAB51CCBFF744E57BEE /* Pods-CRMNetDetect_Tests */ = {
isa = PBXGroup;
children = (
89229355210BC0CA6D3D8BF572D1C51B /* Pods-CRMNetDetect_Tests.modulemap */,
B0B563F8B99ABAB3F9546A82AE5D5194 /* Pods-CRMNetDetect_Tests-acknowledgements.markdown */,
F0D50D828266A69AE323AA3AEDADD89A /* Pods-CRMNetDetect_Tests-acknowledgements.plist */,
BC43E13B2A1648689CA85FB31051D1FF /* Pods-CRMNetDetect_Tests-dummy.m */,
64B293762EE2AFE00ECA3792BCE256C3 /* Pods-CRMNetDetect_Tests-Info.plist */,
7553B02EF8159F88857455120A6E09FC /* Pods-CRMNetDetect_Tests-umbrella.h */,
C4ECF0070DAC1A794BA7BD296C38003A /* Pods-CRMNetDetect_Tests.debug.xcconfig */,
A410666D2F14440EE4573B9FD919E2D1 /* Pods-CRMNetDetect_Tests.release.xcconfig */,
);
name = "Pods-CRMNetDetect_Tests";
path = "Target Support Files/Pods-CRMNetDetect_Tests";
sourceTree = "<group>";
};
70928ABBB977D7B739CDA6BCE788745B /* Pod */ = {
isa = PBXGroup;
children = (
2DF9AF2B76F5E7EE09777B102CEAF275 /* CRMNetDetect.podspec */,
C87CBDF7C9D6564E83FF515597F8FD41 /* LICENSE */,
ACE1A140E22833FA3FDF933754BC2B64 /* README.md */,
);
name = Pod;
sourceTree = "<group>";
};
9C64A66DE216404EE852FB1B3F2CCFD2 /* Development Pods */ = {
isa = PBXGroup;
children = (
42E1548B2B378E7510A22441E13A1256 /* CRMNetDetect */,
);
name = "Development Pods";
sourceTree = "<group>";
};
B0B85C3D043C7BEC82EBD83A61C89CA6 /* Support Files */ = {
isa = PBXGroup;
children = (
41C21C0E979FABAD3562C7FA07958C99 /* CRMNetDetect.modulemap */,
C2BAD2AB8E644F3028A21511F82B055F /* CRMNetDetect-dummy.m */,
0E8C5FF400ECFBE78269A7B8B41C58F1 /* CRMNetDetect-Info.plist */,
D88628C237CC1612A2ED3B7A44495D4F /* CRMNetDetect-prefix.pch */,
0280AE64150F71E17ACB1861FAFB4677 /* CRMNetDetect-umbrella.h */,
4219201D388FC8DD2B605FF87AA91A1C /* CRMNetDetect.debug.xcconfig */,
A9F25A90DBB10220C04350169342C3AF /* CRMNetDetect.release.xcconfig */,
);
name = "Support Files";
path = "Example/Pods/Target Support Files/CRMNetDetect";
sourceTree = "<group>";
};
B35CD1E2CF2D27F0BA7DE5EDFDC02F00 /* Pods-CRMNetDetect_Example */ = {
isa = PBXGroup;
children = (
F81C5CF683443FFC42D9E1228D7B5A62 /* Pods-CRMNetDetect_Example.modulemap */,
6402D858A3698838D279BFD4D96E85EB /* Pods-CRMNetDetect_Example-acknowledgements.markdown */,
249FC6845EF9F3486FC0E98C949002DC /* Pods-CRMNetDetect_Example-acknowledgements.plist */,
2A78ACED08D358EF03D3B7DCEAA3FE17 /* Pods-CRMNetDetect_Example-dummy.m */,
78E575167A6F0271FDD952DBB5682C8C /* Pods-CRMNetDetect_Example-frameworks.sh */,
CA264FEEA78EC9757ED9BD7060FDB76D /* Pods-CRMNetDetect_Example-Info.plist */,
186EEDB427E8CA1149F1C265614A192D /* Pods-CRMNetDetect_Example-umbrella.h */,
B32524E44CDF1EF61A537141C79E97A5 /* Pods-CRMNetDetect_Example.debug.xcconfig */,
9EC2E9CEE4C472DC6E5F5D139652C2D7 /* Pods-CRMNetDetect_Example.release.xcconfig */,
);
name = "Pods-CRMNetDetect_Example";
path = "Target Support Files/Pods-CRMNetDetect_Example";
sourceTree = "<group>";
};
CEEBEA2B1E690E681726D3DA7F862C22 /* Targets Support Files */ = {
isa = PBXGroup;
children = (
B35CD1E2CF2D27F0BA7DE5EDFDC02F00 /* Pods-CRMNetDetect_Example */,
5B8392D1CB740EAB51CCBFF744E57BEE /* Pods-CRMNetDetect_Tests */,
);
name = "Targets Support Files";
sourceTree = "<group>";
};
CF1408CF629C7361332E53B88F7BD30C = {
isa = PBXGroup;
children = (
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */,
9C64A66DE216404EE852FB1B3F2CCFD2 /* Development Pods */,
D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */,
31D45604078021110917CBDE1B864EF6 /* Products */,
CEEBEA2B1E690E681726D3DA7F862C22 /* Targets Support Files */,
);
sourceTree = "<group>";
};
D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = {
isa = PBXGroup;
children = (
578452D2E740E91742655AC8F1636D1F /* iOS */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
1352DD5223A82E5AEA0561334DB3F0B7 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
E9A11907AA90CADF1213F162F76E3884 /* Pods-CRMNetDetect_Tests-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2C3A7D90FAD619EAD41B9DE299F6450D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
9711466938C63585D137E3D757119F52 /* ASCellularService.h in Headers */,
A3E9EE2F05C8E5C188A3600D755FEF82 /* ASIPService.h in Headers */,
9F71F2E4C224953A4062549398DA4EAB /* ASPingService.h in Headers */,
F32040B7DCE2AC900E3CEACB9278F3AB /* ASReachability.h in Headers */,
2AB593F171395205C5A99821C0B22D8F /* ASSimplePing.h in Headers */,
9710E06143A85CB0FFA5DC59D3C43759 /* CRMNetDetect-umbrella.h in Headers */,
61F90CA4FB55C90EBF5134119705263E /* CRMNetDetectService.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
974D3CF3F7CC0F404A63C40F524E8235 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
C7C82325F37C2FFDB19E9EEA2C443D07 /* Pods-CRMNetDetect_Example-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
3A54B90CDAB2E37B80545B85DE2A4E98 /* Pods-CRMNetDetect_Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 135EA2FCDA7D49BBF6D8D7970F645B7F /* Build configuration list for PBXNativeTarget "Pods-CRMNetDetect_Tests" */;
buildPhases = (
1352DD5223A82E5AEA0561334DB3F0B7 /* Headers */,
8F00D2EEC8831C15A7F71DE4ACBB7463 /* Sources */,
08AFB816AAA99EBEA2CBE54F2B11BD66 /* Frameworks */,
D3D43FFA0DF2FE5430C83AA5C56B0C29 /* Resources */,
);
buildRules = (
);
dependencies = (
E6BD9D88B1566F87F75A70DC829F2A57 /* PBXTargetDependency */,
);
name = "Pods-CRMNetDetect_Tests";
productName = Pods_CRMNetDetect_Tests;
productReference = 7855F1FE5AB2BC9EC87F0E77CF9B5D2D /* Pods-CRMNetDetect_Tests */;
productType = "com.apple.product-type.framework";
};
5F9B27A55448F371B87234C2ABC2B1F0 /* Pods-CRMNetDetect_Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6D04C5732C1B69FE002DC0C84B2E41A7 /* Build configuration list for PBXNativeTarget "Pods-CRMNetDetect_Example" */;
buildPhases = (
974D3CF3F7CC0F404A63C40F524E8235 /* Headers */,
F604526D4EA7A51D56D9BC0FB4E82CC4 /* Sources */,
3DD85B014EA060818946223A44AE7A6C /* Frameworks */,
CEF85C8AB281BEEA5A741B2DBD036888 /* Resources */,
);
buildRules = (
);
dependencies = (
FDF6CBB5C9A96767E49CACDA9D5EA578 /* PBXTargetDependency */,
);
name = "Pods-CRMNetDetect_Example";
productName = Pods_CRMNetDetect_Example;
productReference = 9D2A0FFFFFA3D084D8BB354D35A94B3D /* Pods-CRMNetDetect_Example */;
productType = "com.apple.product-type.framework";
};
A15DBD8B0E93908127568265727CF1A6 /* CRMNetDetect */ = {
isa = PBXNativeTarget;
buildConfigurationList = 4C1E278A51998E597534EB4E6B0EFBF3 /* Build configuration list for PBXNativeTarget "CRMNetDetect" */;
buildPhases = (
2C3A7D90FAD619EAD41B9DE299F6450D /* Headers */,
3690B45B008C2C70014E8812FC2C1D5E /* Sources */,
8A65980E9F25C34E692E9DE39E742A12 /* Frameworks */,
F5731E6AADD6F7B146335CAB05CE0471 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = CRMNetDetect;
productName = CRMNetDetect;
productReference = 20FAFD359BCB1B046D43AFB541C52903 /* CRMNetDetect */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
BFDFE7DC352907FC980B868725387E98 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1300;
LastUpgradeCheck = 1300;
};
buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = CF1408CF629C7361332E53B88F7BD30C;
productRefGroup = 31D45604078021110917CBDE1B864EF6 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
A15DBD8B0E93908127568265727CF1A6 /* CRMNetDetect */,
5F9B27A55448F371B87234C2ABC2B1F0 /* Pods-CRMNetDetect_Example */,
3A54B90CDAB2E37B80545B85DE2A4E98 /* Pods-CRMNetDetect_Tests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
CEF85C8AB281BEEA5A741B2DBD036888 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D3D43FFA0DF2FE5430C83AA5C56B0C29 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F5731E6AADD6F7B146335CAB05CE0471 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
3690B45B008C2C70014E8812FC2C1D5E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
623939AC658561C434479B886DD5662D /* ASCellularService.m in Sources */,
A43355FFDCB23FEAA78B812DE4CA2332 /* ASIPService.m in Sources */,
6BAB483D908688F6AA6A0FE36B1516F5 /* ASPingService.m in Sources */,
438AF190B68A1A8D9ABA19022F576D30 /* ASReachability.m in Sources */,
C80E53489F66A8DD4827FA9C81245091 /* ASSimplePing.m in Sources */,
8F3E67C1A21A5B977A7B28C231B41CD3 /* CRMNetDetect-dummy.m in Sources */,
8829ACD127840ADB7B9C72B32C642400 /* CRMNetDetectService.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8F00D2EEC8831C15A7F71DE4ACBB7463 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
58742F2B879F3D68E8FCE527B08E136B /* Pods-CRMNetDetect_Tests-dummy.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F604526D4EA7A51D56D9BC0FB4E82CC4 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9E86D4BF69F9197E677C369D7BA6A2DE /* Pods-CRMNetDetect_Example-dummy.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
E6BD9D88B1566F87F75A70DC829F2A57 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Pods-CRMNetDetect_Example";
target = 5F9B27A55448F371B87234C2ABC2B1F0 /* Pods-CRMNetDetect_Example */;
targetProxy = 7075D6E43A5669225682E7E00FD0A732 /* PBXContainerItemProxy */;
};
FDF6CBB5C9A96767E49CACDA9D5EA578 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = CRMNetDetect;
target = A15DBD8B0E93908127568265727CF1A6 /* CRMNetDetect */;
targetProxy = 2B72EB97E8F061F6B7ADEB90E54B56E7 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
1849C33FAE6CCF74E316F8061F4C995F /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4219201D388FC8DD2B605FF87AA91A1C /* CRMNetDetect.debug.xcconfig */;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/CRMNetDetect/CRMNetDetect-prefix.pch";
INFOPLIST_FILE = "Target Support Files/CRMNetDetect/CRMNetDetect-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/CRMNetDetect/CRMNetDetect.modulemap";
PRODUCT_MODULE_NAME = CRMNetDetect;
PRODUCT_NAME = CRMNetDetect;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
2AD8F3D6A2B2CD2EBD178C3E4AE62F99 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9EC2E9CEE4C472DC6E5F5D139652C2D7 /* Pods-CRMNetDetect_Example.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-CRMNetDetect_Example/Pods-CRMNetDetect_Example-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-CRMNetDetect_Example/Pods-CRMNetDetect_Example.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
4E9D97466B80B3D01C74572651BEA5FE /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C4ECF0070DAC1A794BA7BD296C38003A /* Pods-CRMNetDetect_Tests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-CRMNetDetect_Tests/Pods-CRMNetDetect_Tests-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-CRMNetDetect_Tests/Pods-CRMNetDetect_Tests.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
50591A76E386A2C925A9084E9DFFA86F /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A9F25A90DBB10220C04350169342C3AF /* CRMNetDetect.release.xcconfig */;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/CRMNetDetect/CRMNetDetect-prefix.pch";
INFOPLIST_FILE = "Target Support Files/CRMNetDetect/CRMNetDetect-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/CRMNetDetect/CRMNetDetect.modulemap";
PRODUCT_MODULE_NAME = CRMNetDetect;
PRODUCT_NAME = CRMNetDetect;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
5B9A9028934539029CFA942DFDB77A4D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B32524E44CDF1EF61A537141C79E97A5 /* Pods-CRMNetDetect_Example.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-CRMNetDetect_Example/Pods-CRMNetDetect_Example-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-CRMNetDetect_Example/Pods-CRMNetDetect_Example.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
7EE7A78859F657F6BEFC651185B43192 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"POD_CONFIGURATION_RELEASE=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
SYMROOT = "${SRCROOT}/../build";
};
name = Release;
};
A64364CD308F31342EB5F91B8746EA49 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A410666D2F14440EE4573B9FD919E2D1 /* Pods-CRMNetDetect_Tests.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-CRMNetDetect_Tests/Pods-CRMNetDetect_Tests-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-CRMNetDetect_Tests/Pods-CRMNetDetect_Tests.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
D299434AB35E7FD6F7921C8EF24742FF /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"POD_CONFIGURATION_DEBUG=1",
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SYMROOT = "${SRCROOT}/../build";
};
name = Debug;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
135EA2FCDA7D49BBF6D8D7970F645B7F /* Build configuration list for PBXNativeTarget "Pods-CRMNetDetect_Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
4E9D97466B80B3D01C74572651BEA5FE /* Debug */,
A64364CD308F31342EB5F91B8746EA49 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D299434AB35E7FD6F7921C8EF24742FF /* Debug */,
7EE7A78859F657F6BEFC651185B43192 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4C1E278A51998E597534EB4E6B0EFBF3 /* Build configuration list for PBXNativeTarget "CRMNetDetect" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1849C33FAE6CCF74E316F8061F4C995F /* Debug */,
50591A76E386A2C925A9084E9DFFA86F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6D04C5732C1B69FE002DC0C84B2E41A7 /* Build configuration list for PBXNativeTarget "Pods-CRMNetDetect_Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5B9A9028934539029CFA942DFDB77A4D /* Debug */,
2AD8F3D6A2B2CD2EBD178C3E4AE62F99 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */;
}
<?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>CFBundleDevelopmentRegion</key>
<string>${PODS_DEVELOPMENT_LANGUAGE}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
#import <Foundation/Foundation.h>
@interface PodsDummy_CRMNetDetect : NSObject
@end
@implementation PodsDummy_CRMNetDetect
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "ASCellularService.h"
#import "ASIPService.h"
#import "ASPingService.h"
#import "ASReachability.h"
#import "ASSimplePing.h"
#import "CRMNetDetectService.h"
FOUNDATION_EXPORT double CRMNetDetectVersionNumber;
FOUNDATION_EXPORT const unsigned char CRMNetDetectVersionString[];
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CRMNetDetect
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
framework module CRMNetDetect {
umbrella header "CRMNetDetect-umbrella.h"
export *
module * { export * }
}
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CRMNetDetect
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
<?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>CFBundleDevelopmentRegion</key>
<string>${PODS_DEVELOPMENT_LANGUAGE}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
# Acknowledgements
This application makes use of the following third party libraries:
## CRMNetDetect
Copyright (c) 2024 guojianpeng@svinvy.com <svinvy@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Generated by CocoaPods - https://cocoapods.org
<?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>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2024 guojianpeng@svinvy.com &lt;svinvy@gmail.com&gt;
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>CRMNetDetect</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - https://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_CRMNetDetect_Example : NSObject
@end
@implementation PodsDummy_Pods_CRMNetDetect_Example
@end
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the script phase was successful).
exit 0
fi
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
BCSYMBOLMAP_DIR="BCSymbolMaps"
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
# Copies and strips a vendored framework
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRODUCTS_DIR}/$1"
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
elif [ -r "$1" ]; then
local source="$1"
fi
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink -f "${source}")"
fi
if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then
# Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied
find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do
echo "Installing $f"
install_bcsymbolmap "$f" "$destination"
rm "$f"
done
rmdir "${source}/${BCSYMBOLMAP_DIR}"
fi
# Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
elif [ -L "${binary}" ]; then
echo "Destination binary is symlinked..."
dirname="$(dirname "${binary}")"
binary="${dirname}/$(readlink "${binary}")"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
strip_invalid_archs "$binary"
fi
# Resign the code if required by the build settings to avoid unstable apps
code_sign_if_enabled "${destination}/$(basename "$1")"
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u)
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
code_sign_if_enabled "${destination}/${lib}"
done
fi
}
# Copies and strips a vendored dSYM
install_dsym() {
local source="$1"
warn_missing_arch=${2:-true}
if [ -r "$source" ]; then
# Copy the dSYM into the targets temp dir.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
local basename
basename="$(basename -s .dSYM "$source")"
binary_name="$(ls "$source/Contents/Resources/DWARF")"
binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}"
# Strip invalid architectures from the dSYM.
if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
strip_invalid_archs "$binary" "$warn_missing_arch"
fi
if [[ $STRIP_BINARY_RETVAL == 0 ]]; then
# Move the stripped file into its final destination.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
else
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
mkdir -p "${DWARF_DSYM_FOLDER_PATH}"
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM"
fi
fi
}
# Used as a return value for each invocation of `strip_invalid_archs` function.
STRIP_BINARY_RETVAL=0
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
warn_missing_arch=${2:-true}
# Get architectures for current target binary
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
# Intersect them with the architectures we are building for
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
# If there are no archs supported by this binary then warn the user
if [[ -z "$intersected_archs" ]]; then
if [[ "$warn_missing_arch" == "true" ]]; then
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
fi
STRIP_BINARY_RETVAL=1
return
fi
stripped=""
for arch in $binary_archs; do
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary"
stripped="$stripped $arch"
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
STRIP_BINARY_RETVAL=0
}
# Copies the bcsymbolmap files of a vendored framework
install_bcsymbolmap() {
local bcsymbolmap_path="$1"
local destination="${BUILT_PRODUCTS_DIR}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identity
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
fi
echo "$code_sign_cmd"
eval "$code_sign_cmd"
fi
}
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/CRMNetDetect/CRMNetDetect.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/CRMNetDetect/CRMNetDetect.framework"
fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait
fi
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double Pods_CRMNetDetect_ExampleVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_CRMNetDetect_ExampleVersionString[];
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CRMNetDetect"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CRMNetDetect/CRMNetDetect.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_LDFLAGS = $(inherited) -framework "CRMNetDetect"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
framework module Pods_CRMNetDetect_Example {
umbrella header "Pods-CRMNetDetect_Example-umbrella.h"
export *
module * { export * }
}
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CRMNetDetect"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CRMNetDetect/CRMNetDetect.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_LDFLAGS = $(inherited) -framework "CRMNetDetect"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
<?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>CFBundleDevelopmentRegion</key>
<string>${PODS_DEVELOPMENT_LANGUAGE}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
# Acknowledgements
This application makes use of the following third party libraries:
Generated by CocoaPods - https://cocoapods.org
<?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>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - https://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_CRMNetDetect_Tests : NSObject
@end
@implementation PodsDummy_Pods_CRMNetDetect_Tests
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double Pods_CRMNetDetect_TestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_CRMNetDetect_TestsVersionString[];
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CRMNetDetect"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CRMNetDetect/CRMNetDetect.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "CRMNetDetect"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
framework module Pods_CRMNetDetect_Tests {
umbrella header "Pods-CRMNetDetect_Tests-umbrella.h"
export *
module * { export * }
}
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CRMNetDetect"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CRMNetDetect/CRMNetDetect.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "CRMNetDetect"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment