SMSSDK is the most popular social SDK for apps and mobile games ! We've already supported over 1000 country or zone in global world until now.中文官网
Current SMSSDK version
- iOS v3.2.8
中文集成文档
SMSSDK is the most popular social SDK for apps and mobile games ! We've already supported over 1000 country or zone in global world until now. And also it’s easily to use in your app.now, I will tell you the steps liking this:
If you use cocoaPods ,now ,it's easily to import SMSSDK liking this:
##cocoapods import:
- main module(necessary)
- pod "mob_smssdk"
Yeah, you are right,it's over using cocoaPods to import SMSSDK. The next is to import the file's header and use the API of the SMSSDK what you wanted.
Step1: Download the SDK from here :Download SMSSDK_iOS
When you download the SDK, you will get something liking this:
It’s contain the three parties:
- SMSSDK. Including static libraries and local files.When used directly to this folder into the project.
- SMSSDKDemo. Showing the SDK foundation.
- SMSSDKUI. If you want to use it, drag SMSSDKUI.xcodeproj to your project directly.
Drag this folder into the project:
Required:
- libz.dylib
- libc++.dylib (libstdc++.dylib这个库在XCode10之后以libc++替代)
##1. Access to privacy agreement
According to the requirements of national laws and regulations (for details, please refer to the printed and distributed by the network security administration of the Ministry of industry and information technology of the people's Republic of China notice of [identification method for illegal collection and use of personal information by app] (http://www.miit.gov.cn/n1146285/n1146352/n3054355/n3057724/n3057729/c7591259 / content. HTML) ). When developers use SDK products provided by mobtech, they need to show the privacy service agreement of mobtech to end users and obtain the authorization of users.
mobtech provides the corresponding interface of privacy service for developers to use.
Note: all developers are required to access the mobtech privacy service process according to this document, otherwise, the relevant services provided by each SDK of mobtech may not be used.
The privacy process of mobtech mainly includes the functions of "privacy agreement authorization" and "privacy agreement secondary confirmation", involving the following interfaces:
it is suggested that developers should attach mobtech's privacy protocol in a prominent position (e.g. in the application's own service agreement pop-up box), users
Click to view the agreement.)
(1) show the mobtech privacy protocol to the end user and return the user authorization result
(2) privacy secondary confirmation box switch setting
(3) user defined privacy secondary confirmation box UI
(4) query the content of mobtech privacy agreement
###
1.2 access process
####
1. Import the latest version of sms_sdk.framework, mobfoundation.framework and mob privacy protocol related interfaces in mobsdk + privacy. H, including 4 interfaces
####Import header file:
#import <MOBFoundation/MobSDK+Privacy.h>
Show mobtech privacy agreement
developers need to show mobtech privacy policy first. It is suggested to show it in the following ways:
(1) embed the URL of mobtech privacy agreement into the description of the app's own privacy agreement
(2) add the title of mobtech privacy agreement in the prominent position of the app privacy agreement authorization box, and click to view the content of the agreement
(3) embed the content of mobtech privacy agreement in the app's own privacy agreement
####
2. Query the content of mobtech privacy agreement
developers should attach mobtech's privacy protocol in a prominent position (for example, in the application's own service agreement pop-up box), and users can view the content of the protocol by clicking. The function of querying the privacy protocol provides two options: synchronous and asynchronous.
* *
Get user privacy agreement
@Param type protocol type (1 = URL type, 2 = rich text type)
@Param data title = title, content = content (type = 1, return URL, return rich text when type = 2)
* /
+ (void)getPrivacyPolicy:(NSString * _Nullable)type
compeletion:(void (^ _Nullable)(NSDictionary * _Nullable data,NSErro
R
* _Nullable error))result;
The following values are available for
type:
(1) obtain the URL address of the privacy agreement, which is used to display the privacy agreement through the web page
(2) obtain the complete content of the privacy agreement, which is used to display the privacy agreement through the rich version
####
3. Upload privacy agreement authorization status
upload the user's authorization status of the privacy agreement. When the user operates the authorization of the privacy agreement (whether authorized or denied), the status will be correctly fed back to mobtech, so that mobtech can identify whether the corresponding service content can be provided
* *
Upload privacy agreement authorization status
@Whether param isagree agrees (the result of user authorization)
* /
+ (void)uploadPrivacyPermissionStatus:(BOOL)isAgree
onResult:(void (^_Nullable)(BOOL success))handler;
#####The scenario is as follows:
####
4. Setting of privacy secondary confirmation box switch (not required)
* *
Set whether pop ups are allowed
@Whether param show allows to display the secondary pop-up window of the privacy protocol (preferably set to yes, otherwise some functions of mobtech may not be able to
Yes by default)
* /
+ (void)setAllowShowPrivacyWindow:(BOOL)show;
**It is better to call when application: didfinishlaunchingwithoptions: is used during application initialization to avoid late call and ineffective setting effect.
####
5. User defined privacy secondary confirmation box UI (not required)
* *
Set privacy protocol pop-up tone
@Param backcolorb pop up background color
@Param colors pop-up button tone array (⾸ element is reject button tone, the second element is agree button tone)
* /
+ (void)setPrivacyBackgroundColor:(UIColor *_Nullable)backColor
operationButtonColor:(NSArray <UIColor *>*_Nullable)colors;
##2. Import header file
#import <SMS_SDK/SMSSDK.h>
- Get verificationCode
[SMSSDK getVerificationCodeByMethod:SMSGetCodeMethodSMS phoneNumber:@"13800138000" zone:@"86" result:^(NSError *error) {
if (!error)
{
// 请求成功
}
else
{
// error
}
}];
- commit
[SMSSDK commitVerificationCode:@"1234" phoneNumber:@"13800138000" zone:@"86" result:^(NSError *error) {
if (!error)
{
// 验证成功
}
else
{
// error
}
}];