Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8c73a3a
Add native Android sharing and modern iOS sharing with optional WeCha…
yuntengm Nov 8, 2026
c376670
Document migration limits and add latest Android device smoke test
yuntengm Nov 8, 2026
a63cc81
Run vendor tests on ART and host iOS UI tests in a scene-based sample
yuntengm Nov 8, 2026
5d6cbd3
Verify Swift imports and isolate payload decoding from simulator clip…
yuntengm Nov 8, 2026
e8b8963
Accept valid Universal Links and present share-sheet tests from the v…
yuntengm Nov 8, 2026
f4531c6
Check popover positioning on iPad and native presentation on iPhone
yuntengm Nov 8, 2026
3afa752
Wait for UIKit to finish presenting the real share sheet before asser…
yuntengm Nov 8, 2026
33eac4f
Boot simulator devices explicitly and ad-hoc sign test hosts
yuntengm Nov 8, 2026
c459273
Exercise the native iOS share sheet with a separate UI test runner
yuntengm Nov 8, 2026
f07d321
Verify observed share-sheet controls and select SDK-compatible simula…
yuntengm Nov 8, 2026
7d537af
Validate Apple current iOS 27.2 runtime with the available 27.2 SDK
yuntengm Nov 8, 2026
1e2d6b0
Pin the released iOS 27.2 simulator build from Apple catalog
yuntengm Nov 8, 2026
b85da94
Verify the exact registered simulator after runtime installation
yuntengm Nov 8, 2026
f432d64
Use iOS 15 deployment baseline required by the current Xcode SDK
yuntengm Nov 8, 2026
26d6a1e
Align minimum-version documentation and release CI simulator memory b…
yuntengm Nov 8, 2026
ade7edd
Allow cold simulator startup in system share UI test
yuntengm Nov 8, 2026
5ed0cf4
Document verified release Xcode 27.2 toolchain
yuntengm Nov 8, 2026
e1ae2b0
Document ShareSDK protocols and propose minimal cross-platform SDK co…
yuntengm Nov 9, 2026
46fa708
Implement minimal cross-platform ShareClient and extensible providers
yuntengm Nov 9, 2026
cdd0949
Respect nonnull WeChat SDK title and description imports
yuntengm Nov 9, 2026
d59bff8
Expose Swift sample bridge to Objective-C and retry SDK transport fai…
yuntengm Nov 9, 2026
c8f6b95
Exercise visible Android UI and distinguish implemented P1 from research
yuntengm Nov 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Mobile CI
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: mobile-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
android:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: '21'
- uses: gradle/actions/setup-gradle@v6
with:
validate-wrappers: true
- name: Install stable Android SDK
run: '"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platforms;android-37.2" "build-tools;37.0.0"'
- name: Test, lint and build libraries and sample
working-directory: android
run: ./gradlew test lint assembleDebug --stacktrace
- name: Enable emulator acceleration
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run on latest stable Android with 16 KB pages
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: '37.2'
target: google_apis_ps16k
arch: x86_64
profile: pixel_6
working-directory: android
script: |
adb shell getconf PAGE_SIZE
test "$(adb shell getconf PAGE_SIZE | tr -d '\r')" = "16384"
./gradlew :sample:connectedDebugAndroidTest :openshare-wechat:connectedDebugAndroidTest
- uses: actions/upload-artifact@v7
if: always()
with:
name: android-reports-and-builds
path: |
android/**/build/reports/
android/**/build/outputs/aar/
android/sample/build/outputs/apk/debug/
ios:
timeout-minutes: ${{ matrix.runner == 'xcode-27' && 45 || 30 }}
strategy:
fail-fast: false
matrix:
runner: [macos-15, macos-26, xcode-27]
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v7
- name: Select iOS 27.2 toolchain
if: matrix.runner == 'xcode-27'
run: |
echo 'DEVELOPER_DIR=/Applications/Xcode_27.2.app/Contents/Developer' >> "$GITHUB_ENV"
echo 'OPENSHARE_IOS_RUNTIME=27.2' >> "$GITHUB_ENV"
echo 'OPENSHARE_IOS_RUNTIME_BUILD=24B8117' >> "$GITHUB_ENV"
- name: Record Xcode and available SDKs
run: xcodebuild -version && xcodebuild -showsdks
- name: Download Apple iOS 27.2 runtime
if: matrix.runner == 'xcode-27'
run: python3 scripts/ensure-ios-runtime.py
- name: Install project generator
run: brew install xcodegen
- name: Download pinned official WeChat SDK
run: bash scripts/download-wechat-ios.sh
- name: Generate test project
run: xcodegen generate --spec ios/project.yml
- name: Build Swift package without vendor SDKs
run: |
xcodebuild -scheme OpenShare -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO build
xcodebuild -scheme OpenShareNext -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO build
- name: Test on iPhone and iPad
run: bash scripts/ios-test.sh
- name: Build legacy demo with current SDK
run: xcodebuild -project OpenShareDemo/openshare.xcodeproj -scheme openshare -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO build
- name: Lint CocoaPods core and optional adapter
run: |
echo 'IPHONEOS_DEPLOYMENT_TARGET = 15.0' > "$PWD/.build/pod-lint.xcconfig"
export XCODE_XCCONFIG_FILE="$PWD/.build/pod-lint.xcconfig"
pod lib lint OpenShare.podspec --subspec=Core --allow-warnings
pod lib lint OpenShare.podspec --subspec=WeChat --allow-warnings
pod lib lint OpenShare.podspec --subspec=Next --allow-warnings
pod lib lint OpenShare.podspec --subspec=NextWeChat --allow-warnings
- uses: actions/upload-artifact@v7
if: always()
with:
name: ios-results-${{ matrix.runner }}
path: .build/*.xcresult
include-hidden-files: true
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,15 @@ DerivedData
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
#Pods/

# Android / Swift Package Manager
.gradle/
.kotlin/
local.properties
.build/
.swiftpm/
Pods/
*.xcresult
ios/OpenShareCI.xcodeproj/
ios/Sample/Info.plist
__pycache__/
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

171 changes: 35 additions & 136 deletions OpenShare.podspec
Original file line number Diff line number Diff line change
@@ -1,138 +1,37 @@
#
# Be sure to run `pod spec lint OpenShare.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#

Pod::Spec.new do |s|

# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#

s.name = "OpenShare"
s.version = "0.0.1"
s.summary = "share to social network without official SDKs"

s.description = <<-DESC
OpenShare可以让你更轻松地调起社交网络的客户端,进行分享、第三方登录。

目前支持地平台有:

* 微信
* QQ
* 微博
* 人人
DESC

s.homepage = "http://openshare.gfzj.us"
s.screenshots = "https://github.com/100apps/openshare/raw/gh-pages/images/demo.gif"


# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#

#s.license = "MIT"
s.license = { :type => "GPL v3", :file => "LICENSE" }


# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#

s.author = { "Logan" => "gf@gfzj.us" }
# Or just: s.author = "Logan"
# s.authors = { "Logan" => "gf@gfzj.us" }
s.social_media_url = "http://weibo.com/guangfengfocus/"

# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#

s.platform = :ios
# s.platform = :ios, "5.0"

# When using multiple platforms
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"


# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#

s.source = { :git => "https://github.com/100apps/openshare.git", :tag => "0.0.1" }


# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any swift, h, m, mm, c & cpp files.
# For header files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#

s.source_files = "openshare", "openshare/**/*.{h,m}"
# s.exclude_files = "Classes/Exclude"

# s.public_header_files = "Classes/**/*.h"


# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#

# s.resource = "icon.png"
# s.resources = "Resources/*.png"

# s.preserve_paths = "FilesToSave", "MoreFilesToSave"


# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#

# s.framework = "SomeFramework"
# s.frameworks = "SomeFramework", "AnotherFramework"

# s.library = "iconv"
# s.libraries = "iconv", "xml2"


# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.

# s.requires_arc = true

# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "JSONKit", "~> 1.4"

s.name = 'OpenShare'
s.version = '0.1.0'
s.summary = 'Minimal native sharing, with optional official SDK adapters.'
s.homepage = 'https://github.com/100apps/openshare'
s.license = { :type => 'GPL v3', :file => 'LICENSE' }
s.author = { 'Logan' => 'gf@gfzj.us' }
s.source = { :git => 'https://github.com/100apps/openshare.git', :tag => s.version.to_s }
s.ios.deployment_target = '15.0'
s.requires_arc = true
s.static_framework = true
s.swift_version = '5.9'
s.default_subspecs = 'Core'

s.subspec 'Core' do |core|
# Keep all existing headers/categories available for source compatibility.
core.source_files = 'openshare/*.{h,m}'
core.frameworks = 'UIKit', 'WebKit'
end

s.subspec 'WeChat' do |wechat|
wechat.dependency 'OpenShare/Core'
wechat.dependency 'WechatOpenSDK-XCFramework', '2.0.9'
wechat.source_files = 'adapters/ios/*.{h,m}'
end

s.subspec 'Next' do |next_sdk|
next_sdk.source_files = 'next/ios/{Core,System}/*.swift'
next_sdk.frameworks = 'UIKit'
end

s.subspec 'NextWeChat' do |wechat|
wechat.dependency 'OpenShare/Next'
wechat.dependency 'WechatOpenSDK-XCFramework', '2.0.9'
wechat.source_files = 'next/ios/WeChat/*.swift'
end
end
16 changes: 11 additions & 5 deletions OpenShareDemo/openshare.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
A00000000000000000000001 /* OpenShare+System.m in Sources */ = {isa = PBXBuildFile; fileRef = A00000000000000000000002; };
B66BF3B31B0C137E0082F8D6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B66BF3B21B0C137E0082F8D6 /* main.m */; };
B66BF3B61B0C137E0082F8D6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B66BF3B51B0C137E0082F8D6 /* AppDelegate.m */; };
B66BF3B91B0C137E0082F8D6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B66BF3B81B0C137E0082F8D6 /* ViewController.m */; };
Expand Down Expand Up @@ -38,6 +39,8 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
A00000000000000000000002 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "OpenShare+System.m"; sourceTree = "<group>"; };
A00000000000000000000003 = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OpenShare+System.h"; sourceTree = "<group>"; };
B66BF3AD1B0C137E0082F8D6 /* openshare.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = openshare.app; sourceTree = BUILT_PRODUCTS_DIR; };
B66BF3B11B0C137E0082F8D6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B66BF3B21B0C137E0082F8D6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -167,6 +170,8 @@
B66BF3E11B0C16290082F8D6 /* OpenShare */ = {
isa = PBXGroup;
children = (
A00000000000000000000002,
A00000000000000000000003,
B66BF3E21B0C16290082F8D6 /* OpenShare+QQ.h */,
B66BF3E31B0C16290082F8D6 /* OpenShare+QQ.m */,
B66BF3E41B0C16290082F8D6 /* OpenShare+Renren.h */,
Expand All @@ -182,7 +187,7 @@
B66BF3EC1B0C16290082F8D6 /* OpenShareHeader.h */,
);
name = OpenShare;
path = ../../OpenShare;
path = ../../openshare;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand Down Expand Up @@ -294,6 +299,7 @@
B66BF3EE1B0C16290082F8D6 /* OpenShare+Renren.m in Sources */,
B66BF3B61B0C137E0082F8D6 /* AppDelegate.m in Sources */,
B66BF3F41B0C1AEB0082F8D6 /* UIControl+Blocks.m in Sources */,
A00000000000000000000001 /* OpenShare+System.m in Sources */,
B66BF3F11B0C16290082F8D6 /* OpenShare.m in Sources */,
B66BF3B31B0C137E0082F8D6 /* main.m in Sources */,
B66BF3EF1B0C16290082F8D6 /* OpenShare+Weibo.m in Sources */,
Expand Down Expand Up @@ -372,7 +378,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -412,7 +418,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -427,7 +433,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
DEVELOPMENT_TEAM = UXQ4US7LL6;
INFOPLIST_FILE = openshare/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "us.gfzj.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -441,7 +447,7 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
DEVELOPMENT_TEAM = UXQ4US7LL6;
INFOPLIST_FILE = openshare/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "us.gfzj.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
4 changes: 2 additions & 2 deletions OpenShareDemo/openshare/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[self.window makeKeyAndVisible];
return YES;
}
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
//第二步:添加回调
if ([OpenShare handleOpenURL:url]) {
return YES;
}
//这里可以写上其他OpenShare不支持的客户端的回调,比如支付宝等。
return YES;
return NO;
}

- (void)applicationWillResignActive:(UIApplication *)application {
Expand Down
Loading
Loading