Skip to content

Commit 1b36c2e

Browse files
committed
Merge pull request #1 from NZX/feature/remove_json_kit
Remove JSONKit.
2 parents 0090b36 + 15aa68d commit 1b36c2e

File tree

4 files changed

+3
-3334
lines changed

4 files changed

+3
-3334
lines changed

AWVersionAgent/AWVersionAgent.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88

99
#import "AWVersionAgent.h"
1010

11-
#import "JSONKit.h"
12-
1311
#define kAppleLookupURLTemplate @"http://itunes.apple.com/lookup?id=%@"
1412
#define kAppStoreURLTemplate @"itms-apps://itunes.apple.com/app/id%@"
1513

16-
#define kUpgradeAlertMessage @"New version is released, current version: %@, new version: %@. Get it from App Store right now."
14+
#define kUpgradeAlertMessage @"A new version is available, current version: %@, new version: %@. Upgrade from the App Store now."
1715
#define kUpgradeAlertAction @"kUpgradeAlertAction"
1816
#define kUpgradeAlertDelay 3
1917

@@ -68,7 +66,7 @@ - (void)checkNewVersionForApp:(NSString *)appid
6866
NSString *url = [NSString stringWithFormat:kAppleLookupURLTemplate, _appid];
6967
NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]];
7068
if (data && [data length]>0) {
71-
id obj = [data objectFromJSONData];
69+
id obj = [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL];
7270
if (obj && [obj isKindOfClass:[NSDictionary class]]) {
7371
NSDictionary *dict = (NSDictionary *)obj;
7472
NSArray *array = dict[@"results"];

AWVersionAgentDemo/AWVersionAgentDemo.xcodeproj/project.pbxproj

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
571B2E9516E5D4F900E69036 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 571B2E9416E5D4F900E69036 /* [email protected] */; };
1919
571B2E9816E5D4F900E69036 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571B2E9716E5D4F900E69036 /* ViewController.m */; };
2020
571B2E9B16E5D4F900E69036 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571B2E9916E5D4F900E69036 /* ViewController.xib */; };
21-
571B2EA916E5D53900E69036 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 571B2EA716E5D53900E69036 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
2221
571B2EAD16E5D83000E69036 /* AWVersionAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 571B2EAC16E5D83000E69036 /* AWVersionAgent.m */; };
2322
/* End PBXBuildFile section */
2423

@@ -39,8 +38,6 @@
3938
571B2E9616E5D4F900E69036 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
4039
571B2E9716E5D4F900E69036 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
4140
571B2E9A16E5D4F900E69036 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = "<group>"; };
42-
571B2EA616E5D53900E69036 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
43-
571B2EA716E5D53900E69036 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
4441
571B2EAB16E5D83000E69036 /* AWVersionAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AWVersionAgent.h; sourceTree = "<group>"; };
4542
571B2EAC16E5D83000E69036 /* AWVersionAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AWVersionAgent.m; sourceTree = "<group>"; };
4643
/* End PBXFileReference section */
@@ -118,20 +115,10 @@
118115
isa = PBXGroup;
119116
children = (
120117
571B2EAA16E5D83000E69036 /* AWVersionAgent */,
121-
571B2EA516E5D53900E69036 /* JSONKit */,
122118
);
123119
path = Vendor;
124120
sourceTree = "<group>";
125121
};
126-
571B2EA516E5D53900E69036 /* JSONKit */ = {
127-
isa = PBXGroup;
128-
children = (
129-
571B2EA616E5D53900E69036 /* JSONKit.h */,
130-
571B2EA716E5D53900E69036 /* JSONKit.m */,
131-
);
132-
path = JSONKit;
133-
sourceTree = "<group>";
134-
};
135122
571B2EAA16E5D83000E69036 /* AWVersionAgent */ = {
136123
isa = PBXGroup;
137124
children = (
@@ -211,7 +198,6 @@
211198
571B2E8B16E5D4F900E69036 /* main.m in Sources */,
212199
571B2E8F16E5D4F900E69036 /* AppDelegate.m in Sources */,
213200
571B2E9816E5D4F900E69036 /* ViewController.m in Sources */,
214-
571B2EA916E5D53900E69036 /* JSONKit.m in Sources */,
215201
571B2EAD16E5D83000E69036 /* AWVersionAgent.m in Sources */,
216202
);
217203
runOnlyForDeploymentPostprocessing = 0;
@@ -335,6 +321,7 @@
335321
571B2EA016E5D4F900E69036 /* Release */,
336322
);
337323
defaultConfigurationIsVisible = 0;
324+
defaultConfigurationName = Release;
338325
};
339326
/* End XCConfigurationList section */
340327
};

AWVersionAgentDemo/AWVersionAgentDemo/Vendor/JSONKit/JSONKit.h

Lines changed: 0 additions & 251 deletions
This file was deleted.

0 commit comments

Comments
 (0)