mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
chore: Clean up Xcode config (#10461)
- declary sentry as FirezoneKit dependency - add config for non-Xcode LSP config - add some more info in README
This commit is contained in:
committed by
GitHub
parent
f07d2932dc
commit
4d2b592d65
@@ -271,7 +271,6 @@
|
||||
name = FirezoneNetworkExtensioniOS;
|
||||
packageProductDependencies = (
|
||||
794C38142970A2660029F38F /* FirezoneKit */,
|
||||
8D4087D42D24653B005B2BAF /* Sentry */,
|
||||
);
|
||||
productName = FirezoneNetworkExtensioniOS;
|
||||
productReference = 05CF1CF0290B1CEE00CF4755 /* dev.firezone.firezone.network-extension.appex */;
|
||||
@@ -293,7 +292,6 @@
|
||||
name = FirezoneNetworkExtensionmacOS;
|
||||
packageProductDependencies = (
|
||||
8D5047F72CE6AA22009802E9 /* FirezoneKit */,
|
||||
8D4087D82D246541005B2BAF /* Sentry */,
|
||||
);
|
||||
productName = FirezoneNetworkExtensionStandalonemacOS;
|
||||
productReference = 8D5047E32CE6A8F4009802E9 /* dev.firezone.firezone.network-extension.systemextension */;
|
||||
@@ -320,7 +318,6 @@
|
||||
name = Firezone;
|
||||
packageProductDependencies = (
|
||||
79756C6529704A7A0018E2D5 /* FirezoneKit */,
|
||||
8D4087DC2D246651005B2BAF /* Sentry */,
|
||||
);
|
||||
productName = Firezone;
|
||||
productReference = 8DCC021928D512AC007E12D2 /* Firezone.app */;
|
||||
@@ -359,7 +356,6 @@
|
||||
);
|
||||
mainGroup = 8DCC021028D512AC007E12D2;
|
||||
packageReferences = (
|
||||
8D4087C72D2464D6005B2BAF /* XCRemoteSwiftPackageReference "sentry-cocoa" */,
|
||||
);
|
||||
productRefGroup = 8DCC021A28D512AC007E12D2 /* Products */;
|
||||
projectDirPath = "";
|
||||
@@ -968,16 +964,6 @@
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
8D4087C72D2464D6005B2BAF /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/getsentry/sentry-cocoa";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 8.42.1;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
794C38142970A2660029F38F /* FirezoneKit */ = {
|
||||
@@ -988,21 +974,6 @@
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = FirezoneKit;
|
||||
};
|
||||
8D4087D42D24653B005B2BAF /* Sentry */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 8D4087C72D2464D6005B2BAF /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
|
||||
productName = Sentry;
|
||||
};
|
||||
8D4087D82D246541005B2BAF /* Sentry */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 8D4087C72D2464D6005B2BAF /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
|
||||
productName = Sentry;
|
||||
};
|
||||
8D4087DC2D246651005B2BAF /* Sentry */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 8D4087C72D2464D6005B2BAF /* XCRemoteSwiftPackageReference "sentry-cocoa" */;
|
||||
productName = Sentry;
|
||||
};
|
||||
8D5047F72CE6AA22009802E9 /* FirezoneKit */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = FirezoneKit;
|
||||
|
||||
@@ -12,7 +12,7 @@ let package = Package(
|
||||
.library(name: "FirezoneKit", targets: ["FirezoneKit"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.55.0")
|
||||
.package(url: "https://github.com/getsentry/sentry-cocoa", exact: "8.49.0")
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
|
||||
@@ -9,9 +9,13 @@ export MACOSX_DEPLOYMENT_TARGET=12.4
|
||||
|
||||
build-macos:
|
||||
echo "Building debug build for ${PLATFORM}, ${ARCH}"
|
||||
cd ../../rust/apple-client-ffi && rm -rf ./Connlib.xcframework && ./build-rust.sh && ./build-xcframework-dev.sh
|
||||
@xcodebuild build -scheme Firezone -sdk macosx -destination 'platform=${PLATFORM},arch=${ARCH}'
|
||||
|
||||
# Info for sourcekit-lsp (LSP server for other IDEs)
|
||||
lsp:
|
||||
@xcode-build-server config \
|
||||
-project Firezone.xcodeproj \
|
||||
-scheme Firezone
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
|
||||
@@ -48,6 +48,10 @@ and configurations without risking your main machine.
|
||||
|
||||
1. Build and run the `Firezone` target.
|
||||
|
||||
`Firezone` target will orchestrate building `connlib` with Rust as an Xcode
|
||||
build phase. Xcode build can be triggered both from Xcode UI or via the
|
||||
`Makefile`.
|
||||
|
||||
**Note**: To test the iOS app, you'll need a physical iOS device such as an
|
||||
iPhone or iPad. Network Extensions can't be debugged in the iOS simulator.
|
||||
|
||||
@@ -89,6 +93,52 @@ iPhone or iPad. Network Extensions can't be debugged in the iOS simulator.
|
||||
scripts/build/macos-standalone.sh
|
||||
```
|
||||
|
||||
## Developing
|
||||
|
||||
### IDE
|
||||
|
||||
The most obvious and encouraged IDE choice for Firezone macOS/iOS development is
|
||||
Xcode. It is required for:
|
||||
|
||||
- configuring code signing / provisioning
|
||||
- performing any project-related changes (editing Xcode project manually can
|
||||
break it)
|
||||
- debugging
|
||||
- analyzing the app in [Instruments](#instruments)
|
||||
|
||||
Note: Although Swift and sourcekit-lsp are technically cross-platform, this
|
||||
method still relies on Xcode to build the project. However, if you prefer to use
|
||||
another IDE for code editing, you can use any LSP-compatible editor (such as
|
||||
Neovim, VSCode, Zed, Emacs etc) with `sourcekit-lsp` support.
|
||||
|
||||
In order to configure your IDE follow these steps:
|
||||
|
||||
```sh
|
||||
brew install xcode-build-server
|
||||
make lsp
|
||||
make build
|
||||
```
|
||||
|
||||
Note: Although Swift and sourcekit-lsp are technically cross-platform, this
|
||||
method still relies on Xcode to build the project.
|
||||
|
||||
### Instruments
|
||||
|
||||
`Instruments` is a powerful performance analyzer and visualizer application
|
||||
developed by Apple, integrated in Xcode. It helps developers profile, debug, and
|
||||
optimize their applications by tracking various metrics such as CPU activity,
|
||||
memory allocation, file and network usage, graphics rendering, and energy
|
||||
consumption. Instruments uses a timeline view to show events in apps like CPU
|
||||
usage spikes, memory leaks, and UI responsiveness issues.
|
||||
|
||||
#### What to look for in Instruments
|
||||
|
||||
##### network extension memory usage
|
||||
|
||||
iOS has a 50 MB hard cap on memory usage in the network extension. Whenever we
|
||||
make changes to our threading model it's a good idea to double-check we don't go
|
||||
over there.
|
||||
|
||||
## Debugging
|
||||
|
||||
[This Network Extension debugging guide](https://developer.apple.com/forums/thread/725805)
|
||||
|
||||
Reference in New Issue
Block a user