Commit 848e85bef2ef65e8f36225b76d5ddf8d8d51f637

Authored by yanglingyu
1 parent ee757e1c

版本判断失败,则返回

CNLiveScioLive/AppDelegate.m
@@ -562,6 +562,9 @@ @@ -562,6 +562,9 @@
562 NSString *nowVersion = [infoDict objectForKey:@"CFBundleShortVersionString"]; 562 NSString *nowVersion = [infoDict objectForKey:@"CFBundleShortVersionString"];
563 NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://itunes.apple.com/lookup?id=%@", uAppId]]; 563 NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://itunes.apple.com/lookup?id=%@", uAppId]];
564 NSString * file = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil]; 564 NSString * file = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];
  565 + if (!file) {
  566 + return;
  567 + }
565 NSDictionary *dic = [file objectFromJSONString]; 568 NSDictionary *dic = [file objectFromJSONString];
566 NSDictionary *results = [[dic objectForKey:@"results"] firstObject]; 569 NSDictionary *results = [[dic objectForKey:@"results"] firstObject];
567 NSString *newVersion =[results objectForKey:@"version"]; 570 NSString *newVersion =[results objectForKey:@"version"];
CNLiveScioLive/Pages/Header/UrlMacro.h
@@ -9,8 +9,8 @@ @@ -9,8 +9,8 @@
9 #ifndef UrlMacro_h 9 #ifndef UrlMacro_h
10 #define UrlMacro_h 10 #define UrlMacro_h
11 11
12 -#define REQUESTURL(url) [@"http://test.app.phonemovie.cnlive.com/" stringByAppendingPathComponent:url] //测试环境  
13 -//#define REQUESTURL(url) [@"http://app.phonemovie.cnlive.com/" stringByAppendingPathComponent:url] //正式环境 12 +//#define REQUESTURL(url) [@"http://test.app.phonemovie.cnlive.com/" stringByAppendingPathComponent:url] //测试环境
  13 +#define REQUESTURL(url) [@"http://app.phonemovie.cnlive.com/" stringByAppendingPathComponent:url] //正式环境
14 14
15 #define IS_STRING_EMPTY(string) (string==nil || string == NULL || [string isKindOfClass:[NSNull class]] || [[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0 || [string isEqualToString:@""] || [string isEqualToString:@"<null>"]) 15 #define IS_STRING_EMPTY(string) (string==nil || string == NULL || [string isKindOfClass:[NSNull class]] || [[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0 || [string isEqualToString:@""] || [string isEqualToString:@"<null>"])
16 16