remove CoreTelephony
This commit is contained in:
@@ -72,7 +72,6 @@
|
||||
23CEFC632AFB8FC100576D89 /* BSRealTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23CEFC442AFB8FC100576D89 /* BSRealTextView.m */; };
|
||||
23CEFC642AFB8FC100576D89 /* BSkObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 23CEFC472AFB8FC100576D89 /* BSkObject.m */; };
|
||||
23CEFC652AFB8FC100576D89 /* BSDrawLine.m in Sources */ = {isa = PBXBuildFile; fileRef = 23CEFC482AFB8FC100576D89 /* BSDrawLine.m */; };
|
||||
23E56B3C2B03564B00C8DAC9 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23E56B3B2B03564B00C8DAC9 /* CoreTelephony.framework */; };
|
||||
4C06427F2E97BD6D00BAF413 /* EPMineHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C0642732E97BD6D00BAF413 /* EPMineHeaderView.m */; };
|
||||
4C0642802E97BD6D00BAF413 /* EPMomentCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C06427A2E97BD6D00BAF413 /* EPMomentCell.m */; };
|
||||
4C0642852E97BD9500BAF413 /* APIConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0642842E97BD9500BAF413 /* APIConfig.swift */; };
|
||||
@@ -93,7 +92,6 @@
|
||||
4C7B909B2E9F822900A5E236 /* EPEmotionColorWheelView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C7B909A2E9F822900A5E236 /* EPEmotionColorWheelView.m */; };
|
||||
4C7B91D82EA096DE00A5E236 /* EPEmotionInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C7B91D72EA096DE00A5E236 /* EPEmotionInfoView.m */; };
|
||||
4CA7410E2E72B8FC00DB6853 /* YMLanguageConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA7410D2E72B8FC00DB6853 /* YMLanguageConfig.m */; };
|
||||
4CD15D922D7EC2AC00D9279F /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23E56B3B2B03564B00C8DAC9 /* CoreTelephony.framework */; };
|
||||
4CD19C872E9CB31C0069DAA0 /* EPLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19C7E2E9CB31C0069DAA0 /* EPLoginViewController.swift */; };
|
||||
4CD19C882E9CB31C0069DAA0 /* EPLoginState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19C802E9CB31C0069DAA0 /* EPLoginState.swift */; };
|
||||
4CD19C892E9CB31C0069DAA0 /* EPLoginTypesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19C7D2E9CB31C0069DAA0 /* EPLoginTypesViewController.swift */; };
|
||||
@@ -298,7 +296,6 @@
|
||||
23CEFC472AFB8FC100576D89 /* BSkObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSkObject.m; sourceTree = "<group>"; };
|
||||
23CEFC482AFB8FC100576D89 /* BSDrawLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSDrawLine.m; sourceTree = "<group>"; };
|
||||
23CEFC492AFB8FC100576D89 /* BSkObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSkObject.h; sourceTree = "<group>"; };
|
||||
23E56B3B2B03564B00C8DAC9 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
|
||||
4C0642722E97BD6D00BAF413 /* EPMineHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EPMineHeaderView.h; sourceTree = "<group>"; };
|
||||
4C0642732E97BD6D00BAF413 /* EPMineHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EPMineHeaderView.m; sourceTree = "<group>"; };
|
||||
4C0642792E97BD6D00BAF413 /* EPMomentCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EPMomentCell.h; sourceTree = "<group>"; };
|
||||
@@ -463,13 +460,11 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
237701122BCF742C00D661F1 /* libz.tbd in Frameworks */,
|
||||
23E56B3C2B03564B00C8DAC9 /* CoreTelephony.framework in Frameworks */,
|
||||
237701102BCF740400D661F1 /* libsqlite3.tbd in Frameworks */,
|
||||
2377010E2BCF73F400D661F1 /* CoreGraphics.framework in Frameworks */,
|
||||
2377010C2BCF73EA00D661F1 /* SystemConfiguration.framework in Frameworks */,
|
||||
2377010A2BCF73DD00D661F1 /* libiconv.tbd in Frameworks */,
|
||||
237701082BCF73CE00D661F1 /* Security.framework in Frameworks */,
|
||||
4CD15D922D7EC2AC00D9279F /* CoreTelephony.framework in Frameworks */,
|
||||
73FFADDC93E195344047A2EC /* Pods_YuMi.framework in Frameworks */,
|
||||
186A531926FC592100D67B2C /* libresolv.tbd in Frameworks */,
|
||||
9BA8A47727C60DF7000365A3 /* AVFoundation.framework in Frameworks */,
|
||||
@@ -1322,7 +1317,6 @@
|
||||
2377010B2BCF73EA00D661F1 /* SystemConfiguration.framework */,
|
||||
237701092BCF73DD00D661F1 /* libiconv.tbd */,
|
||||
237701072BCF73CE00D661F1 /* Security.framework */,
|
||||
23E56B3B2B03564B00C8DAC9 /* CoreTelephony.framework */,
|
||||
186A531826FC591100D67B2C /* libresolv.tbd */,
|
||||
CACF623970097D653132D69A /* Pods_YuMi.framework */,
|
||||
);
|
||||
|
@@ -334,7 +334,6 @@ constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
|
||||
@"os" : @"iOS",
|
||||
@"osVersion" : [YYUtility systemVersion],
|
||||
@"netType" : ([YYUtility networkStatus] == ReachableViaWiFi) ? @2 : @1,
|
||||
@"ispType" : @([YYUtility carrierIdentifier]),
|
||||
@"channel" : [YYUtility getAppSource] ? : @"",
|
||||
@"model" : [YYUtility modelType],
|
||||
@"deviceId" : [YYUtility deviceUniqueIdentification],
|
||||
@@ -345,16 +344,10 @@ constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
|
||||
|
||||
if (!parmars||![parmars isKindOfClass:[NSDictionary class]]){
|
||||
NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithDictionary:defaultBasciParame];
|
||||
if(![[YYUtility getMobileCountryCode] isEqualToString:@"65535"]){
|
||||
[dic setValue:[YYUtility getMobileCountryCode] forKey:@"mcc"];
|
||||
}
|
||||
return dic;
|
||||
}
|
||||
|
||||
NSMutableDictionary * dic = [NSMutableDictionary dictionaryWithDictionary:parmars];
|
||||
if(![[YYUtility getMobileCountryCode] isEqualToString:@"65535"]){
|
||||
[dic setValue:[YYUtility getMobileCountryCode] forKey:@"mcc"];
|
||||
}
|
||||
[dic addEntriesFromDictionary:defaultBasciParame];
|
||||
|
||||
if ([[AccountInfoStorage instance] getUid].length > 0) {
|
||||
|
@@ -5,9 +5,6 @@
|
||||
|
||||
|
||||
#import "YYUtility.h"
|
||||
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
|
||||
#import <CoreTelephony/CTCarrier.h>
|
||||
|
||||
|
||||
@implementation YYUtility (App)
|
||||
|
||||
|
@@ -5,58 +5,17 @@
|
||||
|
||||
|
||||
#import "YYUtility.h"
|
||||
#import <CoreTelephony/CTCarrier.h>
|
||||
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
|
||||
#import "CarrierIdentifier.h"
|
||||
@import CoreTelephony;
|
||||
|
||||
|
||||
static NSString * const kMobileCountryCode_China = @"460";
|
||||
|
||||
|
||||
static NSSet * kMobileNetworkCodes_ChinaMobile;
|
||||
static NSSet * kMobileNetworkCodes_ChinaUnicom;
|
||||
static NSSet * kMobileNetworkCodes_ChinaTelecom;
|
||||
|
||||
@implementation YYUtility (Carrier)
|
||||
|
||||
+ (void)load
|
||||
{
|
||||
if (self == [YYUtility self]) {
|
||||
kMobileNetworkCodes_ChinaMobile = [NSSet setWithObjects:@"00", @"02", @"07", nil];
|
||||
kMobileNetworkCodes_ChinaUnicom = [NSSet setWithObjects:@"01", @"06", nil];
|
||||
kMobileNetworkCodes_ChinaTelecom = [NSSet setWithObjects:@"03", @"05", nil];
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSString *)getMobileCountryCode{
|
||||
CTCarrier *carrier = [[CTTelephonyNetworkInfo alloc] init].subscriberCellularProvider;
|
||||
NSString *code = carrier.mobileCountryCode;
|
||||
return code;
|
||||
return @"";
|
||||
}
|
||||
|
||||
+ (NSInteger)carrierIdentifier
|
||||
{
|
||||
CTCarrier *carrier = [[CTTelephonyNetworkInfo alloc] init].subscriberCellularProvider;
|
||||
CarrierIdentifier identifier = CarrierIdentifier_Unknown;
|
||||
|
||||
if (carrier.mobileCountryCode == nil || carrier.mobileNetworkCode == nil) {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
if ([carrier.mobileCountryCode isEqualToString:kMobileCountryCode_China]) {
|
||||
if ([kMobileNetworkCodes_ChinaMobile containsObject:carrier.mobileNetworkCode]) {
|
||||
identifier = CarrierIdentifier_ChinaMobile;
|
||||
} else if ([kMobileNetworkCodes_ChinaUnicom containsObject:carrier.mobileNetworkCode]) {
|
||||
identifier = CarrierIdentifier_ChinaUnicom;
|
||||
} else if ([kMobileNetworkCodes_ChinaTelecom containsObject:carrier.mobileNetworkCode]) {
|
||||
identifier = CarrierIdentifier_ChinaTelecom;
|
||||
}
|
||||
} else {
|
||||
identifier = CarrierIdentifier_Otherwise;
|
||||
}
|
||||
|
||||
return identifier;
|
||||
return CarrierIdentifier_Unknown;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -23,8 +23,8 @@
|
||||
|
||||
@interface YYUtility (Carrier)
|
||||
|
||||
+ (NSString *)getMobileCountryCode;
|
||||
+ (NSInteger)carrierIdentifier;
|
||||
+ (NSString *)getMobileCountryCode DEPRECATED_MSG_ATTRIBUTE("CoreTelephony API deprecated, always returns empty string");
|
||||
+ (NSInteger)carrierIdentifier DEPRECATED_MSG_ATTRIBUTE("CoreTelephony API deprecated, always returns CarrierIdentifier_Unknown");
|
||||
|
||||
@end
|
||||
|
||||
|
Reference in New Issue
Block a user