Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
Final version for AppStore Review
Browse files Browse the repository at this point in the history
  • Loading branch information
bi119aTe5hXk committed May 13, 2014
1 parent 21d4b64 commit 9b72aeb
Show file tree
Hide file tree
Showing 14 changed files with 92 additions and 39 deletions.
29 changes: 27 additions & 2 deletions bangumi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
4751E628191F648E004143D3 /* ProgressListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4751E627191F648E004143D3 /* ProgressListViewController.m */; };
4751E630191F84DA004143D3 /* HTMLEntityDecode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4751E62F191F84DA004143D3 /* HTMLEntityDecode.m */; };
4751E633191F9209004143D3 /* RakuenViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4751E632191F9209004143D3 /* RakuenViewController.m */; };
4751E6361921F231004143D3 /* UITabBarStar.png in Resources */ = {isa = PBXBuildFile; fileRef = 4751E6341921F231004143D3 /* UITabBarStar.png */; };
4751E6371921F231004143D3 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4751E6351921F231004143D3 /* [email protected] */; };
4751E63A1921F521004143D3 /* UITabBarList.png in Resources */ = {isa = PBXBuildFile; fileRef = 4751E6381921F521004143D3 /* UITabBarList.png */; };
4751E63B1921F521004143D3 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4751E6391921F521004143D3 /* [email protected] */; };
478B3B881902A2A1006C6E67 /* BGMDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 478B3B871902A2A1006C6E67 /* BGMDetailViewController.m */; };
47A5DC56190940340086A14B /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 47A5DC55190940340086A14B /* MBProgressHUD.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
47A5DC58190AA7F10086A14B /* README in Resources */ = {isa = PBXBuildFile; fileRef = 47A5DC57190AA7F10086A14B /* README */; };
Expand Down Expand Up @@ -56,6 +60,10 @@
4751E62F191F84DA004143D3 /* HTMLEntityDecode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLEntityDecode.m; sourceTree = "<group>"; };
4751E631191F9209004143D3 /* RakuenViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RakuenViewController.h; sourceTree = "<group>"; };
4751E632191F9209004143D3 /* RakuenViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RakuenViewController.m; sourceTree = "<group>"; };
4751E6341921F231004143D3 /* UITabBarStar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = UITabBarStar.png; sourceTree = "<group>"; };
4751E6351921F231004143D3 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
4751E6381921F521004143D3 /* UITabBarList.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = UITabBarList.png; sourceTree = "<group>"; };
4751E6391921F521004143D3 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
478B3B861902A2A1006C6E67 /* BGMDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BGMDetailViewController.h; sourceTree = "<group>"; };
478B3B871902A2A1006C6E67 /* BGMDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BGMDetailViewController.m; sourceTree = "<group>"; };
47A5DC54190940340086A14B /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -210,6 +218,10 @@
47E2715E1900043300304DED /* main.m */,
47E271601900043300304DED /* bangumi-Prefix.pch */,
47A5DD28191135BB0086A14B /* bgm38a1024.png */,
4751E6341921F231004143D3 /* UITabBarStar.png */,
4751E6351921F231004143D3 /* [email protected] */,
4751E6381921F521004143D3 /* UITabBarList.png */,
4751E6391921F521004143D3 /* [email protected] */,
);
name = "Supporting Files";
sourceTree = "<group>";
Expand Down Expand Up @@ -309,10 +321,14 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4751E6371921F231004143D3 /* [email protected] in Resources */,
47A5DC58190AA7F10086A14B /* README in Resources */,
47E2716E1900043300304DED /* Images.xcassets in Resources */,
47A5DD29191135BB0086A14B /* bgm38a1024.png in Resources */,
4751E6361921F231004143D3 /* UITabBarStar.png in Resources */,
47E2719319001AE000304DED /* Main.storyboard in Resources */,
4751E63B1921F521004143D3 /* [email protected] in Resources */,
4751E63A1921F521004143D3 /* UITabBarList.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -404,7 +420,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
Expand All @@ -423,6 +439,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "-ObjC";
PROVISIONING_PROFILE = "C2BEDBAA-9A75-43F0-8BDE-F15F298D6974";
SDKROOT = iphoneos;
};
name = Debug;
Expand All @@ -443,7 +460,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -455,6 +472,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
OTHER_LDFLAGS = "-ObjC";
PROVISIONING_PROFILE = "C2BEDBAA-9A75-43F0-8BDE-F15F298D6974";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
Expand All @@ -465,6 +483,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
/Users/bi119aTe5hXk/Downloads,
Expand All @@ -475,6 +495,7 @@
INFOPLIST_FILE = "bangumi/bangumi-Info.plist";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "C2BEDBAA-9A75-43F0-8BDE-F15F298D6974";
TARGETED_DEVICE_FAMILY = 1;
WRAPPER_EXTENSION = app;
};
Expand All @@ -485,6 +506,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
/Users/bi119aTe5hXk/Downloads,
Expand All @@ -493,8 +516,10 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "bangumi/bangumi-Prefix.pch";
INFOPLIST_FILE = "bangumi/bangumi-Info.plist";
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "C2BEDBAA-9A75-43F0-8BDE-F15F298D6974";
TARGETED_DEVICE_FAMILY = 1;
WRAPPER_EXTENSION = app;
};
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion bangumi.xcodeproj/xcshareddata/xcschemes/bangumi.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
buildConfiguration = "Release"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
Expand Down
2 changes: 1 addition & 1 deletion bangumi/API.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright (c) 2014年 HT&L. All rights reserved.
//

#define debugmode 1
#define debugmode 0

#define LoginURL @"http://%@:%@@api.bgm.tv/auth"
#define appName @"BGMbi119aTe5hXk"
Expand Down
4 changes: 2 additions & 2 deletions bangumi/BGMAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ -(void)userLoginWithUserName:(NSString *)username WithPassword:(NSString *)passw

-(void)getWatchingListWithUID:(NSString *)uid{
NSString *url = [NSString stringWithFormat:WatchingListURL,uid];
url = [url stringByAppendingString:[NSString stringWithFormat:@"?source=%@&auth=%@",appName,authURLencoded]];
url = [url stringByAppendingString:[NSString stringWithFormat:@"&source=%@&auth=%@",appName,authURLencoded]];
[self createGETConnectionWithURL:url];
}
-(void)getProgressListWithUID:(NSString *)uid WithSubID:(NSString *)subid{
Expand Down Expand Up @@ -99,7 +99,7 @@ -(void)getDayBGMList{
-(void)searchWithKeyword:(NSString *)keyword startWithCount:(NSInteger)count{
NSString *keyEncoded = (__bridge NSString *)CFURLCreateStringByAddingPercentEscapes(NULL,(CFStringRef)keyword,NULL,(CFStringRef)@"!*'\"();:@&=+$,/?%#[]% ",kCFStringEncodingUTF8);
NSString *url = [NSString stringWithFormat:SearchURL,keyEncoded];
url = [url stringByAppendingString:[NSString stringWithFormat:@"?source=%@&auth=%@&start=%ld&max_results=20",appName,authURLencoded,count]];
url = [url stringByAppendingString:[NSString stringWithFormat:@"?source=%@&auth=%@&start=%ld&max_results=20",appName,authURLencoded,(long)count]];
[self createGETConnectionWithURL:url];
}

Expand Down
3 changes: 3 additions & 0 deletions bangumi/SearchViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
@interface SearchViewController : UITableViewController<UITableViewDataSource,UITableViewDelegate,BGMAPIDelegate,UISearchBarDelegate>{
BGMAPI *bgmapi;
NSArray *resultlist;

}
@property (nonatomic, retain) IBOutlet UISearchBar *seachbar;

-(IBAction)searchinfo:(id)sender;
@end
23 changes: 15 additions & 8 deletions bangumi/SearchViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ - (void)viewDidLoad
bgmapi = [[BGMAPI alloc] initWithdelegate:self ];
//[self.tableView registerClass: [NormalCell class] forCellReuseIdentifier:@"SearchCell"];
}

-(IBAction)searchinfo:(id)sender{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"关于搜索"
message:@"目前暂时只能显示前20条项目,如果找不到您想看的番组,请将关键词描写更详细一些。m(_ _)m"
delegate:nil
cancelButtonTitle:@"知道了"
otherButtonTitles:nil, nil];
[alert show];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
Expand Down Expand Up @@ -69,12 +76,12 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
{
//#warning Incomplete method implementation.
// Return the number of rows in the section.
NSInteger count = [[resultlist valueForKey:@"list"] count];
if (count == 20) {
return [[resultlist valueForKey:@"list"] count] + 1;
}else{
// NSInteger count = [[resultlist valueForKey:@"list"] count];
// if (count == 20) {
// return [[resultlist valueForKey:@"list"] count] + 1;
// }else{
return [[resultlist valueForKey:@"list"] count];
}
// }
}


Expand All @@ -87,8 +94,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
NormalCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
NSUInteger row = [indexPath row];

if (row == [[resultlist valueForKey:@"list"] count]) {
cell.titlelabel.text = [resultlist valueForKey:@"results"];
if (row == [[resultlist valueForKey:@"list"] count]+1) {
cell.titlelabel.text = @"下一页";
cell.sublabel.text = @"";
cell.icon.image = nil;
}else{
Expand Down
Binary file added bangumi/UITabBarList.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bangumi/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bangumi/UITabBarStar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bangumi/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions bangumi/WatchingListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ -(void)api:(BGMAPI *)api readyWithList:(NSArray *)list{
NSInteger ep_countindex = ep_count - 1;
if ([[list valueForKey:@"eps"] count] > 0 && ep_countindex <= [[list valueForKey:@"eps"] count]) {
NSString *epid = [[[list valueForKey:@"eps"] objectAtIndex:ep_countindex] valueForKey:@"id"];
NSLog(@"epidd:%@",epid);
//NSLog(@"epidd:%@",epid);
[bgmapi setProgressWithEPID:epid WithStatus:@"watched"];
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
request_type = @"updateProgress";
Expand Down Expand Up @@ -163,22 +163,22 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
NSInteger ep_status = [[arr valueForKey:@"ep_status"] integerValue];//已看
NSInteger eps = [[[arr valueForKey:@"subject"] valueForKey:@"eps"] integerValue];//总共

[cell.updatebtn setTitle:[NSString stringWithFormat:@"标记 ep.%ld 看过",ep_status+1] forState:UIControlStateNormal];
[cell.updatebtn setTitle:[NSString stringWithFormat:@"标记 ep.%ld 看过",(long)ep_status+1] forState:UIControlStateNormal];
[cell.updatebtn addTarget:self action:@selector(updatebtnpressd:) forControlEvents:UIControlEventTouchUpInside];

if (eps == 0) {
cell.progresslabel.text = [NSString stringWithFormat:@"%ld/??",ep_status];
cell.progresslabel.text = [NSString stringWithFormat:@"%ld/??",(long)ep_status];
//[cell.updatebtn setHidden:YES];
if (ep_status <= 12) {
eps = 12;
}else{
eps = 100;
}
}else if (eps == ep_status){
cell.progresslabel.text = [NSString stringWithFormat:@"%ld/%ld",ep_status,eps];
cell.progresslabel.text = [NSString stringWithFormat:@"%ld/%ld",(long)ep_status,(long)eps];
//[cell.updatebtn setHidden:YES];
}else{
cell.progresslabel.text = [NSString stringWithFormat:@"%ld/%ld",ep_status,eps];
cell.progresslabel.text = [NSString stringWithFormat:@"%ld/%ld",(long)ep_status,(long)eps];
[cell.updatebtn setHidden:NO];

}
Expand Down Expand Up @@ -216,7 +216,7 @@ -(void)updatebtnpressd:(id)sender{
epid = [[arr valueForKey:@"subject"] valueForKey:@"id"];
ep_count = ep_status+1;
UIAlertView *updatealert = [[UIAlertView alloc] initWithTitle:@"确定将以下章节标为看过?"
message:[NSString stringWithFormat:@"%@ ep.%ld",[arr valueForKey:@"name"],ep_count]
message:[NSString stringWithFormat:@"%@ ep.%ld",[arr valueForKey:@"name"],(long)ep_count]
delegate:self
cancelButtonTitle:@"取消"
otherButtonTitles:@"是的", nil];
Expand Down
4 changes: 2 additions & 2 deletions bangumi/bangumi-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.7</string>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.0.7</string>
<string>1.0.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
Expand Down
Loading

0 comments on commit 9b72aeb

Please sign in to comment.