Skip to content

Commit

Permalink
Added iPhone OS support.
Browse files Browse the repository at this point in the history
  • Loading branch information
computermatt committed Jun 4, 2010
1 parent ec38007 commit c0a9f5f
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 16 deletions.
16 changes: 16 additions & 0 deletions JSON/MSOEngineGlobalHeader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// MSOEngineGlobalHeader.h
// StackTop
//
// Created by Matt on 6/4/10.
// Copyright 2010 Matt's Apps. All rights reserved.
//

#if TARGET_OS_IPHONE
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>

#endif
4 changes: 2 additions & 2 deletions JSON/NSObject+SBJSON.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>

//#import <Foundation/Foundation.h>
#import "MSOEngineGlobalHeader.h"

/**
@brief Adds JSON generation to Foundation classes
Expand Down
4 changes: 2 additions & 2 deletions JSON/NSString+SBJSON.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>

//#import <Foundation/Foundation.h>
#import "MSOEngineGlobalHeader.h"
/**
@brief Adds JSON parsing methods to NSString
Expand Down
3 changes: 2 additions & 1 deletion JSON/SBJSON.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>
//#import <Foundation/Foundation.h>
#import "MSOEngineGlobalHeader.h"
#import "SBJsonParser.h"
#import "SBJsonWriter.h"

Expand Down
4 changes: 2 additions & 2 deletions JSON/SBJsonBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>

//#import <Foundation/Foundation.h>
#import "MSOEngineGlobalHeader.h"
extern NSString * SBJSONErrorDomain;


Expand Down
3 changes: 2 additions & 1 deletion JSON/SBJsonParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>
//#import <Foundation/Foundation.h>
#import "MSOEngineGlobalHeader.h"
#import "SBJsonBase.h"

/**
Expand Down
3 changes: 2 additions & 1 deletion JSON/SBJsonWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>
//#import <Foundation/Foundation.h>
#import "MSOEngineGlobalHeader.h"
#import "SBJsonBase.h"

/**
Expand Down
3 changes: 2 additions & 1 deletion MSOEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
// Copyright 2010 Matt's Apps. All rights reserved.
//

#import <Cocoa/Cocoa.h>
//#import <Cocoa/Cocoa.h>
#import "MSOEngineGlobalHeader.h"
#import "JSON.h"


Expand Down
8 changes: 2 additions & 6 deletions MSOEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ -(NSString*)initWithDataforURL:(NSString *)data
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:theURL]];

NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];

// Get JSON as a NSString from NSData response
NSString *json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
return json_string;
}
Expand Down Expand Up @@ -58,8 +56,7 @@ -(NSArray *)connectMekThxBai:(NSString *)data firstkey:(NSString *)key1 secondke
}

}



return array;

}
Expand Down Expand Up @@ -248,8 +245,7 @@ -(NSArray*)getAnswers:(NSString *)key andData:(NSString *)data
[array addObject:@" "];
}
}

return array;
return [array autorelease];

}
-(NSString*)getVersion
Expand Down

0 comments on commit c0a9f5f

Please sign in to comment.