Commit 8d73316c authored by jz's avatar jz

modify example

parent 89e0b269
......@@ -7,15 +7,51 @@
//
#import "GMAppDelegate.h"
@import GMPhobos;
@implementation GMAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[self setupPhobos];
return YES;
}
- (void)setupPhobos {
@try {
Phobos *client = [Phobos clientWithAppName:@"gengmei_user" channelId:@"APPSTORE"];
#ifdef APPSTORE
NSString *url = @"http://log.igengmei.com/log/collect";
if (![APIHOST isEqualToString:@"https://backend.igengmei.com"]) {
url = @"http://log.wanmeizhensuo.com/log/collect";
}
client.serverAPI = url;
#else
NSString *url = @"http://log.test.igengmei.com/log/collect";
[client setLogEnabled:NO]; // 调试打Log模式,看情况开启
client.serverAPI = url;
#endif
// Phobos.sharedClient = client;
// [Phobos setSharedClient:client];
[Phobos sharedClient].captureNullExpection = ^(NSString *eventId, NSDictionary *dic){
};
// [Phobos sharedClient].getTopController = ^UIViewController *{
// return AppDelegate.visibleController;
// };
}
@catch (NSException *exception) {
// debugLog(@"%@",exception.reason);
}
}
- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
......
......@@ -26,7 +26,7 @@
}
- (void)loadNewData {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.tableView.mj_header endRefreshing];
[self.tableView.mj_footer endRefreshing];
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment