Build your 1st Application with WeChat SDK!

Source : http://dev.wechat.com/wechatapi/installguide

Installation Guide

Build your First Application with WeChat SDK!

Note: This document describes how to develop an app using WeChat SDK. You should already be familiar with the XCode environment.

  1. 1. Register App ID

    Fill in the required details on the App Registration page to obtain an AppID. Submit the registered app for approval. Approved apps will be released.

  2. 2. Download the SDK package

    The package comprises three files: libWeChatSDK.a, WXApi.h, WXApiObject.h

    Download: iOS SDK package

  3. 3. Build your development environment

    [1] Create your project in XCode.

    [2] Add the following three files to your project: libWeChatSDK.a, WXApi.h, WXApiObject.h; for example, you can create a project called Test, and add these files to the project’s directory.

    Note: For XCode 4.3 and earlier versions, please use libWeChatSDK.a. For XCode 4.5 and later versions, use libWeChatSDK_armv7_v7s.a

    iOS Guide : Build your development environment

    [3] Choose the “Build Setting”. Then add the paths of the following files to “Search Paths”, as shown below: libWeChatSDK.a, WXApi.h, WXApiObject.h.

    Note: For XCode 4.3 and earlier versions, use libWeChatSDK.a. for XCode 4.5 and later versions, please use libWeChatSDK_armv7_v7s.a

    iOS Guide : Build your development environment

    [4] In Xcode4, select “TARGETS”>”Info”>”URL type”>”URL scheme”. Add the ID for your registered app. For Xcode3 and earlier versions, please add the ID to your plist file, as shown below.

    iOS Guide : Build your development environmentiOS Guide : Build your development environment

    URL scheme settings in Xcode4

    [5] For files on which you want to use the WeChat API, import WXApi.h and add the WXApiDelegate protocol.

    #import <UIKit/UIKit.h>
    #import "WXApi.h"
    @interface AppDelegate : UIResponder <UIApplicationDelegate, WXApiDelegate>
    @property (strong, nonatomic) UIWindow *window;
    @end
  4. 4. Start Coding

    Now go ahead and start coding!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s