Skip to content

iOS generate dynamic libraries #73479

New issue

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

Closed
CreatSuns opened this issue Apr 23, 2025 · 1 comment
Closed

iOS generate dynamic libraries #73479

CreatSuns opened this issue Apr 23, 2025 · 1 comment
Labels
Question Issues that are questions about using Go.

Comments

@CreatSuns
Copy link

How does iOS generate dynamic libraries to solve the problem of having a copy of both app and app Extension when importing a project as a static library?

Problem Description

I use go code to implement key functions in iOS, Android, macos, Windows and then use commands to generate XCframework

The command is as follows:
gomobile bind -v -ldflags=' -s-w '-trimpath -target ios,iossimulator, macos-iosversion 15.0-o ./output/xvpnsdk.xcframework ./xvpn-mobile-sdk

After the generated framework is detected using the file command, the output is identified as a static library

file Xvpnsdk

Xvpnsdk: Mach-O universal binary with 1 architecture: [arm64:current ar archive]
Xvpnsdk (for architecture arm64):	current ar archive

How do I generate an iOS dynamic library

@seankhliao
Copy link
Member

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2025
@gabyhelp gabyhelp added the Question Issues that are questions about using Go. label Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Issues that are questions about using Go.
Projects
None yet
Development

No branches or pull requests

3 participants