-
Notifications
You must be signed in to change notification settings - Fork 5
Yeung Yiu Hung edited this page Feb 25, 2016
·
2 revisions
In your .pch, add following lines
#import <SocialLib/SocialLib+Weixin.h>
In your AppDelegate,
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
return [SocialLib connectSocialPlatformWithApplication:application didFinishLaunchingWithOptions:launchOptions];
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
[SocialLib applicationDidBecomeActie:application];
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
return [SocialLib handleOpenURL:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
-
In Xcode right-click your .plist file and choose "Open As Source Code".
-
Copy & Paste the XML snippet into the body of your file
(<key>CFBundleURLTypes</key> <array>...</array>)
. -
Replace {WEIXIN API ID} with your Weixin App ID:
<dict> <key>CFBundleURLSchemes</key> <array> <string>{WEIXIN API ID}</string> </array> </dict>
-
Add following lines into body of your file
(<dict>...</dict>)
-
Replace:
- {WEIXIN API ID} with your Weixin App ID.
- {WEIXIN API NAME} with your Weixin App name.
<key>WeixinAppID</key> <string>ENTER{WEIXIN API ID}</string> <key>WeixinAppName</key> <string>{WEIXIN API NAME}</string>