Skip to content

Commit

Permalink
升级1.0.2
Browse files Browse the repository at this point in the history
升级到最新版本1.0.2
  • Loading branch information
Steven committed Dec 11, 2015
1 parent d02a28c commit 172b02c
Show file tree
Hide file tree
Showing 22 changed files with 275 additions and 114 deletions.
4 changes: 2 additions & 2 deletions SMS_SDK.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = "SMS_SDK"
s.version = "1.1.1"
s.version = "1.2.0"
s.summary = '由Steven提供的来自Mob的免费短信验证码SDK。'
s.license = 'Copyright © 2012-2015 mob'
s.author = { "Steven" => "[email protected]" }
s.homepage = 'http://mob.com'
s.source = { :git => "https://github.com/neufeng/SMS_SDK.git", :tag => "1.1.1" }
s.source = { :git => "https://github.com/neufeng/SMS_SDK.git", :tag => s.version }
s.platform = :ios, '7.0'
s.frameworks = "MessageUI", "AddressBook", "AddressBookUI", "javascriptcore"
s.libraries = "icucore", "z", "stdc++"
Expand Down
23 changes: 22 additions & 1 deletion SMS_SDK/MOBFoundation.framework/Headers/MOBFApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,40 @@
*/
@interface MOBFApplication : NSObject

/**
* 获取应用名称
*
* @return 应用名称
*/
+ (NSString *)name;

/**
* 获取应用包名
*
* @return 包名
*/
+ (NSString *)bundleId;

/**
* 获取应用编译版本
*
* @return 编译版本
*/
+ (NSString *)buildVersion;

/**
* 获取应用版本号
*
* @return 应用版本号
*/
+ (NSString *)shortVersion;

/**
* 获取应用版本号
*
* @return 版本号
*/
+ (NSString *)version;
+ (NSString *)version __deprecated_msg("use [buildVersion] method instead");

/**
* 检测是否启用ATS功能
Expand Down
35 changes: 35 additions & 0 deletions SMS_SDK/MOBFoundation.framework/Headers/MOBFDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ typedef NS_ENUM(NSUInteger, MOBFNetworkType)
*/
+ (NSString *)carrier;

/**
* 获取手机运营商名称
*
* @return 运营商名称
*/
+ (NSString *)carrierName;

/**
* 获取手机运营商国家码
*
* @return 运营商国家码
*/
+ (NSString *)mobileCountryCode;

/**
* 获取手机运营商网络编号
*
* @return 运营商网络编号
*/
+ (NSString *)mobileNetworkCode;

/**
* 与当前系统版本比较
*
Expand Down Expand Up @@ -154,4 +175,18 @@ typedef NS_ENUM(NSUInteger, MOBFNetworkType)
*/
+ (NSString *)idfa;

/**
* 获取当前语言
*
* @return 语言描述
*/
+ (NSString *)currentLanguage;

/**
* 获取设备IP地址
*
* @return IP地址
*/
+ (NSString *)ipAddress;

@end
2 changes: 2 additions & 0 deletions SMS_SDK/MOBFoundation.framework/Headers/MOBFoundation.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@
#import <MOBFoundation/MOBFPluginManager.h>
#import <MOBFoundation/IMOBFPlugin.h>

#import <MOBFoundation/MOBFNotificationCenter.h>

#endif
Binary file modified SMS_SDK/MOBFoundation.framework/Info.plist
Binary file not shown.
Binary file modified SMS_SDK/MOBFoundation.framework/MOBFoundation
Binary file not shown.
2 changes: 1 addition & 1 deletion SMS_SDK/SMS_SDK.framework/Headers/SMSSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#import <MessageUI/MessageUI.h>

/**
* @brief 核心类(Core class)v1.1.1
* @brief 核心类(Core class)v1.2.0
*/
@interface SMSSDK : NSObject <MFMessageComposeViewControllerDelegate>

Expand Down
6 changes: 4 additions & 2 deletions SMS_SDK/SMS_SDK.framework/Headers/SMSSDKResultHanderDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ enum SMSResponseState

typedef enum SMSGetCodeMethod
{
SMSGetCodeMethodSMS = 0,
SMSGetCodeMethodVoice = 1
SMSGetCodeMethodSMS = 0, //文本短信方式
SMSGetCodeMethodVoice = 1 //语音方式

} SMSGetCodeMethod;

Expand Down Expand Up @@ -149,3 +149,5 @@ typedef void (^SMSSubmitUserInfoBlock) (enum SMSResponseState state);
*/
typedef void (^SMSShowNewFriendsCountBlock)(enum SMSResponseState state,int latelyFriendsCount);



Binary file modified SMS_SDK/SMS_SDK.framework/Info.plist
Binary file not shown.
Binary file modified SMS_SDK/SMS_SDK.framework/SMS_SDK
Binary file not shown.
12 changes: 6 additions & 6 deletions SMS_SDKDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
ORGANIZATIONNAME = "严军";
TargetAttributes = {
F3F34ABF19AED773004CA430 = {
DevelopmentTeam = 97DW55HLWV;
DevelopmentTeam = 859T9526RA;
};
};
};
Expand Down Expand Up @@ -451,8 +451,8 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution: Guangzhou ZhangAoBo Software Technology Co., Ltd.";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Guangzhou ZhangAoBo Software Technology Co., Ltd.";
CODE_SIGN_IDENTITY = "iPhone Developer: Chen GangQiang (785VZN2ZN7)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chen GangQiang (785VZN2ZN7)";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -477,7 +477,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer: Chen GangQiang (785VZN2ZN7)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chen GangQiang (785VZN2ZN7)";
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
Expand All @@ -499,8 +499,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Distribution: Guangzhou ZhangAoBo Software Technology Co., Ltd.";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Guangzhou ZhangAoBo Software Technology Co., Ltd.";
CODE_SIGN_IDENTITY = "iPhone Developer: Chen GangQiang (785VZN2ZN7)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chen GangQiang (785VZN2ZN7)";
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,46 @@
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
scope = "0"
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "SMS_SDKDemo/UI/Rigister By SMS/RegViewController.m"
timestampString = "466155784.079358"
filePath = "SMS_SDKDemo/UI/Register By Voice Call/RegisterByVoiceCallViewController.m"
timestampString = "468382211.650377"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "380"
endingLineNumber = "380"
landmarkName = "-tableView:didSelectRowAtIndexPath:"
startingLineNumber = "249"
endingLineNumber = "249"
landmarkName = "-viewDidLoad"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
scope = "0"
stopOnStyle = "0">
filePath = "SMS_SDKDemo/UI/Rigister By SMS/RegViewController.m"
timestampString = "468768026.339048"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "132"
endingLineNumber = "132"
landmarkName = "-alertView:clickedButtonAtIndex:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
Expand Down
6 changes: 3 additions & 3 deletions SMS_SDKDemo/SMS_SDKDemo-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.1</string>
<string>1.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.1</string>
<string>1.2.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<true/>
</dict>
<key>UIRequiredDeviceCapabilities</key>
<array>
Expand Down
4 changes: 2 additions & 2 deletions SMS_SDKDemo/SMS_UILib/SMS_MBProgressHUD.m
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ - (void)layoutSubviews {
// Set label properties
label.font = self.labelFont;
label.adjustsFontSizeToFitWidth = NO;
label.textAlignment = UITextAlignmentCenter;
label.textAlignment = NSTextAlignmentCenter;
label.opaque = NO;
label.backgroundColor = [UIColor clearColor];
label.textColor = [UIColor whiteColor];
Expand Down Expand Up @@ -395,7 +395,7 @@ - (void)layoutSubviews {
// Set label properties
detailsLabel.font = self.detailsLabelFont;
detailsLabel.adjustsFontSizeToFitWidth = NO;
detailsLabel.textAlignment = UITextAlignmentCenter;
detailsLabel.textAlignment = NSTextAlignmentCenter;
detailsLabel.opaque = NO;
detailsLabel.backgroundColor = [UIColor clearColor];
detailsLabel.textColor = [UIColor whiteColor];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import <SMS_SDK/SMSSDKCountryAndAreaCode.h>
#import <SMS_SDK/SMSSDK+DeprecatedMethods.h>
#import <SMS_SDK/SMSSDK+ExtexdMethods.h>
#import <MOBFoundation/MOBFoundation.h>

@interface RegisterByVoiceCallViewController ()
{
Expand Down Expand Up @@ -239,28 +240,75 @@ - (void)viewDidLoad

//设置本地区号
[self setTheLocalAreaCode];
//获取支持的地区列表

[SMSSDK getCountryZone:^(NSError *error, NSArray *zonesArray) {

NSString *saveTimeString = [[NSUserDefaults standardUserDefaults] objectForKey:@"saveDate"];

NSDateComponents *dateComponents = nil;

if (saveTimeString.length != 0) {

if (!error) {

NSLog(@"get the area code sucessfully");
//区号数据
_areaArray = [NSMutableArray arrayWithArray:zonesArray];

}
else
{
dateComponents = [self compareTwoDays:saveTimeString];

NSLog(@"failed to get the area code_%@",[error.userInfo objectForKey:@"getZone"]);
}

if (dateComponents.day >= 1 || saveTimeString.length == 0) { //day = 0 ,代表今天,day = 1 代表昨天 day >= 1 表示至少过了一天 saveTimeString.length == 0表示从未进行过缓存

}
//获取支持的地区列表
[SMSSDK getCountryZone:^(NSError *error, NSArray *zonesArray) {

if (!error) {

NSLog(@"get the area code sucessfully");
//区号数据
_areaArray = [NSMutableArray arrayWithArray:zonesArray];
//获取到国家列表数据后对进行缓存
[[MOBFDataService sharedInstance] setCacheData:_areaArray forKey:@"countryCodeArray" domain:nil];
//设置缓存时间
NSDate *saveDate = [NSDate date];
[[NSUserDefaults standardUserDefaults] setObject:[MOBFDate stringByDate:saveDate withFormat:@"yyyy-MM-dd"] forKey:@"saveDate"];

NSLog(@"_areaArray_%@",_areaArray);
}
else
{
NSLog(@"failed to get the area code _%@",[error.userInfo objectForKey:@"getZone"]);
}
}];
}
else
{
_areaArray = [[MOBFDataService sharedInstance] cacheDataForKey:@"countryCodeArray" domain:nil];

}];
}

}


/**
* 计算两个日期的天数差
*
* @param dateString 待计算日期
*
* @return 返回NSDateComponents,通过属性day,可以判断待计算日期和当前日期的天数差
*/
- (NSDateComponents*)compareTwoDays:(NSString *)dateString
{
NSCalendar *gregorian = [[NSCalendar alloc]
initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
[gregorian setFirstWeekday:2];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
NSDate *fromDate;
NSDate *toDate;
[gregorian rangeOfUnit:NSCalendarUnitDay startDate:&fromDate interval:NULL forDate:[dateFormatter dateFromString:dateString]];
[gregorian rangeOfUnit:NSCalendarUnitDay startDate:&toDate interval:NULL forDate:[NSDate date]];
NSDateComponents *dayComponents = [gregorian components:NSCalendarUnitDay | NSWeekdayCalendarUnit fromDate:fromDate toDate:toDate options:0];

return dayComponents;
}


-(void)setTheLocalAreaCode
{
NSLocale *locale = [NSLocale currentLocale];
Expand Down Expand Up @@ -376,6 +424,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
{
SectionsViewController* country2 = [[SectionsViewController alloc] init];
country2.delegate = self;

[country2 setAreaArray:_areaArray];
[self presentViewController:country2 animated:YES completion:^{
;
Expand Down
Loading

0 comments on commit 172b02c

Please sign in to comment.