We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我想在 object-c 项目中使用,但是不知道具体使用方式
The text was updated successfully, but these errors were encountered:
需要先使用不包含异步方法的 Swift 代码进行功能封装后,暴露给 objc 代码。 举个例子
MyAliyunpan.swift
import AliyunpanSDK @objcMember public class MyAliyunpan: NSObject { public func funcA() { Task { let client: AliyunpanClient = AliyunpanClient(.init( appId: "YOUR_APP_ID", scope: "YOUR_SCOPE" ) await client.authorize(credentials: credentials) ... } } }
MyAliyunpanObjc.m
#import <YOUR_MODULE_NAME/YOUR_MODULE_NAME.swift> - (void)test { [MyAliyunpan new] funcA]; }
Sorry, something went wrong.
No branches or pull requests
我想在 object-c 项目中使用,但是不知道具体使用方式
The text was updated successfully, but these errors were encountered: