Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the mullvad API ffi, consume the header after building it #5816

Merged
merged 1 commit into from
Feb 15, 2024
Merged
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
7 changes: 3 additions & 4 deletions ios/MullvadVPN.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@
850201DB2B503D7700EF8C96 /* RelayTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 850201DA2B503D7700EF8C96 /* RelayTests.swift */; };
850201DD2B503D8C00EF8C96 /* SelectLocationPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 850201DC2B503D8C00EF8C96 /* SelectLocationPage.swift */; };
850201DF2B5040A500EF8C96 /* TunnelControlPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 850201DE2B5040A500EF8C96 /* TunnelControlPage.swift */; };
850201E32B51A93C00EF8C96 /* SettingsPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 850201E22B51A93C00EF8C96 /* SettingsPage.swift */; };
852969282B4D9C1F007EAD4C /* AccountTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 852969272B4D9C1F007EAD4C /* AccountTests.swift */; };
852969332B4E9232007EAD4C /* Page.swift in Sources */ = {isa = PBXBuildFile; fileRef = 852969322B4E9232007EAD4C /* Page.swift */; };
852969352B4E9270007EAD4C /* LoginPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 852969342B4E9270007EAD4C /* LoginPage.swift */; };
Expand Down Expand Up @@ -659,6 +658,7 @@
A99E5EE02B7628150033F241 /* ProblemReportViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A99E5EDF2B7628150033F241 /* ProblemReportViewModel.swift */; };
A99E5EE22B762ED30033F241 /* ProblemReportViewController+ViewManagement.swift in Sources */ = {isa = PBXBuildFile; fileRef = A99E5EE12B762ED30033F241 /* ProblemReportViewController+ViewManagement.swift */; };
A9A1DE792AD5708E0073F689 /* TransportStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A1DE782AD5708E0073F689 /* TransportStrategy.swift */; };
A9A557F32B7E19B10017ADA8 /* SettingsPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 850201E22B51A93C00EF8C96 /* SettingsPage.swift */; };
A9A5F9E12ACB05160083449F /* AddressCacheTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06AC114028F841390037AF9A /* AddressCacheTracker.swift */; };
A9A5F9E22ACB05160083449F /* BackgroundTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58C76A0A2A338E4300100D75 /* BackgroundTask.swift */; };
A9A5F9E32ACB05160083449F /* AccountDataThrottling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 587988C628A2A01F00E3DF54 /* AccountDataThrottling.swift */; };
Expand Down Expand Up @@ -4142,8 +4142,8 @@
isa = PBXNativeTarget;
buildConfigurationList = 8529692F2B4D9C1F007EAD4C /* Build configuration list for PBXNativeTarget "MullvadVPNUITests" */;
buildPhases = (
01EF6F2C2B6A517900125696 /* Headers */,
01EF6F2B2B6A512C00125696 /* ShellScript */,
01EF6F2C2B6A517900125696 /* Headers */,
852969212B4D9C1F007EAD4C /* Sources */,
852969222B4D9C1F007EAD4C /* Frameworks */,
852969232B4D9C1F007EAD4C /* Resources */,
Expand Down Expand Up @@ -5390,9 +5390,7 @@
8590896F2B61763B003AF5F5 /* LoggedOutUITestCase.swift in Sources */,
85557B202B5FBBD700795FE1 /* AccountPage.swift in Sources */,
852969352B4E9270007EAD4C /* LoginPage.swift in Sources */,
850201E32B51A93C00EF8C96 /* SettingsPage.swift in Sources */,
85557B102B59215F00795FE1 /* FirewallRule.swift in Sources */,
850201E32B51A93C00EF8C96 /* SettingsPage.swift in Sources */,
85557B0E2B591B2600795FE1 /* FirewallAPIClient.swift in Sources */,
852969282B4D9C1F007EAD4C /* AccountTests.swift in Sources */,
01EF6F2A2B6A473900125696 /* MullvadApi.swift in Sources */,
Expand All @@ -5403,6 +5401,7 @@
85557B1E2B5FB8C700795FE1 /* HeaderBar.swift in Sources */,
85557B122B594FC900795FE1 /* ConnectivityTests.swift in Sources */,
852969332B4E9232007EAD4C /* Page.swift in Sources */,
A9A557F32B7E19B10017ADA8 /* SettingsPage.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
4 changes: 0 additions & 4 deletions ios/MullvadVPNUITests/MullvadApi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ class MullvadApi {
}

func createAccount() throws -> String {
guard let data = NSMutableData(length: 128) else {
throw InitMutableBufferError()
}

var newAccountPtr: UnsafePointer<CChar>?
let result = mullvad_api_create_account(
clientContext,
Expand Down
6 changes: 2 additions & 4 deletions mullvad-api/src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,8 @@ impl FfiClient {
}

fn rest_handle(&self) -> MullvadRestHandle {
self.tokio_runtime.block_on(
self.api_runtime
.static_mullvad_rest_handle(self.api_hostname.clone()),
)
self.api_runtime
.static_mullvad_rest_handle(self.api_hostname.clone())
}

fn device_proxy(&self) -> DevicesProxy {
Expand Down
Loading