Skip to content

Commit

Permalink
Merge pull request leancloud#9 from lzwjava/master
Browse files Browse the repository at this point in the history
改善 Demo、增加网页登录
  • Loading branch information
tang3w committed Jul 29, 2015
2 parents d385f2d + 05c4b06 commit 610afe3
Show file tree
Hide file tree
Showing 16 changed files with 187 additions and 147 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ xcuserdata

# CocoaPods
Pods/
Podfile.lock
2 changes: 1 addition & 1 deletion LeanCloudSocial.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.platform = :ios, "5.1.1"
s.source = { :git => "https://github.com/leancloud/leancloud-social-ios.git", :tag => s.version.to_s }
s.source_files = "LeanCloudSocial/**/*.{h,m}"
s.public_header_files = "LeanCloudSocial/**/*.{h,m}"
s.public_header_files = "LeanCloudSocial/**/*.h"
s.dependency "AVOSCloud", "~> 3.1"
s.dependency "AFNetworking", "~> 1.0"
end
Expand Down
32 changes: 7 additions & 25 deletions LeanCloudSocial.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,13 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
0C92CDB73C81797BB67BBC2A /* Pods-LeanCloudSocial.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeanCloudSocial.release.xcconfig"; path = "LeanCloudSocialDemo/Pods/Target Support Files/Pods-LeanCloudSocial/Pods-LeanCloudSocial.release.xcconfig"; sourceTree = "<group>"; };
40595F669DA649C66885DC13 /* Pods-LeanCloudSocial.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeanCloudSocial.debug.xcconfig"; path = "LeanCloudSocialDemo/Pods/Target Support Files/Pods-LeanCloudSocial/Pods-LeanCloudSocial.debug.xcconfig"; sourceTree = "<group>"; };
5CC504411B0EC5B8004D0CB1 /* LeanCloudSocial.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LeanCloudSocial.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5CC504451B0EC5B8004D0CB1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5CC5044C1B0EC5B9004D0CB1 /* LeanCloudSocialTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LeanCloudSocialTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
5CC504521B0EC5B9004D0CB1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5CC504531B0EC5B9004D0CB1 /* LeanCloudSocialTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LeanCloudSocialTests.m; sourceTree = "<group>"; };
5CC5048B1B0EF3A4004D0CB1 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; };
5CC5048D1B0EF3B3004D0CB1 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
5CC5048F1B0EF3BC004D0CB1 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
5CC504911B0EF3C7004D0CB1 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
5CC504931B0EF3D0004D0CB1 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
70A6A14C1B661BA6005C2D21 /* AVOSCloudSNS_.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AVOSCloudSNS_.h; sourceTree = "<group>"; };
70A6A14D1B661BA6005C2D21 /* AVOSCloudSNS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AVOSCloudSNS.h; sourceTree = "<group>"; };
70A6A14E1B661BA6005C2D21 /* AVOSCloudSNS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AVOSCloudSNS.m; sourceTree = "<group>"; };
Expand All @@ -81,9 +78,7 @@
70A6A15A1B661BA6005C2D21 /* LCHttpClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LCHttpClient.m; sourceTree = "<group>"; };
70A6A15B1B661BA6005C2D21 /* NSURL+AVAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+AVAdditions.h"; sourceTree = "<group>"; };
70A6A15C1B661BA6005C2D21 /* NSURL+AVAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURL+AVAdditions.m"; sourceTree = "<group>"; };
9AFDD10493E1E4CF996AF646 /* Pods-LeanCloudSocial.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeanCloudSocial.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LeanCloudSocial/Pods-LeanCloudSocial.debug.xcconfig"; sourceTree = "<group>"; };
C904EA0C993C8E9F1446505C /* libPods-LeanCloudSocial.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LeanCloudSocial.a"; sourceTree = BUILT_PRODUCTS_DIR; };
C930D00C225985DBCDB35DE5 /* Pods-LeanCloudSocial.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeanCloudSocial.release.xcconfig"; path = "Pods/Target Support Files/Pods-LeanCloudSocial/Pods-LeanCloudSocial.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -109,7 +104,6 @@
5CC504371B0EC5B8004D0CB1 = {
isa = PBXGroup;
children = (
5CC504621B0EC9E7004D0CB1 /* frameworks */,
5CC504431B0EC5B8004D0CB1 /* LeanCloudSocial */,
5CC504501B0EC5B9004D0CB1 /* LeanCloudSocialTests */,
5CC504421B0EC5B8004D0CB1 /* Products */,
Expand Down Expand Up @@ -177,23 +171,11 @@
name = "Supporting Files";
sourceTree = "<group>";
};
5CC504621B0EC9E7004D0CB1 /* frameworks */ = {
isa = PBXGroup;
children = (
5CC504931B0EF3D0004D0CB1 /* SystemConfiguration.framework */,
5CC504911B0EF3C7004D0CB1 /* MobileCoreServices.framework */,
5CC5048F1B0EF3BC004D0CB1 /* CoreTelephony.framework */,
5CC5048D1B0EF3B3004D0CB1 /* CoreLocation.framework */,
5CC5048B1B0EF3A4004D0CB1 /* libicucore.dylib */,
);
name = frameworks;
sourceTree = "<group>";
};
5D1E654D59321818BE3C9B78 /* Pods */ = {
isa = PBXGroup;
children = (
9AFDD10493E1E4CF996AF646 /* Pods-LeanCloudSocial.debug.xcconfig */,
C930D00C225985DBCDB35DE5 /* Pods-LeanCloudSocial.release.xcconfig */,
40595F669DA649C66885DC13 /* Pods-LeanCloudSocial.debug.xcconfig */,
0C92CDB73C81797BB67BBC2A /* Pods-LeanCloudSocial.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
Expand Down Expand Up @@ -363,7 +345,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LeanCloudSocial/Pods-LeanCloudSocial-resources.sh\"\n";
shellScript = "\"${SRCROOT}/LeanCloudSocialDemo/Pods/Target Support Files/Pods-LeanCloudSocial/Pods-LeanCloudSocial-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -493,7 +475,7 @@
};
5CC504581B0EC5B9004D0CB1 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9AFDD10493E1E4CF996AF646 /* Pods-LeanCloudSocial.debug.xcconfig */;
baseConfigurationReference = 40595F669DA649C66885DC13 /* Pods-LeanCloudSocial.debug.xcconfig */;
buildSettings = {
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -515,7 +497,7 @@
};
5CC504591B0EC5B9004D0CB1 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C930D00C225985DBCDB35DE5 /* Pods-LeanCloudSocial.release.xcconfig */;
baseConfigurationReference = 0C92CDB73C81797BB67BBC2A /* Pods-LeanCloudSocial.release.xcconfig */;
buildSettings = {
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down
10 changes: 0 additions & 10 deletions LeanCloudSocial.xcworkspace/contents.xcworkspacedata

This file was deleted.

6 changes: 6 additions & 0 deletions LeanCloudSocial/AVSNSWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ @interface AVSNSWebViewController ()

@implementation AVSNSWebViewController

- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"账号绑定";
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(close)];
}

- (NSDictionary *)extractParamsFromUrl:(NSURL *)url {
NSMutableDictionary *params = [[url av_queryDictionary] mutableCopy];
return params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@
5CC504A61B0EF46C004D0CB1 /* AppDelegate.m */,
5CC504A81B0EF46C004D0CB1 /* ViewController.h */,
5CC504A91B0EF46C004D0CB1 /* ViewController.m */,
5CC505C31B146051004D0CB1 /* ResultViewController.h */,
5CC505C41B146051004D0CB1 /* ResultViewController.m */,
5CC504AB1B0EF46C004D0CB1 /* Main.storyboard */,
5CC504AE1B0EF46C004D0CB1 /* Images.xcassets */,
5CC504B01B0EF46C004D0CB1 /* LaunchScreen.xib */,
5CC504A11B0EF46C004D0CB1 /* Supporting Files */,
5CC505C31B146051004D0CB1 /* ResultViewController.h */,
5CC505C41B146051004D0CB1 /* ResultViewController.m */,
);
path = LeanCloudSocialDemo;
sourceTree = "<group>";
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions LeanCloudSocialDemo/LeanCloudSocialDemo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
NSString *appKey = @"7dtvdetcfggpalwtf91pdoootc7csxx0vxyi3ayqtbnlklq2";
[AVOSCloud setApplicationId:appId clientKey:appKey];
NSLog(@"setAppId:%@, appKey:%@", appId, appKey);
[AVOSCloud setAllLogsEnabled:YES];
[AVOSCloud setLastModifyEnabled:YES];

[AVOSCloudSNS setupPlatform:AVOSCloudSNSSinaWeibo withAppKey:@"2548122881" andAppSecret:@"ba37a6eb3018590b0d75da733c4998f8" andRedirectURI:@"http://wanpaiapp.com/oauth/callback/sina"];
[AVOSCloudSNS setupPlatform:AVOSCloudSNSQQ withAppKey:@"100512940" andAppSecret:@"afbfdff94b95a2fb8fe58a8e24c4ba5f" andRedirectURI:nil];

[AVOSCloud setVerbosePolicy:kAVVerboseShow];
[AVLogger addLoggerDomain:AVLoggerDomainIM];
[AVLogger addLoggerDomain:AVLoggerDomainCURL];
[AVLogger setLoggerLevelMask:AVLoggerLevelAll];

return YES;
}

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
return [AVOSCloudSNS handleOpenURL:url];
}

- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
Expand Down
Loading

0 comments on commit 610afe3

Please sign in to comment.