Skip to content

Commit d1528ca

Browse files
committed
Precompile Framework to released pod
1 parent dd37214 commit d1528ca

File tree

9 files changed

+351
-6
lines changed

9 files changed

+351
-6
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
build/
1111
lib
1212
DerivedData
13-
Frameworks
1413

1514
## Various settings
1615
*.pbxuser
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>HeadersPath</key>
9+
<string>Headers</string>
10+
<key>LibraryIdentifier</key>
11+
<string>ios-arm64</string>
12+
<key>LibraryPath</key>
13+
<string>libwg-go.a</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
</array>
18+
<key>SupportedPlatform</key>
19+
<string>ios</string>
20+
</dict>
21+
<dict>
22+
<key>HeadersPath</key>
23+
<string>Headers</string>
24+
<key>LibraryIdentifier</key>
25+
<string>ios-arm64_x86_64-simulator</string>
26+
<key>LibraryPath</key>
27+
<string>libwg-go.a</string>
28+
<key>SupportedArchitectures</key>
29+
<array>
30+
<string>arm64</string>
31+
<string>x86_64</string>
32+
</array>
33+
<key>SupportedPlatform</key>
34+
<string>ios</string>
35+
<key>SupportedPlatformVariant</key>
36+
<string>simulator</string>
37+
</dict>
38+
<dict>
39+
<key>HeadersPath</key>
40+
<string>Headers</string>
41+
<key>LibraryIdentifier</key>
42+
<string>macos-arm64_x86_64</string>
43+
<key>LibraryPath</key>
44+
<string>libwg-go.a</string>
45+
<key>SupportedArchitectures</key>
46+
<array>
47+
<string>arm64</string>
48+
<string>x86_64</string>
49+
</array>
50+
<key>SupportedPlatform</key>
51+
<string>macos</string>
52+
</dict>
53+
</array>
54+
<key>CFBundlePackageType</key>
55+
<string>XFWK</string>
56+
<key>XCFrameworkFormatVersion</key>
57+
<string>1.0</string>
58+
</dict>
59+
</plist>
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/* Code generated by cmd/cgo; DO NOT EDIT. */
2+
3+
/* package golang.zx2c4.com/wireguard/apple */
4+
5+
6+
#line 1 "cgo-builtin-export-prolog"
7+
8+
#include <stddef.h>
9+
10+
#ifndef GO_CGO_EXPORT_PROLOGUE_H
11+
#define GO_CGO_EXPORT_PROLOGUE_H
12+
13+
#ifndef GO_CGO_GOSTRING_TYPEDEF
14+
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
15+
#endif
16+
17+
#endif
18+
19+
/* Start of preamble from import "C" comments. */
20+
21+
22+
#line 8 "api-apple.go"
23+
#include <stdlib.h>
24+
#include <sys/types.h>
25+
static void callLogger(void *func, void *ctx, int level, const char *msg)
26+
{
27+
((void(*)(void *, int, const char *))func)(ctx, level, msg);
28+
}
29+
30+
#line 1 "cgo-generated-wrapper"
31+
32+
33+
/* End of preamble from import "C" comments. */
34+
35+
36+
/* Start of boilerplate cgo prologue. */
37+
#line 1 "cgo-gcc-export-header-prolog"
38+
39+
#ifndef GO_CGO_PROLOGUE_H
40+
#define GO_CGO_PROLOGUE_H
41+
42+
typedef signed char GoInt8;
43+
typedef unsigned char GoUint8;
44+
typedef short GoInt16;
45+
typedef unsigned short GoUint16;
46+
typedef int GoInt32;
47+
typedef unsigned int GoUint32;
48+
typedef long long GoInt64;
49+
typedef unsigned long long GoUint64;
50+
typedef GoInt64 GoInt;
51+
typedef GoUint64 GoUint;
52+
typedef size_t GoUintptr;
53+
typedef float GoFloat32;
54+
typedef double GoFloat64;
55+
#ifdef _MSC_VER
56+
#include <complex.h>
57+
typedef _Fcomplex GoComplex64;
58+
typedef _Dcomplex GoComplex128;
59+
#else
60+
typedef float _Complex GoComplex64;
61+
typedef double _Complex GoComplex128;
62+
#endif
63+
64+
/*
65+
static assertion to make sure the file is being used on architecture
66+
at least with matching size of GoInt.
67+
*/
68+
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
69+
70+
#ifndef GO_CGO_GOSTRING_TYPEDEF
71+
typedef _GoString_ GoString;
72+
#endif
73+
typedef void *GoMap;
74+
typedef void *GoChan;
75+
typedef struct { void *t; void *v; } GoInterface;
76+
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
77+
78+
#endif
79+
80+
/* End of boilerplate cgo prologue. */
81+
82+
#ifdef __cplusplus
83+
extern "C" {
84+
#endif
85+
86+
extern void wgSetLogger(GoUintptr context, GoUintptr loggerFn);
87+
extern GoInt32 wgTurnOn(char* settings, GoInt32 tunFd);
88+
extern void wgTurnOff(GoInt32 tunnelHandle);
89+
extern GoInt64 wgSetConfig(GoInt32 tunnelHandle, char* settings);
90+
extern char* wgGetConfig(GoInt32 tunnelHandle);
91+
extern void wgBumpSockets(GoInt32 tunnelHandle);
92+
extern void wgDisableSomeRoamingForBrokenMobileSemantics(GoInt32 tunnelHandle);
93+
extern char* wgVersion();
94+
95+
#ifdef __cplusplus
96+
}
97+
#endif
3.14 MB
Binary file not shown.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/* Code generated by cmd/cgo; DO NOT EDIT. */
2+
3+
/* package golang.zx2c4.com/wireguard/apple */
4+
5+
6+
#line 1 "cgo-builtin-export-prolog"
7+
8+
#include <stddef.h>
9+
10+
#ifndef GO_CGO_EXPORT_PROLOGUE_H
11+
#define GO_CGO_EXPORT_PROLOGUE_H
12+
13+
#ifndef GO_CGO_GOSTRING_TYPEDEF
14+
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
15+
#endif
16+
17+
#endif
18+
19+
/* Start of preamble from import "C" comments. */
20+
21+
22+
#line 8 "api-apple.go"
23+
#include <stdlib.h>
24+
#include <sys/types.h>
25+
static void callLogger(void *func, void *ctx, int level, const char *msg)
26+
{
27+
((void(*)(void *, int, const char *))func)(ctx, level, msg);
28+
}
29+
30+
#line 1 "cgo-generated-wrapper"
31+
32+
33+
/* End of preamble from import "C" comments. */
34+
35+
36+
/* Start of boilerplate cgo prologue. */
37+
#line 1 "cgo-gcc-export-header-prolog"
38+
39+
#ifndef GO_CGO_PROLOGUE_H
40+
#define GO_CGO_PROLOGUE_H
41+
42+
typedef signed char GoInt8;
43+
typedef unsigned char GoUint8;
44+
typedef short GoInt16;
45+
typedef unsigned short GoUint16;
46+
typedef int GoInt32;
47+
typedef unsigned int GoUint32;
48+
typedef long long GoInt64;
49+
typedef unsigned long long GoUint64;
50+
typedef GoInt64 GoInt;
51+
typedef GoUint64 GoUint;
52+
typedef size_t GoUintptr;
53+
typedef float GoFloat32;
54+
typedef double GoFloat64;
55+
#ifdef _MSC_VER
56+
#include <complex.h>
57+
typedef _Fcomplex GoComplex64;
58+
typedef _Dcomplex GoComplex128;
59+
#else
60+
typedef float _Complex GoComplex64;
61+
typedef double _Complex GoComplex128;
62+
#endif
63+
64+
/*
65+
static assertion to make sure the file is being used on architecture
66+
at least with matching size of GoInt.
67+
*/
68+
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
69+
70+
#ifndef GO_CGO_GOSTRING_TYPEDEF
71+
typedef _GoString_ GoString;
72+
#endif
73+
typedef void *GoMap;
74+
typedef void *GoChan;
75+
typedef struct { void *t; void *v; } GoInterface;
76+
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
77+
78+
#endif
79+
80+
/* End of boilerplate cgo prologue. */
81+
82+
#ifdef __cplusplus
83+
extern "C" {
84+
#endif
85+
86+
extern void wgSetLogger(GoUintptr context, GoUintptr loggerFn);
87+
extern GoInt32 wgTurnOn(char* settings, GoInt32 tunFd);
88+
extern void wgTurnOff(GoInt32 tunnelHandle);
89+
extern GoInt64 wgSetConfig(GoInt32 tunnelHandle, char* settings);
90+
extern char* wgGetConfig(GoInt32 tunnelHandle);
91+
extern void wgBumpSockets(GoInt32 tunnelHandle);
92+
extern void wgDisableSomeRoamingForBrokenMobileSemantics(GoInt32 tunnelHandle);
93+
extern char* wgVersion();
94+
95+
#ifdef __cplusplus
96+
}
97+
#endif
Binary file not shown.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/* Code generated by cmd/cgo; DO NOT EDIT. */
2+
3+
/* package golang.zx2c4.com/wireguard/apple */
4+
5+
6+
#line 1 "cgo-builtin-export-prolog"
7+
8+
#include <stddef.h>
9+
10+
#ifndef GO_CGO_EXPORT_PROLOGUE_H
11+
#define GO_CGO_EXPORT_PROLOGUE_H
12+
13+
#ifndef GO_CGO_GOSTRING_TYPEDEF
14+
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
15+
#endif
16+
17+
#endif
18+
19+
/* Start of preamble from import "C" comments. */
20+
21+
22+
#line 8 "api-apple.go"
23+
#include <stdlib.h>
24+
#include <sys/types.h>
25+
static void callLogger(void *func, void *ctx, int level, const char *msg)
26+
{
27+
((void(*)(void *, int, const char *))func)(ctx, level, msg);
28+
}
29+
30+
#line 1 "cgo-generated-wrapper"
31+
32+
33+
/* End of preamble from import "C" comments. */
34+
35+
36+
/* Start of boilerplate cgo prologue. */
37+
#line 1 "cgo-gcc-export-header-prolog"
38+
39+
#ifndef GO_CGO_PROLOGUE_H
40+
#define GO_CGO_PROLOGUE_H
41+
42+
typedef signed char GoInt8;
43+
typedef unsigned char GoUint8;
44+
typedef short GoInt16;
45+
typedef unsigned short GoUint16;
46+
typedef int GoInt32;
47+
typedef unsigned int GoUint32;
48+
typedef long long GoInt64;
49+
typedef unsigned long long GoUint64;
50+
typedef GoInt64 GoInt;
51+
typedef GoUint64 GoUint;
52+
typedef size_t GoUintptr;
53+
typedef float GoFloat32;
54+
typedef double GoFloat64;
55+
#ifdef _MSC_VER
56+
#include <complex.h>
57+
typedef _Fcomplex GoComplex64;
58+
typedef _Dcomplex GoComplex128;
59+
#else
60+
typedef float _Complex GoComplex64;
61+
typedef double _Complex GoComplex128;
62+
#endif
63+
64+
/*
65+
static assertion to make sure the file is being used on architecture
66+
at least with matching size of GoInt.
67+
*/
68+
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
69+
70+
#ifndef GO_CGO_GOSTRING_TYPEDEF
71+
typedef _GoString_ GoString;
72+
#endif
73+
typedef void *GoMap;
74+
typedef void *GoChan;
75+
typedef struct { void *t; void *v; } GoInterface;
76+
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
77+
78+
#endif
79+
80+
/* End of boilerplate cgo prologue. */
81+
82+
#ifdef __cplusplus
83+
extern "C" {
84+
#endif
85+
86+
extern void wgSetLogger(GoUintptr context, GoUintptr loggerFn);
87+
extern GoInt32 wgTurnOn(char* settings, GoInt32 tunFd);
88+
extern void wgTurnOff(GoInt32 tunnelHandle);
89+
extern GoInt64 wgSetConfig(GoInt32 tunnelHandle, char* settings);
90+
extern char* wgGetConfig(GoInt32 tunnelHandle);
91+
extern void wgBumpSockets(GoInt32 tunnelHandle);
92+
extern void wgDisableSomeRoamingForBrokenMobileSemantics(GoInt32 tunnelHandle);
93+
extern char* wgVersion();
94+
95+
#ifdef __cplusplus
96+
}
97+
#endif
5.99 MB
Binary file not shown.

WireGuardKit.podspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = "WireGuardKit"
3-
spec.version = "0.3"
3+
spec.version = "0.4"
44
spec.summary = "WireGuard for iOS and macOS"
55

66
spec.description = <<-DESC
@@ -25,10 +25,6 @@ Pod::Spec.new do |spec|
2525
# Not including the public_header_files will make all headers public.
2626
#
2727

28-
spec.prepare_command = <<-CMD
29-
./build-libwg.sh
30-
CMD
31-
3228
spec.vendored_frameworks = "Frameworks/wg-go.xcframework"
3329
spec.swift_version = "5.7"
3430

0 commit comments

Comments
 (0)