share_bridge_wechat 0.1.0-dev.2
share_bridge_wechat: ^0.1.0-dev.2 copied to clipboard
WeChat sharing plugin for Share Bridge.
share_bridge_wechat #
Chinese
WeChat sharing capability package for Share Bridge.
Status #
- Android integrates WeChat OpenSDK and supports webpage and image sharing with
WXEntryActivitycallback handling. - iOS integrates
WechatOpenSDK-XCFrameworkand supports webpage and image sharing with URL scheme and Universal Link callbacks. - HarmonyOS integrates
share_bridge_wechat_ohosand supports webpage and image sharing through WeChat OpenSDK.
Usage #
final manager = ShareManager();
await manager.register(
WechatShareProvider(
appId: 'your_wechat_app_id',
universalLink: 'https://example.com/wechat/',
),
);
The WeChat package does not expose setPrivacyGranted. Host apps should follow their own privacy compliance flow and register providers or call sharing only after users agree to the app privacy policy.
Scope #
- WeChat sharing only.
- No login, payment, OAuth, or user profile APIs.
- Webpage and image sharing are supported on Android, iOS, and HarmonyOS.
Android Callback Setup #
The host app must provide wxapi.WXEntryActivity under its own package name and extend the base class provided by the plugin.
package your.application.id.wxapi
import com.gongziming.share_bridge_wechat.ShareBridgeWechatEntryActivity
class WXEntryActivity : ShareBridgeWechatEntryActivity()
Declare it in the host app AndroidManifest.xml.
iOS Callback Setup #
Configure URL schemes, LSApplicationQueriesSchemes, Associated Domains when Universal Links are used, and forward AppDelegate or SceneDelegate callbacks to share_bridge_wechat_ios.
HarmonyOS Setup #
HarmonyOS is loaded through share_bridge_wechat_ohos. WeChat HarmonyOS does not need a signing callback; keep using normal ShareContent.webpage and ShareContent.image.
See the repository setup guides for complete host configuration.