Skip to content

Commit bb27d76

Browse files
committed
Xcode 4/iOS 5
(Progress View doesn't work yet.)
1 parent c97c2ee commit bb27d76

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

Classes/MyTubeViewController.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ - (IBAction)download {
6464
[webView setUserInteractionEnabled:NO];
6565

6666
NSString *getURL = [webView stringByEvaluatingJavaScriptFromString:@"function getURL() {var player = document.getElementById('player'); var video = player.getElementsByTagName('video')[0]; return video.getAttribute('src');} getURL();"];
67-
NSString *getTitle = [webView stringByEvaluatingJavaScriptFromString:@"function getTitle() {var nl = document.getElementsByClassName('nl')[0]; return nl.childNodes[0].innerHTML;} getTitle();"];
67+
NSString *getTitle = [webView stringByEvaluatingJavaScriptFromString:@"function getTitle() {var kp = document.getElementsByClassName('kp')[0]; return kp.childNodes[0].innerHTML;} getTitle();"];
6868
NSString *getTitleFromChannel = [webView stringByEvaluatingJavaScriptFromString:@"function getTitleFromChannel() {var video_title = document.getElementById('video_title'); return video_title.childNodes[0].innerHTML;} getTitleFromChannel();"];
6969

7070
[webView setUserInteractionEnabled:YES];
@@ -106,10 +106,18 @@ - (IBAction)download {
106106

107107
[bar release];
108108
} else {
109+
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"MyTube" message:@"Couldn't get video title." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
110+
[alertView show];
111+
[alertView release];
112+
109113
[downloadButton setEnabled:YES];
110114
}
111115
}
112116
} else {
117+
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"MyTube" message:@"Couldn't get MP4 URL." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
118+
[alertView show];
119+
[alertView release];
120+
113121
[downloadButton setEnabled:YES];
114122
}
115123
}

Entitlements.plist

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

MyTube.xcodeproj/project.pbxproj

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 45;
6+
objectVersion = 46;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -60,7 +60,6 @@
6060
84EA8C1812D60F560033C894 /* DownloadsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DownloadsViewController.m; path = ../DownloadsViewController.m; sourceTree = "<group>"; };
6161
84EE108012D64404000138C5 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
6262
84EE108112D64404000138C5 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
63-
84EE10B112D6450A000138C5 /* Entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Entitlements.plist; sourceTree = "<group>"; };
6463
8D1107310486CEB800E47090 /* MyTube-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MyTube-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
6564
/* End PBXFileReference section */
6665

@@ -112,7 +111,6 @@
112111
29B97317FDCFA39411CA2CEA /* Resources */,
113112
29B97323FDCFA39411CA2CEA /* Frameworks */,
114113
19C28FACFE9D520D11CA2CBB /* Products */,
115-
84EE10B112D6450A000138C5 /* Entitlements.plist */,
116114
);
117115
name = CustomTemplate;
118116
sourceTree = "<group>";
@@ -183,8 +181,11 @@
183181
/* Begin PBXProject section */
184182
29B97313FDCFA39411CA2CEA /* Project object */ = {
185183
isa = PBXProject;
184+
attributes = {
185+
LastUpgradeCheck = 0420;
186+
};
186187
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MyTube" */;
187-
compatibilityVersion = "Xcode 3.1";
188+
compatibilityVersion = "Xcode 3.2";
188189
developmentRegion = English;
189190
hasScannedForEncodings = 1;
190191
knownRegions = (
@@ -243,7 +244,6 @@
243244
isa = XCBuildConfiguration;
244245
buildSettings = {
245246
ALWAYS_SEARCH_USER_PATHS = NO;
246-
CODE_SIGN_ENTITLEMENTS = Entitlements.plist;
247247
COPY_PHASE_STRIP = NO;
248248
GCC_DYNAMIC_NO_PIC = NO;
249249
GCC_OPTIMIZATION_LEVEL = 0;
@@ -258,7 +258,6 @@
258258
isa = XCBuildConfiguration;
259259
buildSettings = {
260260
ALWAYS_SEARCH_USER_PATHS = NO;
261-
CODE_SIGN_ENTITLEMENTS = Entitlements.plist;
262261
COPY_PHASE_STRIP = YES;
263262
GCC_PRECOMPILE_PREFIX_HEADER = YES;
264263
GCC_PREFIX_HEADER = MyTube_Prefix.pch;
@@ -277,7 +276,6 @@
277276
GCC_WARN_ABOUT_RETURN_TYPE = YES;
278277
GCC_WARN_UNUSED_VARIABLE = YES;
279278
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
280-
PREBINDING = NO;
281279
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
282280
SDKROOT = iphoneos;
283281
};
@@ -293,7 +291,6 @@
293291
GCC_WARN_UNUSED_VARIABLE = YES;
294292
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
295293
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
296-
PREBINDING = NO;
297294
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
298295
SDKROOT = iphoneos;
299296
};

0 commit comments

Comments
 (0)