Compiled for iOS #4114
mnaveedpaki
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have compiled Xray-core for iOS and it generated xray-ios.a file. I am a newbie and i don't know how can i use this into flutter.
can anyone help me regarding this?
Here how i done this
First cloned the xray-core
git clone https://github.com/XTLS/Xray-core.git
cd Xray-core
Set Environment Variables for Cross-Compiling:
export CGO_CFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk"
export CGO_LDFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk"
export CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
export CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
export CGO_ENABLED=1
export GOOS=ios
export GOARCH=arm64
Run the Build Command:
go build -o xray-ios -trimpath -ldflags "-s -w -buildid=" ./main
after successful run it generates .a file and now i don't know much about how can i use these files.
Beta Was this translation helpful? Give feedback.
All reactions