Skip to content

Add Xcode Button in UI

Xcode is building an integration to GitLab, that will offer parity with their existing GitHub integration. We hope to that in a future stage we can collaborate on a more comprehensive integration.

Proposal

Add a button that uses the Xcode URL schema to clone the project in Xcode.

The format of the URL scheme is as follows:

xcode://clone?repo=URLEncodedRepositoryURL => Example: xcode://clone?repo=https%3A%2F%gitlab.com%2Fexample%2Ffoo

The logic used for displaying the button should be:

  1. Does the repository they are viewing contain a “.xcodeproj” or “.xcworkspace” file at the top-level
  2. Does the browser user agent report the operating system as MacOS

Design

  • Xcode button should only be visible where the current clone action is
  • Do not show on mobile
  • Button copy Open in Xcode

image

Links / references

Edited by James Ramsay (ex-GitLab)