Skip to content

sinaweibosdk/weibo_ios_sdk

Repository files navigation

ReadMe

In order to facilitate third-party developers to quickly integrate the microblog SDK, we provide the following contact information to help developers integrate:
QQ group: 453830884 (please add this group for iOS) 226214250 (This group is full) 263989257 (This group is full)
284084420 (This group is full)
Email: sdk4wb@sina.cn
Weibo: new mobile technology
In addition, regarding SDK bug feedback, user experience, and good suggestions, please try to submit them to Github, and we will solve them as soon as possible.
At present, we are gradually improving the microblog SDK to provide a standardized, simple, reliable, extensible and customizable SDK for third-party developers.

summary

The microblog iOS platform SDK provides a simple and easy to use microblog API call service for third-party applications, enabling third-party clients to authorize login without understanding complex verification mechanisms, and provides microblog sharing function, which allows them to share microblogs directly through the official microblog client.

#Rapid integration WeiboSDK supports Cocoapods integration. Please add the following statement in Podfile:

 pod "Weibo_SDK", :git => " https://github.com/sinaweibosdk/weibo_ios_sdk.git "

#API documentation http://sinaweibosdk.github.io/weibo_ios_sdk/index.html

#FAQs https://github.com/sinaweibosdk/weibo_ios_sdk/blob/master/FAQ.md

Terminology

noun annotation
AppKey The app key assigned to each third-party application. It is used for authentication, source display and other functions.
RedirectURI The application callback page can be found in Sina Weibo Open Platform ->My Application ->Application Information ->Advanced Application ->Authorization Settings ->Application Callback page.
AccessToken Token representing the user's identity, which is used to call Weibo API.
Expire in The expiration time is used to determine whether the login has expired.

Function list

1. Authentication and authorization

Provide developers with Oauth2.0 authorization and authentication, and integrate SSO login function.

2. Weibo sharing

Information sharing from third-party applications to microblog is currently only supported through the official microblog client.

3. Login

The Weibo login button is mainly used to simplify users' SSO login. In fact, it simply encapsulates the SSO authentication process inside.
The Weibo logout button mainly provides a one click logout function to help developers cancel user authorization.

Scope of application

The following conditions must be met to use this SDK:

  • Register and create applications on Sina Weibo open platform
  • The authorization callback page of this app has been defined
  • The application has been selected as iOS platform, and the Bundle id and apple id have been filled in correctly

Note: The authorization callback page is invisible to users for mobile client applications, so it will not affect what form is defined, but without definition, you cannot use SDK authentication to log in. It is recommended to use the default callback page https://api.weibo.com/oauth2/default.html

Adaptation of iOS9

Since the release of iOS9 has affected the integration of microblog SDK and applications, we need to take the following measures to ensure a good application experience: ###1. Support for transmission security In the new generation of iOS system, SSL needs to be established for each network transmission by default. There are two ways to solve this problem:

  • A. Create a whitelist and add it to your app's plsit
  • NSAppTransportSecurity NSExceptionDomains sina.cn NSIncludesSubdomains NSThirdPartyExceptionRequiresForwardSecrecy weibo.cn NSIncludesSubdomains NSThirdPartyExceptionRequiresForwardSecrecy weibo.com NSIncludesSubdomains NSThirdPartyExceptionAllowsInsecureHTTPLoads NSThirdPartyExceptionRequiresForwardSecrecy sinaimg.cn NSIncludesSubdomains NSThirdPartyExceptionAllowsInsecureHTTPLoads NSThirdPartyExceptionRequiresForwardSecrecy sinajs.cn NSIncludesSubdomains NSThirdPartyExceptionAllowsInsecureHTTPLoads NSThirdPartyExceptionRequiresForwardSecrecy sina.com.cn NSIncludesSubdomains NSThirdPartyExceptionAllowsInsecureHTTPLoads NSThirdPartyExceptionRequiresForwardSecrecy

An SSL error has occurred and a secure connection to the server cannot be made. "Such a question.

  • B. Force the NSAllowsArbitraryLoads attribute to be set to YES and add it to the plist of your application
  • NSAppTransportSecurity NSAllowsArbitraryLoads

###2. Support for application jump If you need to use the relevant functions of Weibo, such as login, sharing, etc. And it needs to realize the function of jumping to Weibo. In iOS9 system, you need to add the following key value pairs to the plist of your app. Otherwise, when canOpenURL function is executed, NO will be returned. For more information, please go to https://developer.apple.com/videos/wwdc/2015/?id=703

  • LSApplicationQueriesSchemes sinaweibohd sinaweibo weibosdk weibosdk2.5 weibosdk3.3

###3. Apply slimming and bitcode Apple has added support for application slimming in the SDK of iOS9, including bitcode. We also added bitcode support in the latest code

Questions about ADSupport integration

On whether the third-party application developers integrate ADSupport. framework:

  1. If the developer wants to integrate ADSupport. framework, check the option to track the user's advertising effect when submitting the store for ipa. Please refer to Youmeng for specific operation http://bbs.umeng.com/forum.php mod=viewthread&tid=6242&aid=1611&from=album&page=1&mobile=2

  2. If developers want to not integrate ADSupport. framework, they can delete it directly. The use of Weibo SDK does not require third-party developers to integrate ADSupport. framework. Not integrating ADSupport. framework will not affect the normal use of WeiboSDK.

Questions about ipv6 support

Since the Apple Store started on June 1, the mandatory app needs to support the ipv6 only network. The microblog sdk also provides support and updates the underlying network code used, including the reachability library.

Adaptation of iOS10

Due to the release of iOS10, the original ATS settings on iOS10 will have https network access restrictions. To ensure a good application experience, we need to take the following measures:

  •  <key>sina.com.cn</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSExceptionMinimumTLSVersion</key> <string>TLSv1.0</string> <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> </dict>

You need to add a key such as NSExceptionMinimumTLSVersion under each domain name. The value part is TLSv1.0

3.2.0 Version update

Focusing on the core theme of "sharing+connection", Microblog Mobile SDK3.2 is targeted at developers. It has only four main functional modules planned: SDK initialization, logging in with a microblog account, sharing to microblog, and connecting to microblog. Other functions have been transferred to offline or will be offline in the near future. The specific functions of the changes are as follows:

  1. Hot evaluation and relevancy component offline
  2. Private message sharing function, private message application recommendation function offline
  3. The SDK will no longer package the interface to access openAPI, and the network access tool WBHttpRequest provided by the SDK will also be gradually offline. When developers use the microblog openAPI interface later, they need to use their own network module and call it according to the platform's interface document
  4. SMS registration login function offline
  5. The multimedia sharing function has been modified as a whole. In the version of Weibo client after 7.5.0, multimedia objects shared to the publisher will no longer be displayed as linkcards, but will be inserted into the shared text in the form of text links. (The modification of this function will not affect the display of the shared content in the information. For any third party that has passed the business connection, the multimedia object sent out will display the linkcard in the information flow.) And this function will be further modified later.

At the same time, some functions in the new SDK are not perfect, which will be gradually improved in the recent version update:

  1. Because some H5 modules have problems with TLS1.2 support, the ATS of the SDK cannot be fully turned on at present
  2. Some functions connected to Weibo are not perfect, and will be gradually modified in later versions

3.2.1 Version update

The Weibo Mobile SDK 3.2.1 simplifies the original statistical functions, updates the original sharing functions, and enriches the sharing functions. The specific changes are as follows:

  1. Statistical function adjustment, which is expected to be provided in the form of components later
  2. The original picture sharing function is expanded from the form of a single picture on the pasteboard to the mode of album with multiple pictures and videos
  3. Add the function of sharing to story in the form of single image or video.

3.2.5 Version update

The specific changes of Weibo Mobile SDK 3.2.5 are as follows:

  1. Replace UIWebView Control
  2. Adapt to iOS13, disable dark mode, and display the page in full screen
  3. Delete useless codes and "payment" related characters, optimize content and reduce package size

3.2.6 Version update

The specific changes of Weibo Mobile SDK 3.2.6 are as follows:

  1. Fix some page adaptation problems and iTunes download link failure problems
  2. Fix some problems in the issue
  3. Document modification, adding FAQs

3.2.7 Version update

The specific changes of Weibo Mobile SDK 3.2.7 are as follows:

  1. Replace NSURLConnection related APIs
  2. Replace UIAlertView related API
  3. Add i386 architecture

3.3.0 Version update

The specific changes of Weibo Mobile SDK 3.3.0 are as follows:

  1. Add support for universal link sharing jump
  2. Modify the problem of Ios14 sharing multiple images and video data loss
  3. You can set not to obtain idfa
  4. Remove sharing to get album permission

Note: To update the 3.3.0 version, you must add weibosdk3.3 to the project scheme white list, or the ios14 configuration will not take effect

3.3.1 Version supports sharing hypercalls

be careful:

1. To use the sharing hyperphone function, the microblog app must be upgraded to version 11.6.2 or above (included)

2. If you need to share the hyperphone function, please contact us to open the function permission

3.3.2 Version supports sharing of livephoto

Note: To use the function of sharing live photo, the microblog app must be upgraded to version 11.7.2 or above (included)

3.3.3 Get equipment information offline

Note: The sdk no longer obtains user device information. If: idfa, idfv, etc

3.3.4 iOS16 adaptation

Updated content:

  1. Adapt to iOS16
  2. Solve the current known bugs and clarify the meaning of some comments
  3. The+(void) checkUniversalLink: (void (^ _Nullable) (WBULCheckStep step, NSError * _Nullable error)) checkBlock interface is removed
  4. Go to Weibo 12.9.3 and later versions, and you will receive the corresponding operation information in the response when you return.

3.3.5 Download to obtain idfa code

Updated content:

In the code layer, the idfa access code is dropped

3.3.6 Version update

The specific changes of Weibo Mobile SDK 3.3.6 are as follows, please update as soon as possible.

  1. Fixed known functional issues
  2. Optimizes known security compliance issues

3.3.7 Version update

The specific changes of Weibo Mobile SDK 3.3.7 are as follows, please update as soon as possible.

  1. Improve SDK stability, performance and security

3.3.8 Version update

The specific changes of Weibo Mobile SDK 3.3.8 are as follows:

  1. Add privacy manifest file