Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ SENTRY_DSN=<your sentry dsn> npm run action client/src/cordova/setup macos -- --

Each platform is handled differently:

1. [Developing for Apple **(MacOS and iOS)**](src/cordova/apple)
1. [Developing for Apple **(MacOS and iOS)**](apple)
2. [Developing for **Android**](src/cordova/android)
3. [Developing for Electron **(Windows and Linux)**](electron)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/* Begin PBXFileReference section */
522987032C4F273E009EE577 /* PacketTunnelProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PacketTunnelProvider.h; sourceTree = "<group>"; };
522987042C4F273E009EE577 /* PacketTunnelProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PacketTunnelProvider.m; sourceTree = "<group>"; };
5229870D2C4F2873009EE577 /* Tun2socks.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Tun2socks.xcframework; path = ../../../../../output/client/apple/Tun2socks.xcframework; sourceTree = "<group>"; };
5229870D2C4F2873009EE577 /* Tun2socks.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Tun2socks.xcframework; path = ../../../output/client/apple/Tun2socks.xcframework; sourceTree = "<group>"; };
522E63D82C751A390010C3FA /* VpnExtension-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VpnExtension-Bridging-Header.h"; sourceTree = "<group>"; };
522E63D92C751A3A0010C3FA /* PacketTunnelProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PacketTunnelProvider.swift; sourceTree = "<group>"; };
522E63ED2C768BA30010C3FA /* VpnExtensionTest.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VpnExtensionTest.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ The XCode project is assembled by Cordova. To initialize and open the **iOS** pr

```sh
npm run action client/src/cordova/setup ios
open ./client/src/cordova/apple/client.xcworkspace
open ./client/apple/client.xcworkspace
```

For **macOS**:

```sh
npm run action client/src/cordova/setup macos
open ./client/src/cordova/apple/client.xcworkspace
open ./client/apple/client.xcworkspace
```

> [!NOTE]
Expand Down Expand Up @@ -90,7 +90,7 @@ For the **macOS** client, you can simply select your macOS computer: **Product >

## Development

Most of the Apple-specific development can happen directly on XCode. However, if you edit files in the generated `platforms/ios`, you will need to copy your changes to the appropriate version-controlled location at [`src/cordova/apple/xcode`](./xcode) or [`src/cordova/plugin/apple`](../plugin/apple).
Most of the Apple-specific development can happen directly on XCode. However, if you edit files in the generated `platforms/ios`, you will need to copy your changes to the appropriate version-controlled location at [`xcode`](./xcode) or [`../src/cordova/plugin/apple`](../src/cordova/plugin/apple).

Changes to the [OutlineAppleLib](./OutlineAppleLib) package don't need to be copied, since the package is linked by the XCode workspace and the changes happen in the original location.

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import path from 'path';

import I18N from 'i18n-strings-files';

const STRINGS_DIR = ['client', 'src', 'cordova', 'apple', 'xcode', 'Outline', 'Classes', 'AppKitBridge', 'Resources', 'Strings'];
const STRINGS_DIR = ['client', 'apple', 'xcode', 'Outline', 'Classes', 'AppKitBridge', 'Resources', 'Strings'];
const STRINGS_FILENAME = 'Localizable.strings';

function getNativeLocale(locale) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
3047A5111AB8059700498E2A /* build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = build.xcconfig; path = cordova/build.xcconfig; sourceTree = SOURCE_ROOT; };
32CA4F630368D1EE00C91783 /* Outline-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Outline-Prefix.pch"; sourceTree = "<group>"; };
3B0347431F212E6500C8EF1F /* Outline.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Outline.entitlements; path = Outline/Outline.entitlements; sourceTree = "<group>"; };
5260B0572C4F09FB00CDF289 /* OutlineLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OutlineLib.xcodeproj; path = ../../src/cordova/apple/OutlineLib/OutlineLib.xcodeproj; sourceTree = "<group>"; };
5260B0572C4F09FB00CDF289 /* OutlineLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OutlineLib.xcodeproj; path = ../../apple/OutlineLib/OutlineLib.xcodeproj; sourceTree = "<group>"; };
65A9AC9B2BEC091700C5899F /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = CDVLaunchScreen.storyboard; path = Outline/CDVLaunchScreen.storyboard; sourceTree = SOURCE_ROOT; };
8D1107310486CEB800E47090 /* Outline-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Outline-Info.plist"; path = "Outline/Outline-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -227,7 +227,7 @@
EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = "<group>"; };
EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = "<group>"; };
ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = "<group>"; };
F63DC2162970AFE600D92E0A /* OutlineAppleLib */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OutlineAppleLib; path = ../../src/cordova/apple/OutlineAppleLib; sourceTree = "<group>"; };
F63DC2162970AFE600D92E0A /* OutlineAppleLib */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OutlineAppleLib; path = ../../apple/OutlineAppleLib; sourceTree = "<group>"; };
F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = Outline/config.xml; sourceTree = "<group>"; };
FC8C310A1FAA814A004262BE /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
Expand Down
9 changes: 1 addition & 8 deletions client/src/cordova/build.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,7 @@ function getXcodeBuildArgs(platform) {
}
return [
'-workspace',
path.join(
getRootDir(),
'client',
'src',
'cordova',
'apple',
workspaceFilename
),
path.join(getRootDir(), 'client', 'apple', workspaceFilename),
'-scheme',
'Outline',
'-destination',
Expand Down
2 changes: 1 addition & 1 deletion client/src/cordova/dev.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export async function main(...givenParameters) {
'-scheme',
'Outline',
'-workspace',
path.join(getRootDir(), 'client/src/cordova/apple/client.xcworkspace'),
path.join(getRootDir(), 'client/apple/client.xcworkspace'),
`SYMROOT=${path.join(getRootDir(), OUTPUT_PATH)}`
);

Expand Down
2 changes: 1 addition & 1 deletion client/src/cordova/plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Native platforms consume [outline-go-tun2socks](https://github.com/Jigsaw-Code/o

We use [Swift Packages](https://developer.apple.com/documentation/xcode/swift-packages) for third party dependencies: sentry-cocoa and CocoaLumberjack.

To upgrade the Swift Package dependencies, update the `version` field for the corresponding package under the `XCRemoteSwiftPackageReference` section in the [Outline.pbxproj](https://github.com/Jigsaw-Code/outline-apps/blob/master/client/src/cordova/apple/xcode/Outline.xcodeproj/project.pbxproj) file.
To upgrade the Swift Package dependencies, update the `version` field for the corresponding package under the `XCRemoteSwiftPackageReference` section in the [Outline.pbxproj](https://github.com/Jigsaw-Code/outline-apps/blob/master/client/apple/xcode/Outline.xcodeproj/project.pbxproj) file.

Alternatively, open the xcworkspace file for the curresponding OS, and update the packages via the XCode UI.
14 changes: 2 additions & 12 deletions client/src/cordova/setup.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,7 @@ async function appleDebug(verbose) {
});

// TODO(daniellacosse): move this to a cordova hook
await spawnStream(
'rsync',
'-avc',
'src/cordova/apple/xcode/',
'platforms/ios/'
);
await spawnStream('rsync', '-avc', 'apple/xcode/', 'platforms/ios/');
}

async function setAppleVersion(platform, versionName, buildNumber) {
Expand Down Expand Up @@ -184,12 +179,7 @@ async function appleRelease(version, buildNumber, verbose) {
});

// TODO(daniellacosse): move this to a cordova hook
await spawnStream(
'rsync',
'-avc',
'src/cordova/apple/xcode/',
'platforms/ios/'
);
await spawnStream('rsync', '-avc', 'apple/xcode/', 'platforms/ios/');

await setAppleVersion('ios', version, buildNumber);
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/cordova/test.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {spawnStream} from '@outline/infrastructure/build/spawn_stream.mjs';
import minimist from 'minimist';
import rmfr from 'rmfr';

const APPLE_ROOT = path.join(getRootDir(), 'client', 'src', 'cordova', 'apple');
const APPLE_ROOT = path.join(getRootDir(), 'client', 'apple');

const SUPPORTED_PLATFORMS = new Set(['ios', 'macos']);

Expand Down
2 changes: 1 addition & 1 deletion client/src/www/model/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class VpnStartFailure extends RedFlagNativeError {}

// This must be kept in sync with:
// - cordova-plugin-outline/apple/src/OutlineVpn.swift#ErrorCode
// - cordova/apple/OutlineAppleLib/Sources/OutlineTunnelSources/PacketTunnelProvider.h#NS_ENUM
// - apple/OutlineAppleLib/Sources/OutlineTunnelSources/PacketTunnelProvider.h#NS_ENUM
// - cordova-plugin-outline/android/java/org/outline/OutlinePlugin.java#ErrorCode
//
// TODO: Is it safe to re-use values here, i.e. is native node rebuilt in step with the TypeScript?
Expand Down
Loading