Varied document editing modes across platforms

Our app uses ownCloud Infinite Scale in a webview on both Android and iOS platforms. When integrated with ONLYOFFICE Docs community edition through WOPI, we encountered different behaviors regarding document editing.
On web, android users can edit documents within ONLYOFFICE. However, iOS users get a warning message indicating that the free Community version supports only viewing mode.
Nonetheless, editing documents is allowed on the mobile version of the app for both Android and iOS. We are looking for a way to set the default mode to viewing mode on mobile devices, ensuring consistency across platforms.

Hello @inakamono

Please provide version and installation type (Docker, DEB/RPM, exe) of Document Server and version of ownCloud.

Please specify how did you integrate it precisely for better understanding.

Hey @Constantine, I really appreciate your response. Currently, we have installed the binary version of ONLYOFFICE Docs Community Edition, ownCloud Infinite Scale v2.0.0, and WOPI v10.0.0sciencemesh on Debian 11. We have integrated ONLYOFFICE with oCIS using WOPI, and this integration was achieved by configuring oCIS through environment variables.

GATEWAY_GRPC_ADDR=127.0.0.1:9142
REVA_GATEWAY=127.0.0.1:9142
APP_PROVIDER_GRPC_ADDR=0.0.0.0:9164
APP_PROVIDER_EXTERNAL_ADDR=0.0.0.0:9164
APP_PROVIDER_DRIVER=wopi
APP_PROVIDER_WOPI_FOLDER_URL_BASE_URL=https://local.cloud.test
APP_PROVIDER_WOPI_WOPI_SERVER_EXTERNAL_URL=https://local.wopi.cloud.test
APP_PROVIDER_WOPI_INSECURE=false
APP_PROVIDER_WOPI_WOPI_SERVER_IOP_SECRET=secret
APP_PROVIDER_WOPI_APP_NAME=OnlyOffice
APP_PROVIDER_WOPI_APP_URL=https://local.office.cloud.test
APP_PROVIDER_WOPI_APP_ICON_URI=https://local.office.cloud.test/web-apps/apps/documenteditor/main/resources/img/favicon.ico

and also adding the following app-registry.yaml file to oCIS config.

app_registry:
  mimetypes:
    - mime_type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
      extension: docx
      name: Microsoft Word
      description: Microsoft Word document
      icon: ""
      default_app: OnlyOffice
      allow_creation: true
    - mime_type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
      extension: xlsx
      name: Microsoft Excel
      description: Microsoft Excel document
      icon: ""
      default_app: OnlyOffice
      allow_creation: true
    - mime_type: application/vnd.openxmlformats-officedocument.presentationml.presentation
      extension: pptx
      name: Microsoft PowerPoint
      description: Microsoft PowerPoint document
      icon: ""
      default_app: OnlyOffice
      allow_creation: true
    - mime_type: application/vnd.oasis.opendocument.text
      extension: odt
      name: OpenDocument
      description: OpenDocument text document
      icon: ""
      default_app: OnlyOffice
      allow_creation: true
    - mime_type: application/vnd.oasis.opendocument.spreadsheet
      extension: ods
      name: OpenSpreadsheet
      description: OpenDocument spreadsheet document
      icon: ""
      default_app: OnlyOffice
      allow_creation: true
    - mime_type: application/vnd.oasis.opendocument.presentation
      extension: odp
      name: OpenPresentation
      description: OpenDocument presentation document
      icon: ""
      default_app: OnlyOffice
      allow_creation: true

Hello, @Constantine! I’ve found a solution to address the issue by making a few changes in the api.js file within the web-apps project. Currently, the code only verifies if the browser is Safari on mobile devices. I’ve modified the regular expression to cover various mobile browsers. Before submitting a pull request on GitHub, I wanted to ask whether you classify tablets as mobile devices and whether tablet users should still receive the warning message when using ONLYOFFICE Docs Community Edition.

Thank you for the information. I’m glad to found the solution.

I’d ask you to elaborate on this a little:

I want to make little clarification: in Community Edition of Document Server mobile editors are not available thus you are getting a warning about view-only mode when accessing editors via browser on mobile device. Is your goal to make editors to run in this ‘view-only’ mode or you wish to run them in ‘desktop’ mode like on the screenshot? Could you please provide screenshot of the view opened in the web on Android device?

As for the tablets:

Yes, tablets are also considered as mobile devices. You can also find this in the description of type parameter of initialization config:
https://api.onlyoffice.com/editors/config/#type