apollographql / xcode-graphql Goto Github PK
View Code? Open in Web Editor NEW🛠 Xcode add-ons that add syntax highlighting for GraphQL query document files
License: MIT License
🛠 Xcode add-ons that add syntax highlighting for GraphQL query document files
License: MIT License
I've been trying to work with the Getting Started documentation here... https://www.apollographql.com/docs/ios/get-started
But I'm struggling to work out what I need to do. I don't have any experience with setting up any GraphQL API and I feel like the docs assume quite a bit of knowledge. Either that or there are possibly missing a few steps?
I don't yet have a schema for the project we're working on. I'm just involved in the initial exploration of the Apollo SDK in the project and so I decided to use the StarWars schema mentioned here... https://www.apollographql.com/docs/ios/code-generation/downloading-schema
It mentions using the drop down menu on the right of the Apollo Studio screen to download the JSON
file rather than the raw
file.
But then it drops any mention of using the Star Wars schema. I have a [email protected]
file in my project but I'm not sure what to do with it.
It says to run this line... swift package --allow-writing-to-package-directory apollo-initialize-codegen-config --schema-name ${MySchemaName}
... Should I be using the downloaded star wars file to find the schema name? Is star-wars-swapi
the schema name? Or is the schema name contained inside that file?
I also have an apollo-codegen-config
file. But I'm also not sure what to do with that.
I've added the apollo-ios-cli
to the package and I can right click and see the initialise
, fetch
, generate
options but they don't seem to do anything.
I'm trying to follow the instructions for using a Package.swift
file with SPM rather than doing it through Xcode.
I have a package and target in the SPM package called GraphQL
located at ./Sources/GraphQL
.
I'm stuck right now with trying to get hold of a .graphql
or .graphqls
file. I think I'm supposed to have some of those in the project but I can't find where I am supposed to get them from.
Thanks
Since Apple started code-signing Xcode with Xcode 9, Xcode plugins are no longer supported and it's recommended to use extensions
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. However given x-code extensions seem to be the way forward to support iOS developers individual add-on / plugin needs, we'll consider if it's worthy to create an extension that offers similar functionality to what is available in this x-code plugin.
Steps done:
cd
into repo directory./setup.sh
After restarting Xcode nothing happens. Plugin and spec files exist at required locations: ~/Library/Developer/Xcode/Plug-ins/
and ~/Library/Developer/Xcode/Specifications/
.
Environment:
Need to add the new UUID for Xcode 10.1 but I am not sure where to find the UUID
hello deras
is this plugin is supported on xcode 12 ?
Regards
We'll need to add the UUID for Xcode 10.2 (72F7D751-F810-43B8-A53F-1F1DFD74FC54
).
Not working on Version 11.4.1 (11E503a). I ran sudo ./setup.sh and restarted xcode but not highlighting.
This plugin works with Xcode 11.5 because the UUID for that version is identical to 11.4. If you're having any trouble, please run the installer again. Thank you!
Edit, 7/15: Also with Xcode 11.6, still the same UUID
I had previously installed the syntax highlighting for Xcode 11, but noticed that it stopped working with Xcode 12. I deleted the plugin and specification files and tried the install script again, but it still did not work. I tried both setup.sh
and setup-xcode11.sh
. Neither script seems to work for me.
Here is the output that I get. It seems to be failing on the copy statement, which seems odd to me.
sudo xcode-graphql/setup.sh
+ plugins_dir=/Users/ddavis/Library/Developer/Xcode/Plug-ins/
+ '[' '!' -d /Users/ddavis/Library/Developer/Xcode/Plug-ins/ ']'
+ cp -r GraphQL.ideplugin /Users/ddavis/Library/Developer/Xcode/Plug-ins/
cp: GraphQL.ideplugin: No such file or directory
+ spec_dir=/Users/ddavis/Library/Developer/Xcode/Specifications
+ '[' '!' -d /Users/ddavis/Library/Developer/Xcode/Specifications ']'
+ echo '🎉 Apollo Xcode Add-ons installation has completed! Please restart Xcode and click "Load bundle" when an alert shows about GraphQL.ideplugin.'
If I run these commands directly in the terminal then the copy works.
sudo cp -r ~/Desktop/xcode-graphql/GraphQL.ideplugin ~/Library/Developer/Xcode/Plug-ins/
sudo cp ~/Desktop/xcode-graphql/GraphQL.xclangspec ~/Library/Developer/Xcode/Specifications/
installed GraphQL.ideplugin in Xcode11, can't get highlight now
Currently the plugin doesn't work for Xcode 11
Currently the plugin doesn't work for Xcode 11.1
seems like plugin doesn't work with last Xcode version
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
Renovate has not found any CVEs on osv.dev.
.circleci/config.yml
secops 2.0.7
Result
Workaround:
leaving the language spec but removing the plug-in and XCode starts normally.
Version 13.3 (13E113)
macOS 12.3 M1
Looks like the integration is broken for the latest Xcode. Historically it seems adding the UUID fixes the issue.
I try:
Not work for me
Neither of the two folders listed in the readme, are created by default for Xcode 8.3.3 installations. Should they be manually created, or is a different location necessary now?
~/Library/Developer/Xcode/Plug-ins
~/Library/Developer/Xcode/Specifications
Edit: I did go ahead and create the folders, and highlighting seems to be working now. I might recommend updating the readme to be more clear that those folders might need to be created.
After update to 9.3 plugin appears to be turned off. I tried to reinstall it, without success.
Looks like the plugin is not working for this particular version. Loaded bundle after ./setup.sh
but still no highlighting.
Our product is created on XCode base 3.2, Recently moved on to XCode 11.6 with New build system.
Initially we were getting some issue with pods and carthage while importing Apollo framework but We have implemented Apollo framework successfully by Swift package manager.
Now we are moving to XCode 12 and getting error on simulator "Could not find module ‘Apollo’ for target ‘arm64-apple-ios-simulator’; found: x86_64-apple-ios-simulator, x86_64".
It is successfully compiling for iOS Device and Build... Only issue with running on simulator.
Possible solution tried till now -
1)Adding arm64 in excluded architecture...errors are coming added screenshot.
2)Add valid architecture in build settings - from arm64 arm64e to arm64 arm64e x86_64 .... getting more errors.
It would be good if we can get some solution soon.
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.