MaveSDK 0.7.11

MaveSDK 0.7.11

测试已测试
Lang语言 Obj-CObjective C
许可证 自定义
发布上次发布2015年9月

Danny CossonGreg Einfrank维护。



 
依赖
libPhoneNumber-iOS~> 0.8.3
CCTemplate= 0.2.0
 

MaveSDK 0.7.11

Mave iOS SDK

使用方法

您可以在包含的演示应用程序中看到其操作(无需任何服务器端交互)。要运行它

  • 运行 pod install 以获取所需的依赖项
  • 然后在 Xcode 中打开 MaveSDK.xcworkspace,并构建 DemoApp Target。

快速集成

见完整文档此处

Mave SDK 可通过 CocoaPods 使用。要安装它,只需将以下行添加到您的 Podfile 中

pod "MaveSDK"

然后,在 applicationDidFinishLaunchingWithOptions: 中初始化 SDK

#import <MaveSDK.h>;

#define MAVE_SDK_APPLICATION_ID @"YOUR_APPLICATION_ID"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [MaveSDK setupSharedInstanceWithApplicationID:MAVE_SDK_APPLICATION_ID];

    // The rest of your app's setup code
}

然后,使用以下代码显示页面(例如,在点击“邀请朋友”按钮的操作中)

MAVEUserData *userData = [[MAVEUserData alloc] initWithUserID:@"1"
                                                    firstName:@"Example"
                                                     lastName:@"Person"];
[[MaveSDK sharedInstance] identifyUser:userData];
[[MaveSDK sharedInstance] presentInvitePageModallyWithBlock:^(UIViewController *inviteController) {
    // Code to present Mave's view controller from yours, e.g:
    // [self presentViewController:inviteController animated:YES completion:nil];
} dismissBlock:^(UIViewController *controller, NSUInteger numberOfInvitesSent) {
    // Code to transition back to your view controller after Mave's
    // is dismissed (sent invites or cancelled), e.g:
    // [controller dismissViewControllerAnimated:YES completion:nil];
} inviteContext:@"default"];
    // Passing an inviteContext allows you to track where a user came
    // from to get to the invite page. (e.g. "drawer menu", "profile")
    // It's used for analytics, not functionality.

作者

© Mave Technologies 2015

[email protected]

许可证

本 SDK 在专有许可证下发布,要在您发布的应用程序中使用它,您需要使用 Mave 平台(在我们的beta版上注册mave.io/beta/signup)。见 LICENSE 文件。