Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/ios-11
Browse files Browse the repository at this point in the history
  • Loading branch information
5d committed Apr 23, 2024
2 parents 5146356 + a1e79c9 commit 169c91a
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 44 deletions.
4 changes: 2 additions & 2 deletions AWSAppSync.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AWSAppSync'
s.version = '3.6.4'
s.version = '3.6.5'
s.author = 'AWS'
s.homepage = 'http://aws.amazon.com/mobile/sdk'
s.license = { :type => 'Amazon Software License', :file => 'LICENSE' }
Expand All @@ -13,7 +13,7 @@ Pod::Spec.new do |s|

s.dependency 'AWSCore', '~> 2.36.0'
s.dependency 'SQLite.swift', '~> 0.12.2'
s.dependency 'AppSyncRealTimeClient', '~> 3'
s.dependency 'AppSyncRealTimeClient', '~> 3.2.0'

s.source_files = 'AWSAppSyncClient/AWSAppSync.h', 'AWSAppSyncClient/*.swift', 'AWSAppSyncClient/Internal/**/*.{h,m,swift}', 'AWSAppSyncClient/Apollo/Sources/Apollo/*.swift'
s.public_header_files = ['AWSAppSyncClient/AWSAppSync.h', 'AWSAppSyncClient/AWSAppSync-Swift.h', 'AWSAppSyncClient/Internal/AppSyncLogHelper.h']
Expand Down
10 changes: 5 additions & 5 deletions AWSAppSyncClient/AWSAppSyncHTTPNetworkTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class AWSAppSyncHTTPNetworkTransport: AWSNetworkTransport {
private let authProvider: AppSyncAuthProvider
private let sendOperationIdentifiers: Bool
private var retryStrategy: AWSAppSyncRetryStrategy

private let activeTimersQueue = DispatchQueue(label: "AWSAppSyncHTTPNetworkTransport.activeTimers")
private var activeTimers: [String: DispatchSourceTimer] = [:]

Expand Down Expand Up @@ -140,7 +140,7 @@ public class AWSAppSyncHTTPNetworkTransport: AWSNetworkTransport {
retryStrategy: retryStrategy
)
}

/// Creates a network transport with the specified server URL and session configuration.
///
/// - Parameters:
Expand Down Expand Up @@ -191,7 +191,7 @@ public class AWSAppSyncHTTPNetworkTransport: AWSNetworkTransport {
request.httpMethod = "POST"
request.setValue(NSDate().aws_stringValue(AWSDateISO8601DateFormat2), forHTTPHeaderField: "X-Amz-Date")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.setValue("aws-sdk-ios/3.6.4 AppSyncClient", forHTTPHeaderField: "User-Agent")
request.setValue("aws-sdk-ios/3.6.5 AppSyncClient", forHTTPHeaderField: "User-Agent")
addDeviceId(request: &request)
}

Expand All @@ -205,7 +205,7 @@ public class AWSAppSyncHTTPNetworkTransport: AWSNetworkTransport {
break
}
}

/// Returns `deviceId` for the specified key from the keychain.
/// If the key does not exist in keychain, a `deviceId` is generated, stored and returned.
///
Expand Down Expand Up @@ -374,7 +374,7 @@ public class AWSAppSyncHTTPNetworkTransport: AWSNetworkTransport {
mutableRequest.setValue(provider.getLatestAuthToken(), forHTTPHeaderField: "authorization")
completionHandler(.success(()))
}

case .awsLambda(let provider):
guard let asyncProvider = provider as? AWSLambdaAuthProviderAsync else {
mutableRequest.setValue(provider.getLatestAuthToken(), forHTTPHeaderField: "authorization")
Expand Down
2 changes: 1 addition & 1 deletion AWSAppSyncClient/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.6.4</string>
<string>3.6.5</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
41 changes: 25 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
The AWS AppSync SDK for iOS enables you to access your AWS AppSync backend and perform operations like `Queries`, `Mutations` and `Subscriptions`. The SDK
also includes support for offline operations.

## 3.6.5

### Bug Fixes
- fix AppSyncRealTimClient dependency version defined in podspec and podfile([PR #591](https://github.com/awslabs/aws-mobile-appsync-sdk-ios/pull/591))

### Misc.
- updating AWS SDK dependency to 2.36.0([PR #590](https://github.com/awslabs/aws-mobile-appsync-sdk-ios/pull/590))


## 3.6.4

### Bug Fixes
Expand All @@ -26,18 +35,18 @@ also includes support for offline operations.
### Misc.
- Update SDK dependency to 2.30.1 and AppSyncRealTimeClient dependency to 3.0.0 (https://github.com/awslabs/aws-mobile-appsync-sdk-ios/pull/561)

## 3.6.1
## 3.6.1

### Misc.
- chore: skip build xcframework when build for cocoapods https://github.com/awslabs/aws-mobile-appsync-sdk-ios/pull/524
- chore: Update the gemfile to pin to version https://github.com/awslabs/aws-mobile-appsync-sdk-ios/pull/530

## 3.6.0
## 3.6.0

### Features

- feat: Upgrade AppSyncRTClient 1.8.0 and enable logs ([PR #519](https://github.com/awslabs/aws-mobile-appsync-sdk-ios/pull/519))

### Bug Fixes

- fix: Thread safe subscription watcher cancel ([PR #523](https://github.com/awslabs/aws-mobile-appsync-sdk-ios/pull/523))
Expand Down Expand Up @@ -251,17 +260,17 @@ This release is deprecated due to errors. Please use 3.0.2 or greater.

- **Breaking API Changes**
- Added support for connecting to AWS AppSync using pure WebSockets for GraphQL subscriptions.
- Selection set filtering will be done per client as each client can define their own selection set.
In this case the subscription selection set must be a subset of the mutation selection set. For example,
a subscription `addedPost{author title}` linked to the mutation `addPost(...){id author title url version}`
would receive only the author and the title of the post and none of the other fields.
However, if the mutation didn't have the author in its selection set the subscriber would get a `null`
- Selection set filtering will be done per client as each client can define their own selection set.
In this case the subscription selection set must be a subset of the mutation selection set. For example,
a subscription `addedPost{author title}` linked to the mutation `addPost(...){id author title url version}`
would receive only the author and the title of the post and none of the other fields.
However, if the mutation didn't have the author in its selection set the subscriber would get a `null`
value for the author field (or an error in case the author field is defined as required/not-null in the schema).
- In the earlier SDK version, if you didn’t configure the associated subscription selection set with the required fields
and relied on the mutation fields to push data to subscribed client, the behavior will change when you move to this version
that use pure WebSockets. In the example above, a subscription without the "author" field defined in its selection set
would still return the author name with MQTT over WebSockets as the field is defined in the mutation, the same behavior

- In the earlier SDK version, if you didn’t configure the associated subscription selection set with the required fields
and relied on the mutation fields to push data to subscribed client, the behavior will change when you move to this version
that use pure WebSockets. In the example above, a subscription without the "author" field defined in its selection set
would still return the author name with MQTT over WebSockets as the field is defined in the mutation, the same behavior
won’t apply for pure WebSockets. The subscription selection set is essential when using pure WebSockets: if a field is
not explicitly defined in the subscription it won't be returned by AWS AppSync.

Expand Down Expand Up @@ -297,7 +306,7 @@ not explicitly defined in the subscription it won't be returned by AWS AppSync.

- Fixed a bug where data less than 128 bytes would cause a crash if logging were enabled.
See issues [#258](https://github.com/awslabs/aws-mobile-appsync-sdk-ios/issues/258) and
[#216](https://github.com/awslabs/aws-mobile-appsync-sdk-ios/issues/216), and
[#216](https://github.com/awslabs/aws-mobile-appsync-sdk-ios/issues/216), and
[PR #259](https://github.com/awslabs/aws-mobile-appsync-sdk-ios/pull/259). Thanks @johnmurphy01! 🎉

### Misc. Updates
Expand Down Expand Up @@ -384,7 +393,7 @@ This release has invalid dependency declaration in the AWSAppSync.podspec. Pleas
* Improved internal handling of subscription cancellation and disconnect.
- With this update, the cancellation behavior for subscription is more robust in both cases - when developer issues `cancel` and when SDK notifies `connectionError` in the `statusChangeHandler` and `resultHandler`
- As a best practice, we recommend that if you do not want to receive any more callbacks on the `statusChangeHandler` and `resultHandler` for the subscription, issue a `cancel` which would immediately stop all communication to the watcher.
- Once `cancel` is issued, no notifications or error callbacks will be given to the watcher. If the watcher object is not reference from application code, it will internally issue a `cancel` and ensure that no callbacks are given.
- Once `cancel` is issued, no notifications or error callbacks will be given to the watcher. If the watcher object is not reference from application code, it will internally issue a `cancel` and ensure that no callbacks are given.
## 2.12.0
Expand Down Expand Up @@ -470,7 +479,7 @@ This release has invalid dependency declaration in the AWSAppSync.podspec. Pleas
```
Please note that `verbose` logging is quite verbose, and there is a significant difference between `verbose` and `debug`. We will be making
`debug` more useful as we go. (See [Issue #145](https://github.com/awslabs/aws-mobile-appsync-sdk-ios/issues/145))
As always, we recommend turning off logging when deploying to production.
- Added some verbose logging around mutation queue handling and subscription connections; minor log additions elsewhere
- Minor dead code removal & miscellaneous cleanup
Expand Down
8 changes: 4 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/aws-amplify/aws-appsync-realtime-client-ios.git",
"state": {
"branch": null,
"revision": "3de274c68a3cb60c8aec18b5bc0a8c07860219cd",
"version": "3.0.0"
"revision": "9fd77b043e06193848a68740dfde0836648b2b4e",
"version": "3.2.0"
}
},
{
Expand All @@ -33,8 +33,8 @@
"repositoryURL": "https://github.com/daltoniam/Starscream",
"state": {
"branch": null,
"revision": "ac6c0fc9da221873e01bd1a0d4818498a71eef33",
"version": "4.0.6"
"revision": "c6bfd1af48efcc9a9ad203665db12375ba6b145a",
"version": "4.0.8"
}
}
]
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ let package = Package(
.package(
name: "AppSyncRealTimeClient",
url: "https://github.com/aws-amplify/aws-appsync-realtime-client-ios.git",
from: "3.0.0"
.upToNextMinor(from: "3.2.0")
),
.package(
url: "https://github.com/stephencelis/SQLite.swift.git",
from: "0.12.0"
.upToNextMinor(from: "0.12.0")
)
],
targets: [
.target(
name: "AWSAppSync",
dependencies: [

.product(name: "SQLite", package: "SQLite.swift"),
.product(name: "AppSyncRealTimeClient", package: "AppSyncRealTimeClient"),
.product(name: "AWSCore", package: "AWSiOSSDKV2")
Expand Down
4 changes: 2 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ AWS_SDK_VERSION = "2.36.0"
target "AWSAppSync" do
pod "AWSCore", "~> #{AWS_SDK_VERSION}"
pod "SQLite.swift", "~> 0.12.2"
pod "AppSyncRealTimeClient", "~> 3.0.0"
pod "AppSyncRealTimeClient", "~> 3.2.0"

pod "SwiftLint"
end
Expand All @@ -18,7 +18,7 @@ target "AWSAppSyncTestCommon" do
# We directly access a database connection to verify certain initialization
# setups
pod "SQLite.swift", "~> 0.12.2"
pod "AppSyncRealTimeClient", "~> 3.0.0"
pod "AppSyncRealTimeClient", "~> 3.2.0"
end

target "AWSAppSyncTestApp" do
Expand Down
10 changes: 5 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- AppSyncRealTimeClient (3.0.0):
- Starscream (~> 4.0.4)
- AppSyncRealTimeClient (3.2.0):
- Starscream (= 4.0.8)
- AWSAuthCore (2.36.0):
- AWSCore (= 2.36.0)
- AWSCognitoIdentityProvider (2.36.0):
Expand All @@ -23,7 +23,7 @@ PODS:
- SwiftLint (0.54.0)

DEPENDENCIES:
- AppSyncRealTimeClient (~> 3.0.0)
- AppSyncRealTimeClient (~> 3.2.0)
- AWSCore (~> 2.36.0)
- AWSMobileClient (~> 2.36.0)
- AWSS3 (~> 2.36.0)
Expand All @@ -44,7 +44,7 @@ SPEC REPOS:
- SwiftLint

SPEC CHECKSUMS:
AppSyncRealTimeClient: ec19a24f635611b193eb98a2da573abcf98b793b
AppSyncRealTimeClient: 35c0d2ae28234a9f5daba5dc31402acf45ad802f
AWSAuthCore: 16ad51c6cf9a5a556049401851498f6c0a3aebb7
AWSCognitoIdentityProvider: 454b162e1bf1a10d9fec5cacd9291c021ecbdd22
AWSCognitoIdentityProviderASF: 556ffdfa7ccd0626bc59f784e938b49bccfe3180
Expand All @@ -55,6 +55,6 @@ SPEC CHECKSUMS:
Starscream: 19b5533ddb925208db698f0ac508a100b884a1b9
SwiftLint: c1de071d9d08c8aba837545f6254315bc900e211

PODFILE CHECKSUM: 8bb501cb26334e6646987dfc8c99cd8d9f0963cc
PODFILE CHECKSUM: 5e218425b76767a14793a18c26000168492e6ce0

COCOAPODS: 1.15.2
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The AWS AppSync SDK for iOS enables you to access your AWS AppSync backend and p
1. Add the following line to your Podfile:

```ruby
pod 'AWSAppSync', '~> 3.6.4'
pod 'AWSAppSync', '~> 3.6.5'
```

Example:
Expand All @@ -59,7 +59,7 @@ The AWS AppSync SDK for iOS enables you to access your AWS AppSync backend and p
use_frameworks!
# Pods for EventsApp
pod 'AWSAppSync', '~> 3.6.4'
pod 'AWSAppSync', '~> 3.6.5'
end
```

Expand All @@ -84,18 +84,18 @@ Carthage supports XCFrameworks in Xcode 12 or above. Follow the steps below to c
```

3. Then run the following command:

$ carthage update --use-xcframeworks

4. On your application targets’ General settings tab, in the Embedded Binaries section, drag and drop each xcframework you want to use from the Carthage/Build folder on disk.

> Note: If you are using XCFrameworks (i.e., either Carthage or Dynamic Frameworks), the module `AWSMobileClient` is named as `AWSMobileClientXCF` to work around a [Swift issue](https://bugs.swift.org/browse/SR-11704). To use `AWSMobileClient`, import it as:

import AWSMobileClientXCF

and use it your app code without the `XCF` suffix.

AWSMobileClient.default.initialize()
AWSMobileClient.default.initialize()

##### Frameworks with "fat libraries" (not recommended)

Expand Down Expand Up @@ -205,7 +205,7 @@ You can get the backend setup by following the steps below:
- `AppSyncMultiAuthAPIKey`
1. Create another CloudFormation Stack following step 1-6 above with `API Key` as the Auth type (we'll change that later)
1. Create a Lambda function using the template provided in this project at `AWSAppSyncIntegrationTests/ConsoleResources/appsync-lambda-authorize
r.js`
r.js`
1. Once the stack is complete click on the __Outputs__ tab
1. Copy the appropriate values to the test configuration file `AppSyncIntegrationTests/appsync_test_credentials.json`:
- `AppSyncEndpointAPIKeyLambda`
Expand Down

0 comments on commit 169c91a

Please sign in to comment.