提供两个主要功能区域:(1) 应用服务(Usergrid),和 (2) 应用监控。应用服务提供服务器端存储功能。应用监控提供崩溃报告、错误跟踪、应用程序配置管理和网络性能监控。您可以使用这两个区域,或者只选择使用其中一个。
将 ApigeeiOSSDK.framework
添加到您的项目中。
将以下 iOS 框架添加到您的项目中
CoreLocation.framework
Security.framework
CoreTelephony.framework
QuartzCore.framework
SystemConfiguration.framework
UIKit.framework
向“构建设置”中的“其他链接器标志”添加以下标志
-ObjC -all_load
请确认已为“DEBUG”和“RELEASE”都设置了标志。
在您的代码中导入 SDK
#import <ApigeeiOSSDK/Apigee.h>
在 AppDelegate.h
中声明以下属性
@property (strong, nonatomic) ApigeeClient *apigeeClient; //object for initializing the App Services SDK
@property (strong, nonatomic) ApigeeMonitoringClient *monitoringClient; //client object for Apigee App Monitoring methods
@property (strong, nonatomic) ApigeeDataClient *dataClient; //client object for App Services data methods
在 AppDelegate.m
中的 'didFinishLaunching' 方法内实例化 'ApigeeClient' 类
//Instantiate the AppDelegate
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
//Sepcify your App Services organization and application names
NSString *orgName = @"YOUR-ORG";
NSString *appName = @"YOUR-APP";
//Instantiate ApigeeClient to initialize the SDK
appDelegate.apigeeClient = [[ApigeeClient alloc]
initWithOrganizationId:orgName
applicationId:appName];
//Retrieve instances of ApigeeClient.monitoringClient and ApigeeClient.dataClient
self.monitoringClient = [appDelegate.apigeeClient monitoringClient]; //used to call App Monitoring methods
self.dataClient = [appDelegate.apigeeClient dataClient]; //used to call data methods
要从源代码构建,请从您的存储库的 /source
目录中运行此命令
./Scripts/framework.sh
要运行单元测试,您可以使用 Xcode IDE 或 Xcode 的命令行工具
- From within the Xcode IDE, under the Product menu select Test.
- Using the command line issue the following command from the `\source` directory of your repository:
```xcodebuild -project ApigeeiOSSDK.xcodeproj -scheme “ApigeeiOSSDK Tests” -configuration Debug -sdk iphonesimulator clean build test```
构建脚本使用了 Xcode 的默认安装。如果您需要配置构建以使用不同的 Xcode 版本,请在 source/Scripts/dist.sh 中取消注释为 DEVELOPER_DIR 分配路径的代码。
新增类(ApigeeCollection
、ApigeeEntity
、ApigeeDevice
、ApigeeGroup
),以便更容易地处理实体和集合。其功能已根据我们的 JavaScript 和 PHP SDK 进行建模。
UG
' 前缀命名的类现在将以 'Apigee
' 前缀命名 (UGClassName
变为 ApigeeClassName
)UGClient
现在命名为 ApigeeDataClient
ApigeeClient
(新类)进行初始化