Developed QQ-connected iOS version of the history of the bitterness of ANE expansion

Source: Internet
Author: User
Tags openid

Source: http://www.myexception.cn/operating-system/1451490.html

Development of QQ-connected iOS version of the history of bitterness

Development of the QQ connected iOS version of the ANE extension bitterness history:

1, the installation of Mac system is very painful, found several versions are not installed, while the basic operation of the Mac and Xcode basic operation is not familiar.

2 . Create an ANE project with Xcode (using the Xcode-template-ane-master template), introduce a third-party object-cframework, and generate. A files for the Ane file to be generated under Windows.

found that Windows downgraded with a third-party SDK compiled after the Ane,air call is boxed (for two reasons, one is that the OBJECT-C project code has an error, However, the. A library file can be generated normally, and the second is a reference to the third-party framework, but the Platform.xml is not configured to be packaged into the ANE and the third-party SDK is not read.

Workaround: First exclude reference to third-party class library problems, and then troubleshoot the code (have to comment on the suspected place in the compilation. A, generate ANE repack)

After troubleshooting the error, the compilation is not stuck, but still packed the times wrong:

An error occurred while packaging the application:

 undefined symbols for architecture armv7:

  ' _qqsdkextfinalizer ', Referenced from:

      _g_com_adobe_air_fre_fmap in EXTENSIONGLUE.O

     (maybe to meant: _qqsdkextfinalizer_name)

  " _qqsdkextinitializer ", referenced from:

      _g_com_adobe_air_fre_ Fmap in EXTENSIONGLUE.O

     (maybe you meant: _qqsdkextinitializer_name)

  "_objc_class_$_cttelephonynetworkinfo", referenced from:

      objc-class-ref in Tencentopenapi (MTA4QCHELPER.O)

ld:symbol (s) isn't found for architecture armv7

compilation

3 . Resolve the above error by configuring Platform.xml (add a referenced third-party class library to the Linkeroptions attribute).

Windows RePack build Ane,air project Run Package error:

The reason is that ADT reads the third-party class library when it is packaged and cannot read it. You need to configure the Apple IOS SDK in the native extension of FB (because IOSSDK does not have Windows edition, so you need to put the FB project on your Mac and go to the 4th)

Note <linkerOptions> tags require AIR 3.3 or later

4 . Install FB on Mac, configure the Air project, configure the Apple IOS SDK in the native extension:

/applications/xcode2.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos6.1.sdk/

And put the third-party class library tencentopenapi.framework into the above path system/library/frameworks/, import the relevant required iOS class library in Xcode

To run the prompt again

Ld:librarynot found For-libiconv

compilationfailed while Executing:ld64

The reason is that linkeroptions iOS class library name is wrong, name-libiconv to write-liconv (must remove IB two characters)

After the configuration is complete, re-package the Ane,air project in Windows OK, the calling third-party program is working properly. The Platformoptions.xml configuration is as follows:

5, because do not want to put the project on the Mac to compile, so need to find a way on the ANE, the third party framework package into the ANE (this requires the ANE packaging process must be done on the Mac)

Configure the third-party class library with the Packageddependencies node attribute in the Platformoptions.xml

To package ane prompt with the command line error: Missing dependency tencentopenapi.frameworkfor Platform Iphone-arm

Platformoptions.xml The Packageddependencies node property is configured---Reference to a third-party class library, you need to put the class library in a packaged folder

Note <packagedDependencies> tags require AIR 3.5 or later.

Then use ADT to package ane, error: Unable to build a valid certificate chain for the signer.

It is possible that a. p12 file is not supported on a Mac that uses Windows to generate.

There is a way to say on the internet how to regenerate using Firefox on your Mac. P12 (http://forums.adobe.com/message/1975832#1975832) does not fully understand how to operate, Or do you honestly use your Mac to generate. p12 files for ane generation and IPA publishing.

This makes the ANE file generated for the third-party framework available to air projects on widows, and does not require development projects on Macs to be introduced into the iOS SDK.

6, for QQ Interconnect SDK write ane, send message cannot callback, because object-c part to rewrite Handleopenurl method, and Air app automatically created window cannot override this method.

Workaround: A s listens on the Invokeevent.invoke event, receives the event and then calls the Object-c method via the ANE, which then calls the SDK's Handleopenurl method.

NativeApplication.nativeApplication.addEventListener (Invokeevent.invoke, oninvoke);p rivate function Oninvoke ( event:invokeevent): Void{if (Capabilities.manufacturer.indexOf ("ios")! =-1)//Only in IOS use this way {if (event.arguments! = nul L && event.arguments.length > 0) {var url:string = event.arguments[0] as string;if (URL! = null && URL. IndexOf ("tencent") = = 0) {contex.call ("Handleopenurl", URL);}}}}

7,QQ connected login successfully after the client to the OpenID, Access_token passed to the server access open Platform API prompt 100030 error: The user does not authorize the API

At first, I thought it was OpenID and Access_token error, the actual reason is authorize passed the parameter problem, did not fill in the API's permission string, can add or pass @ "all". The string for each permission is the fun of which CGI is called: the Https://graph.qq.com/user/get_app_friends permission string is: Get_app_friends.

8, other episodes , the beginning of the installation of Flash builder4.7, configure the latest air3.9, project compilation error: Tip: "Files found in the source path must have an externally visible definition." If a definition in a file should be externally visible, put the definition in a package. ”

"AIR application ID" Net.flash8.game.guess.debug "does not match the pattern specified in configuration profile" Net.flash8.game.guess ". Either change the application ID or use a configuration profile that matches the existing ID. ”

Did not find the reason, and then installed flashbuilder4.6, configure the latest air3.9, after normal.

How to upgrade Airsdk under Mac: (Same as upgrade method under Windows, fb4.7 in Mac is more complex)

Http://www.vimer.cn/2013/07/mac flash-builder-4-64-7-Upgrade the version of-AIRSDK to the 3-8 method. html

Xcode error Unsupported compiler ' GCC 4.2 ' selected for architecture ' i386 '

Workaround find compiler for c/c++/objective-c this option in buildingsetting LLVM GCC 4.2 is OK

Xcode error occurred:

Undefined symbolsfor Architecture ARMv7:

"_objc_class_$_xxx", referenced from:

Objc-class-ref inxxx

Ld:symbol (s) notfound for architecture i386

Clang:error:linker command failed with exit code 1 (use-v to see invocation)

If the real machine debugging is undefined symbols for architecture i386 error!

This error is usually caused by project.pbxproj this file, especially in the case of co-development of many people, the SVN submission of the specification may cause project.pbxproj error, resulting in the file reference is not in the Project.pbxproj file.

The Xcode project import file will look up according to Project.pbxproj and will have the above error if it finds no references to the file.

Solution Click on the project, in the main interface click Buildphases, according to the message "XXX" to determine the missing files, generally if the lack of custom files, XXX will be missing the class name, then in Complie sources to add the file. If the class library is missing, the class library is added to the link Binary with libraries.

Xcode sometimes does not compile. A files, but still prompts buildsuccess, most of which are code errors, re-create a project, copy the code over. (Only on Xcode 4.6, behind the decisive installation of the latest xcode5.0)

Command line package ANE hint error: Namespace of platformoptions.xml should match extension Namespace.

Platformoptions.xml inside the air version number configuration must be consistent with the extension.xml, at the same time, the package ane to use the Air SDK version must be greater than or equal to the revision number.

Encountered these problems, and resolved, finally the QQ interconnection of the ISO version of the ANE development completed, and call. During the middle of the block, but also study the other people write a QQ connected to the ANE see can be directly to use, eventually found not support, also have to develop their own.

Induction steps:

1, configure the development environment (MAC, Xcode, familiar with their usage)

2. Create Xcode project (we recommend using Xcode-template-ane-master), export. A library file

3. Create as Commonanelib project, write ane command and package

4. Configure-app.xml permissions (very important)

5, air Project Engineering call

Refer to the relevant website:

To build a native library:
http://help.adobe.com/zh_CN/air/extensions/WSf268776665d7970d-2e74ffb4130044f3619-7fff.html# Wsdb11516da818ea8d49ce0fe713341ed67cf-7ffe

Application Startup and Exit options

Http://help.adobe.com/zh_CN/AIR/1.1/devappsflex/WS5b3ccc516d4fbf351e63e3d118676a5d46-8000.html

Build native extensions for iOS and Android – Part III: Build iOS libraries

Http://www.adobe.com/cn/devnet/air/articles/building-ane-ios-android-pt3.html

Ios5support for air/using external SDKs to package apps:

http://blogs.adobe.com/rajorshi/2011/11/16/ios5-support-for-airusing-external-sdks-to-package-apps/

Integrate Facebook http://zengrong.net/post/1831.htm with ane

The ane-times error with Adobe Air packaging to the external SDK

Http://www.flashj.cn/wp/error-when-adt-package-ipa-with-ane-includes-ios-external-sdk.html

The path of the pit daddy of IOS ane (a) http://rolfzhang.com/articles/1108.html

Ane-facebook:https://github.com/freshplanet/ane-facebook

Anelist-master:https://github.com/zmliu/anelist

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.