You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,18 @@
1
1
# Change log
2
2
3
+
### v0.11.0
4
+
5
+
-**BREAKING**: Updated Podspec to preserve paths rather than embedding scripts in the framework. Updated instructions for embedding with CocoaPods. ([#575](https://github.com/apollographql/apollo-ios/pull/575), [#610](https://github.com/apollographql/apollo-ios/pull/610))
6
+
-**NEW**: At long last, the ability to update headers on preflight requests, the ability to peer into what came to the `URLSession` and the ability to determine if an operation should be retried. ([#602](https://github.com/apollographql/apollo-ios/pull/602))
7
+
-**NEW**: Added `.fetchIgnoringCacheCompletely` caching option, which can result in significantly faster performance if you don't need the caching. ([#551](https://github.com/apollographql/apollo-ios/pull/551))
8
+
-**NEW**: Added support for using `GET` for queries. ([#572](https://github.com/apollographql/apollo-ios/pull/572), [#599](https://github.com/apollographql/apollo-ios/pull/599), [#602](https://github.com/apollographql/apollo-ios/pull/602))
9
+
- Updated lib and dependencies to use Swift 5, and say so in the Podfile. ([#522](https://github.com/apollographql/apollo-ios/pull/522), [#528](https://github.com/apollographql/apollo-ios/pull/528), [#561](https://github.com/apollographql/apollo-ios/pull/561), [#592](https://github.com/apollographql/apollo-ios/pull/592))
10
+
- Exposed a method to ping a WebSocket server to keep it alive. ([#422](https://github.com/apollographql/apollo-ios/pull/422))
11
+
- Handling is always done on a handler queue. ([#539](https://github.com/apollographql/apollo-ios/pull/539))
12
+
- Added documentation on the `read` and `update` operations for watching queries. ([#452](https://github.com/apollographql/apollo-ios/pull/452))
13
+
- Updated build scripts for non-CocoaPods installations to account for spaces in project names or folders. ([#610](https://github.com/apollographql/apollo-ios/pull/610))
14
+
- Fixed a code generation fail if you're using MacPorts instead of Homebrew to install `npm`. ([#591](https://github.com/apollographql/apollo-ios/pull/591))
15
+
3
16
### v0.10.1
4
17
5
18
- Disabled bitcode in Debug builds for physical devices ([#499](https://github.com/apollographql/apollo-ios/pull/499))
Copy file name to clipboardExpand all lines: docs/source/installation.md
+51-24Lines changed: 51 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,8 @@ Apollo iOS requires the latest Xcode, which can be installed from the [Mac App S
7
7
Follow along with these steps (described in detail below) to use Apollo iOS in your app:
8
8
9
9
1. Install the Apollo framework into your project and link it to your application target
10
-
1. Add a code generation build step to your target
11
10
1. Add a schema file to your target directory
11
+
1. Add a code generation build step to your target
12
12
1. Build your target
13
13
1. Add the generated API file to your target
14
14
1. Install the Xcode add-ons to get syntax highlighting for your `.graphql` files (optional)
@@ -41,7 +41,7 @@ You can install `Apollo.framework` into your project using Carthage, CocoaPods,
41
41
42
42
### CocoaPods
43
43
44
-
1. Because Apollo iOS has been written using Swift 3, it requires CocoaPods 1.1.0. You can install it using:
44
+
1. Because Apollo iOS has been written using Swift 5, you need to use version `1.5.0` or higher. You can install CocoaPods using:
45
45
46
46
```sh
47
47
gem install cocoapods
@@ -57,46 +57,73 @@ You can install `Apollo.framework` into your project using Carthage, CocoaPods,
57
57
58
58
You can also manually clone the [`apollo-ios` repository](https://github.com/apollostack/apollo-ios), drag `Apollo.xcodeproj` into your project or workspace, add a dependency on `Apollo.framework` to your target.
59
59
60
+
## Adding a schema file to your target directory
61
+
62
+
You'll have to copy or [download a schema](/downloading-schema/) to your target directory before generating code.
63
+
64
+
Apollo iOS requires a GraphQL schema file as input to the code generation process. A schema file is a JSON file that contains the results of an an introspection query. Conventionally this file is called `schema.json`.
65
+
66
+
60
67
## Adding a code generation build step
61
68
62
-
In order to invoke `apollo` as part of the Xcode build process, create a build step that runs before "Compile Sources".
69
+
In order to invoke `apollo` as part of the Xcode build process, create a build step that runs before "Compile Sources" to invoke `apollo` through the `check-and-run-apollo-cli.sh` wrapper script.
63
70
64
-
1. On your application targets’ "Build Phases" settings tab, click the "+" icon and choose "New Run Script Phase". Create a Run Script, change its name to "Generate Apollo GraphQL API" and drag it just above "Compile Sources". Then add the following contents to the script area below the shell:
71
+
The main reason for calling the wrapper is to check whether the version of `apollo` installed on your system is compatible with the framework version installed in your project, and to warn you if it isn't. Without this check, you could end up generating code that is incompatible with the runtime code contained in the framework.
The location of this wrapper script is slightly different based on how you've integrated Apollo into you project, but the first steps are the same everywhere:
69
74
70
-
if [ -z"$APOLLO_FRAMEWORK_PATH" ];then
71
-
echo"error: Couldn't find Apollo.framework in FRAMEWORK_SEARCH_PATHS; make sure to add the framework to your project."
72
-
exit 1
73
-
fi
75
+
1. On your application target's **Build Phases** settings tab, click the **+** icon and choose **New Run Script Phase**.
76
+
2. In the created Run Script, change its name to **Generate Apollo GraphQL API**
77
+
3. Drag this new run script just above **Compile Sources** in your list of **Build Phases** so that it executes before your code is compiled.
78
+
4. Add the appropriate contents to the run script from the options below.
74
79
80
+
### If you ARE integrating Apollo using CocoaPods
81
+
82
+
Our CocoaPods install includes the code-generation script as a file which will not be added to the framework. Since this is always installed in a consistent place, you can use the same path to it. Add the following to the Run Script:
### If you're NOT integrating Apollo using CocoaPods
91
+
92
+
In this case, the `check-and-run-apollo-cli.sh` file is bundled into the framework. The procedures to call it are slightly different based on whether you're using an iOS or macOS target because of the way the frameworks are compiled.
93
+
94
+
📱 For an **iOS** target or a **Cocoa Touch Framework**, use the following:
💻 For a **macOS** or a **Cocoa Framework** target, use the following:
91
112
113
+
```sh
114
+
# Do some magic so we can make sure `FRAMEWORK_SEARCH_PATHS` works correctly when there's a space in the scheme or the folder name.
115
+
QUOTED_FRAMEWORK_SEARCH_PATHS=\"$(echo $FRAMEWORK_SEARCH_PATHS| tr -d '"'| sed -e 's/ \//" "\//g')\"
92
116
93
-
The script above will invoke `apollo` through the `check-and-run-apollo-cli.sh` wrapper script, which is actually contained in the `Apollo.framework` bundle. The main reason for this is to check whether the version of `apollo` installed on your system is compatible with the framework version installed in your project, and to warn you if it isn't. Without this check, you could end up generating code that is incompatible with the runtime code contained in the framework.
You'll have to copy or [download a schema](/downloading-schema/) to your target directory before generating code.
119
+
if [ -z"${APOLLO_FRAMEWORK_PATH}" ];then
120
+
echo"error: Couldn't find Apollo.framework in FRAMEWORK_SEARCH_PATHS; make sure to add the framework to your project."
121
+
exit 1
122
+
fi
98
123
99
-
Apollo iOS requires a GraphQL schema file as input to the code generation process. A schema file is a JSON file that contains the results of an an introspection query. Conventionally this file is called `schema.json`.
You may receive a warning when you first start up Xcode after installing these add-ons.
155
+
You may receive a warning the first time you start up Xcode after installing these add-ons - once you agree to load the plugin, you will no longer see this warning.
129
156
130
157
## Create `.graphql` files with your queries or mutations
0 commit comments