test

C code posted by J
created at 03 Oct 08:20

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//
//  ShareKitAppDelegate.m
//  ShareKit
//
//  Created by Nathan Weiner on 6/4/10.
//  Copyright Idea Shower, LLC 2010. All rights reserved.
//

#import "ShareKitAppDelegate.h"
#import "RootViewController.h"

#import "SHKReadItLater.h"
#import "SHKFacebook.h"
#import "Yozio.h"
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <net/if.h>
#include <net/if_dl.h>



@implementation ShareKitAppDelegate

@synthesize window;
@synthesize navigationController;


#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

  [Yozio configure:@"8440c580-ee54-012f-9348-388d122de30a" secretKey:@"8440d130-ee54-012f-9349-388d122de30a"];
  [Yozio initializeExperiments];
  
  [Yozio userLoggedIn:@"jimmy"];
  [Yozio userLoggedIn:@"jimmy" properties:[NSDictionary dictionaryWithObject:@"bob" forKey:@"frank"]];
  [window addSubview:[navigationController view]];
    [window makeKeyAndVisible];
  
  navigationController.topViewController.title = SHKLocalizedString(@"Examples");
  [navigationController setToolbarHidden:NO];
  
  [self performSelector:@selector(testOffline) withObject:nil afterDelay:0.5];
  
  return YES;
}

- (void)testOffline
{  
  [SHK flushOfflineQueue];
}

- (void)applicationWillTerminate:(UIApplication *)application 
{
  // Save data if appropriate
}


#pragma mark -
#pragma mark Memory management

- (void)dealloc {
  [navigationController release];
  [window release];
  [super dealloc];
}


@end
1.55 KB in 3 ms with coderay