Skip to content

Commit a52f02e

Browse files
committed
update jobs and docs with build script
1 parent a3f6cb4 commit a52f02e

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,14 @@ jobs:
2727
- name: Setup Go
2828
uses: actions/setup-go@v5
2929
with:
30-
go-version: '1.23'
30+
go-version: '1.24'
3131
cache-dependency-path: netbird/go.sum
3232

3333
- name: Install gomobile
34-
run: |
35-
go install golang.org/x/mobile/cmd/gomobile@latest
36-
gomobile init
34+
run: go install golang.org/x/mobile/cmd/gomobile@latest
3735

3836
- name: Build NetBirdSDK xcframework
39-
run: |
40-
cd netbird
41-
gomobile bind \
42-
-target=ios \
43-
-bundleid=io.netbird.framework \
44-
-o ../NetBirdSDK.xcframework \
45-
./client/ios/NetBirdSDK
37+
run: ./build-go-lib.sh ./netbird
4638

4739
- name: Select Xcode
4840
run: sudo xcode-select -s /Applications/Xcode_16.1.app

.github/workflows/test.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,14 @@ jobs:
2727
- name: Setup Go
2828
uses: actions/setup-go@v5
2929
with:
30-
go-version: '1.23'
30+
go-version: '1.24'
3131
cache-dependency-path: netbird/go.sum
3232

3333
- name: Install gomobile
34-
run: |
35-
go install golang.org/x/mobile/cmd/gomobile@latest
36-
gomobile init
34+
run: go install golang.org/x/mobile/cmd/gomobile@latest
3735

3836
- name: Build NetBirdSDK xcframework
39-
run: |
40-
cd netbird
41-
gomobile bind \
42-
-target=ios \
43-
-bundleid=io.netbird.framework \
44-
-o ../NetBirdSDK.xcframework \
45-
./client/ios/NetBirdSDK
37+
run: ./build-go-lib.sh ./netbird
4638

4739
- name: Select Xcode
4840
run: sudo xcode-select -s /Applications/Xcode_16.1.app

README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
</a>
1010
<a href="https://join.slack.com/t/netbirdio/shared_invite/zt-vrahf41g-ik1v7fV8du6t0RwxSrJ96A">
1111
<img src="https://img.shields.io/badge/slack-@netbird-red.svg?logo=slack"/>
12-
</a>
12+
</a>
13+
<a href="https://github.com/netbirdio/ios-client/actions/workflows/build.yml">
14+
<img src="https://github.com/netbirdio/ios-client/actions/workflows/build.yml/badge.svg"/>
15+
</a>
16+
<a href="https://github.com/netbirdio/ios-client/actions/workflows/test.yml">
17+
<img src="https://github.com/netbirdio/ios-client/actions/workflows/test.yml/badge.svg"/>
18+
</a>
1319
</p>
1420
</div>
1521

@@ -55,27 +61,37 @@ The code is divided into 4 parts:
5561
## Requirements
5662

5763
- iOS 14.0+
58-
- Xcode 12.0+
64+
- Xcode 16.0+
65+
- Go 1.23+
5966
- gomobile
6067

6168
## Run locally
6269

6370
To build the app, this repository and the main netbird repository are needed.
6471

65-
```
72+
```bash
6673
git clone https://github.com/netbirdio/netbird.git
6774
git clone https://github.com/netbirdio/ios-client.git
75+
cd ios-client
6876
```
6977

70-
Building the xcframework from the main netbird repo. This needs to be stored in the root directory of the app
78+
Install gomobile if you haven't already:
79+
```bash
80+
go install golang.org/x/mobile/cmd/gomobile@latest
7181
```
72-
cd netbird
73-
gomobile bind -target=ios -bundleid=io.netbird.framework -o ../ios-client/NetBirdSDK.xcframework ./client/ios/NetBirdSDK
82+
83+
Build the xcframework from the main netbird repo using the build script:
84+
```bash
85+
./build-go-lib.sh ../netbird
7486
```
7587

7688
Open the Xcode project, and we are ready to go.
7789

78-
> **Note:** The app can not be run in the iOS simulator. To test the app, a physical device needs to be connected to Xcode via cable and set as the run destination.
90+
> **Note:** The app cannot be run in the iOS simulator. To test the app, a physical device needs to be connected to Xcode via cable and set as the run destination.
91+
92+
### Firebase Configuration (Optional)
93+
94+
The app supports Firebase for analytics and crash reporting. To enable it, add your `GoogleService-Info.plist` file to the project root. The app will work without Firebase configuration.
7995

8096
## Other project repositories
8197

0 commit comments

Comments
 (0)