ShareSDKForANE packaging notes, sharesdkforane Packaging

Source: Internet
Author: User

ShareSDKForANE packaging notes, sharesdkforane Packaging

Recently I made a ShareSDK IOS access (ANE). Now I think it's actually very simple. However, due to my infamiliarity with Xcode, ANE has been around for a long time, licking your face and disturbing customer service for several days... Haha

At present, I have listed some steps for access to help you.

 

Preparations

0. One Mac machine, the latest AIRSDK
1. Download the SDK you need (for custom download, select the sharing platform you need)
2. Download https://github.com/ShareSDKPlatform/ANESample

 

 

Compile libShareSDKForANE.

Run ANESample-master/iOS/ShareSDKForANE. xcodeproj

1. Drag the downloaded ShareSDK to the project.

 

2. Remove all referenced Lib libraries in the current project (all files are cleared)

3. Change the Device to ios Device.

4. Command + B compile the project

5. Modify the Import and initialization that cannot be used in ShareSDKForANE. m.


Click Command + B to compile the project again. At this time, libShareSDKForANE. a under Products should change to Black (red if any error occurs). Click the arrow on the right to find the corresponding file Copy.

Note that libShareSDKForANE. a should be more than 200 KB at this time. If the size difference is large, check the previous steps.

 

Compile ANE

1. copy the generated libShareSDKForANE. a to the package/iphone-ARM directory.

2. copy the downloaded ShareSDK to the package/iphone-ARM directory.

3. Delete the iphone-x86 directory

4. Modify the ane. sh script:

Your latest AIRSDK directory/adt-package-target ane ShareSDK. ane extension. xml-swc ShareSDKExtension. swc-platform iPhone-ARM-C. /iPhone-ARM. -platformoptions. xml

5. Modify platformoptions. xml (the XML below corresponds to Sina Weibo, Qzone, Facebook, and Twitter)

<platform xmlns="http://ns.adobe.com/air/extension/16.0">     <description >ShareSDK Extension</description>    <copyright>ShareSDK 2014 (optional)</copyright>    <sdkVersion>7.0</sdkVersion>    <linkerOptions>        <option>-w</option>        <option>-ios_version_min 5.11</option>        <option>-framework Foundation</option>        <option>-framework CoreTelephony</option>        <option>-framework MessageUI</option>        <option>-framework SystemConfiguration</option>        <option>-framework QuartzCore</option>        <option>-framework ImageIO</option>        <option>-lz.1.2.5</option>        <option>-licucore</option>        <option>-lstdc++</option>        <option>-lsqlite3</option>        <option>-framework Security</option>    </linkerOptions>     <packagedDependencies>        <packagedDependency>ShareSDK/Core/AGCommon.framework</packagedDependency>        <packagedDependency>ShareSDK/Core/ShareSDKCoreService.framework</packagedDependency>        <packagedDependency>ShareSDK/ShareSDK.framework</packagedDependency>        <packagedDependency>ShareSDK/Connection/SinaWeiboConnection.framework</packagedDependency>        <packagedDependency>ShareSDK/Connection/QZoneConnection.framework</packagedDependency>                <packagedDependency>ShareSDK/Connection/WeChatConnection.framework</packagedDependency>        <packagedDependency>ShareSDK/Connection/FacebookConnection.framework</packagedDependency>        <packagedDependency>ShareSDK/Connection/TwitterConnection.framework</packagedDependency>                        <packagedDependency>ShareSDK/UI/ShareSDKiPadDefaultShareViewUI.framework</packagedDependency>        <packagedDependency>ShareSDK/Extend/WeChatSDK/libWeChatSDK.a</packagedDependency>        <packagedDependency>ShareSDK/Extend/SinaWeiboSDK/libWeiboSDK.a</packagedDependency>        <packagedDependency>ShareSDK/Extend/QQConnectSDK/TencentOpenAPI.framework</packagedDependency>            </packagedDependencies></platform>

 

* It is important to note that

-<Platform xmlns = "http://ns.adobe.com/air/extension/168.0"> the latest version number corresponding to your AIRSDK is now 16.0.

-<Option>-ios_version_min 5.11 </option> changed to 5.11.

-· Http://wiki.mob.com/ /the Sina Weibo SDK dependency library is ImageIO. in the framework, the option is set to <option>-framework ImageIO </option>. Similarly, libstdc ++ is used. dylib corresponds to <option>-lstdc ++ </option>. Please discover the rule by yourself.

-The <packagedDependency> ShareSDK/Extend/WeChatSDK/libWeChatSDK. a </packagedDependency> file a is included in the downloaded ShareSDK.

6. Modify extension. xml

<extension xmlns="http://ns.adobe.com/air/extension/16.0">    <id>cn.sharesdk.ane.ShareSDKExtension</id>    <versionNumber>1</versionNumber>    <platforms>        <platform name="iPhone-ARM">          <applicationDeployment>            <nativeLibrary>libShareSDKForANE.a</nativeLibrary>            <initializer>ShareSDKInitializer</initializer>            <finalizer>ShareSDKFinalizer</finalizer>          </applicationDeployment>        </platform>    </platforms></extension>

Only platform iPhone-ARM is left, And xmlns is modified to 16.0 (the latest AIRSDK version number)

 

7. CD to the corresponding directory sh ane. sh

If everything goes well, ShareSDK. ane will be generated.

 

Test ANE

I use Intellij. If you use Flash Builder, set it according to the steps.

1. Drag all bundle files in the downloaded ShareSDK into the project to ensure that they are finally packaged.


2. Modify the xml configuration file corresponding to the project and add the URLSchemes


3. Set parameters to initialize ShareSDK in http://wiki.mob.com/

If everything goes well, your ShareSDK should be ready to work :)

Enjoy

 

Best
Eran

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.