Coder Social home page Coder Social logo

matvdg / xcode-graphql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apollographql/xcode-graphql

0.0 1.0 0.0 28 KB

๐Ÿ›  Xcode add-ons that add syntax highlighting for GraphQL query document files

License: MIT License

Shell 100.00%

xcode-graphql's Introduction

Apollo Xcode Add-ons

These add-ons add syntax highlighting for GraphQL query document files to Xcode.

Wait, aren't Xcode plugins dead?

Since Apple started code-signing Xcode with Xcode 9, Xcode plugins are indeed mostly dead.

However, there are a few small, limited purposes for which they still work, including recognizing particular file types as tied to particular languages, which is what this plugin allows Xcode to do.

Installation

NOTE: This requires some mucking around with files provided directly by Xcode due to some changes to undocumented APIs for adding syntax highlighting in Xcode 11. Apple friends, please see FB7321565 for further details.

This all works as Xcode of 11.3, but be aware that it's a bit more fragile than we'd like it to be. Please file an issue on this repo if it stops working in a new version and we'll investigate.

Setup script

If you're running Xcode 11 or higher, the fastest way to install is to cd into the directory where this repo has been checked out or downloaded, and run the following command in your terminal:

sudo ./setup.sh

Particularly if you are running Catalina, you will need to use sudo in order to make this work due to changes in the permissions model.

Once the setup script has finished, restart Xcode and click the "Load bundle" button on the permissions dialog that appears in Xcode when it restarts.

Manual installation

Due to the aforementioned changes in APIs, manual installation works slightly differently for Xcode 11 and up vs. 10 and lower.

Note: On Catalina you may need to sudo to get these commands to work.

Xcode 11 and Higher

  • Copy the GraphQL.ideplugin directory to ~/Library/Developer/Xcode/Plug-ins/:

     cp -r GraphQL.ideplugin ~/Library/Developer/Xcode/Plug-ins/
    
  • Copy the GraphQL.xclangspec file to /Applications/Xcode.app/Contents/SharedFrameworks/SourceModel.framework/Versions/A/Resources/LanguageSpecifications:

     cp GraphQL.xclangspec /Applications/Xcode.app/Contents/SharedFrameworks/SourceModel.framework/Versions/A/Resources/LanguageSpecifications
    
  • Copy the Xcode.SourceCodeLanguage.GraphQL.plist file to /Applications/Xcode.app/Contents/SharedFrameworks/SourceModel.framework/Versions/A/Resources/LanguageMetadata:

cp Xcode.SourceCodeLanguage.GraphQL.plist /Applications/Xcode.app/Contents/SharedFrameworks/SourceModel.framework/Versions/A/Resources/LanguageMetadata

Versions of Xcode prior to 11

Please note that if you are running Xcode 8 the Plug-ins and Specifications directories might not exist.

  • Copy the GraphQL.ideplugin directory to ~/Library/Developer/Xcode/Plug-ins/:

     cp -r GraphQL.ideplugin ~/Library/Developer/Xcode/Plug-ins/
    
  • Copy the GraphQL.xclangspec file to ~/Library/Developer/Xcode/Specifications:

     cp GraphQL.xclangspec ~/Library/Developer/Xcode/Specifications/
    

xcode-graphql's People

Contributors

adysart avatar anhar avatar croberts22 avatar daisyramos317 avatar designatednerd avatar kdawgwilk avatar martijnwalraven avatar michaelnisi avatar noahemmet avatar nrivard avatar thexande avatar valpertui avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.