fix: use API v0 on iOS (#2858) [skip e2e]

This commit is contained in:
Mo
2024-03-07 09:17:57 -06:00
committed by moughxyz
parent b28b59e4a0
commit 3b2f761661
9 changed files with 31 additions and 14 deletions

View File

@@ -23,6 +23,7 @@ import {
SNNote,
DesktopManagerInterface,
FileItem,
ApiVersion,
} from '@standardnotes/snjs'
import { action, computed, makeObservable, observable } from 'mobx'
import { startAuthentication, startRegistration } from '@simplewebauthn/browser'
@@ -112,6 +113,8 @@ export class WebApplication extends SNApplication implements WebApplicationInter
defaultHost: defaultSyncServerHost,
appVersion: deviceInterface.appVersion,
webSocketUrl: webSocketUrl,
/** iOS file:// based origin does not work with production cookies */
apiVersion: platform === Platform.Ios ? ApiVersion.v0 : ApiVersion.v1,
loadBatchSize:
deviceInterface.environment === Environment.Mobile ? 250 : ApplicationOptionsDefaults.loadBatchSize,
sleepBetweenBatches: