Skip to content

Commit

Permalink
移除 google plus SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
DaidoujiChen committed Dec 9, 2014
1 parent 6aaebe1 commit 37d1896
Show file tree
Hide file tree
Showing 293 changed files with 11 additions and 8,344 deletions.
20 changes: 0 additions & 20 deletions e-Hentai.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@
016BBF1119B94E4F0015E11E /* LightWeightPlist.m in Sources */ = {isa = PBXBuildFile; fileRef = 016BBF0819B94E4F0015E11E /* LightWeightPlist.m */; };
016BBF1219B94E4F0015E11E /* LightWeightPlistObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = 016BBF0A19B94E4F0015E11E /* LightWeightPlistObjects.m */; };
016BBF1519B953D40015E11E /* HentaiDownloadImageOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 016BBF1419B953D40015E11E /* HentaiDownloadImageOperation.m */; };
016DAD9819E392F900E528BE /* GoogleOpenSource.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 016DAD9519E392F900E528BE /* GoogleOpenSource.framework */; };
016DAD9919E392F900E528BE /* GooglePlus.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 016DAD9619E392F900E528BE /* GooglePlus.bundle */; };
016DAD9A19E392F900E528BE /* GooglePlus.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 016DAD9719E392F900E528BE /* GooglePlus.framework */; };
016DAD9C19E393B900E528BE /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 016DAD9B19E393B900E528BE /* AddressBook.framework */; };
016DAD9E19E393C300E528BE /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 016DAD9D19E393C300E528BE /* MediaPlayer.framework */; };
016DADA019E393D600E528BE /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 016DAD9F19E393D600E528BE /* AssetsLibrary.framework */; };
Expand Down Expand Up @@ -175,9 +172,6 @@
016BBF0A19B94E4F0015E11E /* LightWeightPlistObjects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LightWeightPlistObjects.m; sourceTree = "<group>"; };
016BBF1319B953D40015E11E /* HentaiDownloadImageOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HentaiDownloadImageOperation.h; path = HentaiDownloadCenter/HentaiDownloadImageOperation.h; sourceTree = "<group>"; };
016BBF1419B953D40015E11E /* HentaiDownloadImageOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HentaiDownloadImageOperation.m; path = HentaiDownloadCenter/HentaiDownloadImageOperation.m; sourceTree = "<group>"; };
016DAD9519E392F900E528BE /* GoogleOpenSource.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleOpenSource.framework; sourceTree = "<group>"; };
016DAD9619E392F900E528BE /* GooglePlus.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = GooglePlus.bundle; sourceTree = "<group>"; };
016DAD9719E392F900E528BE /* GooglePlus.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GooglePlus.framework; sourceTree = "<group>"; };
016DAD9B19E393B900E528BE /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
016DAD9D19E393C300E528BE /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
016DAD9F19E393D600E528BE /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -256,8 +250,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
016DAD9A19E392F900E528BE /* GooglePlus.framework in Frameworks */,
016DAD9819E392F900E528BE /* GoogleOpenSource.framework in Frameworks */,
0199268B19ADDB83009F814B /* CoreGraphics.framework in Frameworks */,
010E3AE319E3B95200B866FB /* CoreText.framework in Frameworks */,
010E3AE119E3B94700B866FB /* SystemConfiguration.framework in Frameworks */,
Expand Down Expand Up @@ -371,7 +363,6 @@
children = (
019290161A25D6C70094B423 /* DaiPortal */,
01624CDF1A0B5A6400568EC8 /* DaiInboxHUD */,
016DAD9419E392F900E528BE /* GooglePlus */,
016BBEF919B94E4F0015E11E /* FilesManager */,
016BBEFE19B94E4F0015E11E /* LightWeightPlist */,
0150033719B6E5E90055F47D /* Hpple */,
Expand Down Expand Up @@ -448,16 +439,6 @@
path = LightWeightPlist;
sourceTree = "<group>";
};
016DAD9419E392F900E528BE /* GooglePlus */ = {
isa = PBXGroup;
children = (
016DAD9519E392F900E528BE /* GoogleOpenSource.framework */,
016DAD9619E392F900E528BE /* GooglePlus.bundle */,
016DAD9719E392F900E528BE /* GooglePlus.framework */,
);
path = GooglePlus;
sourceTree = "<group>";
};
0179766019E27E7B00E9005E /* DownloadManagerCell */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -741,7 +722,6 @@
0199269319ADDB83009F814B /* InfoPlist.strings in Resources */,
0180D9201A0212C8002554FC /* [email protected] in Resources */,
01519AF31A3053200091C985 /* IPadDownloadManagerViewController.xib in Resources */,
016DAD9919E392F900E528BE /* GooglePlus.bundle in Resources */,
0180D9301A0214AD002554FC /* [email protected] in Resources */,
0180D92B1A02140E002554FC /* [email protected] in Resources */,
04376DFD19B96B76001B1599 /* GalleryCell.xib in Resources */,
Expand Down
1 change: 0 additions & 1 deletion e-Hentai/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

#import <UIKit/UIKit.h>
#import <GooglePlus/GooglePlus.h>

#import "HentaiNavigationController.h"
#import "SliderViewController.h"
Expand Down
4 changes: 0 additions & 4 deletions e-Hentai/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,4 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
return YES;
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [GPPURLHandler handleURL:url sourceApplication:sourceApplication annotation:annotation];
}

@end
10 changes: 0 additions & 10 deletions e-Hentai/PhotoViewController/HentaiPhotoCell/HentaiPhotoCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,8 @@

#import <UIKit/UIKit.h>

@protocol HentaiPhotoCellDelegate;

@interface HentaiPhotoCell : UITableViewCell

@property (nonatomic, weak) id <HentaiPhotoCellDelegate> delegate;
@property (weak, nonatomic) IBOutlet UIImageView *hentaiImageView;

@end

@protocol HentaiPhotoCellDelegate <NSObject>

@required
- (void)needToShareAtIndexPath:(NSIndexPath *)indexPath;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,4 @@ - (void)layoutSubviews {
self.hentaiImageView.frame = self.bounds;
}

#pragma mark - ibaction

- (IBAction)longPressShareAction:(id)sender {
[self.delegate needToShareAtIndexPath:[self hentai_indexPath]];
}

@end
12 changes: 3 additions & 9 deletions e-Hentai/PhotoViewController/HentaiPhotoCell/HentaiPhotoCell.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment defaultVersion="1792" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
Expand All @@ -23,14 +23,8 @@
<gestureRecognizers/>
<connections>
<outlet property="hentaiImageView" destination="I6x-WU-WtH" id="0HK-EV-POa"/>
<outletCollection property="gestureRecognizers" destination="EjB-5P-ShW" appends="YES" id="n4r-5J-hnd"/>
</connections>
</tableViewCell>
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="3" id="EjB-5P-ShW">
<connections>
<action selector="longPressShareAction:" destination="KGk-i7-Jjw" id="kkK-Ac-dGv"/>
</connections>
</pongPressGestureRecognizer>
</objects>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
Expand Down
2 changes: 1 addition & 1 deletion e-Hentai/PhotoViewController/PhotoViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#import "HentaiPhotoCell.h"
#import "HentaiDownloadImageOperation.h"

@interface PhotoViewController : ColorThemeViewController <UITableViewDataSource, UITableViewDelegate, HentaiDownloadImageOperationDelegate, UIAlertViewDelegate, HentaiPhotoCellDelegate>
@interface PhotoViewController : ColorThemeViewController <UITableViewDataSource, UITableViewDelegate, HentaiDownloadImageOperationDelegate, UIAlertViewDelegate>

@property (nonatomic, strong) NSDictionary *hentaiInfo;
@property (weak, nonatomic) IBOutlet UITableView *hentaiTableView;
Expand Down
42 changes: 0 additions & 42 deletions e-Hentai/PhotoViewController/PhotoViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -271,47 +271,6 @@ - (NSUInteger)foundDownloadKey {
return NSNotFound;
}

#pragma mark - share methods

//分享到 g+
- (void)shareToGPlus {
id <GPPNativeShareBuilder> shareBuilder = [[GPPShare sharedInstance] nativeShareDialog];
[shareBuilder setPrefillText:[self sharedMessage]];
NSString *sharedImageName = self.hentaiImageURLs[self.sharedIndexPath.row];
[shareBuilder attachImage:[UIImage imageWithData:[self.hentaiFilesManager read:[sharedImageName hentai_lastTwoPathComponent]]]];
[shareBuilder open];
}

//預設的文字內容
- (NSString *)sharedMessage {
NSMutableString *sharedMessage = [NSMutableString string];
[sharedMessage appendFormat:@"作品名稱 : %@\n", self.hentaiInfo[@"title"]];
[sharedMessage appendFormat:@"作品連結 : %@\n\n\n\n\n", self.hentaiInfo[@"url"]];
[sharedMessage appendString:@"send from my hentai app"];
return sharedMessage;
}

#pragma mark - HentaiPhotoCellDelegate

- (void)needToShareAtIndexPath:(NSIndexPath *)indexPath {

//防止 alert 多次跳出
if ([self.shareLock tryLock]) {
self.sharedIndexPath = indexPath;
if ([[GPPSignIn sharedInstance] authentication]) {
[self shareToGPlus];
[self.shareLock unlock];
}
else {
@weakify(self);
[UIAlertView hentai_alertViewWithTitle:@"G+尚未聯結" message:@"請到設定頁面做聯結先喔!" cancelButtonTitle:@"好~ O3O" otherButtonTitles:nil onClickIndex:nil onCancel:^{
@strongify(self);
[self.shareLock unlock];
}];
}
}
}

#pragma mark - HentaiDownloadImageOperationDelegate

- (void)downloadResult:(NSString *)urlString heightOfSize:(CGFloat)height isSuccess:(BOOL)isSuccess {
Expand Down Expand Up @@ -381,7 +340,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

static NSString *cellIdentifier = @"HentaiPhotoCell";
HentaiPhotoCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
cell.delegate = self;
NSString *eachImageString = self.hentaiImageURLs[indexPath.row];
if (self.hentaiResults[[eachImageString hentai_lastTwoPathComponent]]) {
NSIndexPath *copyIndexPath = [indexPath copy];
Expand Down
4 changes: 1 addition & 3 deletions e-Hentai/SettingViewController/SettingViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@

#import "ColorThemeViewController.h"

@interface SettingViewController : ColorThemeViewController <GPPSignInDelegate>
@interface SettingViewController : ColorThemeViewController

@property (weak, nonatomic) IBOutlet UILabel *gPlusConnectLabel;
@property (weak, nonatomic) IBOutlet GPPSignInButton *gPlusSignInButton;
@property (weak, nonatomic) IBOutlet UILabel *cacheSizeLabel;
@property (weak, nonatomic) IBOutlet UILabel *downloadedSizeLabel;

Expand Down
30 changes: 0 additions & 30 deletions e-Hentai/SettingViewController/SettingViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ - (IBAction)cleanDocumentAction:(id)sender {
[self documentFolderSize];
}

#pragma mark - GPPSignInDelegate

- (void)finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error {
[self setupGPlusStatus];
}

#pragma mark - private

//code form FLEX
Expand Down Expand Up @@ -113,37 +107,13 @@ - (void)documentFolderSize {
});
}

- (void)gPlusSignIn {
self.gPlusConnectLabel.text = @"聯結 G+ 帳號 : 已聯結";
self.gPlusSignInButton.hidden = YES;
}

- (void)gPlusSignOut {
self.gPlusConnectLabel.text = @"聯結 G+ 帳號 : 未聯結";
self.gPlusSignInButton.hidden = NO;
}

- (void)setupGPlusStatus {
if ([[GPPSignIn sharedInstance] authentication]) {
[self gPlusSignIn];
}
else {
[self gPlusSignOut];
}
}

#pragma mark - life cycle

- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"設定";
[self cacheFolderSize];
[self documentFolderSize];

GPPSignIn *signIn = [GPPSignIn sharedInstance];
signIn.clientID = kClientId;
signIn.delegate = self;
[self setupGPlusStatus];
}

@end
26 changes: 6 additions & 20 deletions e-Hentai/SettingViewController/SettingViewController.xib
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SettingViewController">
<connections>
<outlet property="cacheSizeLabel" destination="fG0-fi-r2V" id="4ug-Wk-b7z"/>
<outlet property="downloadedSizeLabel" destination="TcK-Dr-RHl" id="jyM-kP-p4F"/>
<outlet property="gPlusConnectLabel" destination="G7Z-Ew-V5x" id="q41-G8-zon"/>
<outlet property="gPlusSignInButton" destination="i3L-Jv-wEa" id="dcI-G9-gwC"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
Expand All @@ -20,19 +18,13 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="暫存容量" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fG0-fi-r2V">
<rect key="frame" x="8" y="208" width="304" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="聯結 G+ 帳號" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="G7Z-Ew-V5x">
<rect key="frame" x="8" y="123" width="304" height="21"/>
<rect key="frame" x="8" y="189" width="304" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3MO-tQ-kcN">
<rect key="frame" x="8" y="237" width="304" height="30"/>
<rect key="frame" x="8" y="218" width="304" height="30"/>
<state key="normal" title="清空緩存">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
Expand All @@ -41,7 +33,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gGz-RQ-1kb">
<rect key="frame" x="8" y="304" width="304" height="30"/>
<rect key="frame" x="8" y="285" width="304" height="30"/>
<state key="normal" title="清除未下載成功的緩存">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
Expand All @@ -50,17 +42,11 @@
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="下載容量" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TcK-Dr-RHl">
<rect key="frame" x="8" y="275" width="304" height="21"/>
<rect key="frame" x="8" y="256" width="304" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i3L-Jv-wEa" customClass="GPPSignInButton">
<rect key="frame" x="86" y="152" width="148" height="48"/>
<state key="normal">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" translucent="NO" prompted="NO"/>
Expand Down

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Loading

0 comments on commit 37d1896

Please sign in to comment.