父節點
當前提交
d0c283573b
共有 100 個檔案被更改,包括 16402 行新增1 行删除
  1. 二進制
      AWSCognito.framework/AWSCognito
  2. 48
    0
      AWSCognito.framework/Headers/AWSCognito.h
  3. 72
    0
      AWSCognito.framework/Headers/AWSCognitoConflict.h
  4. 203
    0
      AWSCognito.framework/Headers/AWSCognitoDataset.h
  5. 50
    0
      AWSCognito.framework/Headers/AWSCognitoHandlers.h
  6. 133
    0
      AWSCognito.framework/Headers/AWSCognitoRecord.h
  7. 405
    0
      AWSCognito.framework/Headers/AWSCognitoService.h
  8. 1032
    0
      AWSCognito.framework/Headers/AWSCognitoSyncModel.h
  9. 24
    0
      AWSCognito.framework/Headers/AWSCognitoSyncResources.h
  10. 601
    0
      AWSCognito.framework/Headers/AWSCognitoSyncService.h
  11. 二進制
      AWSCognito.framework/Info.plist
  12. 6
    0
      AWSCognito.framework/Modules/module.modulemap
  13. 二進制
      AWSCore.framework/AWSCore
  14. 27
    0
      AWSCore.framework/Headers/AWSBolts.h
  15. 42
    0
      AWSCore.framework/Headers/AWSCancellationToken.h
  16. 29
    0
      AWSCore.framework/Headers/AWSCancellationTokenRegistration.h
  17. 60
    0
      AWSCore.framework/Headers/AWSCancellationTokenSource.h
  18. 101
    0
      AWSCore.framework/Headers/AWSCategory.h
  19. 56
    0
      AWSCore.framework/Headers/AWSClientContext.h
  20. 87
    0
      AWSCore.framework/Headers/AWSCocoaLumberjack.h
  21. 22
    0
      AWSCore.framework/Headers/AWSCognitoIdentity.h
  22. 1005
    0
      AWSCore.framework/Headers/AWSCognitoIdentityModel.h
  23. 24
    0
      AWSCore.framework/Headers/AWSCognitoIdentityResources.h
  24. 689
    0
      AWSCore.framework/Headers/AWSCognitoIdentityService.h
  25. 71
    0
      AWSCore.framework/Headers/AWSCore.h
  26. 263
    0
      AWSCore.framework/Headers/AWSCredentialsProvider.h
  27. 41
    0
      AWSCore.framework/Headers/AWSDDASLLogCapture.h
  28. 58
    0
      AWSCore.framework/Headers/AWSDDASLLogger.h
  29. 26
    0
      AWSCore.framework/Headers/AWSDDAssertMacros.h
  30. 512
    0
      AWSCore.framework/Headers/AWSDDFileLogger.h
  31. 917
    0
      AWSCore.framework/Headers/AWSDDLog.h
  32. 94
    0
      AWSCore.framework/Headers/AWSDDLogMacros.h
  33. 38
    0
      AWSCore.framework/Headers/AWSDDOSLogger.h
  34. 178
    0
      AWSCore.framework/Headers/AWSDDTTYLogger.h
  35. 62
    0
      AWSCore.framework/Headers/AWSExecutor.h
  36. 53
    0
      AWSCore.framework/Headers/AWSFMDB+AWSHelpers.h
  37. 8
    0
      AWSCore.framework/Headers/AWSFMDB.h
  38. 1080
    0
      AWSCore.framework/Headers/AWSFMDatabase.h
  39. 277
    0
      AWSCore.framework/Headers/AWSFMDatabaseAdditions.h
  40. 200
    0
      AWSCore.framework/Headers/AWSFMDatabasePool.h
  41. 182
    0
      AWSCore.framework/Headers/AWSFMDatabaseQueue.h
  42. 468
    0
      AWSCore.framework/Headers/AWSFMResultSet.h
  43. 44
    0
      AWSCore.framework/Headers/AWSGZIP.h
  44. 25
    0
      AWSCore.framework/Headers/AWSGeneric.h
  45. 147
    0
      AWSCore.framework/Headers/AWSIdentityProvider.h
  46. 49
    0
      AWSCore.framework/Headers/AWSInfo.h
  47. 204
    0
      AWSCore.framework/Headers/AWSKSReachability.h
  48. 97
    0
      AWSCore.framework/Headers/AWSLogging.h
  49. 172
    0
      AWSCore.framework/Headers/AWSMTLJSONAdapter.h
  50. 215
    0
      AWSCore.framework/Headers/AWSMTLManagedObjectAdapter.h
  51. 130
    0
      AWSCore.framework/Headers/AWSMTLModel+NSCoding.h
  52. 125
    0
      AWSCore.framework/Headers/AWSMTLModel.h
  53. 29
    0
      AWSCore.framework/Headers/AWSMTLValueTransformer.h
  54. 26
    0
      AWSCore.framework/Headers/AWSMantle.h
  55. 38
    0
      AWSCore.framework/Headers/AWSModel.h
  56. 212
    0
      AWSCore.framework/Headers/AWSNetworking.h
  57. 22
    0
      AWSCore.framework/Headers/AWSSTS.h
  58. 483
    0
      AWSCore.framework/Headers/AWSSTSModel.h
  59. 24
    0
      AWSCore.framework/Headers/AWSSTSResources.h
  60. 351
    0
      AWSCore.framework/Headers/AWSSTSService.h
  61. 171
    0
      AWSCore.framework/Headers/AWSSerialization.h
  62. 142
    0
      AWSCore.framework/Headers/AWSService.h
  63. 258
    0
      AWSCore.framework/Headers/AWSServiceEnum.h
  64. 101
    0
      AWSCore.framework/Headers/AWSSignature.h
  65. 26
    0
      AWSCore.framework/Headers/AWSSynchronizedMutableDictionary.h
  66. 177
    0
      AWSCore.framework/Headers/AWSTMCache.h
  67. 350
    0
      AWSCore.framework/Headers/AWSTMDiskCache.h
  68. 310
    0
      AWSCore.framework/Headers/AWSTMMemoryCache.h
  69. 266
    0
      AWSCore.framework/Headers/AWSTask.h
  70. 75
    0
      AWSCore.framework/Headers/AWSTaskCompletionSource.h
  71. 274
    0
      AWSCore.framework/Headers/AWSUICKeyChainStore.h
  72. 26
    0
      AWSCore.framework/Headers/AWSURLRequestRetryHandler.h
  73. 47
    0
      AWSCore.framework/Headers/AWSURLRequestSerialization.h
  74. 47
    0
      AWSCore.framework/Headers/AWSURLResponseSerialization.h
  75. 27
    0
      AWSCore.framework/Headers/AWSURLSessionManager.h
  76. 39
    0
      AWSCore.framework/Headers/AWSValidation.h
  77. 28
    0
      AWSCore.framework/Headers/NSArray+AWSMTLManipulationAdditions.h
  78. 25
    0
      AWSCore.framework/Headers/NSDictionary+AWSMTLManipulationAdditions.h
  79. 15
    0
      AWSCore.framework/Headers/NSObject+AWSMTLComparisonAdditions.h
  80. 21
    0
      AWSCore.framework/Headers/NSValueTransformer+AWSMTLInversionAdditions.h
  81. 86
    0
      AWSCore.framework/Headers/NSValueTransformer+AWSMTLPredefinedTransformerAdditions.h
  82. 二進制
      AWSCore.framework/Info.plist
  83. 6
    0
      AWSCore.framework/Modules/module.modulemap
  84. 72
    0
      AWSCore.framework/strip-frameworks.sh
  85. 二進制
      AWSSNS.framework/AWSSNS
  86. 42
    0
      AWSSNS.framework/Headers/AWSSNS.h
  87. 1051
    0
      AWSSNS.framework/Headers/AWSSNSModel.h
  88. 24
    0
      AWSSNS.framework/Headers/AWSSNSResources.h
  89. 899
    0
      AWSSNS.framework/Headers/AWSSNSService.h
  90. 二進制
      AWSSNS.framework/Info.plist
  91. 6
    0
      AWSSNS.framework/Modules/module.modulemap
  92. 111
    0
      EncuestaMarle.xcodeproj/xcshareddata/xcschemes/EncuestaMarle.xcscheme
  93. 14
    0
      EncuestaMarle.xcodeproj/xcuserdata/ccorrada.xcuserdatad/xcschemes/xcschememanagement.plist
  94. 10
    0
      EncuestaMarle.xcworkspace/contents.xcworkspacedata
  95. 8
    0
      EncuestaMarle.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  96. 5
    0
      EncuestaMarle.xcworkspace/xcuserdata/ccorrada.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  97. 5
    0
      EncuestaMarle.xcworkspace/xcuserdata/tatianacastro.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  98. 二進制
      EncuestaMarle/Assets.xcassets/233-2336253_consent-clipart-cutout.imageset/233-2336253_consent-clipart-cutout.png
  99. 1
    1
      EncuestaMarle/Assets.xcassets/233-2336253_consent-clipart-cutout.imageset/Contents.json
  100. 0
    0
      EncuestaMarle/Assets.xcassets/233-2336253_consent-clipart.imageset/233-2336253_consent-clipart.png

二進制
AWSCognito.framework/AWSCognito 查看文件


+ 48
- 0
AWSCognito.framework/Headers/AWSCognito.h 查看文件

@@ -0,0 +1,48 @@
1
+//
2
+// Copyright 2014-2016 Amazon.com,
3
+// Inc. or its affiliates. All Rights Reserved.
4
+//
5
+// Licensed under the Amazon Software License (the "License").
6
+// You may not use this file except in compliance with the
7
+// License. A copy of the License is located at
8
+//
9
+//     http://aws.amazon.com/asl/
10
+//
11
+// or in the "license" file accompanying this file. This file is
12
+// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13
+// CONDITIONS OF ANY KIND, express or implied. See the License
14
+// for the specific language governing permissions and
15
+// limitations under the License.
16
+//
17
+
18
+#import <Foundation/Foundation.h>
19
+
20
+/*!
21
+ Project version number for the AWSCognito framework.
22
+
23
+ @warning This value is deprecated and will be removed in an upcoming minor
24
+ version of the SDK. It conflicts with the umbrella header generated by
25
+ CocoaPods, and is not implemented at all in cases where this SDK is imported
26
+ as a CocoaPod static library. As this numeric value does not support
27
+ patch-level versioning, you should use AWSCognitoSDKVersion instead.
28
+ @deprecated Use AWSCognitoSDKVersion instead.
29
+ */
30
+FOUNDATION_EXPORT double AWSCognitoVersionNumber DEPRECATED_MSG_ATTRIBUTE("Use AWSCognitoSDKVersion instead.");
31
+
32
+/*!
33
+ Project version string for the AWSCognito framework.
34
+
35
+ @warning This value is deprecated and will be removed in an upcoming minor
36
+ version of the SDK. It conflicts with the umbrella header generated by
37
+ CocoaPods, and is not implemented at all in cases where this SDK is imported
38
+ as a CocoaPod static library.
39
+ @deprecated Use AWSCognitoSDKVersion instead.
40
+ */
41
+FOUNDATION_EXPORT const unsigned char AWSCognitoVersionString[] DEPRECATED_MSG_ATTRIBUTE("Use AWSCognitoSDKVersion instead.");
42
+
43
+#import "AWSCognitoService.h"
44
+#import "AWSCognitoDataset.h"
45
+#import "AWSCognitoRecord.h"
46
+#import "AWSCognitoHandlers.h"
47
+#import "AWSCognitoConflict.h"
48
+#import "AWSCognitoSyncService.h"

+ 72
- 0
AWSCognito.framework/Headers/AWSCognitoConflict.h 查看文件

@@ -0,0 +1,72 @@
1
+//
2
+// Copyright 2014-2016 Amazon.com,
3
+// Inc. or its affiliates. All Rights Reserved.
4
+//
5
+// Licensed under the Amazon Software License (the "License").
6
+// You may not use this file except in compliance with the
7
+// License. A copy of the License is located at
8
+//
9
+//     http://aws.amazon.com/asl/
10
+//
11
+// or in the "license" file accompanying this file. This file is
12
+// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13
+// CONDITIONS OF ANY KIND, express or implied. See the License
14
+// for the specific language governing permissions and
15
+// limitations under the License.
16
+//
17
+
18
+#import <Foundation/Foundation.h>
19
+
20
+@class AWSCognitoRecord;
21
+
22
+/**
23
+ An object that encapsulates a resolved conflict in Amazon Cognito.
24
+ */
25
+@interface AWSCognitoResolvedConflict : NSObject
26
+@end
27
+
28
+/**
29
+ An object that encapsulates a tuple of Amazon Cognito records.
30
+ */
31
+@interface AWSCognitoRecordTuple : NSObject
32
+/**
33
+ The local copy of the record.
34
+ */
35
+@property (nonatomic, readonly) AWSCognitoRecord *localRecord;
36
+/**
37
+ The remote (cloud) copy of the record.
38
+ */
39
+@property (nonatomic, readonly) AWSCognitoRecord *remoteRecord;
40
+@end
41
+
42
+/**
43
+ An object that encapsulates a conflicting record where both
44
+ the local and remote have been modified since the last synchronization.
45
+ */
46
+@interface AWSCognitoConflict : AWSCognitoRecordTuple
47
+
48
+/**
49
+ Create a AWSCognitoResolvedConflict object with the value of the
50
+ local record.
51
+ 
52
+ @return AWSCognitoResolvedConflict object using local value
53
+ */
54
+-(AWSCognitoResolvedConflict *) resolveWithLocalRecord;
55
+/**
56
+ Create a AWSCognitoResolvedConflict object with the value of the
57
+ remote (cloud) record.
58
+ 
59
+ @return AWSCognitoResolvedConflict object using remote (cloud) value
60
+ */
61
+-(AWSCognitoResolvedConflict *) resolveWithRemoteRecord;
62
+/**
63
+ Create a AWSCognitoResolvedConflict object with a custom value that
64
+ is neither the local nor remote value.
65
+ 
66
+ @param value the value to use to resolve the conflict
67
+ 
68
+ @return AWSCognitoResolvedConflict object using passed value
69
+ */
70
+-(AWSCognitoResolvedConflict *) resolveWithValue:(NSString *)value;
71
+@end
72
+

+ 203
- 0
AWSCognito.framework/Headers/AWSCognitoDataset.h 查看文件

@@ -0,0 +1,203 @@
1
+//
2
+// Copyright 2014-2016 Amazon.com,
3
+// Inc. or its affiliates. All Rights Reserved.
4
+//
5
+// Licensed under the Amazon Software License (the "License").
6
+// You may not use this file except in compliance with the
7
+// License. A copy of the License is located at
8
+//
9
+//     http://aws.amazon.com/asl/
10
+//
11
+// or in the "license" file accompanying this file. This file is
12
+// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13
+// CONDITIONS OF ANY KIND, express or implied. See the License
14
+// for the specific language governing permissions and
15
+// limitations under the License.
16
+//
17
+
18
+#import <Foundation/Foundation.h>
19
+#import "AWSCognitoHandlers.h"
20
+
21
+@class AWSCognitoRecord;
22
+@class AWSTask;
23
+
24
+/**
25
+ An object that encapsulates the dataset metadata.
26
+ */
27
+@interface AWSCognitoDatasetMetadata : NSObject
28
+
29
+/**
30
+ The name of this dataset
31
+ */
32
+@property (nonatomic, readonly) NSString *name;
33
+/**
34
+ The last sync count known on the client device.
35
+ */
36
+@property (nonatomic, readonly) NSNumber *lastSyncCount;
37
+/**
38
+ The creation date of the dataset on the remote store.
39
+ */
40
+@property (nonatomic, readonly) NSDate *creationDate;
41
+/**
42
+ The amount of storage on the remote store this dataset uses.
43
+ */
44
+@property (nonatomic, readonly) NSNumber *dataStorage;
45
+/**
46
+ The id of the last device to modify this dataset.
47
+ */
48
+@property (nonatomic, readonly) NSString *lastModifiedBy;
49
+/**
50
+ The date this dataset was last modified
51
+ */
52
+@property (nonatomic, readonly) NSDate *lastModifiedDate;
53
+/**
54
+ The number of records in this dataset on the remote store.
55
+ */
56
+@property (nonatomic, readonly) NSNumber *numRecords;
57
+
58
+/**
59
+ Returns true if this dataset has been cleared locally, but not synchronized.
60
+ */
61
+- (BOOL)isDeleted;
62
+
63
+@end
64
+
65
+/**
66
+ An object that encapsulates the dataset. The dataset is the unit of sync
67
+ for Amazon Cognito.
68
+ */
69
+@interface AWSCognitoDataset : AWSCognitoDatasetMetadata
70
+
71
+/**
72
+ A conflict resolution handler that will receive calls when there is a
73
+ conflict during a sync operation.  A conflict will occur when both remote and
74
+ local data have been updated since the last sync time.
75
+ When not explicitly set, we will use the default conflict resolution of
76
+ 'last writer wins', where the data most recently updated will be persisted.
77
+ */
78
+@property (nonatomic, copy) AWSCognitoRecordConflictHandler conflictHandler;
79
+
80
+/**
81
+ A deleted dataset handler. This handler will be called during a synchronization
82
+ when the remote service indicates that a dataset has been deleted.
83
+ Returning YES from the handler will cause the service to recreate the dataset
84
+ on the remote on the next synchronization. Returning NO or leaving this property
85
+ nil will cause the client to delete the dataset locally.
86
+ */
87
+@property (nonatomic, copy) AWSCognitoDatasetDeletedHandler datasetDeletedHandler;
88
+
89
+/**
90
+ A merged dataset handler. This handler will be called during a synchronization
91
+ when the remote service indicates that other datasets should be merged with this one.
92
+ Merged datasets should be fetched, their data overlayed locally and then removed.
93
+ Failing to implement this handler will result in merged datasets remaining on the
94
+ service indefinitely.
95
+ */
96
+@property (nonatomic, copy) AWSCognitoDatasetMergedHandler datasetMergedHandler;
97
+
98
+/**
99
+ The number of times to attempt a synchronization before failing. Defaults to
100
+ to the value on the AWSCognito client that opened this dataset.
101
+ */
102
+@property (nonatomic, assign) uint32_t synchronizeRetries;
103
+
104
+/**
105
+ Only synchronize if device is on a WiFi network. Defaults to
106
+ to the value on the AWSCognito client that opened this dataset.
107
+ */
108
+@property (nonatomic, assign) BOOL synchronizeOnWiFiOnly;
109
+
110
+/**
111
+ Sets a string object for the specified key in the dataset.
112
+ */
113
+- (void)setString:(NSString *) aString forKey:(NSString *) aKey;
114
+
115
+/**
116
+ Returns the string associated with the specified key.
117
+ */
118
+- (NSString *)stringForKey:(NSString *) aKey;
119
+
120
+/**
121
+ Synchronize local changes with remote changes on the service.  First it pulls down changes from the service
122
+ and attempts to overlay them on the local store.  Then it pushes any local updates to the service.  If at any
123
+ point there is a conflict, conflict resolution is invoked.  No changes are pushed to the service until
124
+ all conflicts are resolved.
125
+ */
126
+- (AWSTask *)synchronize;
127
+
128
+/**
129
+ Attempts to synchronize when device has connectivity.  First it checks connectivity, if device is online
130
+ immediately invokes synchronize and returns the AWSTask associated with the attempt.  If the device is offline,
131
+ schedules a synchronize for the next time the device comes online and returns a AWSTask with a nil result.
132
+ The scheduled synchronize is only valid for the lifecycle of the dataset object.  The data will not be synchronized
133
+ if the app is exited before connectivity is regained.  If you want to be notified when events occur during the
134
+ scheduled synchronize, you must add observers of the notifications found in AWSCognito
135
+ */
136
+- (AWSTask *)synchronizeOnConnectivity;
137
+
138
+/**
139
+ Subscribes this dataset to push notifications
140
+ 
141
+ @return AWSTask with nil result. task.error will contain any errors.
142
+ */
143
+- (AWSTask *)subscribe;
144
+
145
+/**
146
+ Unsubscribes this dataset to push notifications
147
+ 
148
+ @return AWSTask with nil result. task.error will contain any errors.
149
+ */
150
+- (AWSTask *)unsubscribe;
151
+
152
+
153
+/**
154
+ Returns all of the records in the dataset. Will return deleted records.
155
+ 
156
+ @return NSArray of AWSCognitoRecord objects
157
+ */
158
+- (NSArray<AWSCognitoRecord *> *)getAllRecords;
159
+
160
+/**
161
+ Returns all the key value pairs in the dataset, ignore any deleted data.
162
+ 
163
+ @return NSDictionary of all key value pairs. Contains no metadata.
164
+ */
165
+- (NSDictionary<NSString *, NSString *> *)getAll;
166
+
167
+/**
168
+ Remove a record from the dataset.
169
+ 
170
+ @param aKey the key to remove
171
+ */
172
+- (void)removeObjectForKey:(NSString *) aKey;
173
+
174
+/**
175
+ Returns the record associated with the specified key.
176
+ 
177
+ @param aKey the key to return
178
+ 
179
+ @return AWSCognitoRecord for this particular record. Will return nil if record does not exist.
180
+ */
181
+- (AWSCognitoRecord *)recordForKey:(NSString *) aKey;
182
+
183
+/**
184
+ Clear this dataset locally.  Dataset will not be removed from the service until the next synchronize call.
185
+ */
186
+- (void) clear;
187
+
188
+/**
189
+ Returns the size in bytes for this dataset.
190
+ */
191
+- (long) size;
192
+
193
+/**
194
+ Returns the size in bytes for the specified key.
195
+ 
196
+ @param aKey the key to check
197
+ */
198
+- (long) sizeForKey:(NSString *) aKey;
199
+
200
+
201
+
202
+
203
+@end

+ 50
- 0
AWSCognito.framework/Headers/AWSCognitoHandlers.h 查看文件

@@ -0,0 +1,50 @@
1
+//
2
+// Copyright 2014-2016 Amazon.com,
3
+// Inc. or its affiliates. All Rights Reserved.
4
+//
5
+// Licensed under the Amazon Software License (the "License").
6
+// You may not use this file except in compliance with the
7
+// License. A copy of the License is located at
8
+//
9
+//     http://aws.amazon.com/asl/
10
+//
11
+// or in the "license" file accompanying this file. This file is
12
+// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13
+// CONDITIONS OF ANY KIND, express or implied. See the License
14
+// for the specific language governing permissions and
15
+// limitations under the License.
16
+//
17
+
18
+#import <Foundation/Foundation.h>
19
+
20
+@class AWSCognitoResolvedConflict;
21
+@class AWSCognitoConflict;
22
+
23
+/**
24
+ DatasetDeletedHandler
25
+ 
26
+ @param datasetName The name of the dataset that was deleted
27
+ 
28
+ @return YES if Cognito should recreate the dataset, NO if Cognito should delete
29
+         the local copy of the dataset.
30
+ */
31
+typedef BOOL (^AWSCognitoDatasetDeletedHandler)(NSString *datasetName);
32
+
33
+/**
34
+ DatasetMergedHandler
35
+ 
36
+ @param datasetName The name of the local dataset that is the destination of the merge
37
+ @param datasets The list of dataset names that should be merged into the destination
38
+ */
39
+typedef void (^AWSCognitoDatasetMergedHandler)(NSString *datasetName, NSArray *datasets);
40
+
41
+/**
42
+ ConflictHandler
43
+ 
44
+ @param conflict The AWSCognitoConflict for this record. Conflict contains
45
+        both local and remote data as properties.
46
+ 
47
+ @return An instance of AWSCognitoResolvedConflict which indicates what data should be
48
+         stored and syncronized. Returning nil will cancel synchronization.
49
+ */
50
+typedef AWSCognitoResolvedConflict* (^AWSCognitoRecordConflictHandler)(NSString *datasetName, AWSCognitoConflict *conflict);

+ 133
- 0
AWSCognito.framework/Headers/AWSCognitoRecord.h 查看文件

@@ -0,0 +1,133 @@
1
+//
2
+// Copyright 2014-2016 Amazon.com,
3
+// Inc. or its affiliates. All Rights Reserved.
4
+//
5
+// Licensed under the Amazon Software License (the "License").
6
+// You may not use this file except in compliance with the
7
+// License. A copy of the License is located at
8
+//
9
+//     http://aws.amazon.com/asl/
10
+//
11
+// or in the "license" file accompanying this file. This file is
12
+// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13
+// CONDITIONS OF ANY KIND, express or implied. See the License
14
+// for the specific language governing permissions and
15
+// limitations under the License.
16
+//
17
+
18
+#import <Foundation/Foundation.h>
19
+
20
+typedef NS_ENUM(NSInteger, AWSCognitoRecordValueType) {
21
+    AWSCognitoRecordValueTypeUnknown,
22
+    AWSCognitoRecordValueTypeString,
23
+    AWSCognitoRecordValueTypeDeleted,
24
+};
25
+
26
+/**
27
+ An object that encapsulates the record value.
28
+ */
29
+@interface AWSCognitoRecordValue : NSObject
30
+
31
+
32
+/**
33
+ The type of the record value.
34
+ 
35
+ The record value datatypes.
36
+ <ul>
37
+ <li>AWSCognitoRecordValueTypeUnknown - Unknown type.</li>
38
+ <li>AWSCognitoRecordValueTypeString - The string value.</li>
39
+ <li>AWSCognitoRecordValueTypeDeleted - A deleted value.</li>
40
+ </ul>
41
+ */
42
+@property (nonatomic, readonly) AWSCognitoRecordValueType type;
43
+
44
+/**
45
+ Initializes a AWSCognitoRecordValue with the given string value.
46
+ The type property is automatically set to AWSCognitoRecordValueTypeString.
47
+ 
48
+ @param value The string value of the AWSCognitoRecordValue.
49
+ 
50
+ @return The initialized instance
51
+ */
52
+- (instancetype)initWithString:(NSString *)value;
53
+
54
+/**
55
+ Returns the string value.
56
+ 
57
+ @return The string value stored by the record value object.
58
+ */
59
+- (NSString *)string;
60
+
61
+@end
62
+
63
+@interface AWSCognitoRecordMetadata : NSObject
64
+
65
+/**
66
+ Record ID or name.
67
+ */
68
+@property (nonatomic, readonly) NSString *recordId;
69
+
70
+/**
71
+ The last date the record was modified.
72
+ */
73
+@property (nonatomic, readonly) NSDate *lastModified;
74
+
75
+/**
76
+ The ID of the client that last modified the record. Set in AWSCognitoConfig under the clientID property.
77
+ */
78
+@property (nonatomic, strong) NSString *lastModifiedBy;
79
+
80
+/**
81
+ Boolean indicating whether or not the record has updates/deletes that need to be synced with the server.
82
+ */
83
+@property (nonatomic, readonly, getter = isDirty) BOOL dirty;
84
+
85
+/**
86
+ Integer value indicating how many times the record has been written since the last sync.
87
+ The value is 0 if the record has not been modified. The value is incremented by 1 each time the record is updated.
88
+ The value is set to -1 when the record is marked as deleted from the local database.
89
+ */
90
+@property (nonatomic, assign) int64_t dirtyCount;
91
+
92
+/**
93
+ Integer value of the server sync count of the record.
94
+ */
95
+@property (nonatomic, assign) int64_t syncCount;
96
+
97
+- (instancetype)initWithId:(NSString *)recordId;
98
+
99
+/**
100
+ Checks if the metadata matches.
101
+ 
102
+ @param object The object to be compared to the receiver.
103
+ May be nil, in which case this method returns NO.
104
+ @return YES if the receiver and object have equal metadata, otherwise NO.
105
+ */
106
+- (BOOL)isEqualMetadata:(id)object;
107
+
108
+@end
109
+
110
+@interface AWSCognitoRecord : AWSCognitoRecordMetadata
111
+
112
+/**
113
+ The data for the record.
114
+ */
115
+@property (nonatomic, strong) AWSCognitoRecordValue *data;
116
+
117
+/**
118
+ Initializes a AWSCognitoRecord with the given recordID, given data, and a dirtyCount and recordVersion of 0.
119
+ 
120
+ @param recordId The record ID of the AWSCognitoRecord
121
+ @param data the initial data that the AWSCognitoRecord will contain
122
+ */
123
+- (instancetype)initWithId:(NSString *)recordId
124
+                      data:(AWSCognitoRecordValue *)data;
125
+
126
+/**
127
+ Returns true if this record has been deleted
128
+ 
129
+ @return YES if the record is deleted, NO otherwise
130
+ */
131
+- (BOOL)isDeleted;
132
+
133
+@end

+ 405
- 0
AWSCognito.framework/Headers/AWSCognitoService.h 查看文件

@@ -0,0 +1,405 @@
1
+//
2
+// Copyright 2014-2016 Amazon.com,
3
+// Inc. or its affiliates. All Rights Reserved.
4
+//
5
+// Licensed under the Amazon Software License (the "License").
6
+// You may not use this file except in compliance with the
7
+// License. A copy of the License is located at
8
+//
9
+//     http://aws.amazon.com/asl/
10
+//
11
+// or in the "license" file accompanying this file. This file is
12
+// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13
+// CONDITIONS OF ANY KIND, express or implied. See the License
14
+// for the specific language governing permissions and
15
+// limitations under the License.
16
+//
17
+
18
+#import <Foundation/Foundation.h>
19
+#import <AWSCore/AWSCore.h>
20
+#import "AWSCognitoHandlers.h"
21
+#import "AWSCognitoSyncService.h"
22
+
23
+NS_ASSUME_NONNULL_BEGIN
24
+
25
+FOUNDATION_EXPORT NSString *const AWSCognitoSDKVersion;
26
+
27
+@class AWSCognitoDataset;
28
+@class AWSCognitoDatasetMetadata;
29
+@class AWSCognitoCredentialsProvider;
30
+@class AWSTask;
31
+
32
+/**
33
+ AWSCognito
34
+ 
35
+ @warning The AWSCognito (Amazon Cognito Sync) SDK is deprecated. Please use AWSAppSync for data sync.
36
+ @deprecated Please use AWSAppSync for data sync.
37
+ */
38
+DEPRECATED_MSG_ATTRIBUTE("Use `AWSAppSync` for data synchronization.")
39
+@interface AWSCognito : AWSService
40
+
41
+/**
42
+ Posted when the synchronization is started.
43
+ The notification sender is an instance of AWSCognitoClient. The userInfo
44
+ contains the dataset name.
45
+ @discussion This notification is posted once per synchronization.
46
+ The notification is posted on the Grand Central Dispatch
47
+ DISPATCH_QUEUE_PRIORITY_DEFAULT queue. The user interface should not be
48
+ modified on the thread.
49
+ */
50
+extern NSString *const AWSCognitoDidStartSynchronizeNotification;
51
+/**
52
+ Posted when the synchronization is finished with or without errors.
53
+ The notification sender is an instance of AWSCognitoClient. The userInfo
54
+ contains the dataset name.
55
+ @discussion This notification is posted once per synchronization.
56
+ The notification is posted on the Grand Central Dispatch
57
+ DISPATCH_QUEUE_PRIORITY_DEFAULT queue. The user interface should not be
58
+ modified on the thread.
59
+ */
60
+extern NSString *const AWSCognitoDidEndSynchronizeNotification;
61
+/**
62
+ Posted when values are changed to the value from the remote data store. The notification
63
+ sender is an instance of AWSCognitoClient. The userInfo contains the dataset name and
64
+ an NSArray of changed keys.
65
+ @discussion This notification may be posted multiple times per synchronization.
66
+ The notification is posted on the Grand Central Dispatch
67
+ DISPATCH_QUEUE_PRIORITY_DEFAULT queue. The user interface should not be
68
+ modified on the thread.
69
+ */
70
+extern NSString *const AWSCognitoDidChangeLocalValueFromRemoteNotification;
71
+/**
72
+ Posted when locally changed values are pushed to the remote store. The notification
73
+ sender is an instance of AWSCognitoClient. The userInfo contains the dataset name and
74
+ an NSArray of changed keys.
75
+ @discussion This notification may be posted multiple times per synchronization.
76
+ The notification is posted on the Grand Central Dispatch
77
+ DISPATCH_QUEUE_PRIORITY_DEFAULT queue. The user interface should not be
78
+ modified on the thread.
79
+ */
80
+extern NSString *const AWSCognitoDidChangeRemoteValueNotification;
81
+/**
82
+ Posted when the synchronization for the for the dataset failed. The notification
83
+ sender is an instance of AWSCognitoClient. The userInfo contains the dataset name
84
+ and error.
85
+ @discussion This notification may be posted multiple times per synchronization.
86
+ The notification is posted on the Grand Central Dispatch
87
+ DISPATCH_QUEUE_PRIORITY_DEFAULT queue. The user interface should not be
88
+ modified on the thread.
89
+ */
90
+extern NSString *const AWSCognitoDidFailToSynchronizeNotification;
91
+
92
+/**
93
+ The error domain for AWSCognito errors.
94
+ <ul>
95
+ <li>AWSCognitoErrorUnknown - Unknow error.</li>
96
+ <li>AWSCognitoErrorRemoteDataStorageFailed - The Amazon Cognito call temporarily failed.</li>
97
+ <li>AWSCognitoErrorInvalidDataValue - The Amazon Cognito call failed. The value for the
98
+ key is invalid and has been deleted from the local database.</li>
99
+ <li>AWSCognitoErrorDataSizeLimitExceeded - The Amazon Cognito call failed. A
100
+ dataset has exceeded the max dataset size.</li>
101
+ <li>AWSCognitoErrorLocalDataStorageFailed - The SQLite call failed.</li>
102
+ <li>AWSCognitoErrorIllegalArgument - The input value is invalid.</li>
103
+ <li>AWSCognitoErrorConflictRetriesExhausted - The number of attempts to resolve a conflict
104
+ has exceeded the max number of retries.</li>
105
+ <li>AWSCognitoErrorWiFiNotAvailable - WiFi is required and not currently available.</li>
106
+ <li>AWSCognitoErrorDeviceNotRegistered - The device has not been registered yet.</li>
107
+ <li>AWSCognitoErrorSyncAlreadyPending - This sync is unecessary, there is already a pending sync.</li>
108
+ <li>AWSCognitoErrorTimedOutWaitingForInFlightSync - There is a in flight sync that took over 5 minutes to complete, so this one was cancelled.</li>
109
+ </ul>
110
+ */
111
+FOUNDATION_EXPORT NSString *const AWSCognitoErrorDomain;
112
+typedef NS_ENUM(NSInteger, AWSCognitoErrorType) {
113
+    AWSCognitoErrorUnknown = 0,
114
+    AWSCognitoErrorRemoteDataStorageFailed = -1000,
115
+    AWSCognitoErrorInvalidDataValue = -1001,
116
+    AWSCognitoErrorUserDataSizeLimitExceeded = -1002,
117
+    AWSCognitoErrorLocalDataStorageFailed = -2000,
118
+    AWSCognitoErrorIllegalArgument = -3000,
119
+    AWSCognitoAuthenticationFailed = -4000,
120
+    AWSCognitoErrorTaskCanceled = -5000,
121
+    AWSCognitoErrorConflictRetriesExhausted = -6000,
122
+    AWSCognitoErrorWiFiNotAvailable = -7000,
123
+    AWSCognitoErrorDeviceNotRegistered = -8000,
124
+    AWSCognitoErrorSyncAlreadyPending = -9000,
125
+    AWSCognitoErrorTimedOutWaitingForInFlightSync = -10000,
126
+};
127
+
128
+@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration;
129
+
130
+/**
131
+ A conflict resolution handler that will receive calls when there is a
132
+ conflict during a sync operation.  A conflict will occur when both remote and
133
+ local data have been updated since the last sync time.
134
+ When not explicitly set, we will use the default conflict resolution of
135
+ 'last writer wins', where the data most recently updated will be persisted.
136
+ This handler will be propagated to any AWSCognitoDataset opened by this client.
137
+ */
138
+@property (nonatomic, strong) AWSCognitoRecordConflictHandler conflictHandler;
139
+
140
+/**
141
+ A deleted dataset handler. This handler will be called during a synchronization
142
+ when the remote service indicates that a dataset has been deleted.
143
+ Returning YES from the handler will cause the service to recreate the dataset
144
+ on the remote on the next synchronization. Returning NO or leaving this property
145
+ nil will cause the client to delete the dataset locally.
146
+ This handler will be propagated to any AWSCognitoDataset opened by this client.
147
+ */
148
+@property (nonatomic, strong) AWSCognitoDatasetDeletedHandler datasetDeletedHandler;
149
+
150
+/**
151
+ A merged dataset handler. This handler will be called during a synchronization
152
+ when the remote service indicates that other datasets should be merged with this one.
153
+ Merged datasets should be fetched, their data overlayed locally and then removed.
154
+ Failing to implement this handler will result in merged datasets remaining on the
155
+ service indefinitely.
156
+ This handler will be propagated to any AWSCognitoDataset opened by this client.
157
+ */
158
+@property (nonatomic, strong) AWSCognitoDatasetMergedHandler datasetMergedHandler;
159
+
160
+/**
161
+ The identifier used for this client in Amazon Cognito.  If not supplied
162
+ Amazon Cognito will create a random GUID for the device.
163
+ */
164
+@property (nonatomic, strong) NSString *deviceId;
165
+
166
+/**
167
+ The number of times to attempt a synchronization before failing. This will
168
+ be set on any AWSCognitoDatasets opened with this client. Defaults to 5 if not set.
169
+ */
170
+@property (nonatomic, assign) uint32_t synchronizeRetries;
171
+
172
+/**
173
+ Only synchronize if device is on a WiFi network. Defaults to NO if not set.
174
+ */
175
+@property (nonatomic, assign) BOOL synchronizeOnWiFiOnly;
176
+
177
+/**
178
+ Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with `defaultServiceConfiguration` from `[AWSServiceManager defaultServiceManager]`. The reference to this object is maintained by the SDK, and you do not need to retain it manually. Returns `nil` if the credentials provider is not an instance of `AWSCognitoCredentials` provider.
179
+
180
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
181
+ 
182
+ *Swift*
183
+
184
+     func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
185
+         let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
186
+         let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
187
+         AWSServiceManager.default().defaultServiceConfiguration = configuration
188
+
189
+         return true
190
+     }
191
+
192
+ *Objective-C*
193
+
194
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
195
+          AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
196
+                                                                                                          identityPoolId:@"YourIdentityPoolId"];
197
+          AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
198
+                                                                               credentialsProvider:credentialsProvider];
199
+          [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
200
+
201
+          return YES;
202
+      }
203
+
204
+ Then call the following to get the default service client:
205
+
206
+ *Swift*
207
+
208
+     let Cognito = AWSCognito.default()
209
+
210
+ *Objective-C*
211
+
212
+     AWSCognito *Cognito = [AWSCognito defaultCognito];
213
+
214
+ @return The default service client.
215
+ */
216
++ (instancetype)defaultCognito;
217
+
218
+/**
219
+ Creates a service client with the given service configuration and registers it for the key.
220
+
221
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
222
+
223
+ *Swift*
224
+
225
+     func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
226
+         let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
227
+         let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
228
+         AWSCognito.register(with: configuration!, forKey: "USWest2Cognito")
229
+
230
+         return true
231
+     }
232
+
233
+ *Objective-C*
234
+
235
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
236
+         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
237
+                                                                                                         identityPoolId:@"YourIdentityPoolId"];
238
+         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
239
+                                                                              credentialsProvider:credentialsProvider];
240
+
241
+         [AWSCognito registerCognitoWithConfiguration:configuration forKey:@"USWest2Cognito"];
242
+
243
+         return YES;
244
+     }
245
+
246
+ Then call the following to get the service client:
247
+
248
+ *Swift*
249
+
250
+     let Cognito = AWSCognito(forKey: "USWest2Cognito")
251
+
252
+ *Objective-C*
253
+
254
+     AWSCognito *Cognito = [AWSCognito CognitoForKey:@"USWest2Cognito"];
255
+
256
+ @warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
257
+
258
+ @param configuration A service configuration object.
259
+ @param key           A string to identify the service client.
260
+ */
261
++ (void)registerCognitoWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key;
262
+
263
+/**
264
+ Retrieves the service client associated with the key. You need to call `+ registerCognitoWithConfiguration:forKey:` before invoking this method.
265
+
266
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
267
+
268
+ *Swift*
269
+
270
+     func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
271
+         let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
272
+         let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
273
+         AWSCognito.register(with: configuration!, forKey: "USWest2Cognito")
274
+
275
+         return true
276
+     }
277
+
278
+ *Objective-C*
279
+
280
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
281
+         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
282
+                                                                                                         identityPoolId:@"YourIdentityPoolId"];
283
+         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
284
+                                                                              credentialsProvider:credentialsProvider];
285
+
286
+         [AWSCognito registerCognitoWithConfiguration:configuration forKey:@"USWest2Cognito"];
287
+
288
+         return YES;
289
+     }
290
+
291
+ Then call the following to get the service client:
292
+
293
+ *Swift*
294
+
295
+     let Cognito = AWSCognito(forKey: "USWest2Cognito")
296
+
297
+ *Objective-C*
298
+
299
+     AWSCognito *Cognito = [AWSCognito CognitoForKey:@"USWest2Cognito"];
300
+
301
+ @param key A string to identify the service client.
302
+
303
+ @return An instance of the service client.
304
+ */
305
++ (instancetype)CognitoForKey:(NSString *)key;
306
+
307
+/**
308
+ Removes the service client associated with the key and release it.
309
+ 
310
+ @warning Before calling this method, make sure no method is running on this client.
311
+ 
312
+ @param key A string to identify the service client.
313
+ */
314
++ (void)removeCognitoForKey:(NSString *)key;
315
+
316
+/**
317
+ Opens an existing dataset or creates a new one.
318
+ 
319
+ @return handle to AWSCognitoDataset
320
+ */
321
+- (AWSCognitoDataset *)openOrCreateDataset:(NSString *)datasetName;
322
+
323
+/**
324
+ List all datasets our client is aware of. Call refreshDatasetMetadata to ensure
325
+ the client has knowledge of all datasets available on the remote store.
326
+ 
327
+ @return NSArray of AWSCognitoDatasetMetadata
328
+ */
329
+- (NSArray<AWSCognitoDatasetMetadata *> *)listDatasets;
330
+
331
+/**
332
+ List all of the datasets.  Returns a AWSTask. The result of this task will be an array of 
333
+ AWSCognitoDatasetMetadata objects.
334
+ */
335
+- (AWSTask<NSArray<AWSCognitoDatasetMetadata *> *> *)refreshDatasetMetadata;
336
+
337
+/**
338
+ Wipe all cached data.
339
+ */
340
+- (void)wipe;
341
+
342
+/**
343
+ Get the default, last writer wins conflict handler
344
+ */
345
++ (AWSCognitoRecordConflictHandler) defaultConflictHandler;
346
+
347
+/**
348
+ Register this device for push notifications.  You will not receive any notifications until you actually subscribe the
349
+ dataset you want to receive push notifications for.  If your build targets Release, this will register the device
350
+ with APNS, if your build targets Debug this will register the device with APNS_SANDBOX. Returns a AWSTask.
351
+ The result of this task will be a AWSCognitoSyncRegisterDeviceResponse.
352
+ */
353
+- (AWSTask *)registerDevice: (NSData *) deviceToken;
354
+
355
+/**
356
+ Get the device id Cognito Sync gave this device. nil if device has never been registered
357
+ */
358
++ (NSString *) cognitoDeviceId;
359
+
360
+/**
361
+ Used to override the platform for push notifications. If you are not using the CocoaPods distribution,
362
+ #ifdef DEBUG
363
+  [[AWSCognito defaultCognito] setPushPlatform:AWSCognitoSyncPlatformApnsSandbox];
364
+ #endif
365
+ will set push notifications to use the APNS_SANDBOX if your build targets Debug.  Otherwise it will
366
+ always use APNS.
367
+ */
368
+
369
++ (void)setPushPlatform:(AWSCognitoSyncPlatform) pushPlatform;
370
+
371
+/**
372
+ The push platform for push notifications
373
+ */
374
++ (AWSCognitoSyncPlatform)pushPlatform;
375
+
376
+/**
377
+ Subscribe to a list of datasets.  Make sure you have called synchronize on each of the datasets in the list
378
+ at least once prior to calling this. Returns a AWSTask.  The result of this task will be a NSArray of
379
+ AWSCognitoSyncSubscribeToDatasetResponse
380
+ */
381
+- (AWSTask *)subscribe:(NSArray<NSString *> *) datasetNames;
382
+
383
+/**
384
+ Subscribe to all datasets you have locally.  Make sure you have called synchronize on all of your local datasets
385
+ at least once prior to calling this. Returns a AWSTask.  The result of this task will be a NSArray of
386
+ AWSCognitoSyncSubscribeToDatasetResponse
387
+ */
388
+- (AWSTask *)subscribeAll;
389
+
390
+/**
391
+ Unsubscribe to a list of datasets. Returns a AWSTask.  The result of this task will be a NSArray of
392
+ AWSCognitoSyncUnsubscribeToDatasetResponse
393
+ */
394
+- (AWSTask *)unsubscribe:(NSArray<NSString *> *) datasetNames;
395
+
396
+/**
397
+ Unsubscribe to all datasets you have locally.  Make sure you have called synchronize on all of your local datasets
398
+ at least once prior to calling this. Returns a AWSTask.  The result of this task will be a NSArray of
399
+ AWSCognitoSyncUnsubscribeToDatasetResponse
400
+ */
401
+- (AWSTask *)unsubscribeAll;
402
+
403
+@end
404
+
405
+NS_ASSUME_NONNULL_END

+ 1032
- 0
AWSCognito.framework/Headers/AWSCognitoSyncModel.h
文件差異過大導致無法顯示
查看文件


+ 24
- 0
AWSCognito.framework/Headers/AWSCognitoSyncResources.h 查看文件

@@ -0,0 +1,24 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+@interface AWSCognitoSyncResources : NSObject
19
+
20
++ (instancetype)sharedInstance;
21
+
22
+- (NSDictionary *)JSONObject;
23
+
24
+@end

+ 601
- 0
AWSCognito.framework/Headers/AWSCognitoSyncService.h 查看文件

@@ -0,0 +1,601 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import <AWSCore/AWSCore.h>
18
+#import "AWSCognitoSyncModel.h"
19
+#import "AWSCognitoSyncResources.h"
20
+
21
+NS_ASSUME_NONNULL_BEGIN
22
+
23
+//! SDK version for AWSCognitoSync
24
+FOUNDATION_EXPORT NSString *const AWSCognitoSyncSDKVersion;
25
+
26
+/**
27
+ <fullname>Amazon Cognito Sync</fullname><p>Amazon Cognito Sync provides an AWS service and client library that enable cross-device syncing of application-related user data. High-level client libraries are available for both iOS and Android. You can use these libraries to persist data locally so that it's available even if the device is offline. Developer credentials don't need to be stored on the mobile device to access the service. You can use Amazon Cognito to obtain a normalized user ID and credentials. User data is persisted in a dataset that can store up to 1 MB of key-value pairs, and you can have up to 20 datasets per user identity.</p><p>With Amazon Cognito Sync, the data stored for each identity is accessible only to credentials assigned to that identity. In order to use the Cognito Sync service, you need to make API calls using credentials retrieved with <a href="http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/Welcome.html">Amazon Cognito Identity service</a>.</p><p>If you want to use Cognito Sync in an Android or iOS application, you will probably want to make API calls via the AWS Mobile SDK. To learn more, see the <a href="http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-sync.html">Developer Guide for Android</a> and the <a href="http://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-sync.html">Developer Guide for iOS</a>.</p>
28
+ */
29
+@interface AWSCognitoSync : AWSService
30
+
31
+/**
32
+ The service configuration used to instantiate this service client.
33
+ 
34
+ @warning Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.
35
+ */
36
+@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration;
37
+
38
+/**
39
+ Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with `defaultServiceConfiguration` from `[AWSServiceManager defaultServiceManager]`. The reference to this object is maintained by the SDK, and you do not need to retain it manually.
40
+
41
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
42
+ 
43
+ *Swift*
44
+
45
+     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
46
+        let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
47
+        let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
48
+        AWSServiceManager.default().defaultServiceConfiguration = configuration
49
+ 
50
+        return true
51
+    }
52
+
53
+ *Objective-C*
54
+
55
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
56
+          AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
57
+                                                                                                          identityPoolId:@"YourIdentityPoolId"];
58
+          AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
59
+                                                                               credentialsProvider:credentialsProvider];
60
+          [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
61
+
62
+          return YES;
63
+      }
64
+
65
+ Then call the following to get the default service client:
66
+
67
+ *Swift*
68
+
69
+     let CognitoSync = AWSCognitoSync.default()
70
+
71
+ *Objective-C*
72
+
73
+     AWSCognitoSync *CognitoSync = [AWSCognitoSync defaultCognitoSync];
74
+
75
+ @return The default service client.
76
+ */
77
++ (instancetype)defaultCognitoSync;
78
+
79
+/**
80
+ Creates a service client with the given service configuration and registers it for the key.
81
+
82
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
83
+
84
+ *Swift*
85
+
86
+     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
87
+        let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
88
+        let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
89
+        AWSCognitoSync.register(with: configuration!, forKey: "USWest2CognitoSync")
90
+ 
91
+        return true
92
+    }
93
+
94
+ *Objective-C*
95
+
96
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
97
+         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
98
+                                                                                                         identityPoolId:@"YourIdentityPoolId"];
99
+         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
100
+                                                                              credentialsProvider:credentialsProvider];
101
+
102
+         [AWSCognitoSync registerCognitoSyncWithConfiguration:configuration forKey:@"USWest2CognitoSync"];
103
+
104
+         return YES;
105
+     }
106
+
107
+ Then call the following to get the service client:
108
+
109
+ *Swift*
110
+
111
+     let CognitoSync = AWSCognitoSync(forKey: "USWest2CognitoSync")
112
+
113
+ *Objective-C*
114
+
115
+     AWSCognitoSync *CognitoSync = [AWSCognitoSync CognitoSyncForKey:@"USWest2CognitoSync"];
116
+
117
+ @warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
118
+
119
+ @param configuration A service configuration object.
120
+ @param key           A string to identify the service client.
121
+ */
122
++ (void)registerCognitoSyncWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key;
123
+
124
+/**
125
+ Retrieves the service client associated with the key. You need to call `+ registerCognitoSyncWithConfiguration:forKey:` before invoking this method.
126
+
127
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
128
+
129
+ *Swift*
130
+
131
+     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
132
+        let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
133
+        let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
134
+        AWSCognitoSync.register(with: configuration!, forKey: "USWest2CognitoSync")
135
+ 
136
+        return true
137
+    }
138
+
139
+ *Objective-C*
140
+
141
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
142
+         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
143
+                                                                                                         identityPoolId:@"YourIdentityPoolId"];
144
+         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
145
+                                                                              credentialsProvider:credentialsProvider];
146
+
147
+         [AWSCognitoSync registerCognitoSyncWithConfiguration:configuration forKey:@"USWest2CognitoSync"];
148
+
149
+         return YES;
150
+     }
151
+
152
+ Then call the following to get the service client:
153
+
154
+ *Swift*
155
+
156
+     let CognitoSync = AWSCognitoSync(forKey: "USWest2CognitoSync")
157
+
158
+ *Objective-C*
159
+
160
+     AWSCognitoSync *CognitoSync = [AWSCognitoSync CognitoSyncForKey:@"USWest2CognitoSync"];
161
+
162
+ @param key A string to identify the service client.
163
+
164
+ @return An instance of the service client.
165
+ */
166
++ (instancetype)CognitoSyncForKey:(NSString *)key;
167
+
168
+/**
169
+ Removes the service client associated with the key and release it.
170
+ 
171
+ @warning Before calling this method, make sure no method is running on this client.
172
+ 
173
+ @param key A string to identify the service client.
174
+ */
175
++ (void)removeCognitoSyncForKey:(NSString *)key;
176
+
177
+/**
178
+ <p>Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
179
+ 
180
+ @param request A container for the necessary parameters to execute the BulkPublish service method.
181
+
182
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncBulkPublishResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorDuplicateRequest`, `AWSCognitoSyncErrorAlreadyStreamed`.
183
+ 
184
+ @see AWSCognitoSyncBulkPublishRequest
185
+ @see AWSCognitoSyncBulkPublishResponse
186
+ */
187
+- (AWSTask<AWSCognitoSyncBulkPublishResponse *> *)bulkPublish:(AWSCognitoSyncBulkPublishRequest *)request;
188
+
189
+/**
190
+ <p>Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
191
+ 
192
+ @param request A container for the necessary parameters to execute the BulkPublish service method.
193
+ @param completionHandler The completion handler to call when the load request is complete.
194
+                          `response` - A response object, or `nil` if the request failed.
195
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorDuplicateRequest`, `AWSCognitoSyncErrorAlreadyStreamed`.
196
+ 
197
+ @see AWSCognitoSyncBulkPublishRequest
198
+ @see AWSCognitoSyncBulkPublishResponse
199
+ */
200
+- (void)bulkPublish:(AWSCognitoSyncBulkPublishRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncBulkPublishResponse * _Nullable response, NSError * _Nullable error))completionHandler;
201
+
202
+/**
203
+ <p>Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
204
+ 
205
+ @param request A container for the necessary parameters to execute the DeleteDataset service method.
206
+
207
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncDeleteDatasetResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorResourceConflict`.
208
+ 
209
+ @see AWSCognitoSyncDeleteDatasetRequest
210
+ @see AWSCognitoSyncDeleteDatasetResponse
211
+ */
212
+- (AWSTask<AWSCognitoSyncDeleteDatasetResponse *> *)deleteDataset:(AWSCognitoSyncDeleteDatasetRequest *)request;
213
+
214
+/**
215
+ <p>Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
216
+ 
217
+ @param request A container for the necessary parameters to execute the DeleteDataset service method.
218
+ @param completionHandler The completion handler to call when the load request is complete.
219
+                          `response` - A response object, or `nil` if the request failed.
220
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorResourceConflict`.
221
+ 
222
+ @see AWSCognitoSyncDeleteDatasetRequest
223
+ @see AWSCognitoSyncDeleteDatasetResponse
224
+ */
225
+- (void)deleteDataset:(AWSCognitoSyncDeleteDatasetRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncDeleteDatasetResponse * _Nullable response, NSError * _Nullable error))completionHandler;
226
+
227
+/**
228
+ <p>Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.</p>
229
+ 
230
+ @param request A container for the necessary parameters to execute the DescribeDataset service method.
231
+
232
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncDescribeDatasetResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
233
+ 
234
+ @see AWSCognitoSyncDescribeDatasetRequest
235
+ @see AWSCognitoSyncDescribeDatasetResponse
236
+ */
237
+- (AWSTask<AWSCognitoSyncDescribeDatasetResponse *> *)describeDataset:(AWSCognitoSyncDescribeDatasetRequest *)request;
238
+
239
+/**
240
+ <p>Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.</p>
241
+ 
242
+ @param request A container for the necessary parameters to execute the DescribeDataset service method.
243
+ @param completionHandler The completion handler to call when the load request is complete.
244
+                          `response` - A response object, or `nil` if the request failed.
245
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
246
+ 
247
+ @see AWSCognitoSyncDescribeDatasetRequest
248
+ @see AWSCognitoSyncDescribeDatasetResponse
249
+ */
250
+- (void)describeDataset:(AWSCognitoSyncDescribeDatasetRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncDescribeDatasetResponse * _Nullable response, NSError * _Nullable error))completionHandler;
251
+
252
+/**
253
+ <p>Gets usage details (for example, data storage) about a particular identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
254
+ 
255
+ @param request A container for the necessary parameters to execute the DescribeIdentityPoolUsage service method.
256
+
257
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncDescribeIdentityPoolUsageResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
258
+ 
259
+ @see AWSCognitoSyncDescribeIdentityPoolUsageRequest
260
+ @see AWSCognitoSyncDescribeIdentityPoolUsageResponse
261
+ */
262
+- (AWSTask<AWSCognitoSyncDescribeIdentityPoolUsageResponse *> *)describeIdentityPoolUsage:(AWSCognitoSyncDescribeIdentityPoolUsageRequest *)request;
263
+
264
+/**
265
+ <p>Gets usage details (for example, data storage) about a particular identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
266
+ 
267
+ @param request A container for the necessary parameters to execute the DescribeIdentityPoolUsage service method.
268
+ @param completionHandler The completion handler to call when the load request is complete.
269
+                          `response` - A response object, or `nil` if the request failed.
270
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
271
+ 
272
+ @see AWSCognitoSyncDescribeIdentityPoolUsageRequest
273
+ @see AWSCognitoSyncDescribeIdentityPoolUsageResponse
274
+ */
275
+- (void)describeIdentityPoolUsage:(AWSCognitoSyncDescribeIdentityPoolUsageRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncDescribeIdentityPoolUsageResponse * _Nullable response, NSError * _Nullable error))completionHandler;
276
+
277
+/**
278
+ <p>Gets usage information for an identity, including number of datasets and data usage.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
279
+ 
280
+ @param request A container for the necessary parameters to execute the DescribeIdentityUsage service method.
281
+
282
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncDescribeIdentityUsageResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
283
+ 
284
+ @see AWSCognitoSyncDescribeIdentityUsageRequest
285
+ @see AWSCognitoSyncDescribeIdentityUsageResponse
286
+ */
287
+- (AWSTask<AWSCognitoSyncDescribeIdentityUsageResponse *> *)describeIdentityUsage:(AWSCognitoSyncDescribeIdentityUsageRequest *)request;
288
+
289
+/**
290
+ <p>Gets usage information for an identity, including number of datasets and data usage.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
291
+ 
292
+ @param request A container for the necessary parameters to execute the DescribeIdentityUsage service method.
293
+ @param completionHandler The completion handler to call when the load request is complete.
294
+                          `response` - A response object, or `nil` if the request failed.
295
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
296
+ 
297
+ @see AWSCognitoSyncDescribeIdentityUsageRequest
298
+ @see AWSCognitoSyncDescribeIdentityUsageResponse
299
+ */
300
+- (void)describeIdentityUsage:(AWSCognitoSyncDescribeIdentityUsageRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncDescribeIdentityUsageResponse * _Nullable response, NSError * _Nullable error))completionHandler;
301
+
302
+/**
303
+ <p>Get the status of the last BulkPublish operation for an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
304
+ 
305
+ @param request A container for the necessary parameters to execute the GetBulkPublishDetails service method.
306
+
307
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncGetBulkPublishDetailsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`.
308
+ 
309
+ @see AWSCognitoSyncGetBulkPublishDetailsRequest
310
+ @see AWSCognitoSyncGetBulkPublishDetailsResponse
311
+ */
312
+- (AWSTask<AWSCognitoSyncGetBulkPublishDetailsResponse *> *)getBulkPublishDetails:(AWSCognitoSyncGetBulkPublishDetailsRequest *)request;
313
+
314
+/**
315
+ <p>Get the status of the last BulkPublish operation for an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
316
+ 
317
+ @param request A container for the necessary parameters to execute the GetBulkPublishDetails service method.
318
+ @param completionHandler The completion handler to call when the load request is complete.
319
+                          `response` - A response object, or `nil` if the request failed.
320
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`.
321
+ 
322
+ @see AWSCognitoSyncGetBulkPublishDetailsRequest
323
+ @see AWSCognitoSyncGetBulkPublishDetailsResponse
324
+ */
325
+- (void)getBulkPublishDetails:(AWSCognitoSyncGetBulkPublishDetailsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncGetBulkPublishDetailsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
326
+
327
+/**
328
+ <p>Gets the events and the corresponding Lambda functions associated with an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
329
+ 
330
+ @param request A container for the necessary parameters to execute the GetCognitoEvents service method.
331
+
332
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncGetCognitoEventsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
333
+ 
334
+ @see AWSCognitoSyncGetCognitoEventsRequest
335
+ @see AWSCognitoSyncGetCognitoEventsResponse
336
+ */
337
+- (AWSTask<AWSCognitoSyncGetCognitoEventsResponse *> *)getCognitoEvents:(AWSCognitoSyncGetCognitoEventsRequest *)request;
338
+
339
+/**
340
+ <p>Gets the events and the corresponding Lambda functions associated with an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
341
+ 
342
+ @param request A container for the necessary parameters to execute the GetCognitoEvents service method.
343
+ @param completionHandler The completion handler to call when the load request is complete.
344
+                          `response` - A response object, or `nil` if the request failed.
345
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
346
+ 
347
+ @see AWSCognitoSyncGetCognitoEventsRequest
348
+ @see AWSCognitoSyncGetCognitoEventsResponse
349
+ */
350
+- (void)getCognitoEvents:(AWSCognitoSyncGetCognitoEventsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncGetCognitoEventsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
351
+
352
+/**
353
+ <p>Gets the configuration settings of an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
354
+ 
355
+ @param request A container for the necessary parameters to execute the GetIdentityPoolConfiguration service method.
356
+
357
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncGetIdentityPoolConfigurationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
358
+ 
359
+ @see AWSCognitoSyncGetIdentityPoolConfigurationRequest
360
+ @see AWSCognitoSyncGetIdentityPoolConfigurationResponse
361
+ */
362
+- (AWSTask<AWSCognitoSyncGetIdentityPoolConfigurationResponse *> *)getIdentityPoolConfiguration:(AWSCognitoSyncGetIdentityPoolConfigurationRequest *)request;
363
+
364
+/**
365
+ <p>Gets the configuration settings of an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
366
+ 
367
+ @param request A container for the necessary parameters to execute the GetIdentityPoolConfiguration service method.
368
+ @param completionHandler The completion handler to call when the load request is complete.
369
+                          `response` - A response object, or `nil` if the request failed.
370
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
371
+ 
372
+ @see AWSCognitoSyncGetIdentityPoolConfigurationRequest
373
+ @see AWSCognitoSyncGetIdentityPoolConfigurationResponse
374
+ */
375
+- (void)getIdentityPoolConfiguration:(AWSCognitoSyncGetIdentityPoolConfigurationRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncGetIdentityPoolConfigurationResponse * _Nullable response, NSError * _Nullable error))completionHandler;
376
+
377
+/**
378
+ <p>Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call.</p>
379
+ 
380
+ @param request A container for the necessary parameters to execute the ListDatasets service method.
381
+
382
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncListDatasetsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
383
+ 
384
+ @see AWSCognitoSyncListDatasetsRequest
385
+ @see AWSCognitoSyncListDatasetsResponse
386
+ */
387
+- (AWSTask<AWSCognitoSyncListDatasetsResponse *> *)listDatasets:(AWSCognitoSyncListDatasetsRequest *)request;
388
+
389
+/**
390
+ <p>Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call.</p>
391
+ 
392
+ @param request A container for the necessary parameters to execute the ListDatasets service method.
393
+ @param completionHandler The completion handler to call when the load request is complete.
394
+                          `response` - A response object, or `nil` if the request failed.
395
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
396
+ 
397
+ @see AWSCognitoSyncListDatasetsRequest
398
+ @see AWSCognitoSyncListDatasetsResponse
399
+ */
400
+- (void)listDatasets:(AWSCognitoSyncListDatasetsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncListDatasetsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
401
+
402
+/**
403
+ <p>Gets a list of identity pools registered with Cognito.</p><p>ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.</p>
404
+ 
405
+ @param request A container for the necessary parameters to execute the ListIdentityPoolUsage service method.
406
+
407
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncListIdentityPoolUsageResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
408
+ 
409
+ @see AWSCognitoSyncListIdentityPoolUsageRequest
410
+ @see AWSCognitoSyncListIdentityPoolUsageResponse
411
+ */
412
+- (AWSTask<AWSCognitoSyncListIdentityPoolUsageResponse *> *)listIdentityPoolUsage:(AWSCognitoSyncListIdentityPoolUsageRequest *)request;
413
+
414
+/**
415
+ <p>Gets a list of identity pools registered with Cognito.</p><p>ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.</p>
416
+ 
417
+ @param request A container for the necessary parameters to execute the ListIdentityPoolUsage service method.
418
+ @param completionHandler The completion handler to call when the load request is complete.
419
+                          `response` - A response object, or `nil` if the request failed.
420
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
421
+ 
422
+ @see AWSCognitoSyncListIdentityPoolUsageRequest
423
+ @see AWSCognitoSyncListIdentityPoolUsageResponse
424
+ */
425
+- (void)listIdentityPoolUsage:(AWSCognitoSyncListIdentityPoolUsageRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncListIdentityPoolUsageResponse * _Nullable response, NSError * _Nullable error))completionHandler;
426
+
427
+/**
428
+ <p>Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.</p>
429
+ 
430
+ @param request A container for the necessary parameters to execute the ListRecords service method.
431
+
432
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncListRecordsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorInternalError`.
433
+ 
434
+ @see AWSCognitoSyncListRecordsRequest
435
+ @see AWSCognitoSyncListRecordsResponse
436
+ */
437
+- (AWSTask<AWSCognitoSyncListRecordsResponse *> *)listRecords:(AWSCognitoSyncListRecordsRequest *)request;
438
+
439
+/**
440
+ <p>Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.</p>
441
+ 
442
+ @param request A container for the necessary parameters to execute the ListRecords service method.
443
+ @param completionHandler The completion handler to call when the load request is complete.
444
+                          `response` - A response object, or `nil` if the request failed.
445
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorInternalError`.
446
+ 
447
+ @see AWSCognitoSyncListRecordsRequest
448
+ @see AWSCognitoSyncListRecordsResponse
449
+ */
450
+- (void)listRecords:(AWSCognitoSyncListRecordsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncListRecordsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
451
+
452
+/**
453
+ <p>Registers a device to receive push sync notifications.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
454
+ 
455
+ @param request A container for the necessary parameters to execute the RegisterDevice service method.
456
+
457
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncRegisterDeviceResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
458
+ 
459
+ @see AWSCognitoSyncRegisterDeviceRequest
460
+ @see AWSCognitoSyncRegisterDeviceResponse
461
+ */
462
+- (AWSTask<AWSCognitoSyncRegisterDeviceResponse *> *)registerDevice:(AWSCognitoSyncRegisterDeviceRequest *)request;
463
+
464
+/**
465
+ <p>Registers a device to receive push sync notifications.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
466
+ 
467
+ @param request A container for the necessary parameters to execute the RegisterDevice service method.
468
+ @param completionHandler The completion handler to call when the load request is complete.
469
+                          `response` - A response object, or `nil` if the request failed.
470
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
471
+ 
472
+ @see AWSCognitoSyncRegisterDeviceRequest
473
+ @see AWSCognitoSyncRegisterDeviceResponse
474
+ */
475
+- (void)registerDevice:(AWSCognitoSyncRegisterDeviceRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncRegisterDeviceResponse * _Nullable response, NSError * _Nullable error))completionHandler;
476
+
477
+/**
478
+ <p>Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
479
+ 
480
+ @param request A container for the necessary parameters to execute the SetCognitoEvents service method.
481
+
482
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
483
+ 
484
+ @see AWSCognitoSyncSetCognitoEventsRequest
485
+ */
486
+- (AWSTask *)setCognitoEvents:(AWSCognitoSyncSetCognitoEventsRequest *)request;
487
+
488
+/**
489
+ <p>Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
490
+ 
491
+ @param request A container for the necessary parameters to execute the SetCognitoEvents service method.
492
+ @param completionHandler The completion handler to call when the load request is complete.
493
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
494
+ 
495
+ @see AWSCognitoSyncSetCognitoEventsRequest
496
+ */
497
+- (void)setCognitoEvents:(AWSCognitoSyncSetCognitoEventsRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
498
+
499
+/**
500
+ <p>Sets the necessary configuration for push sync.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
501
+ 
502
+ @param request A container for the necessary parameters to execute the SetIdentityPoolConfiguration service method.
503
+
504
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncSetIdentityPoolConfigurationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorConcurrentModification`.
505
+ 
506
+ @see AWSCognitoSyncSetIdentityPoolConfigurationRequest
507
+ @see AWSCognitoSyncSetIdentityPoolConfigurationResponse
508
+ */
509
+- (AWSTask<AWSCognitoSyncSetIdentityPoolConfigurationResponse *> *)setIdentityPoolConfiguration:(AWSCognitoSyncSetIdentityPoolConfigurationRequest *)request;
510
+
511
+/**
512
+ <p>Sets the necessary configuration for push sync.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
513
+ 
514
+ @param request A container for the necessary parameters to execute the SetIdentityPoolConfiguration service method.
515
+ @param completionHandler The completion handler to call when the load request is complete.
516
+                          `response` - A response object, or `nil` if the request failed.
517
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorConcurrentModification`.
518
+ 
519
+ @see AWSCognitoSyncSetIdentityPoolConfigurationRequest
520
+ @see AWSCognitoSyncSetIdentityPoolConfigurationResponse
521
+ */
522
+- (void)setIdentityPoolConfiguration:(AWSCognitoSyncSetIdentityPoolConfigurationRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncSetIdentityPoolConfigurationResponse * _Nullable response, NSError * _Nullable error))completionHandler;
523
+
524
+/**
525
+ <p>Subscribes to receive notifications when a dataset is modified by another device.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
526
+ 
527
+ @param request A container for the necessary parameters to execute the SubscribeToDataset service method.
528
+
529
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncSubscribeToDatasetResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
530
+ 
531
+ @see AWSCognitoSyncSubscribeToDatasetRequest
532
+ @see AWSCognitoSyncSubscribeToDatasetResponse
533
+ */
534
+- (AWSTask<AWSCognitoSyncSubscribeToDatasetResponse *> *)subscribeToDataset:(AWSCognitoSyncSubscribeToDatasetRequest *)request;
535
+
536
+/**
537
+ <p>Subscribes to receive notifications when a dataset is modified by another device.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
538
+ 
539
+ @param request A container for the necessary parameters to execute the SubscribeToDataset service method.
540
+ @param completionHandler The completion handler to call when the load request is complete.
541
+                          `response` - A response object, or `nil` if the request failed.
542
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
543
+ 
544
+ @see AWSCognitoSyncSubscribeToDatasetRequest
545
+ @see AWSCognitoSyncSubscribeToDatasetResponse
546
+ */
547
+- (void)subscribeToDataset:(AWSCognitoSyncSubscribeToDatasetRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncSubscribeToDatasetResponse * _Nullable response, NSError * _Nullable error))completionHandler;
548
+
549
+/**
550
+ <p>Unsubscribes from receiving notifications when a dataset is modified by another device.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
551
+ 
552
+ @param request A container for the necessary parameters to execute the UnsubscribeFromDataset service method.
553
+
554
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncUnsubscribeFromDatasetResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
555
+ 
556
+ @see AWSCognitoSyncUnsubscribeFromDatasetRequest
557
+ @see AWSCognitoSyncUnsubscribeFromDatasetResponse
558
+ */
559
+- (AWSTask<AWSCognitoSyncUnsubscribeFromDatasetResponse *> *)unsubscribeFromDataset:(AWSCognitoSyncUnsubscribeFromDatasetRequest *)request;
560
+
561
+/**
562
+ <p>Unsubscribes from receiving notifications when a dataset is modified by another device.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
563
+ 
564
+ @param request A container for the necessary parameters to execute the UnsubscribeFromDataset service method.
565
+ @param completionHandler The completion handler to call when the load request is complete.
566
+                          `response` - A response object, or `nil` if the request failed.
567
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
568
+ 
569
+ @see AWSCognitoSyncUnsubscribeFromDatasetRequest
570
+ @see AWSCognitoSyncUnsubscribeFromDatasetResponse
571
+ */
572
+- (void)unsubscribeFromDataset:(AWSCognitoSyncUnsubscribeFromDatasetRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncUnsubscribeFromDatasetResponse * _Nullable response, NSError * _Nullable error))completionHandler;
573
+
574
+/**
575
+ <p>Posts updates to records and adds and deletes records for a dataset and user.</p><p>The sync count in the record patch is your last known sync count for that record. The server will reject an UpdateRecords request with a ResourceConflictException if you try to patch a record with a new value but a stale sync count.</p><p>For example, if the sync count on the server is 5 for a key called highScore and you try and submit a new highScore with sync count of 4, the request will be rejected. To obtain the current sync count for a record, call ListRecords. On a successful update of the record, the response returns the new sync count for that record. You should present that sync count the next time you try to update that same record. When the record does not exist, specify the sync count as 0.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
576
+ 
577
+ @param request A container for the necessary parameters to execute the UpdateRecords service method.
578
+
579
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncUpdateRecordsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorLimitExceeded`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorResourceConflict`, `AWSCognitoSyncErrorInvalidLambdaFunctionOutput`, `AWSCognitoSyncErrorLambdaThrottled`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorInternalError`.
580
+ 
581
+ @see AWSCognitoSyncUpdateRecordsRequest
582
+ @see AWSCognitoSyncUpdateRecordsResponse
583
+ */
584
+- (AWSTask<AWSCognitoSyncUpdateRecordsResponse *> *)updateRecords:(AWSCognitoSyncUpdateRecordsRequest *)request;
585
+
586
+/**
587
+ <p>Posts updates to records and adds and deletes records for a dataset and user.</p><p>The sync count in the record patch is your last known sync count for that record. The server will reject an UpdateRecords request with a ResourceConflictException if you try to patch a record with a new value but a stale sync count.</p><p>For example, if the sync count on the server is 5 for a key called highScore and you try and submit a new highScore with sync count of 4, the request will be rejected. To obtain the current sync count for a record, call ListRecords. On a successful update of the record, the response returns the new sync count for that record. You should present that sync count the next time you try to update that same record. When the record does not exist, specify the sync count as 0.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
588
+ 
589
+ @param request A container for the necessary parameters to execute the UpdateRecords service method.
590
+ @param completionHandler The completion handler to call when the load request is complete.
591
+                          `response` - A response object, or `nil` if the request failed.
592
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorLimitExceeded`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorResourceConflict`, `AWSCognitoSyncErrorInvalidLambdaFunctionOutput`, `AWSCognitoSyncErrorLambdaThrottled`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorInternalError`.
593
+ 
594
+ @see AWSCognitoSyncUpdateRecordsRequest
595
+ @see AWSCognitoSyncUpdateRecordsResponse
596
+ */
597
+- (void)updateRecords:(AWSCognitoSyncUpdateRecordsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncUpdateRecordsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
598
+
599
+@end
600
+
601
+NS_ASSUME_NONNULL_END

二進制
AWSCognito.framework/Info.plist 查看文件


+ 6
- 0
AWSCognito.framework/Modules/module.modulemap 查看文件

@@ -0,0 +1,6 @@
1
+framework module AWSCognito {
2
+  umbrella header "AWSCognito.h"
3
+
4
+  export *
5
+  module * { export * }
6
+}

二進制
AWSCore.framework/AWSCore 查看文件


+ 27
- 0
AWSCore.framework/Headers/AWSBolts.h 查看文件

@@ -0,0 +1,27 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import "AWSCancellationToken.h"
12
+#import "AWSCancellationTokenRegistration.h"
13
+#import "AWSCancellationTokenSource.h"
14
+#import "AWSExecutor.h"
15
+#import "AWSGeneric.h"
16
+#import "AWSTask.h"
17
+#import "AWSTaskCompletionSource.h"
18
+
19
+
20
+NS_ASSUME_NONNULL_BEGIN
21
+
22
+/**
23
+ A string containing the version of the Bolts Framework used by the current application.
24
+ */
25
+extern NSString *const AWSBoltsFrameworkVersionString;
26
+
27
+NS_ASSUME_NONNULL_END

+ 42
- 0
AWSCore.framework/Headers/AWSCancellationToken.h 查看文件

@@ -0,0 +1,42 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+#import "AWSCancellationTokenRegistration.h"
14
+
15
+NS_ASSUME_NONNULL_BEGIN
16
+
17
+/*!
18
+ A block that will be called when a token is cancelled.
19
+ */
20
+typedef void(^AWSCancellationBlock)(void);
21
+
22
+/*!
23
+ The consumer view of a CancellationToken.
24
+ Propagates notification that operations should be canceled.
25
+ A AWSCancellationToken has methods to inspect whether the token has been cancelled.
26
+ */
27
+@interface AWSCancellationToken : NSObject
28
+
29
+/*!
30
+ Whether cancellation has been requested for this token source.
31
+ */
32
+@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested;
33
+
34
+/*!
35
+ Register a block to be notified when the token is cancelled.
36
+ If the token is already cancelled the delegate will be notified immediately.
37
+ */
38
+- (AWSCancellationTokenRegistration *)registerCancellationObserverWithBlock:(AWSCancellationBlock)block;
39
+
40
+@end
41
+
42
+NS_ASSUME_NONNULL_END

+ 29
- 0
AWSCore.framework/Headers/AWSCancellationTokenRegistration.h 查看文件

@@ -0,0 +1,29 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+NS_ASSUME_NONNULL_BEGIN
14
+
15
+/*!
16
+ Represents the registration of a cancellation observer with a cancellation token.
17
+ Can be used to unregister the observer at a later time.
18
+ */
19
+@interface AWSCancellationTokenRegistration : NSObject
20
+
21
+/*!
22
+ Removes the cancellation observer registered with the token
23
+ and releases all resources associated with this registration.
24
+ */
25
+- (void)dispose;
26
+
27
+@end
28
+
29
+NS_ASSUME_NONNULL_END

+ 60
- 0
AWSCore.framework/Headers/AWSCancellationTokenSource.h 查看文件

@@ -0,0 +1,60 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+NS_ASSUME_NONNULL_BEGIN
14
+
15
+@class AWSCancellationToken;
16
+
17
+/*!
18
+ AWSCancellationTokenSource represents the producer side of a CancellationToken.
19
+ Signals to a CancellationToken that it should be canceled.
20
+ It is a cancellation token that also has methods
21
+ for changing the state of a token by cancelling it.
22
+ */
23
+@interface AWSCancellationTokenSource : NSObject
24
+
25
+/*!
26
+ Creates a new cancellation token source.
27
+ */
28
++ (instancetype)cancellationTokenSource;
29
+
30
+/*!
31
+ The cancellation token associated with this CancellationTokenSource.
32
+ */
33
+@property (nonatomic, strong, readonly) AWSCancellationToken *token;
34
+
35
+/*!
36
+ Whether cancellation has been requested for this token source.
37
+ */
38
+@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested;
39
+
40
+/*!
41
+ Cancels the token if it has not already been cancelled.
42
+ */
43
+- (void)cancel;
44
+
45
+/*!
46
+ Schedules a cancel operation on this CancellationTokenSource after the specified number of milliseconds.
47
+ @param millis The number of milliseconds to wait before completing the returned task.
48
+ If delay is `0` the cancel is executed immediately. If delay is `-1` any scheduled cancellation is stopped.
49
+ */
50
+- (void)cancelAfterDelay:(int)millis;
51
+
52
+/*!
53
+ Releases all resources associated with this token source,
54
+ including disposing of all registrations.
55
+ */
56
+- (void)dispose;
57
+
58
+@end
59
+
60
+NS_ASSUME_NONNULL_END

+ 101
- 0
AWSCore.framework/Headers/AWSCategory.h 查看文件

@@ -0,0 +1,101 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import "AWSServiceEnum.h"
18
+
19
+FOUNDATION_EXPORT NSString *const AWSDateRFC822DateFormat1;
20
+FOUNDATION_EXPORT NSString *const AWSDateISO8601DateFormat1;
21
+FOUNDATION_EXPORT NSString *const AWSDateISO8601DateFormat2;
22
+FOUNDATION_EXPORT NSString *const AWSDateISO8601DateFormat3;
23
+FOUNDATION_EXPORT NSString *const AWSDateShortDateFormat1;
24
+FOUNDATION_EXPORT NSString *const AWSDateShortDateFormat2;
25
+
26
+@interface NSDate (AWS)
27
+
28
++ (NSDate *)aws_clockSkewFixedDate;
29
+
30
++ (NSDate *)aws_dateFromString:(NSString *)string;
31
++ (NSDate *)aws_dateFromString:(NSString *)string format:(NSString *)dateFormat;
32
+- (NSString *)aws_stringValue:(NSString *)dateFormat;
33
+
34
+/**
35
+ * Set the clock skew for the current device.  This clock skew will be used for calculating
36
+ * signatures to AWS signatures and for parsing/converting date values from responses.
37
+ *
38
+ * @param clockskew the skew (in seconds) for this device.  If the clock on the device is fast, pass positive skew to correct.  If the clock on the device is slow, pass negative skew to correct.
39
+ */
40
++ (void)aws_setRuntimeClockSkew:(NSTimeInterval)clockskew;
41
+
42
+/**
43
+ * Get the clock skew for the current device.
44
+ *
45
+ * @return the skew (in seconds) currently set for this device.  Positive clock skew implies the device is fast, negative implies the device is slow.
46
+ */
47
++ (NSTimeInterval)aws_getRuntimeClockSkew;
48
+
49
+@end
50
+
51
+@interface NSDictionary (AWS)
52
+
53
+- (NSDictionary *)aws_removeNullValues;
54
+- (id)aws_objectForCaseInsensitiveKey:(id)aKey;
55
+
56
+@end
57
+
58
+@interface NSJSONSerialization (AWS)
59
+
60
++ (NSData *)aws_dataWithJSONObject:(id)obj
61
+                           options:(NSJSONWritingOptions)opt
62
+                             error:(NSError **)error;
63
+
64
+@end
65
+
66
+@interface NSNumber (AWS)
67
+
68
++ (NSNumber *)aws_numberFromString:(NSString *)string;
69
+
70
+@end
71
+
72
+@interface NSObject (AWS)
73
+
74
+- (NSDictionary *)aws_properties;
75
+- (void)aws_copyPropertiesFromObject:(NSObject *)object;
76
+
77
+@end
78
+
79
+@interface NSString (AWS)
80
+
81
++ (NSString *)aws_base64md5FromData:(NSData *)data;
82
+- (BOOL)aws_isBase64Data;
83
+- (NSString *)aws_stringWithURLEncoding;
84
+- (NSString *)aws_stringWithURLEncodingPath;
85
+- (NSString *)aws_stringWithURLEncodingPathWithoutPriorDecoding;
86
+- (NSString *)aws_md5String;
87
+- (NSString *)aws_md5StringLittleEndian;
88
+- (BOOL)aws_isVirtualHostedStyleCompliant;
89
+
90
+- (AWSRegionType)aws_regionTypeValue;
91
+
92
+@end
93
+
94
+@interface NSFileManager (AWS)
95
+
96
+- (BOOL)aws_atomicallyCopyItemAtURL:(NSURL *)sourceURL
97
+                              toURL:(NSURL *)destinationURL
98
+                     backupItemName:(NSString *)backupItemName
99
+                              error:(NSError **)outError;
100
+
101
+@end

+ 56
- 0
AWSCore.framework/Headers/AWSClientContext.h 查看文件

@@ -0,0 +1,56 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+FOUNDATION_EXPORT NSString *const AWSClientContextVersion;
19
+FOUNDATION_EXPORT NSString *const AWSClientContextHeader;
20
+FOUNDATION_EXPORT NSString *const AWSClientContextHeaderEncoding;
21
+
22
+@interface AWSClientContext : NSObject
23
+
24
+#pragma mark - App Details
25
+@property (nonatomic, strong, readonly) NSString *installationId;
26
+@property (nonatomic, strong) NSString *appVersion;
27
+@property (nonatomic, strong) NSString *appBuild;
28
+@property (nonatomic, strong) NSString *appPackageName;
29
+@property (nonatomic, strong) NSString *appName;
30
+
31
+#pragma mark - Device Details
32
+@property (nonatomic, strong) NSString *devicePlatformVersion;
33
+@property (nonatomic, strong) NSString *devicePlatform;
34
+@property (nonatomic, strong) NSString *deviceManufacturer;
35
+@property (nonatomic, strong) NSString *deviceModel;
36
+@property (nonatomic, strong) NSString *deviceModelVersion;
37
+@property (nonatomic, strong) NSString *deviceLocale;
38
+
39
+#pragma mark - Custom Attributes
40
+@property (nonatomic, strong) NSDictionary *customAttributes;
41
+
42
+#pragma mark - Service Details
43
+@property (nonatomic, strong, readonly) NSDictionary *serviceDetails;
44
+
45
+- (instancetype)init;
46
+
47
+- (NSDictionary *)dictionaryRepresentation;
48
+
49
+- (NSString *)JSONString;
50
+
51
+- (NSString *)base64EncodedJSONString;
52
+
53
+- (void)setDetails:(id)details
54
+        forService:(NSString *)service;
55
+
56
+@end

+ 87
- 0
AWSCore.framework/Headers/AWSCocoaLumberjack.h 查看文件

@@ -0,0 +1,87 @@
1
+// Software License Agreement (BSD License)
2
+//
3
+// Copyright (c) 2010-2016, Deusty, LLC
4
+// All rights reserved.
5
+//
6
+// Redistribution and use of this software in source and binary forms,
7
+// with or without modification, are permitted provided that the following conditions are met:
8
+//
9
+// * Redistributions of source code must retain the above copyright notice,
10
+//   this list of conditions and the following disclaimer.
11
+//
12
+// * Neither the name of Deusty nor the names of its contributors may be used
13
+//   to endorse or promote products derived from this software without specific
14
+//   prior written permission of Deusty, LLC.
15
+
16
+/**
17
+ * Welcome to CocoaLumberjack!
18
+ *
19
+ * The project page has a wealth of documentation if you have any questions.
20
+ * https://github.com/CocoaLumberjack/CocoaLumberjack
21
+ *
22
+ * If you're new to the project you may wish to read "Getting Started" at:
23
+ * Documentation/GettingStarted.md
24
+ *
25
+ * Otherwise, here is a quick refresher.
26
+ * There are three steps to using the macros:
27
+ *
28
+ * Step 1:
29
+ * Import the header in your implementation or prefix file:
30
+ *
31
+ * #import <CocoaLumberjack/CocoaLumberjack.h>
32
+ *
33
+ * Step 2:
34
+ * Define your logging level in your implementation file:
35
+ *
36
+ * // Log levels: off, error, warn, info, verbose
37
+ * static const AWSDDLogLevel ddLogLevel = AWSDDLogLevelVerbose;
38
+ *
39
+ * Step 2 [3rd party frameworks]:
40
+ *
41
+ * Define your LOG_LEVEL_DEF to a different variable/function than ddLogLevel:
42
+ *
43
+ * // #undef LOG_LEVEL_DEF // Undefine first only if needed
44
+ * #define LOG_LEVEL_DEF myLibLogLevel
45
+ *
46
+ * Define your logging level in your implementation file:
47
+ *
48
+ * // Log levels: off, error, warn, info, verbose
49
+ * static const AWSDDLogLevel myLibLogLevel = AWSDDLogLevelVerbose;
50
+ *
51
+ * Step 3:
52
+ * Replace your NSLog statements with AWSDDLog statements according to the severity of the message.
53
+ *
54
+ * NSLog(@"Fatal error, no dohickey found!"); -> AWSDDLogError(@"Fatal error, no dohickey found!");
55
+ *
56
+ * AWSDDLog works exactly the same as NSLog.
57
+ * This means you can pass it multiple variables just like NSLog.
58
+ **/
59
+
60
+#import <Foundation/Foundation.h>
61
+
62
+
63
+// Disable legacy macros
64
+#ifndef AWSDD_LEGACY_MACROS
65
+    #define AWSDD_LEGACY_MACROS 0
66
+#endif
67
+
68
+// Core
69
+#import "AWSDDLog.h"
70
+
71
+// Main macros
72
+#import "AWSDDLogMacros.h"
73
+#import "AWSDDAssertMacros.h"
74
+
75
+// Capture ASL
76
+#import "AWSDDASLLogCapture.h"
77
+
78
+// Loggers
79
+#import "AWSDDTTYLogger.h"
80
+#import "AWSDDASLLogger.h"
81
+#import "AWSDDFileLogger.h"
82
+#import "AWSDDOSLogger.h"
83
+
84
+// CLI
85
+#if __has_include("CLIColor.h") && TARGET_OS_OSX
86
+#import "CLIColor.h"
87
+#endif

+ 22
- 0
AWSCore.framework/Headers/AWSCognitoIdentity.h 查看文件

@@ -0,0 +1,22 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+
19
+
20
+
21
+#import "AWSCore.h"
22
+#import "AWSCognitoIdentityService.h"

+ 1005
- 0
AWSCore.framework/Headers/AWSCognitoIdentityModel.h
文件差異過大導致無法顯示
查看文件


+ 24
- 0
AWSCore.framework/Headers/AWSCognitoIdentityResources.h 查看文件

@@ -0,0 +1,24 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+@interface AWSCognitoIdentityResources : NSObject
19
+
20
++ (instancetype)sharedInstance;
21
+
22
+- (NSDictionary *)JSONObject;
23
+
24
+@end

+ 689
- 0
AWSCore.framework/Headers/AWSCognitoIdentityService.h 查看文件

@@ -0,0 +1,689 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import "AWSCore.h"
18
+#import "AWSCognitoIdentityModel.h"
19
+#import "AWSCognitoIdentityResources.h"
20
+
21
+NS_ASSUME_NONNULL_BEGIN
22
+
23
+/**
24
+ <fullname>Amazon Cognito Federated Identities</fullname><p>Amazon Cognito Federated Identities is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. It uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.</p><p>Using Amazon Cognito Federated Identities, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon Cognito user pool, and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.</p><p>For a description of the authentication flow from the Amazon Cognito Developer Guide see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html">Authentication Flow</a>.</p><p>For more information see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html">Amazon Cognito Federated Identities</a>.</p>
25
+ */
26
+@interface AWSCognitoIdentity : AWSService
27
+
28
+/**
29
+ The service configuration used to instantiate this service client.
30
+ 
31
+ @warning Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.
32
+ */
33
+@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration;
34
+
35
+/**
36
+ Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with `defaultServiceConfiguration` from `[AWSServiceManager defaultServiceManager]`. The reference to this object is maintained by the SDK, and you do not need to retain it manually.
37
+
38
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
39
+ 
40
+ *Swift*
41
+
42
+     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
43
+        let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
44
+        let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
45
+        AWSServiceManager.default().defaultServiceConfiguration = configuration
46
+ 
47
+        return true
48
+    }
49
+
50
+ *Objective-C*
51
+
52
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
53
+          AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
54
+                                                                                                          identityPoolId:@"YourIdentityPoolId"];
55
+          AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
56
+                                                                               credentialsProvider:credentialsProvider];
57
+          [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
58
+
59
+          return YES;
60
+      }
61
+
62
+ Then call the following to get the default service client:
63
+
64
+ *Swift*
65
+
66
+     let CognitoIdentity = AWSCognitoIdentity.default()
67
+
68
+ *Objective-C*
69
+
70
+     AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity defaultCognitoIdentity];
71
+
72
+ @return The default service client.
73
+ */
74
++ (instancetype)defaultCognitoIdentity;
75
+
76
+/**
77
+ Creates a service client with the given service configuration and registers it for the key.
78
+
79
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
80
+
81
+ *Swift*
82
+
83
+     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
84
+        let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
85
+        let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
86
+        AWSCognitoIdentity.register(with: configuration!, forKey: "USWest2CognitoIdentity")
87
+ 
88
+        return true
89
+    }
90
+
91
+ *Objective-C*
92
+
93
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
94
+         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
95
+                                                                                                         identityPoolId:@"YourIdentityPoolId"];
96
+         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
97
+                                                                              credentialsProvider:credentialsProvider];
98
+
99
+         [AWSCognitoIdentity registerCognitoIdentityWithConfiguration:configuration forKey:@"USWest2CognitoIdentity"];
100
+
101
+         return YES;
102
+     }
103
+
104
+ Then call the following to get the service client:
105
+
106
+ *Swift*
107
+
108
+     let CognitoIdentity = AWSCognitoIdentity(forKey: "USWest2CognitoIdentity")
109
+
110
+ *Objective-C*
111
+
112
+     AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity CognitoIdentityForKey:@"USWest2CognitoIdentity"];
113
+
114
+ @warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
115
+
116
+ @param configuration A service configuration object.
117
+ @param key           A string to identify the service client.
118
+ */
119
++ (void)registerCognitoIdentityWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key;
120
+
121
+/**
122
+ Retrieves the service client associated with the key. You need to call `+ registerCognitoIdentityWithConfiguration:forKey:` before invoking this method.
123
+
124
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
125
+
126
+ *Swift*
127
+
128
+     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
129
+        let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
130
+        let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
131
+        AWSCognitoIdentity.register(with: configuration!, forKey: "USWest2CognitoIdentity")
132
+ 
133
+        return true
134
+    }
135
+
136
+ *Objective-C*
137
+
138
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
139
+         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
140
+                                                                                                         identityPoolId:@"YourIdentityPoolId"];
141
+         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
142
+                                                                              credentialsProvider:credentialsProvider];
143
+
144
+         [AWSCognitoIdentity registerCognitoIdentityWithConfiguration:configuration forKey:@"USWest2CognitoIdentity"];
145
+
146
+         return YES;
147
+     }
148
+
149
+ Then call the following to get the service client:
150
+
151
+ *Swift*
152
+
153
+     let CognitoIdentity = AWSCognitoIdentity(forKey: "USWest2CognitoIdentity")
154
+
155
+ *Objective-C*
156
+
157
+     AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity CognitoIdentityForKey:@"USWest2CognitoIdentity"];
158
+
159
+ @param key A string to identify the service client.
160
+
161
+ @return An instance of the service client.
162
+ */
163
++ (instancetype)CognitoIdentityForKey:(NSString *)key;
164
+
165
+/**
166
+ Removes the service client associated with the key and release it.
167
+ 
168
+ @warning Before calling this method, make sure no method is running on this client.
169
+ 
170
+ @param key A string to identify the service client.
171
+ */
172
++ (void)removeCognitoIdentityForKey:(NSString *)key;
173
+
174
+/**
175
+ <p>Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account. The keys for <code>SupportedLoginProviders</code> are as follows:</p><ul><li><p>Facebook: <code>graph.facebook.com</code></p></li><li><p>Google: <code>accounts.google.com</code></p></li><li><p>Amazon: <code>www.amazon.com</code></p></li><li><p>Twitter: <code>api.twitter.com</code></p></li><li><p>Digits: <code>www.digits.com</code></p></li></ul><p>You must use AWS Developer credentials to call this API.</p>
176
+ 
177
+ @param request A container for the necessary parameters to execute the CreateIdentityPool service method.
178
+
179
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityPool`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`.
180
+ 
181
+ @see AWSCognitoIdentityCreateIdentityPoolInput
182
+ @see AWSCognitoIdentityIdentityPool
183
+ */
184
+- (AWSTask<AWSCognitoIdentityIdentityPool *> *)createIdentityPool:(AWSCognitoIdentityCreateIdentityPoolInput *)request;
185
+
186
+/**
187
+ <p>Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account. The keys for <code>SupportedLoginProviders</code> are as follows:</p><ul><li><p>Facebook: <code>graph.facebook.com</code></p></li><li><p>Google: <code>accounts.google.com</code></p></li><li><p>Amazon: <code>www.amazon.com</code></p></li><li><p>Twitter: <code>api.twitter.com</code></p></li><li><p>Digits: <code>www.digits.com</code></p></li></ul><p>You must use AWS Developer credentials to call this API.</p>
188
+ 
189
+ @param request A container for the necessary parameters to execute the CreateIdentityPool service method.
190
+ @param completionHandler The completion handler to call when the load request is complete.
191
+                          `response` - A response object, or `nil` if the request failed.
192
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`.
193
+ 
194
+ @see AWSCognitoIdentityCreateIdentityPoolInput
195
+ @see AWSCognitoIdentityIdentityPool
196
+ */
197
+- (void)createIdentityPool:(AWSCognitoIdentityCreateIdentityPoolInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityPool * _Nullable response, NSError * _Nullable error))completionHandler;
198
+
199
+/**
200
+ <p>Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.</p><p>You must use AWS Developer credentials to call this API.</p>
201
+ 
202
+ @param request A container for the necessary parameters to execute the DeleteIdentities service method.
203
+
204
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityDeleteIdentitiesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
205
+ 
206
+ @see AWSCognitoIdentityDeleteIdentitiesInput
207
+ @see AWSCognitoIdentityDeleteIdentitiesResponse
208
+ */
209
+- (AWSTask<AWSCognitoIdentityDeleteIdentitiesResponse *> *)deleteIdentities:(AWSCognitoIdentityDeleteIdentitiesInput *)request;
210
+
211
+/**
212
+ <p>Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.</p><p>You must use AWS Developer credentials to call this API.</p>
213
+ 
214
+ @param request A container for the necessary parameters to execute the DeleteIdentities service method.
215
+ @param completionHandler The completion handler to call when the load request is complete.
216
+                          `response` - A response object, or `nil` if the request failed.
217
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
218
+ 
219
+ @see AWSCognitoIdentityDeleteIdentitiesInput
220
+ @see AWSCognitoIdentityDeleteIdentitiesResponse
221
+ */
222
+- (void)deleteIdentities:(AWSCognitoIdentityDeleteIdentitiesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityDeleteIdentitiesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
223
+
224
+/**
225
+ <p>Deletes an identity pool. Once a pool is deleted, users will not be able to authenticate with the pool.</p><p>You must use AWS Developer credentials to call this API.</p>
226
+ 
227
+ @param request A container for the necessary parameters to execute the DeleteIdentityPool service method.
228
+
229
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
230
+ 
231
+ @see AWSCognitoIdentityDeleteIdentityPoolInput
232
+ */
233
+- (AWSTask *)deleteIdentityPool:(AWSCognitoIdentityDeleteIdentityPoolInput *)request;
234
+
235
+/**
236
+ <p>Deletes an identity pool. Once a pool is deleted, users will not be able to authenticate with the pool.</p><p>You must use AWS Developer credentials to call this API.</p>
237
+ 
238
+ @param request A container for the necessary parameters to execute the DeleteIdentityPool service method.
239
+ @param completionHandler The completion handler to call when the load request is complete.
240
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
241
+ 
242
+ @see AWSCognitoIdentityDeleteIdentityPoolInput
243
+ */
244
+- (void)deleteIdentityPool:(AWSCognitoIdentityDeleteIdentityPoolInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
245
+
246
+/**
247
+ <p>Returns metadata related to the given identity, including when the identity was created and any associated linked logins.</p><p>You must use AWS Developer credentials to call this API.</p>
248
+ 
249
+ @param request A container for the necessary parameters to execute the DescribeIdentity service method.
250
+
251
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityDescription`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
252
+ 
253
+ @see AWSCognitoIdentityDescribeIdentityInput
254
+ @see AWSCognitoIdentityIdentityDescription
255
+ */
256
+- (AWSTask<AWSCognitoIdentityIdentityDescription *> *)describeIdentity:(AWSCognitoIdentityDescribeIdentityInput *)request;
257
+
258
+/**
259
+ <p>Returns metadata related to the given identity, including when the identity was created and any associated linked logins.</p><p>You must use AWS Developer credentials to call this API.</p>
260
+ 
261
+ @param request A container for the necessary parameters to execute the DescribeIdentity service method.
262
+ @param completionHandler The completion handler to call when the load request is complete.
263
+                          `response` - A response object, or `nil` if the request failed.
264
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
265
+ 
266
+ @see AWSCognitoIdentityDescribeIdentityInput
267
+ @see AWSCognitoIdentityIdentityDescription
268
+ */
269
+- (void)describeIdentity:(AWSCognitoIdentityDescribeIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityDescription * _Nullable response, NSError * _Nullable error))completionHandler;
270
+
271
+/**
272
+ <p>Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.</p><p>You must use AWS Developer credentials to call this API.</p>
273
+ 
274
+ @param request A container for the necessary parameters to execute the DescribeIdentityPool service method.
275
+
276
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityPool`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
277
+ 
278
+ @see AWSCognitoIdentityDescribeIdentityPoolInput
279
+ @see AWSCognitoIdentityIdentityPool
280
+ */
281
+- (AWSTask<AWSCognitoIdentityIdentityPool *> *)describeIdentityPool:(AWSCognitoIdentityDescribeIdentityPoolInput *)request;
282
+
283
+/**
284
+ <p>Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.</p><p>You must use AWS Developer credentials to call this API.</p>
285
+ 
286
+ @param request A container for the necessary parameters to execute the DescribeIdentityPool service method.
287
+ @param completionHandler The completion handler to call when the load request is complete.
288
+                          `response` - A response object, or `nil` if the request failed.
289
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
290
+ 
291
+ @see AWSCognitoIdentityDescribeIdentityPoolInput
292
+ @see AWSCognitoIdentityIdentityPool
293
+ */
294
+- (void)describeIdentityPool:(AWSCognitoIdentityDescribeIdentityPoolInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityPool * _Nullable response, NSError * _Nullable error))completionHandler;
295
+
296
+/**
297
+ <p>Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.</p><p>This is a public API. You do not need any credentials to call this API.</p>
298
+ 
299
+ @param request A container for the necessary parameters to execute the GetCredentialsForIdentity service method.
300
+
301
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetCredentialsForIdentityResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
302
+ 
303
+ @see AWSCognitoIdentityGetCredentialsForIdentityInput
304
+ @see AWSCognitoIdentityGetCredentialsForIdentityResponse
305
+ */
306
+- (AWSTask<AWSCognitoIdentityGetCredentialsForIdentityResponse *> *)getCredentialsForIdentity:(AWSCognitoIdentityGetCredentialsForIdentityInput *)request;
307
+
308
+/**
309
+ <p>Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.</p><p>This is a public API. You do not need any credentials to call this API.</p>
310
+ 
311
+ @param request A container for the necessary parameters to execute the GetCredentialsForIdentity service method.
312
+ @param completionHandler The completion handler to call when the load request is complete.
313
+                          `response` - A response object, or `nil` if the request failed.
314
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
315
+ 
316
+ @see AWSCognitoIdentityGetCredentialsForIdentityInput
317
+ @see AWSCognitoIdentityGetCredentialsForIdentityResponse
318
+ */
319
+- (void)getCredentialsForIdentity:(AWSCognitoIdentityGetCredentialsForIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetCredentialsForIdentityResponse * _Nullable response, NSError * _Nullable error))completionHandler;
320
+
321
+/**
322
+ <p>Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.</p><p>This is a public API. You do not need any credentials to call this API.</p>
323
+ 
324
+ @param request A container for the necessary parameters to execute the GetId service method.
325
+
326
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetIdResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`, `AWSCognitoIdentityErrorExternalService`.
327
+ 
328
+ @see AWSCognitoIdentityGetIdInput
329
+ @see AWSCognitoIdentityGetIdResponse
330
+ */
331
+- (AWSTask<AWSCognitoIdentityGetIdResponse *> *)getId:(AWSCognitoIdentityGetIdInput *)request;
332
+
333
+/**
334
+ <p>Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.</p><p>This is a public API. You do not need any credentials to call this API.</p>
335
+ 
336
+ @param request A container for the necessary parameters to execute the GetId service method.
337
+ @param completionHandler The completion handler to call when the load request is complete.
338
+                          `response` - A response object, or `nil` if the request failed.
339
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`, `AWSCognitoIdentityErrorExternalService`.
340
+ 
341
+ @see AWSCognitoIdentityGetIdInput
342
+ @see AWSCognitoIdentityGetIdResponse
343
+ */
344
+- (void)getId:(AWSCognitoIdentityGetIdInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetIdResponse * _Nullable response, NSError * _Nullable error))completionHandler;
345
+
346
+/**
347
+ <p>Gets the roles for an identity pool.</p><p>You must use AWS Developer credentials to call this API.</p>
348
+ 
349
+ @param request A container for the necessary parameters to execute the GetIdentityPoolRoles service method.
350
+
351
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetIdentityPoolRolesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
352
+ 
353
+ @see AWSCognitoIdentityGetIdentityPoolRolesInput
354
+ @see AWSCognitoIdentityGetIdentityPoolRolesResponse
355
+ */
356
+- (AWSTask<AWSCognitoIdentityGetIdentityPoolRolesResponse *> *)getIdentityPoolRoles:(AWSCognitoIdentityGetIdentityPoolRolesInput *)request;
357
+
358
+/**
359
+ <p>Gets the roles for an identity pool.</p><p>You must use AWS Developer credentials to call this API.</p>
360
+ 
361
+ @param request A container for the necessary parameters to execute the GetIdentityPoolRoles service method.
362
+ @param completionHandler The completion handler to call when the load request is complete.
363
+                          `response` - A response object, or `nil` if the request failed.
364
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
365
+ 
366
+ @see AWSCognitoIdentityGetIdentityPoolRolesInput
367
+ @see AWSCognitoIdentityGetIdentityPoolRolesResponse
368
+ */
369
+- (void)getIdentityPoolRoles:(AWSCognitoIdentityGetIdentityPoolRolesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetIdentityPoolRolesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
370
+
371
+/**
372
+ <p>Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by <a>GetId</a>. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.</p><p>The OpenId token is valid for 10 minutes.</p><p>This is a public API. You do not need any credentials to call this API.</p>
373
+ 
374
+ @param request A container for the necessary parameters to execute the GetOpenIdToken service method.
375
+
376
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetOpenIdTokenResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
377
+ 
378
+ @see AWSCognitoIdentityGetOpenIdTokenInput
379
+ @see AWSCognitoIdentityGetOpenIdTokenResponse
380
+ */
381
+- (AWSTask<AWSCognitoIdentityGetOpenIdTokenResponse *> *)getOpenIdToken:(AWSCognitoIdentityGetOpenIdTokenInput *)request;
382
+
383
+/**
384
+ <p>Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by <a>GetId</a>. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.</p><p>The OpenId token is valid for 10 minutes.</p><p>This is a public API. You do not need any credentials to call this API.</p>
385
+ 
386
+ @param request A container for the necessary parameters to execute the GetOpenIdToken service method.
387
+ @param completionHandler The completion handler to call when the load request is complete.
388
+                          `response` - A response object, or `nil` if the request failed.
389
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
390
+ 
391
+ @see AWSCognitoIdentityGetOpenIdTokenInput
392
+ @see AWSCognitoIdentityGetOpenIdTokenResponse
393
+ */
394
+- (void)getOpenIdToken:(AWSCognitoIdentityGetOpenIdTokenInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetOpenIdTokenResponse * _Nullable response, NSError * _Nullable error))completionHandler;
395
+
396
+/**
397
+ <p>Registers (or retrieves) a Cognito <code>IdentityId</code> and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the <code>Logins</code> map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users.</p><p>You can use <code>GetOpenIdTokenForDeveloperIdentity</code> to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the <code>IdentityId</code> should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing <code>IdentityId</code>. This API will create the identity in the specified <code>IdentityPoolId</code>.</p><p>You must use AWS Developer credentials to call this API.</p>
398
+ 
399
+ @param request A container for the necessary parameters to execute the GetOpenIdTokenForDeveloperIdentity service method.
400
+
401
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered`.
402
+ 
403
+ @see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput
404
+ @see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse
405
+ */
406
+- (AWSTask<AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse *> *)getOpenIdTokenForDeveloperIdentity:(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput *)request;
407
+
408
+/**
409
+ <p>Registers (or retrieves) a Cognito <code>IdentityId</code> and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the <code>Logins</code> map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users.</p><p>You can use <code>GetOpenIdTokenForDeveloperIdentity</code> to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the <code>IdentityId</code> should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing <code>IdentityId</code>. This API will create the identity in the specified <code>IdentityPoolId</code>.</p><p>You must use AWS Developer credentials to call this API.</p>
410
+ 
411
+ @param request A container for the necessary parameters to execute the GetOpenIdTokenForDeveloperIdentity service method.
412
+ @param completionHandler The completion handler to call when the load request is complete.
413
+                          `response` - A response object, or `nil` if the request failed.
414
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered`.
415
+ 
416
+ @see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput
417
+ @see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse
418
+ */
419
+- (void)getOpenIdTokenForDeveloperIdentity:(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse * _Nullable response, NSError * _Nullable error))completionHandler;
420
+
421
+/**
422
+ <p>Lists the identities in an identity pool.</p><p>You must use AWS Developer credentials to call this API.</p>
423
+ 
424
+ @param request A container for the necessary parameters to execute the ListIdentities service method.
425
+
426
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityListIdentitiesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
427
+ 
428
+ @see AWSCognitoIdentityListIdentitiesInput
429
+ @see AWSCognitoIdentityListIdentitiesResponse
430
+ */
431
+- (AWSTask<AWSCognitoIdentityListIdentitiesResponse *> *)listIdentities:(AWSCognitoIdentityListIdentitiesInput *)request;
432
+
433
+/**
434
+ <p>Lists the identities in an identity pool.</p><p>You must use AWS Developer credentials to call this API.</p>
435
+ 
436
+ @param request A container for the necessary parameters to execute the ListIdentities service method.
437
+ @param completionHandler The completion handler to call when the load request is complete.
438
+                          `response` - A response object, or `nil` if the request failed.
439
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
440
+ 
441
+ @see AWSCognitoIdentityListIdentitiesInput
442
+ @see AWSCognitoIdentityListIdentitiesResponse
443
+ */
444
+- (void)listIdentities:(AWSCognitoIdentityListIdentitiesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityListIdentitiesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
445
+
446
+/**
447
+ <p>Lists all of the Cognito identity pools registered for your account.</p><p>You must use AWS Developer credentials to call this API.</p>
448
+ 
449
+ @param request A container for the necessary parameters to execute the ListIdentityPools service method.
450
+
451
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityListIdentityPoolsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorInternalError`.
452
+ 
453
+ @see AWSCognitoIdentityListIdentityPoolsInput
454
+ @see AWSCognitoIdentityListIdentityPoolsResponse
455
+ */
456
+- (AWSTask<AWSCognitoIdentityListIdentityPoolsResponse *> *)listIdentityPools:(AWSCognitoIdentityListIdentityPoolsInput *)request;
457
+
458
+/**
459
+ <p>Lists all of the Cognito identity pools registered for your account.</p><p>You must use AWS Developer credentials to call this API.</p>
460
+ 
461
+ @param request A container for the necessary parameters to execute the ListIdentityPools service method.
462
+ @param completionHandler The completion handler to call when the load request is complete.
463
+                          `response` - A response object, or `nil` if the request failed.
464
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorInternalError`.
465
+ 
466
+ @see AWSCognitoIdentityListIdentityPoolsInput
467
+ @see AWSCognitoIdentityListIdentityPoolsResponse
468
+ */
469
+- (void)listIdentityPools:(AWSCognitoIdentityListIdentityPoolsInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityListIdentityPoolsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
470
+
471
+/**
472
+ <p>Lists the tags that are assigned to an Amazon Cognito identity pool.</p><p>A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.</p><p>You can use this action up to 10 times per second, per account.</p>
473
+ 
474
+ @param request A container for the necessary parameters to execute the ListTagsForResource service method.
475
+
476
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityListTagsForResourceResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
477
+ 
478
+ @see AWSCognitoIdentityListTagsForResourceInput
479
+ @see AWSCognitoIdentityListTagsForResourceResponse
480
+ */
481
+- (AWSTask<AWSCognitoIdentityListTagsForResourceResponse *> *)listTagsForResource:(AWSCognitoIdentityListTagsForResourceInput *)request;
482
+
483
+/**
484
+ <p>Lists the tags that are assigned to an Amazon Cognito identity pool.</p><p>A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.</p><p>You can use this action up to 10 times per second, per account.</p>
485
+ 
486
+ @param request A container for the necessary parameters to execute the ListTagsForResource service method.
487
+ @param completionHandler The completion handler to call when the load request is complete.
488
+                          `response` - A response object, or `nil` if the request failed.
489
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
490
+ 
491
+ @see AWSCognitoIdentityListTagsForResourceInput
492
+ @see AWSCognitoIdentityListTagsForResourceResponse
493
+ */
494
+- (void)listTagsForResource:(AWSCognitoIdentityListTagsForResourceInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityListTagsForResourceResponse * _Nullable response, NSError * _Nullable error))completionHandler;
495
+
496
+/**
497
+ <p>Retrieves the <code>IdentityID</code> associated with a <code>DeveloperUserIdentifier</code> or the list of <code>DeveloperUserIdentifier</code> values associated with an <code>IdentityId</code> for an existing identity. Either <code>IdentityID</code> or <code>DeveloperUserIdentifier</code> must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, <code>DeveloperUserIdentifier</code> will be matched against <code>IdentityID</code>. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a <code>ResourceConflictException</code> is thrown.</p><p><code>LookupDeveloperIdentity</code> is intended for low-throughput control plane operations: for example, to enable customer service to locate an identity ID by username. If you are using it for higher-volume operations such as user authentication, your requests are likely to be throttled. <a>GetOpenIdTokenForDeveloperIdentity</a> is a better option for higher-volume operations for user authentication.</p><p>You must use AWS Developer credentials to call this API.</p>
498
+ 
499
+ @param request A container for the necessary parameters to execute the LookupDeveloperIdentity service method.
500
+
501
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityLookupDeveloperIdentityResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
502
+ 
503
+ @see AWSCognitoIdentityLookupDeveloperIdentityInput
504
+ @see AWSCognitoIdentityLookupDeveloperIdentityResponse
505
+ */
506
+- (AWSTask<AWSCognitoIdentityLookupDeveloperIdentityResponse *> *)lookupDeveloperIdentity:(AWSCognitoIdentityLookupDeveloperIdentityInput *)request;
507
+
508
+/**
509
+ <p>Retrieves the <code>IdentityID</code> associated with a <code>DeveloperUserIdentifier</code> or the list of <code>DeveloperUserIdentifier</code> values associated with an <code>IdentityId</code> for an existing identity. Either <code>IdentityID</code> or <code>DeveloperUserIdentifier</code> must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, <code>DeveloperUserIdentifier</code> will be matched against <code>IdentityID</code>. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a <code>ResourceConflictException</code> is thrown.</p><p><code>LookupDeveloperIdentity</code> is intended for low-throughput control plane operations: for example, to enable customer service to locate an identity ID by username. If you are using it for higher-volume operations such as user authentication, your requests are likely to be throttled. <a>GetOpenIdTokenForDeveloperIdentity</a> is a better option for higher-volume operations for user authentication.</p><p>You must use AWS Developer credentials to call this API.</p>
510
+ 
511
+ @param request A container for the necessary parameters to execute the LookupDeveloperIdentity service method.
512
+ @param completionHandler The completion handler to call when the load request is complete.
513
+                          `response` - A response object, or `nil` if the request failed.
514
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
515
+ 
516
+ @see AWSCognitoIdentityLookupDeveloperIdentityInput
517
+ @see AWSCognitoIdentityLookupDeveloperIdentityResponse
518
+ */
519
+- (void)lookupDeveloperIdentity:(AWSCognitoIdentityLookupDeveloperIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityLookupDeveloperIdentityResponse * _Nullable response, NSError * _Nullable error))completionHandler;
520
+
521
+/**
522
+ <p>Merges two users having different <code>IdentityId</code>s, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (<code>SourceUserIdentifier</code>) with the <code>IdentityId</code> of the <code>DestinationUserIdentifier</code>. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.</p><p>The number of linked logins is limited to 20. So, the number of linked logins for the source user, <code>SourceUserIdentifier</code>, and the destination user, <code>DestinationUserIdentifier</code>, together should not be larger than 20. Otherwise, an exception will be thrown.</p><p>You must use AWS Developer credentials to call this API.</p>
523
+ 
524
+ @param request A container for the necessary parameters to execute the MergeDeveloperIdentities service method.
525
+
526
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityMergeDeveloperIdentitiesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
527
+ 
528
+ @see AWSCognitoIdentityMergeDeveloperIdentitiesInput
529
+ @see AWSCognitoIdentityMergeDeveloperIdentitiesResponse
530
+ */
531
+- (AWSTask<AWSCognitoIdentityMergeDeveloperIdentitiesResponse *> *)mergeDeveloperIdentities:(AWSCognitoIdentityMergeDeveloperIdentitiesInput *)request;
532
+
533
+/**
534
+ <p>Merges two users having different <code>IdentityId</code>s, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (<code>SourceUserIdentifier</code>) with the <code>IdentityId</code> of the <code>DestinationUserIdentifier</code>. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.</p><p>The number of linked logins is limited to 20. So, the number of linked logins for the source user, <code>SourceUserIdentifier</code>, and the destination user, <code>DestinationUserIdentifier</code>, together should not be larger than 20. Otherwise, an exception will be thrown.</p><p>You must use AWS Developer credentials to call this API.</p>
535
+ 
536
+ @param request A container for the necessary parameters to execute the MergeDeveloperIdentities service method.
537
+ @param completionHandler The completion handler to call when the load request is complete.
538
+                          `response` - A response object, or `nil` if the request failed.
539
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
540
+ 
541
+ @see AWSCognitoIdentityMergeDeveloperIdentitiesInput
542
+ @see AWSCognitoIdentityMergeDeveloperIdentitiesResponse
543
+ */
544
+- (void)mergeDeveloperIdentities:(AWSCognitoIdentityMergeDeveloperIdentitiesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityMergeDeveloperIdentitiesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
545
+
546
+/**
547
+ <p>Sets the roles for an identity pool. These roles are used when making calls to <a>GetCredentialsForIdentity</a> action.</p><p>You must use AWS Developer credentials to call this API.</p>
548
+ 
549
+ @param request A container for the necessary parameters to execute the SetIdentityPoolRoles service method.
550
+
551
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`.
552
+ 
553
+ @see AWSCognitoIdentitySetIdentityPoolRolesInput
554
+ */
555
+- (AWSTask *)setIdentityPoolRoles:(AWSCognitoIdentitySetIdentityPoolRolesInput *)request;
556
+
557
+/**
558
+ <p>Sets the roles for an identity pool. These roles are used when making calls to <a>GetCredentialsForIdentity</a> action.</p><p>You must use AWS Developer credentials to call this API.</p>
559
+ 
560
+ @param request A container for the necessary parameters to execute the SetIdentityPoolRoles service method.
561
+ @param completionHandler The completion handler to call when the load request is complete.
562
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`.
563
+ 
564
+ @see AWSCognitoIdentitySetIdentityPoolRolesInput
565
+ */
566
+- (void)setIdentityPoolRoles:(AWSCognitoIdentitySetIdentityPoolRolesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
567
+
568
+/**
569
+ <p>Assigns a set of tags to an Amazon Cognito identity pool. A tag is a label that you can use to categorize and manage identity pools in different ways, such as by purpose, owner, environment, or other criteria.</p><p>Each tag consists of a key and value, both of which you define. A key is a general category for more specific values. For example, if you have two versions of an identity pool, one for testing and another for production, you might assign an <code>Environment</code> tag key to both identity pools. The value of this key might be <code>Test</code> for one identity pool and <code>Production</code> for the other.</p><p>Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with your identity pools. In an IAM policy, you can constrain permissions for identity pools based on specific tags or tag values.</p><p>You can use this action up to 5 times per second, per account. An identity pool can have as many as 50 tags.</p>
570
+ 
571
+ @param request A container for the necessary parameters to execute the TagResource service method.
572
+
573
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityTagResourceResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
574
+ 
575
+ @see AWSCognitoIdentityTagResourceInput
576
+ @see AWSCognitoIdentityTagResourceResponse
577
+ */
578
+- (AWSTask<AWSCognitoIdentityTagResourceResponse *> *)tagResource:(AWSCognitoIdentityTagResourceInput *)request;
579
+
580
+/**
581
+ <p>Assigns a set of tags to an Amazon Cognito identity pool. A tag is a label that you can use to categorize and manage identity pools in different ways, such as by purpose, owner, environment, or other criteria.</p><p>Each tag consists of a key and value, both of which you define. A key is a general category for more specific values. For example, if you have two versions of an identity pool, one for testing and another for production, you might assign an <code>Environment</code> tag key to both identity pools. The value of this key might be <code>Test</code> for one identity pool and <code>Production</code> for the other.</p><p>Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with your identity pools. In an IAM policy, you can constrain permissions for identity pools based on specific tags or tag values.</p><p>You can use this action up to 5 times per second, per account. An identity pool can have as many as 50 tags.</p>
582
+ 
583
+ @param request A container for the necessary parameters to execute the TagResource service method.
584
+ @param completionHandler The completion handler to call when the load request is complete.
585
+                          `response` - A response object, or `nil` if the request failed.
586
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
587
+ 
588
+ @see AWSCognitoIdentityTagResourceInput
589
+ @see AWSCognitoIdentityTagResourceResponse
590
+ */
591
+- (void)tagResource:(AWSCognitoIdentityTagResourceInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityTagResourceResponse * _Nullable response, NSError * _Nullable error))completionHandler;
592
+
593
+/**
594
+ <p>Unlinks a <code>DeveloperUserIdentifier</code> from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.</p><p>You must use AWS Developer credentials to call this API.</p>
595
+ 
596
+ @param request A container for the necessary parameters to execute the UnlinkDeveloperIdentity service method.
597
+
598
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
599
+ 
600
+ @see AWSCognitoIdentityUnlinkDeveloperIdentityInput
601
+ */
602
+- (AWSTask *)unlinkDeveloperIdentity:(AWSCognitoIdentityUnlinkDeveloperIdentityInput *)request;
603
+
604
+/**
605
+ <p>Unlinks a <code>DeveloperUserIdentifier</code> from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.</p><p>You must use AWS Developer credentials to call this API.</p>
606
+ 
607
+ @param request A container for the necessary parameters to execute the UnlinkDeveloperIdentity service method.
608
+ @param completionHandler The completion handler to call when the load request is complete.
609
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
610
+ 
611
+ @see AWSCognitoIdentityUnlinkDeveloperIdentityInput
612
+ */
613
+- (void)unlinkDeveloperIdentity:(AWSCognitoIdentityUnlinkDeveloperIdentityInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
614
+
615
+/**
616
+ <p>Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible.</p><p>This is a public API. You do not need any credentials to call this API.</p>
617
+ 
618
+ @param request A container for the necessary parameters to execute the UnlinkIdentity service method.
619
+
620
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
621
+ 
622
+ @see AWSCognitoIdentityUnlinkIdentityInput
623
+ */
624
+- (AWSTask *)unlinkIdentity:(AWSCognitoIdentityUnlinkIdentityInput *)request;
625
+
626
+/**
627
+ <p>Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible.</p><p>This is a public API. You do not need any credentials to call this API.</p>
628
+ 
629
+ @param request A container for the necessary parameters to execute the UnlinkIdentity service method.
630
+ @param completionHandler The completion handler to call when the load request is complete.
631
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
632
+ 
633
+ @see AWSCognitoIdentityUnlinkIdentityInput
634
+ */
635
+- (void)unlinkIdentity:(AWSCognitoIdentityUnlinkIdentityInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
636
+
637
+/**
638
+ <p>Removes the specified tags from an Amazon Cognito identity pool. You can use this action up to 5 times per second, per account</p>
639
+ 
640
+ @param request A container for the necessary parameters to execute the UntagResource service method.
641
+
642
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityUntagResourceResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
643
+ 
644
+ @see AWSCognitoIdentityUntagResourceInput
645
+ @see AWSCognitoIdentityUntagResourceResponse
646
+ */
647
+- (AWSTask<AWSCognitoIdentityUntagResourceResponse *> *)untagResource:(AWSCognitoIdentityUntagResourceInput *)request;
648
+
649
+/**
650
+ <p>Removes the specified tags from an Amazon Cognito identity pool. You can use this action up to 5 times per second, per account</p>
651
+ 
652
+ @param request A container for the necessary parameters to execute the UntagResource service method.
653
+ @param completionHandler The completion handler to call when the load request is complete.
654
+                          `response` - A response object, or `nil` if the request failed.
655
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
656
+ 
657
+ @see AWSCognitoIdentityUntagResourceInput
658
+ @see AWSCognitoIdentityUntagResourceResponse
659
+ */
660
+- (void)untagResource:(AWSCognitoIdentityUntagResourceInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityUntagResourceResponse * _Nullable response, NSError * _Nullable error))completionHandler;
661
+
662
+/**
663
+ <p>Updates an identity pool.</p><p>You must use AWS Developer credentials to call this API.</p>
664
+ 
665
+ @param request A container for the necessary parameters to execute the UpdateIdentityPool service method.
666
+
667
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityPool`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`, `AWSCognitoIdentityErrorLimitExceeded`.
668
+ 
669
+ @see AWSCognitoIdentityIdentityPool
670
+ @see AWSCognitoIdentityIdentityPool
671
+ */
672
+- (AWSTask<AWSCognitoIdentityIdentityPool *> *)updateIdentityPool:(AWSCognitoIdentityIdentityPool *)request;
673
+
674
+/**
675
+ <p>Updates an identity pool.</p><p>You must use AWS Developer credentials to call this API.</p>
676
+ 
677
+ @param request A container for the necessary parameters to execute the UpdateIdentityPool service method.
678
+ @param completionHandler The completion handler to call when the load request is complete.
679
+                          `response` - A response object, or `nil` if the request failed.
680
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`, `AWSCognitoIdentityErrorLimitExceeded`.
681
+ 
682
+ @see AWSCognitoIdentityIdentityPool
683
+ @see AWSCognitoIdentityIdentityPool
684
+ */
685
+- (void)updateIdentityPool:(AWSCognitoIdentityIdentityPool *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityPool * _Nullable response, NSError * _Nullable error))completionHandler;
686
+
687
+@end
688
+
689
+NS_ASSUME_NONNULL_END

+ 71
- 0
AWSCore.framework/Headers/AWSCore.h 查看文件

@@ -0,0 +1,71 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <UIKit/UIKit.h>
17
+
18
+/*!
19
+ Project version number for the AWSCore framework.
20
+
21
+ @warning This value is deprecated and will be removed in an upcoming minor
22
+ version of the SDK. It conflicts with the umbrella header generated by
23
+ CocoaPods, and is not implemented at all in cases where this SDK is imported
24
+ as a CocoaPod static library. As this numeric value does not support
25
+ patch-level versioning, you should use AWSiOSSDKVersion instead.
26
+ @deprecated Use AWSiOSSDKVersion instead.
27
+ */
28
+FOUNDATION_EXPORT double AWSCoreVersionNumber DEPRECATED_MSG_ATTRIBUTE("Use AWSiOSSDKVersion instead.");
29
+
30
+/*!
31
+ Project version string for the AWSCore framework.
32
+
33
+ @warning This value is deprecated and will be removed in an upcoming minor
34
+ version of the SDK. It conflicts with the umbrella header generated by
35
+ CocoaPods, and is not implemented at all in cases where this SDK is imported
36
+ as a CocoaPod static library.
37
+ @deprecated Use AWSiOSSDKVersion instead.
38
+ */
39
+FOUNDATION_EXPORT const unsigned char AWSCoreVersionString[] DEPRECATED_MSG_ATTRIBUTE("Use AWSiOSSDKVersion instead.");
40
+
41
+#import "AWSCocoaLumberjack.h"
42
+
43
+#import "AWSServiceEnum.h"
44
+#import "AWSService.h"
45
+#import "AWSCredentialsProvider.h"
46
+#import "AWSIdentityProvider.h"
47
+#import "AWSModel.h"
48
+#import "AWSNetworking.h"
49
+#import "AWSCategory.h"
50
+#import "AWSLogging.h"
51
+#import "AWSClientContext.h"
52
+#import "AWSSynchronizedMutableDictionary.h"
53
+#import "AWSSerialization.h"
54
+#import "AWSURLRequestSerialization.h"
55
+#import "AWSURLResponseSerialization.h"
56
+#import "AWSURLSessionManager.h"
57
+#import "AWSSignature.h"
58
+#import "AWSURLRequestRetryHandler.h"
59
+#import "AWSValidation.h"
60
+#import "AWSInfo.h"
61
+
62
+#import "AWSBolts.h"
63
+#import "AWSGZIP.h"
64
+#import "AWSFMDB.h"
65
+#import "AWSKSReachability.h"
66
+#import "AWSTMCache.h"
67
+#import "AWSUICKeyChainStore.h"
68
+
69
+
70
+#import "AWSSTS.h"
71
+#import "AWSCognitoIdentity.h"

+ 263
- 0
AWSCore.framework/Headers/AWSCredentialsProvider.h 查看文件

@@ -0,0 +1,263 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import "AWSServiceEnum.h"
18
+#import "AWSIdentityProvider.h"
19
+
20
+NS_ASSUME_NONNULL_BEGIN
21
+
22
+FOUNDATION_EXPORT NSString *const AWSCognitoCredentialsProviderErrorDomain;
23
+typedef NS_ENUM(NSInteger, AWSCognitoCredentialsProviderErrorType) {
24
+    AWSCognitoCredentialsProviderErrorUnknown,
25
+    AWSCognitoCredentialsProviderIdentityIdIsNil,
26
+    AWSCognitoCredentialsProviderInvalidConfiguration,
27
+    AWSCognitoCredentialsProviderInvalidCognitoIdentityToken,
28
+    AWSCognitoCredentialsProviderCredentialsRefreshTimeout,
29
+};
30
+
31
+@class AWSTask<__covariant ResultType>;
32
+
33
+/**
34
+ An AWS credentials container class.
35
+ */
36
+@interface AWSCredentials : NSObject
37
+
38
+/**
39
+ Access Key component of credentials.
40
+ */
41
+@property (nonatomic, strong, readonly) NSString *accessKey;
42
+
43
+/**
44
+ Secret Access Key component of credentials.
45
+ */
46
+@property (nonatomic, strong, readonly) NSString *secretKey;
47
+
48
+/**
49
+ Session Token component of credentials.
50
+ */
51
+@property (nonatomic, strong, readonly, nullable) NSString *sessionKey;
52
+
53
+/**
54
+ Date at which these credentials will expire.
55
+ */
56
+@property (nonatomic, strong, readonly, nullable) NSDate *expiration;
57
+
58
+/**
59
+ Initiates an AWS credentials object.
60
+
61
+ @param accessKey  An AWS Access key.
62
+ @param secretKey  An AWS Secret key.
63
+ @param sessionKey An AWS Session key.
64
+ @param expiration The expiration date of the temporary AWS credentials.
65
+
66
+ @return An AWS credentials object.
67
+ */
68
+- (instancetype)initWithAccessKey:(NSString *)accessKey
69
+                        secretKey:(NSString *)secretKey
70
+                       sessionKey:(nullable NSString *)sessionKey
71
+                       expiration:(nullable NSDate *)expiration;
72
+
73
+@end
74
+
75
+/**
76
+ The AWS credentials provider protocol used to provide credentials to the SDK in order to make calls to the AWS services.
77
+ */
78
+@protocol AWSCredentialsProvider <NSObject>
79
+
80
+/**
81
+ Asynchronously returns a valid AWS credentials or an error object if it cannot retrieve valid credentials. It should cache valid credentials as much as possible and refresh them when they are invalid.
82
+
83
+ @return A valid AWS credentials or an error object describing the error.
84
+ */
85
+- (AWSTask<AWSCredentials *> *)credentials;
86
+
87
+/**
88
+ Invalidates the cached temporary AWS credentials. If the credentials provider does not cache temporary credentials, this operation is a no-op.
89
+ */
90
+- (void)invalidateCachedTemporaryCredentials;
91
+
92
+@end
93
+
94
+/**
95
+ @warning This credentials provider is intended only for testing purposes.
96
+ We strongly discourage embedding AWS credentials in your production apps because they can be easily extracted and abused. Consider using `AWSCognitoCredentialsProvider`.
97
+ */
98
+@interface AWSStaticCredentialsProvider : NSObject <AWSCredentialsProvider>
99
+
100
+/**
101
+ Instantiates a static credentials provider.
102
+
103
+ @param accessKey An AWS Access key.
104
+ @param secretKey An AWS Secret key.
105
+
106
+ @return An AWS credentials object.
107
+ */
108
+- (instancetype)initWithAccessKey:(NSString *)accessKey
109
+                        secretKey:(NSString *)secretKey;
110
+
111
+@end
112
+
113
+/**
114
+ @warning This credentials provider is intended only for testing purposes.
115
+ We strongly discourage embedding AWS credentials in your production apps because they can be easily extracted and abused. Consider using `AWSCognitoCredentialsProvider`.
116
+ Simple session credentials with keys and session token.
117
+ */
118
+@interface AWSBasicSessionCredentialsProvider: NSObject <AWSCredentialsProvider>
119
+
120
+/**
121
+ Instantiates a static credentials provider.
122
+ 
123
+ @param accessKey An AWS Access key.
124
+ @param secretKey An AWS Secret key.
125
+ @param sessionToken The session token for this session.
126
+ @return An AWS credentials object.
127
+ */
128
+- (instancetype)initWithAccessKey:(NSString *)accessKey
129
+                        secretKey:(NSString *)secretKey
130
+                     sessionToken:(NSString *)sessionToken;
131
+
132
+@end
133
+
134
+@interface AWSAnonymousCredentialsProvider : NSObject <AWSCredentialsProvider>
135
+
136
+@end
137
+
138
+/**
139
+ A credentials provider that uses AWS STS web identity federation.
140
+ */
141
+@interface AWSWebIdentityCredentialsProvider : NSObject <AWSCredentialsProvider>
142
+
143
+@property (nonatomic, strong) NSString *webIdentityToken;
144
+@property (nonatomic, strong) NSString *roleArn;
145
+@property (nonatomic, strong) NSString *roleSessionName;
146
+@property (nonatomic, strong) NSString *providerId;
147
+
148
+- (instancetype)initWithRegionType:(AWSRegionType)regionType
149
+                        providerId:(nullable NSString *)providerId
150
+                           roleArn:(NSString *)roleArn
151
+                   roleSessionName:(NSString *)roleSessionName
152
+                  webIdentityToken:(NSString *)webIdentityToken;
153
+
154
+@end
155
+
156
+/**
157
+ An AWSCredentialsProvider that uses Amazon Cognito to fetch temporary credentials tied to an identity.
158
+
159
+ To learn more about Amazon Cognito, please visit <a href="https://aws.amazon.com/cognito">https://aws.amazon.com/cognito</a>.
160
+
161
+ There are 3 different flows supported by this credentials provider, see factory and init methods for choosing the right one for your use case:
162
+
163
+ 1. Enhanced flow: Uses Cognito for all operations and only requires an identity pool id to initialize.
164
+ 2. Basic flow: Uses Cognito + STS and requires identity pool plus IAM roles
165
+ 3. Developer authenticated identities: Uses your own AWSCognitoCredentialsProviderHelper to establish identity +
166
+ Cognito (and optionally STS) to establish credentials.
167
+ */
168
+@interface AWSCognitoCredentialsProvider : NSObject <AWSCredentialsProvider>
169
+
170
+/**
171
+ The identityProvider which is responsible for establishing the identity id and (optionally) the open id token for use in the Amazon Cognito authflow.
172
+ */
173
+@property (nonatomic, strong, readonly) id<AWSCognitoCredentialsProviderHelper> identityProvider;
174
+
175
+/**
176
+ The identity id associated with this provider. This value will be fetched from the keychain at startup. If you do not want to reuse the existing identity id, you must call the clearKeychain method.
177
+ */
178
+@property (nonatomic, strong, readonly, nullable) NSString *identityId;
179
+
180
+/**
181
+ The identity pool id associated with this provider. Also used to create a namedspaced keychain area to store identity id and credentials.
182
+ */
183
+@property (nonatomic, strong, readonly) NSString *identityPoolId;
184
+
185
+/**
186
+ Initializer for credentials provider with enhanced authentication flow. This is the recommended constructor for first time Amazon Cognito developers. Will create an instance of `AWSEnhancedCognitoIdentityProvider`.
187
+
188
+ @param regionType The region in which your identity pool exists.
189
+ @param identityPoolId The identity pool id for this provider. Value is used to communicate with Amazon Cognito as well as namespace values stored in the keychain.
190
+ */
191
+- (instancetype)initWithRegionType:(AWSRegionType)regionType
192
+                    identityPoolId:(NSString *)identityPoolId;
193
+
194
+/**
195
+ Initializer for credentials provider with enhanced authentication flow. This is the recommended method for first time Amazon Cognito developers. Will create an instance of `AWSEnhancedCognitoIdentityProvider`.
196
+
197
+ @param regionType The region in which your identity pool exists.
198
+ @param identityPoolId The identity pool id for this provider. Value is used to communicate with Amazon Cognito as well as namespace values stored in the keychain.
199
+ @param identityProviderManager An object that conforms to the `AWSIdentityProviderManager` protocol. It should return a valid `login` dictionary when requested. Can be nil if identity is unauthenticated.
200
+ */
201
+- (instancetype)initWithRegionType:(AWSRegionType)regionType
202
+                    identityPoolId:(NSString *)identityPoolId
203
+           identityProviderManager:(nullable id<AWSIdentityProviderManager>)identityProviderManager;
204
+
205
+/**
206
+ Initializer for credentials provider with pre-created `AWSCognitoCredentialsProviderHelper`. Use this method when using developer authenticated identities.
207
+
208
+ @param regionType The region in which your identity pool exists.
209
+ @param identityProvider Implementation of AWSCognitoCredentialsProviderHelper which is responsible for acquiring identity id and (optionally) OpenId Connect token.
210
+ */
211
+- (instancetype)initWithRegionType:(AWSRegionType)regionType
212
+                  identityProvider:(id<AWSCognitoCredentialsProviderHelper>)identityProvider;
213
+
214
+/**
215
+ Initializer for credentials provider with pre-created `AWSCognitoCredentialsProviderHelper`. Only use this method if you need to set your IAM roles client side and use developer authenticated identities
216
+
217
+ @param regionType The region in which your identity pool exists.
218
+ @param unauthRoleArn The role ARN to use when getting credentials for unauthenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if unauthenticated identities are not supported or if using enhanced authentication flow.
219
+ @param authRoleArn The role ARN to use when getting credentials for authenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if authenticated identities are not supported or if using enhanced authentication flow.
220
+ @param identityProvider Implementation of AWSCognitoCredentialsProviderHelper which is responsible for acquiring identity id and (optionally) OpenId Connect token.
221
+ */
222
+- (instancetype)initWithRegionType:(AWSRegionType)regionType
223
+                     unauthRoleArn:(nullable NSString *)unauthRoleArn
224
+                       authRoleArn:(nullable NSString *)authRoleArn
225
+                  identityProvider:(id<AWSCognitoCredentialsProviderHelper>)identityProvider;
226
+
227
+/**
228
+ Initializer for credentials provider with basic auth flow. Only use this method if you still need to set your IAM roles client side. This method will create an instance of `AWSBasicCognitoIdentityProvider`.
229
+
230
+ @param regionType The region in which your identity pool exists.
231
+ @param identityPoolId The identity pool id for this provider. Value is used to communicate with Amazon Cognito as well as namespace values stored in the keychain.
232
+ @param unauthRoleArn The role ARN to use when getting credentials for unauthenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if unauthenticated identities are not supported.
233
+ @param authRoleArn The role ARN to use when getting credentials for authenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if authenticated identities are not supported.
234
+ @param identityProviderManager An object that conforms to the `AWSIdentityProviderManager` protocol. It should return a valid `login` dictionary when requested. Can be nil if identity is unauthenticated.
235
+ */
236
+- (instancetype)initWithRegionType:(AWSRegionType)regionType
237
+                    identityPoolId:(NSString *)identityPoolId
238
+                     unauthRoleArn:(nullable NSString *)unauthRoleArn
239
+                       authRoleArn:(nullable NSString *)authRoleArn
240
+           identityProviderManager:(nullable id<AWSIdentityProviderManager>)identityProviderManager;
241
+
242
+/**
243
+ Get/retrieve the identity id for this provider. If an identity id is already set on this provider, no remote call is made and the identity will be returned as a result of the AWSTask (the identityId is also available as a property). If no identityId is set on this provider, one will be retrieved from the service.
244
+
245
+ @return AWSTask
246
+ */
247
+- (AWSTask<NSString *> *)getIdentityId;
248
+
249
+/**
250
+ Clear ALL saved values for this provider (identityId, credentials, logins).
251
+ */
252
+- (void)clearKeychain;
253
+
254
+/**
255
+ Clear the cached AWS credentials for this provider.
256
+ */
257
+- (void)clearCredentials;
258
+
259
+- (void)setIdentityProviderManagerOnce:(id<AWSIdentityProviderManager>)identityProviderManager;
260
+
261
+@end
262
+
263
+NS_ASSUME_NONNULL_END

+ 41
- 0
AWSCore.framework/Headers/AWSDDASLLogCapture.h 查看文件

@@ -0,0 +1,41 @@
1
+// Software License Agreement (BSD License)
2
+//
3
+// Copyright (c) 2010-2016, Deusty, LLC
4
+// All rights reserved.
5
+//
6
+// Redistribution and use of this software in source and binary forms,
7
+// with or without modification, are permitted provided that the following conditions are met:
8
+//
9
+// * Redistributions of source code must retain the above copyright notice,
10
+//   this list of conditions and the following disclaimer.
11
+//
12
+// * Neither the name of Deusty nor the names of its contributors may be used
13
+//   to endorse or promote products derived from this software without specific
14
+//   prior written permission of Deusty, LLC.
15
+
16
+#import "AWSDDASLLogger.h"
17
+
18
+@protocol AWSDDLogger;
19
+
20
+/**
21
+ *  This class provides the ability to capture the ASL (Apple System Logs)
22
+ */
23
+@interface AWSDDASLLogCapture : NSObject
24
+
25
+/**
26
+ *  Start capturing logs
27
+ */
28
++ (void)start;
29
+
30
+/**
31
+ *  Stop capturing logs
32
+ */
33
++ (void)stop;
34
+
35
+/**
36
+ *  The current capture level.
37
+ *  @note Default log level: AWSDDLogLevelVerbose (i.e. capture all ASL messages).
38
+ */
39
+@property (class) AWSDDLogLevel captureLevel;
40
+
41
+@end

+ 58
- 0
AWSCore.framework/Headers/AWSDDASLLogger.h 查看文件

@@ -0,0 +1,58 @@
1
+// Software License Agreement (BSD License)
2
+//
3
+// Copyright (c) 2010-2016, Deusty, LLC
4
+// All rights reserved.
5
+//
6
+// Redistribution and use of this software in source and binary forms,
7
+// with or without modification, are permitted provided that the following conditions are met:
8
+//
9
+// * Redistributions of source code must retain the above copyright notice,
10
+//   this list of conditions and the following disclaimer.
11
+//
12
+// * Neither the name of Deusty nor the names of its contributors may be used
13
+//   to endorse or promote products derived from this software without specific
14
+//   prior written permission of Deusty, LLC.
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+// Disable legacy macros
19
+#ifndef AWSDD_LEGACY_MACROS
20
+    #define AWSDD_LEGACY_MACROS 0
21
+#endif
22
+
23
+#import "AWSDDLog.h"
24
+
25
+// Custom key set on messages sent to ASL
26
+extern const char* const kAWSDDASLKeyAWSDDLog;
27
+
28
+// Value set for kAWSDDASLKeyAWSDDLog
29
+extern const char* const kAWSDDASLAWSDDLogValue;
30
+
31
+/**
32
+ * This class provides a logger for the Apple System Log facility.
33
+ *
34
+ * As described in the "Getting Started" page,
35
+ * the traditional NSLog() function directs its output to two places:
36
+ *
37
+ * - Apple System Log
38
+ * - StdErr (if stderr is a TTY) so log statements show up in Xcode console
39
+ *
40
+ * To duplicate NSLog() functionality you can simply add this logger and a tty logger.
41
+ * However, if you instead choose to use file logging (for faster performance),
42
+ * you may choose to use a file logger and a tty logger.
43
+ **/
44
+@interface AWSDDASLLogger : AWSDDAbstractLogger <AWSDDLogger>
45
+
46
+/**
47
+ *  Singleton method
48
+ *
49
+ *  @return the shared instance
50
+ */
51
+@property (class, readonly, strong) AWSDDASLLogger *sharedInstance;
52
+
53
+// Inherited from AWSDDAbstractLogger
54
+
55
+// - (id <AWSDDLogFormatter>)logFormatter;
56
+// - (void)setLogFormatter:(id <AWSDDLogFormatter>)formatter;
57
+
58
+@end

+ 26
- 0
AWSCore.framework/Headers/AWSDDAssertMacros.h 查看文件

@@ -0,0 +1,26 @@
1
+// Software License Agreement (BSD License)
2
+//
3
+// Copyright (c) 2010-2016, Deusty, LLC
4
+// All rights reserved.
5
+//
6
+// Redistribution and use of this software in source and binary forms,
7
+// with or without modification, are permitted provided that the following conditions are met:
8
+//
9
+// * Redistributions of source code must retain the above copyright notice,
10
+//   this list of conditions and the following disclaimer.
11
+//
12
+// * Neither the name of Deusty nor the names of its contributors may be used
13
+//   to endorse or promote products derived from this software without specific
14
+//   prior written permission of Deusty, LLC.
15
+
16
+/**
17
+ * NSAsset replacement that will output a log message even when assertions are disabled.
18
+ **/
19
+#define AWSDDAssert(condition, frmt, ...)                                                \
20
+        if (!(condition)) {                                                           \
21
+            NSString *description = [NSString stringWithFormat:frmt, ## __VA_ARGS__]; \
22
+            AWSDDLogError(@"%@", description);                                           \
23
+            NSAssert(NO, description);                                                \
24
+        }
25
+#define AWSDDAssertCondition(condition) AWSDDAssert(condition, @"Condition not satisfied: %s", #condition)
26
+

+ 512
- 0
AWSCore.framework/Headers/AWSDDFileLogger.h 查看文件

@@ -0,0 +1,512 @@
1
+// Software License Agreement (BSD License)
2
+//
3
+// Copyright (c) 2010-2016, Deusty, LLC
4
+// All rights reserved.
5
+//
6
+// Redistribution and use of this software in source and binary forms,
7
+// with or without modification, are permitted provided that the following conditions are met:
8
+//
9
+// * Redistributions of source code must retain the above copyright notice,
10
+//   this list of conditions and the following disclaimer.
11
+//
12
+// * Neither the name of Deusty nor the names of its contributors may be used
13
+//   to endorse or promote products derived from this software without specific
14
+//   prior written permission of Deusty, LLC.
15
+
16
+// Disable legacy macros
17
+#ifndef AWSDD_LEGACY_MACROS
18
+    #define AWSDD_LEGACY_MACROS 0
19
+#endif
20
+
21
+#import "AWSDDLog.h"
22
+
23
+@class AWSDDLogFileInfo;
24
+
25
+/**
26
+ * This class provides a logger to write log statements to a file.
27
+ **/
28
+
29
+
30
+// Default configuration and safety/sanity values.
31
+//
32
+// maximumFileSize         -> kAWSDDDefaultLogMaxFileSize
33
+// rollingFrequency        -> kAWSDDDefaultLogRollingFrequency
34
+// maximumNumberOfLogFiles -> kAWSDDDefaultLogMaxNumLogFiles
35
+// logFilesDiskQuota       -> kAWSDDDefaultLogFilesDiskQuota
36
+//
37
+// You should carefully consider the proper configuration values for your application.
38
+
39
+extern unsigned long long const kAWSDDDefaultLogMaxFileSize;
40
+extern NSTimeInterval     const kAWSDDDefaultLogRollingFrequency;
41
+extern NSUInteger         const kAWSDDDefaultLogMaxNumLogFiles;
42
+extern unsigned long long const kAWSDDDefaultLogFilesDiskQuota;
43
+
44
+
45
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
46
+#pragma mark -
47
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
48
+
49
+/**
50
+ *  The LogFileManager protocol is designed to allow you to control all aspects of your log files.
51
+ *
52
+ *  The primary purpose of this is to allow you to do something with the log files after they have been rolled.
53
+ *  Perhaps you want to compress them to save disk space.
54
+ *  Perhaps you want to upload them to an FTP server.
55
+ *  Perhaps you want to run some analytics on the file.
56
+ *
57
+ *  A default LogFileManager is, of course, provided.
58
+ *  The default LogFileManager simply deletes old log files according to the maximumNumberOfLogFiles property.
59
+ *
60
+ *  This protocol provides various methods to fetch the list of log files.
61
+ *
62
+ *  There are two variants: sorted and unsorted.
63
+ *  If sorting is not necessary, the unsorted variant is obviously faster.
64
+ *  The sorted variant will return an array sorted by when the log files were created,
65
+ *  with the most recently created log file at index 0, and the oldest log file at the end of the array.
66
+ *
67
+ *  You can fetch only the log file paths (full path including name), log file names (name only),
68
+ *  or an array of `AWSDDLogFileInfo` objects.
69
+ *  The `AWSDDLogFileInfo` class is documented below, and provides a handy wrapper that
70
+ *  gives you easy access to various file attributes such as the creation date or the file size.
71
+ */
72
+@protocol AWSDDLogFileManager <NSObject>
73
+@required
74
+
75
+// Public properties
76
+
77
+/**
78
+ * The maximum number of archived log files to keep on disk.
79
+ * For example, if this property is set to 3,
80
+ * then the LogFileManager will only keep 3 archived log files (plus the current active log file) on disk.
81
+ * Once the active log file is rolled/archived, then the oldest of the existing 3 rolled/archived log files is deleted.
82
+ *
83
+ * You may optionally disable this option by setting it to zero.
84
+ **/
85
+@property (readwrite, assign, atomic) NSUInteger maximumNumberOfLogFiles;
86
+
87
+/**
88
+ * The maximum space that logs can take. On rolling logfile all old logfiles that exceed logFilesDiskQuota will
89
+ * be deleted.
90
+ *
91
+ * You may optionally disable this option by setting it to zero.
92
+ **/
93
+@property (readwrite, assign, atomic) unsigned long long logFilesDiskQuota;
94
+
95
+// Public methods
96
+
97
+/**
98
+ *  Returns the logs directory (path)
99
+ */
100
+@property (nonatomic, readonly, copy) NSString *logsDirectory;
101
+
102
+/**
103
+ * Returns an array of `NSString` objects,
104
+ * each of which is the filePath to an existing log file on disk.
105
+ **/
106
+@property (nonatomic, readonly, strong) NSArray<NSString *> *unsortedLogFilePaths;
107
+
108
+/**
109
+ * Returns an array of `NSString` objects,
110
+ * each of which is the fileName of an existing log file on disk.
111
+ **/
112
+@property (nonatomic, readonly, strong) NSArray<NSString *> *unsortedLogFileNames;
113
+
114
+/**
115
+ * Returns an array of `AWSDDLogFileInfo` objects,
116
+ * each representing an existing log file on disk,
117
+ * and containing important information about the log file such as it's modification date and size.
118
+ **/
119
+@property (nonatomic, readonly, strong) NSArray<AWSDDLogFileInfo *> *unsortedLogFileInfos;
120
+
121
+/**
122
+ * Just like the `unsortedLogFilePaths` method, but sorts the array.
123
+ * The items in the array are sorted by creation date.
124
+ * The first item in the array will be the most recently created log file.
125
+ **/
126
+@property (nonatomic, readonly, strong) NSArray<NSString *> *sortedLogFilePaths;
127
+
128
+/**
129
+ * Just like the `unsortedLogFileNames` method, but sorts the array.
130
+ * The items in the array are sorted by creation date.
131
+ * The first item in the array will be the most recently created log file.
132
+ **/
133
+@property (nonatomic, readonly, strong) NSArray<NSString *> *sortedLogFileNames;
134
+
135
+/**
136
+ * Just like the `unsortedLogFileInfos` method, but sorts the array.
137
+ * The items in the array are sorted by creation date.
138
+ * The first item in the array will be the most recently created log file.
139
+ **/
140
+@property (nonatomic, readonly, strong) NSArray<AWSDDLogFileInfo *> *sortedLogFileInfos;
141
+
142
+// Private methods (only to be used by AWSDDFileLogger)
143
+
144
+/**
145
+ * Generates a new unique log file path, and creates the corresponding log file.
146
+ **/
147
+- (NSString *)createNewLogFile;
148
+
149
+@optional
150
+
151
+// Notifications from AWSDDFileLogger
152
+
153
+/**
154
+ *  Called when a log file was archieved
155
+ */
156
+- (void)didArchiveLogFile:(NSString *)logFilePath NS_SWIFT_NAME(didArchiveLogFile(atPath:));
157
+
158
+/**
159
+ *  Called when the roll action was executed and the log was archieved
160
+ */
161
+- (void)didRollAndArchiveLogFile:(NSString *)logFilePath NS_SWIFT_NAME(didRollAndArchiveLogFile(atPath:));
162
+
163
+@end
164
+
165
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
166
+#pragma mark -
167
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
168
+
169
+/**
170
+ * Default log file manager.
171
+ *
172
+ * All log files are placed inside the logsDirectory.
173
+ * If a specific logsDirectory isn't specified, the default directory is used.
174
+ * On Mac, this is in `~/Library/Logs/<Application Name>`.
175
+ * On iPhone, this is in `~/Library/Caches/Logs`.
176
+ *
177
+ * Log files are named `"<bundle identifier> <date> <time>.log"`
178
+ * Example: `com.organization.myapp 2013-12-03 17-14.log`
179
+ *
180
+ * Archived log files are automatically deleted according to the `maximumNumberOfLogFiles` property.
181
+ **/
182
+@interface AWSDDLogFileManagerDefault : NSObject <AWSDDLogFileManager>
183
+
184
+/**
185
+ *  Default initializer
186
+ */
187
+- (instancetype)init;
188
+
189
+/**
190
+ *  Designated initialized, requires the logs directory
191
+ */
192
+- (instancetype)initWithLogsDirectory:(NSString *)logsDirectory NS_DESIGNATED_INITIALIZER;
193
+
194
+#if TARGET_OS_IPHONE
195
+/*
196
+ * Calling this constructor you can override the default "automagically" chosen NSFileProtection level.
197
+ * Useful if you are writing a command line utility / CydiaSubstrate addon for iOS that has no NSBundle
198
+ * or like SpringBoard no BackgroundModes key in the NSBundle:
199
+ *    iPhone:~ root# cycript -p SpringBoard
200
+ *    cy# [NSBundle mainBundle]
201
+ *    #"NSBundle </System/Library/CoreServices/SpringBoard.app> (loaded)"
202
+ *    cy# [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIBackgroundModes"];
203
+ *    null
204
+ *    cy#
205
+ **/
206
+- (instancetype)initWithLogsDirectory:(NSString *)logsDirectory defaultFileProtectionLevel:(NSString *)fileProtectionLevel;
207
+#endif
208
+
209
+/*
210
+ * Methods to override.
211
+ *
212
+ * Log files are named `"<bundle identifier> <date> <time>.log"`
213
+ * Example: `com.organization.myapp 2013-12-03 17-14.log`
214
+ *
215
+ * If you wish to change default filename, you can override following two methods.
216
+ * - `newLogFileName` method would be called on new logfile creation.
217
+ * - `isLogFile:` method would be called to filter logfiles from all other files in logsDirectory.
218
+ *   You have to parse given filename and return YES if it is logFile.
219
+ *
220
+ * **NOTE**
221
+ * `newLogFileName` returns filename. If appropriate file already exists, number would be added
222
+ * to filename before extension. You have to handle this case in isLogFile: method.
223
+ *
224
+ * Example:
225
+ * - newLogFileName returns `"com.organization.myapp 2013-12-03.log"`,
226
+ *   file `"com.organization.myapp 2013-12-03.log"` would be created.
227
+ * - after some time `"com.organization.myapp 2013-12-03.log"` is archived
228
+ * - newLogFileName again returns `"com.organization.myapp 2013-12-03.log"`,
229
+ *   file `"com.organization.myapp 2013-12-03 2.log"` would be created.
230
+ * - after some time `"com.organization.myapp 2013-12-03 1.log"` is archived
231
+ * - newLogFileName again returns `"com.organization.myapp 2013-12-03.log"`,
232
+ *   file `"com.organization.myapp 2013-12-03 3.log"` would be created.
233
+ **/
234
+
235
+/**
236
+ * Generates log file name with default format `"<bundle identifier> <date> <time>.log"`
237
+ * Example: `MobileSafari 2013-12-03 17-14.log`
238
+ *
239
+ * You can change it by overriding `newLogFileName` and `isLogFile:` methods.
240
+ **/
241
+@property (readonly, copy) NSString *newLogFileName;
242
+
243
+/**
244
+ * Default log file name is `"<bundle identifier> <date> <time>.log"`.
245
+ * Example: `MobileSafari 2013-12-03 17-14.log`
246
+ *
247
+ * You can change it by overriding `newLogFileName` and `isLogFile:` methods.
248
+ **/
249
+- (BOOL)isLogFile:(NSString *)fileName NS_SWIFT_NAME(isLogFile(withName:));
250
+
251
+/* Inherited from AWSDDLogFileManager protocol:
252
+
253
+   @property (readwrite, assign, atomic) NSUInteger maximumNumberOfLogFiles;
254
+   @property (readwrite, assign, atomic) NSUInteger logFilesDiskQuota;
255
+
256
+   - (NSString *)logsDirectory;
257
+
258
+   - (NSArray *)unsortedLogFilePaths;
259
+   - (NSArray *)unsortedLogFileNames;
260
+   - (NSArray *)unsortedLogFileInfos;
261
+
262
+   - (NSArray *)sortedLogFilePaths;
263
+   - (NSArray *)sortedLogFileNames;
264
+   - (NSArray *)sortedLogFileInfos;
265
+
266
+ */
267
+
268
+@end
269
+
270
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
271
+#pragma mark -
272
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
273
+
274
+/**
275
+ * Most users will want file log messages to be prepended with the date and time.
276
+ * Rather than forcing the majority of users to write their own formatter,
277
+ * we will supply a logical default formatter.
278
+ * Users can easily replace this formatter with their own by invoking the `setLogFormatter:` method.
279
+ * It can also be removed by calling `setLogFormatter:`, and passing a nil parameter.
280
+ *
281
+ * In addition to the convenience of having a logical default formatter,
282
+ * it will also provide a template that makes it easy for developers to copy and change.
283
+ **/
284
+@interface AWSDDLogFileFormatterDefault : NSObject <AWSDDLogFormatter>
285
+
286
+/**
287
+ *  Default initializer
288
+ */
289
+- (instancetype)init;
290
+
291
+/**
292
+ *  Designated initializer, requires a date formatter
293
+ */
294
+- (instancetype)initWithDateFormatter:(NSDateFormatter *)dateFormatter NS_DESIGNATED_INITIALIZER;
295
+
296
+@end
297
+
298
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
299
+#pragma mark -
300
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
301
+
302
+/**
303
+ *  The standard implementation for a file logger
304
+ */
305
+@interface AWSDDFileLogger : AWSDDAbstractLogger <AWSDDLogger> {
306
+	AWSDDLogFileInfo *_currentLogFileInfo;
307
+}
308
+
309
+/**
310
+ *  Default initializer
311
+ */
312
+- (instancetype)init;
313
+
314
+/**
315
+ *  Designated initializer, requires a `AWSDDLogFileManager` instance
316
+ */
317
+- (instancetype)initWithLogFileManager:(id <AWSDDLogFileManager>)logFileManager NS_DESIGNATED_INITIALIZER;
318
+
319
+/**
320
+ *  Called when the logger is about to write message. Call super before your implementation.
321
+ */
322
+- (void)willLogMessage NS_REQUIRES_SUPER;
323
+
324
+/**
325
+ *  Called when the logger wrote message. Call super after your implementation.
326
+ */
327
+- (void)didLogMessage NS_REQUIRES_SUPER;
328
+
329
+/**
330
+ *  Called when the logger checks archive or not current log file. 
331
+ *  Override this method to exdend standart behavior. By default returns NO.
332
+ */
333
+- (BOOL)shouldArchiveRecentLogFileInfo:(AWSDDLogFileInfo *)recentLogFileInfo;
334
+
335
+/**
336
+ * Log File Rolling:
337
+ *
338
+ * `maximumFileSize`:
339
+ *   The approximate maximum size (in bytes) to allow log files to grow.
340
+ *   If a log file is larger than this value after a log statement is appended,
341
+ *   then the log file is rolled.
342
+ *
343
+ * `rollingFrequency`
344
+ *   How often to roll the log file.
345
+ *   The frequency is given as an `NSTimeInterval`, which is a double that specifies the interval in seconds.
346
+ *   Once the log file gets to be this old, it is rolled.
347
+ *
348
+ * `doNotReuseLogFiles`
349
+ *   When set, will always create a new log file at application launch.
350
+ *
351
+ * Both the `maximumFileSize` and the `rollingFrequency` are used to manage rolling.
352
+ * Whichever occurs first will cause the log file to be rolled.
353
+ *
354
+ * For example:
355
+ * The `rollingFrequency` is 24 hours,
356
+ * but the log file surpasses the `maximumFileSize` after only 20 hours.
357
+ * The log file will be rolled at that 20 hour mark.
358
+ * A new log file will be created, and the 24 hour timer will be restarted.
359
+ *
360
+ * You may optionally disable rolling due to filesize by setting `maximumFileSize` to zero.
361
+ * If you do so, rolling is based solely on `rollingFrequency`.
362
+ *
363
+ * You may optionally disable rolling due to time by setting `rollingFrequency` to zero (or any non-positive number).
364
+ * If you do so, rolling is based solely on `maximumFileSize`.
365
+ *
366
+ * If you disable both `maximumFileSize` and `rollingFrequency`, then the log file won't ever be rolled.
367
+ * This is strongly discouraged.
368
+ **/
369
+@property (readwrite, assign) unsigned long long maximumFileSize;
370
+
371
+/**
372
+ *  See description for `maximumFileSize`
373
+ */
374
+@property (readwrite, assign) NSTimeInterval rollingFrequency;
375
+
376
+/**
377
+ *  See description for `maximumFileSize`
378
+ */
379
+@property (readwrite, assign, atomic) BOOL doNotReuseLogFiles;
380
+
381
+/**
382
+ * The AWSDDLogFileManager instance can be used to retrieve the list of log files,
383
+ * and configure the maximum number of archived log files to keep.
384
+ *
385
+ * @see AWSDDLogFileManager.maximumNumberOfLogFiles
386
+ **/
387
+@property (strong, nonatomic, readonly) id <AWSDDLogFileManager> logFileManager;
388
+
389
+/**
390
+ * When using a custom formatter you can set the `logMessage` method not to append
391
+ * `\n` character after each output. This allows for some greater flexibility with
392
+ * custom formatters. Default value is YES.
393
+ **/
394
+@property (nonatomic, readwrite, assign) BOOL automaticallyAppendNewlineForCustomFormatters;
395
+
396
+/**
397
+ *  You can optionally force the current log file to be rolled with this method.
398
+ *  CompletionBlock will be called on main queue.
399
+ */
400
+- (void)rollLogFileWithCompletionBlock:(void (^)(void))completionBlock NS_SWIFT_NAME(rollLogFile(withCompletion:));
401
+
402
+/**
403
+ *  Method is deprecated.
404
+ *  @deprecated Use `rollLogFileWithCompletionBlock:` method instead.
405
+ */
406
+- (void)rollLogFile __attribute((deprecated));
407
+
408
+// Inherited from AWSDDAbstractLogger
409
+
410
+// - (id <AWSDDLogFormatter>)logFormatter;
411
+// - (void)setLogFormatter:(id <AWSDDLogFormatter>)formatter;
412
+
413
+/**
414
+ * Returns the log file that should be used.
415
+ * If there is an existing log file that is suitable,
416
+ * within the constraints of `maximumFileSize` and `rollingFrequency`, then it is returned.
417
+ *
418
+ * Otherwise a new file is created and returned.
419
+ **/
420
+@property (nonatomic, readonly, strong) AWSDDLogFileInfo *currentLogFileInfo;
421
+
422
+@end
423
+
424
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
425
+#pragma mark -
426
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
427
+
428
+/**
429
+ * `AWSDDLogFileInfo` is a simple class that provides access to various file attributes.
430
+ * It provides good performance as it only fetches the information if requested,
431
+ * and it caches the information to prevent duplicate fetches.
432
+ *
433
+ * It was designed to provide quick snapshots of the current state of log files,
434
+ * and to help sort log files in an array.
435
+ *
436
+ * This class does not monitor the files, or update it's cached attribute values if the file changes on disk.
437
+ * This is not what the class was designed for.
438
+ *
439
+ * If you absolutely must get updated values,
440
+ * you can invoke the reset method which will clear the cache.
441
+ **/
442
+@interface AWSDDLogFileInfo : NSObject
443
+
444
+@property (strong, nonatomic, readonly) NSString *filePath;
445
+@property (strong, nonatomic, readonly) NSString *fileName;
446
+
447
+#if FOUNDATION_SWIFT_SDK_EPOCH_AT_LEAST(8)
448
+@property (strong, nonatomic, readonly) NSDictionary<NSFileAttributeKey, id> *fileAttributes;
449
+#else
450
+@property (strong, nonatomic, readonly) NSDictionary<NSString *, id> *fileAttributes;
451
+#endif
452
+
453
+@property (strong, nonatomic, readonly) NSDate *creationDate;
454
+@property (strong, nonatomic, readonly) NSDate *modificationDate;
455
+
456
+@property (nonatomic, readonly) unsigned long long fileSize;
457
+
458
+@property (nonatomic, readonly) NSTimeInterval age;
459
+
460
+@property (nonatomic, readwrite) BOOL isArchived;
461
+
462
++ (instancetype)logFileWithPath:(NSString *)filePath NS_SWIFT_UNAVAILABLE("Use init(filePath:)");
463
+
464
+- (instancetype)init NS_UNAVAILABLE;
465
+- (instancetype)initWithFilePath:(NSString *)filePath NS_DESIGNATED_INITIALIZER;
466
+
467
+- (void)reset;
468
+- (void)renameFile:(NSString *)newFileName NS_SWIFT_NAME(renameFile(to:));
469
+
470
+#if TARGET_IPHONE_SIMULATOR
471
+
472
+// So here's the situation.
473
+// Extended attributes are perfect for what we're trying to do here (marking files as archived).
474
+// This is exactly what extended attributes were designed for.
475
+//
476
+// But Apple screws us over on the simulator.
477
+// Everytime you build-and-go, they copy the application into a new folder on the hard drive,
478
+// and as part of the process they strip extended attributes from our log files.
479
+// Normally, a copy of a file preserves extended attributes.
480
+// So obviously Apple has gone to great lengths to piss us off.
481
+//
482
+// Thus we use a slightly different tactic for marking log files as archived in the simulator.
483
+// That way it "just works" and there's no confusion when testing.
484
+//
485
+// The difference in method names is indicative of the difference in functionality.
486
+// On the simulator we add an attribute by appending a filename extension.
487
+//
488
+// For example:
489
+// "mylog.txt" -> "mylog.archived.txt"
490
+// "mylog"     -> "mylog.archived"
491
+
492
+- (BOOL)hasExtensionAttributeWithName:(NSString *)attrName;
493
+
494
+- (void)addExtensionAttributeWithName:(NSString *)attrName;
495
+- (void)removeExtensionAttributeWithName:(NSString *)attrName;
496
+
497
+#else /* if TARGET_IPHONE_SIMULATOR */
498
+
499
+// Normal use of extended attributes used everywhere else,
500
+// such as on Macs and on iPhone devices.
501
+
502
+- (BOOL)hasExtendedAttributeWithName:(NSString *)attrName;
503
+
504
+- (void)addExtendedAttributeWithName:(NSString *)attrName;
505
+- (void)removeExtendedAttributeWithName:(NSString *)attrName;
506
+
507
+#endif /* if TARGET_IPHONE_SIMULATOR */
508
+
509
+- (NSComparisonResult)reverseCompareByCreationDate:(AWSDDLogFileInfo *)another;
510
+- (NSComparisonResult)reverseCompareByModificationDate:(AWSDDLogFileInfo *)another;
511
+
512
+@end

+ 917
- 0
AWSCore.framework/Headers/AWSDDLog.h 查看文件

@@ -0,0 +1,917 @@
1
+// Software License Agreement (BSD License)
2
+//
3
+// Copyright (c) 2010-2016, Deusty, LLC
4
+// All rights reserved.
5
+//
6
+// Redistribution and use of this software in source and binary forms,
7
+// with or without modification, are permitted provided that the following conditions are met:
8
+//
9
+// * Redistributions of source code must retain the above copyright notice,
10
+//   this list of conditions and the following disclaimer.
11
+//
12
+// * Neither the name of Deusty nor the names of its contributors may be used
13
+//   to endorse or promote products derived from this software without specific
14
+//   prior written permission of Deusty, LLC.
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+#if OS_OBJECT_USE_OBJC
19
+    #define DISPATCH_QUEUE_REFERENCE_TYPE strong
20
+#else
21
+    #define DISPATCH_QUEUE_REFERENCE_TYPE assign
22
+#endif
23
+
24
+@class AWSDDLogMessage;
25
+@class AWSDDLoggerInformation;
26
+@protocol AWSDDLogger;
27
+@protocol AWSDDLogFormatter;
28
+
29
+/**
30
+ * Define the standard options.
31
+ *
32
+ * We default to only 4 levels because it makes it easier for beginners
33
+ * to make the transition to a logging framework.
34
+ *
35
+ * More advanced users may choose to completely customize the levels (and level names) to suite their needs.
36
+ * For more information on this see the "Custom Log Levels" page:
37
+ * Documentation/CustomLogLevels.md
38
+ *
39
+ * Advanced users may also notice that we're using a bitmask.
40
+ * This is to allow for custom fine grained logging:
41
+ * Documentation/FineGrainedLogging.md
42
+ *
43
+ * -- Flags --
44
+ *
45
+ * Typically you will use the LOG_LEVELS (see below), but the flags may be used directly in certain situations.
46
+ * For example, say you have a lot of warning log messages, and you wanted to disable them.
47
+ * However, you still needed to see your error and info log messages.
48
+ * You could accomplish that with the following:
49
+ *
50
+ * static const AWSDDLogLevel ddLogLevel = AWSDDLogFlagError | AWSDDLogFlagInfo;
51
+ *
52
+ * When LOG_LEVEL_DEF is defined as ddLogLevel.
53
+ *
54
+ * Flags may also be consulted when writing custom log formatters,
55
+ * as the AWSDDLogMessage class captures the individual flag that caused the log message to fire.
56
+ *
57
+ * -- Levels --
58
+ *
59
+ * Log levels are simply the proper bitmask of the flags.
60
+ *
61
+ * -- Booleans --
62
+ *
63
+ * The booleans may be used when your logging code involves more than one line.
64
+ * For example:
65
+ *
66
+ * if (LOG_VERBOSE) {
67
+ *     for (id sprocket in sprockets)
68
+ *         AWSDDLogVerbose(@"sprocket: %@", [sprocket description])
69
+ * }
70
+ *
71
+ * -- Async --
72
+ *
73
+ * Defines the default asynchronous options.
74
+ * The default philosophy for asynchronous logging is very simple:
75
+ *
76
+ * Log messages with errors should be executed synchronously.
77
+ *     After all, an error just occurred. The application could be unstable.
78
+ *
79
+ * All other log messages, such as debug output, are executed asynchronously.
80
+ *     After all, if it wasn't an error, then it was just informational output,
81
+ *     or something the application was easily able to recover from.
82
+ *
83
+ * -- Changes --
84
+ *
85
+ * You are strongly discouraged from modifying this file.
86
+ * If you do, you make it more difficult on yourself to merge future bug fixes and improvements from the project.
87
+ * Instead, create your own MyLogging.h or ApplicationNameLogging.h or CompanyLogging.h
88
+ *
89
+ * For an example of customizing your logging experience, see the "Custom Log Levels" page:
90
+ * Documentation/CustomLogLevels.md
91
+ **/
92
+
93
+/**
94
+ *  Flags accompany each log. They are used together with levels to filter out logs.
95
+ */
96
+typedef NS_OPTIONS(NSUInteger, AWSDDLogFlag){
97
+    /**
98
+     *  0...00001 AWSDDLogFlagError
99
+     */
100
+    AWSDDLogFlagError      = (1 << 0),
101
+    
102
+    /**
103
+     *  0...00010 AWSDDLogFlagWarning
104
+     */
105
+    AWSDDLogFlagWarning    = (1 << 1),
106
+    
107
+    /**
108
+     *  0...00100 AWSDDLogFlagInfo
109
+     */
110
+    AWSDDLogFlagInfo       = (1 << 2),
111
+    
112
+    /**
113
+     *  0...01000 AWSDDLogFlagDebug
114
+     */
115
+    AWSDDLogFlagDebug      = (1 << 3),
116
+    
117
+    /**
118
+     *  0...10000 AWSDDLogFlagVerbose
119
+     */
120
+    AWSDDLogFlagVerbose    = (1 << 4)
121
+};
122
+
123
+/**
124
+ *  Log levels are used to filter out logs. Used together with flags.
125
+ */
126
+typedef NS_ENUM(NSUInteger, AWSDDLogLevel){
127
+    /**
128
+     *  No logs
129
+     */
130
+    AWSDDLogLevelOff       = 0,
131
+    
132
+    /**
133
+     *  Error logs only
134
+     */
135
+    AWSDDLogLevelError     = (AWSDDLogFlagError),
136
+    
137
+    /**
138
+     *  Error and warning logs
139
+     */
140
+    AWSDDLogLevelWarning   = (AWSDDLogLevelError   | AWSDDLogFlagWarning),
141
+    
142
+    /**
143
+     *  Error, warning and info logs
144
+     */
145
+    AWSDDLogLevelInfo      = (AWSDDLogLevelWarning | AWSDDLogFlagInfo),
146
+    
147
+    /**
148
+     *  Error, warning, info and debug logs
149
+     */
150
+    AWSDDLogLevelDebug     = (AWSDDLogLevelInfo    | AWSDDLogFlagDebug),
151
+    
152
+    /**
153
+     *  Error, warning, info, debug and verbose logs
154
+     */
155
+    AWSDDLogLevelVerbose   = (AWSDDLogLevelDebug   | AWSDDLogFlagVerbose),
156
+    
157
+    /**
158
+     *  All logs (1...11111)
159
+     */
160
+    AWSDDLogLevelAll       = NSUIntegerMax
161
+};
162
+
163
+NS_ASSUME_NONNULL_BEGIN
164
+
165
+/**
166
+ *  Extracts just the file name, no path or extension
167
+ *
168
+ *  @param filePath input file path
169
+ *  @param copy     YES if we want the result to be copied
170
+ *
171
+ *  @return the file name
172
+ */
173
+NSString * __nullable AWSDDExtractFileNameWithoutExtension(const char *filePath, BOOL copy);
174
+
175
+/**
176
+ * The THIS_FILE macro gives you an NSString of the file name.
177
+ * For simplicity and clarity, the file name does not include the full path or file extension.
178
+ *
179
+ * For example: AWSDDLogWarn(@"%@: Unable to find thingy", THIS_FILE) -> @"MyViewController: Unable to find thingy"
180
+ **/
181
+#ifndef THIS_FILE
182
+    #define THIS_FILE         (AWSDDExtractFileNameWithoutExtension(__FILE__, NO))
183
+#endif
184
+
185
+/**
186
+ * The AWS_THIS_FILE macro gives you an NSString of the file name.
187
+ * Provided for convenience in case of name conflicts of the THIS_FILE macro with CocoaLumberjack.
188
+ *
189
+ * For example: AWSDDLogWarn(@"%@: Unable to find thingy", AWS_THIS_FILE) -> @"MyViewController: Unable to find thingy"
190
+ **/
191
+#define AWS_THIS_FILE         (AWSDDExtractFileNameWithoutExtension(__FILE__, NO))
192
+
193
+/**
194
+ * The THIS_METHOD macro gives you the name of the current objective-c method.
195
+ *
196
+ * For example: AWSDDLogWarn(@"%@ - Requires non-nil strings", THIS_METHOD) -> @"setMake:model: requires non-nil strings"
197
+ *
198
+ * Note: This does NOT work in straight C functions (non objective-c).
199
+ * Instead you should use the predefined __FUNCTION__ macro.
200
+ **/
201
+#define THIS_METHOD       NSStringFromSelector(_cmd)
202
+
203
+
204
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
205
+#pragma mark -
206
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
207
+
208
+/**
209
+ *  The main class, exposes all logging mechanisms, loggers, ...
210
+ *  For most of the users, this class is hidden behind the logging functions like `AWSDDLogInfo`
211
+ */
212
+@interface AWSDDLog : NSObject
213
+
214
+/**
215
+ *  Returns the singleton `AWSDDLog`.
216
+ *  The instance is used by `AWSDDLog` class methods.
217
+ */
218
+@property (class, nonatomic, strong, readonly) AWSDDLog *sharedInstance;
219
+
220
+/**
221
+ * Log level setting.
222
+ */
223
+@property (nonatomic, assign) AWSDDLogLevel logLevel;
224
+
225
+/**
226
+ * Provides access to the underlying logging queue.
227
+ * This may be helpful to Logger classes for things like thread synchronization.
228
+ **/
229
+@property (class, nonatomic, DISPATCH_QUEUE_REFERENCE_TYPE, readonly) dispatch_queue_t loggingQueue;
230
+
231
+/**
232
+ * Logging Primitive.
233
+ *
234
+ * This method is used by the macros or logging functions.
235
+ * It is suggested you stick with the macros as they're easier to use.
236
+ *
237
+ *  @param asynchronous YES if the logging is done async, NO if you want to force sync
238
+ *  @param level        the log level
239
+ *  @param flag         the log flag
240
+ *  @param context      the context (if any is defined)
241
+ *  @param file         the current file
242
+ *  @param function     the current function
243
+ *  @param line         the current code line
244
+ *  @param tag          potential tag
245
+ *  @param format       the log format
246
+ */
247
++ (void)log:(BOOL)asynchronous
248
+      level:(AWSDDLogLevel)level
249
+       flag:(AWSDDLogFlag)flag
250
+    context:(NSInteger)context
251
+       file:(const char *)file
252
+   function:(const char *)function
253
+       line:(NSUInteger)line
254
+        tag:(id __nullable)tag
255
+     format:(NSString *)format, ... NS_FORMAT_FUNCTION(9,10);
256
+
257
+/**
258
+ * Logging Primitive.
259
+ *
260
+ * This method is used by the macros or logging functions.
261
+ * It is suggested you stick with the macros as they're easier to use.
262
+ *
263
+ *  @param asynchronous YES if the logging is done async, NO if you want to force sync
264
+ *  @param level        the log level
265
+ *  @param flag         the log flag
266
+ *  @param context      the context (if any is defined)
267
+ *  @param file         the current file
268
+ *  @param function     the current function
269
+ *  @param line         the current code line
270
+ *  @param tag          potential tag
271
+ *  @param format       the log format
272
+ */
273
+- (void)log:(BOOL)asynchronous
274
+      level:(AWSDDLogLevel)level
275
+       flag:(AWSDDLogFlag)flag
276
+    context:(NSInteger)context
277
+       file:(const char *)file
278
+   function:(const char *)function
279
+       line:(NSUInteger)line
280
+        tag:(id __nullable)tag
281
+     format:(NSString *)format, ... NS_FORMAT_FUNCTION(9,10);
282
+
283
+/**
284
+ * Logging Primitive.
285
+ *
286
+ * This method can be used if you have a prepared va_list.
287
+ * Similar to `log:level:flag:context:file:function:line:tag:format:...`
288
+ *
289
+ *  @param asynchronous YES if the logging is done async, NO if you want to force sync
290
+ *  @param level        the log level
291
+ *  @param flag         the log flag
292
+ *  @param context      the context (if any is defined)
293
+ *  @param file         the current file
294
+ *  @param function     the current function
295
+ *  @param line         the current code line
296
+ *  @param tag          potential tag
297
+ *  @param format       the log format
298
+ *  @param argList      the arguments list as a va_list
299
+ */
300
++ (void)log:(BOOL)asynchronous
301
+      level:(AWSDDLogLevel)level
302
+       flag:(AWSDDLogFlag)flag
303
+    context:(NSInteger)context
304
+       file:(const char *)file
305
+   function:(const char *)function
306
+       line:(NSUInteger)line
307
+        tag:(id __nullable)tag
308
+     format:(NSString *)format
309
+       args:(va_list)argList NS_SWIFT_NAME(log(asynchronous:level:flag:context:file:function:line:tag:format:arguments:));
310
+
311
+/**
312
+ * Logging Primitive.
313
+ *
314
+ * This method can be used if you have a prepared va_list.
315
+ * Similar to `log:level:flag:context:file:function:line:tag:format:...`
316
+ *
317
+ *  @param asynchronous YES if the logging is done async, NO if you want to force sync
318
+ *  @param level        the log level
319
+ *  @param flag         the log flag
320
+ *  @param context      the context (if any is defined)
321
+ *  @param file         the current file
322
+ *  @param function     the current function
323
+ *  @param line         the current code line
324
+ *  @param tag          potential tag
325
+ *  @param format       the log format
326
+ *  @param argList      the arguments list as a va_list
327
+ */
328
+- (void)log:(BOOL)asynchronous
329
+      level:(AWSDDLogLevel)level
330
+       flag:(AWSDDLogFlag)flag
331
+    context:(NSInteger)context
332
+       file:(const char *)file
333
+   function:(const char *)function
334
+       line:(NSUInteger)line
335
+        tag:(id __nullable)tag
336
+     format:(NSString *)format
337
+       args:(va_list)argList NS_SWIFT_NAME(log(asynchronous:level:flag:context:file:function:line:tag:format:arguments:));
338
+
339
+/**
340
+ * Logging Primitive.
341
+ *
342
+ * This method can be used if you manualy prepared AWSDDLogMessage.
343
+ *
344
+ *  @param asynchronous YES if the logging is done async, NO if you want to force sync
345
+ *  @param logMessage   the log message stored in a `AWSDDLogMessage` model object
346
+ */
347
++ (void)log:(BOOL)asynchronous
348
+    message:(AWSDDLogMessage *)logMessage NS_SWIFT_NAME(log(asynchronous:message:));
349
+
350
+/**
351
+ * Logging Primitive.
352
+ *
353
+ * This method can be used if you manualy prepared AWSDDLogMessage.
354
+ *
355
+ *  @param asynchronous YES if the logging is done async, NO if you want to force sync
356
+ *  @param logMessage   the log message stored in a `AWSDDLogMessage` model object
357
+ */
358
+- (void)log:(BOOL)asynchronous
359
+    message:(AWSDDLogMessage *)logMessage NS_SWIFT_NAME(log(asynchronous:message:));
360
+
361
+/**
362
+ * Since logging can be asynchronous, there may be times when you want to flush the logs.
363
+ * The framework invokes this automatically when the application quits.
364
+ **/
365
++ (void)flushLog;
366
+
367
+/**
368
+ * Since logging can be asynchronous, there may be times when you want to flush the logs.
369
+ * The framework invokes this automatically when the application quits.
370
+ **/
371
+- (void)flushLog;
372
+
373
+/**
374
+ * Loggers
375
+ *
376
+ * In order for your log statements to go somewhere, you should create and add a logger.
377
+ *
378
+ * You can add multiple loggers in order to direct your log statements to multiple places.
379
+ * And each logger can be configured separately.
380
+ * So you could have, for example, verbose logging to the console, but a concise log file with only warnings & errors.
381
+ **/
382
+
383
+/**
384
+ * Adds the logger to the system.
385
+ *
386
+ * This is equivalent to invoking `[AWSDDLog addLogger:logger withLogLevel:AWSDDLogLevelAll]`.
387
+ **/
388
++ (void)addLogger:(id <AWSDDLogger>)logger;
389
+
390
+/**
391
+ * Adds the logger to the system.
392
+ *
393
+ * This is equivalent to invoking `[AWSDDLog addLogger:logger withLogLevel:AWSDDLogLevelAll]`.
394
+ **/
395
+- (void)addLogger:(id <AWSDDLogger>)logger;
396
+
397
+/**
398
+ * Adds the logger to the system.
399
+ *
400
+ * The level that you provide here is a preemptive filter (for performance).
401
+ * That is, the level specified here will be used to filter out logMessages so that
402
+ * the logger is never even invoked for the messages.
403
+ *
404
+ * More information:
405
+ * When you issue a log statement, the logging framework iterates over each logger,
406
+ * and checks to see if it should forward the logMessage to the logger.
407
+ * This check is done using the level parameter passed to this method.
408
+ *
409
+ * For example:
410
+ *
411
+ * `[AWSDDLog addLogger:consoleLogger withLogLevel:AWSDDLogLevelVerbose];`
412
+ * `[AWSDDLog addLogger:fileLogger    withLogLevel:AWSDDLogLevelWarning];`
413
+ *
414
+ * `AWSDDLogError(@"oh no");` => gets forwarded to consoleLogger & fileLogger
415
+ * `AWSDDLogInfo(@"hi");`     => gets forwarded to consoleLogger only
416
+ *
417
+ * It is important to remember that Lumberjack uses a BITMASK.
418
+ * Many developers & third party frameworks may define extra log levels & flags.
419
+ * For example:
420
+ *
421
+ * `#define SOME_FRAMEWORK_LOG_FLAG_TRACE (1 << 6) // 0...1000000`
422
+ *
423
+ * So if you specify `AWSDDLogLevelVerbose` to this method, you won't see the framework's trace messages.
424
+ *
425
+ * `(SOME_FRAMEWORK_LOG_FLAG_TRACE & AWSDDLogLevelVerbose) => (01000000 & 00011111) => NO`
426
+ *
427
+ * Consider passing `AWSDDLogLevelAll` to this method, which has all bits set.
428
+ * You can also use the exclusive-or bitwise operator to get a bitmask that has all flags set,
429
+ * except the ones you explicitly don't want. For example, if you wanted everything except verbose & debug:
430
+ *
431
+ * `((AWSDDLogLevelAll ^ AWSDDLogLevelVerbose) | AWSDDLogLevelInfo)`
432
+ **/
433
++ (void)addLogger:(id <AWSDDLogger>)logger withLevel:(AWSDDLogLevel)level;
434
+
435
+/**
436
+ * Adds the logger to the system.
437
+ *
438
+ * The level that you provide here is a preemptive filter (for performance).
439
+ * That is, the level specified here will be used to filter out logMessages so that
440
+ * the logger is never even invoked for the messages.
441
+ *
442
+ * More information:
443
+ * When you issue a log statement, the logging framework iterates over each logger,
444
+ * and checks to see if it should forward the logMessage to the logger.
445
+ * This check is done using the level parameter passed to this method.
446
+ *
447
+ * For example:
448
+ *
449
+ * `[AWSDDLog addLogger:consoleLogger withLogLevel:AWSDDLogLevelVerbose];`
450
+ * `[AWSDDLog addLogger:fileLogger    withLogLevel:AWSDDLogLevelWarning];`
451
+ *
452
+ * `AWSDDLogError(@"oh no");` => gets forwarded to consoleLogger & fileLogger
453
+ * `AWSDDLogInfo(@"hi");`     => gets forwarded to consoleLogger only
454
+ *
455
+ * It is important to remember that Lumberjack uses a BITMASK.
456
+ * Many developers & third party frameworks may define extra log levels & flags.
457
+ * For example:
458
+ *
459
+ * `#define SOME_FRAMEWORK_LOG_FLAG_TRACE (1 << 6) // 0...1000000`
460
+ *
461
+ * So if you specify `AWSDDLogLevelVerbose` to this method, you won't see the framework's trace messages.
462
+ *
463
+ * `(SOME_FRAMEWORK_LOG_FLAG_TRACE & AWSDDLogLevelVerbose) => (01000000 & 00011111) => NO`
464
+ *
465
+ * Consider passing `AWSDDLogLevelAll` to this method, which has all bits set.
466
+ * You can also use the exclusive-or bitwise operator to get a bitmask that has all flags set,
467
+ * except the ones you explicitly don't want. For example, if you wanted everything except verbose & debug:
468
+ *
469
+ * `((AWSDDLogLevelAll ^ AWSDDLogLevelVerbose) | AWSDDLogLevelInfo)`
470
+ **/
471
+- (void)addLogger:(id <AWSDDLogger>)logger withLevel:(AWSDDLogLevel)level;
472
+
473
+/**
474
+ *  Remove the logger from the system
475
+ */
476
++ (void)removeLogger:(id <AWSDDLogger>)logger;
477
+
478
+/**
479
+ *  Remove the logger from the system
480
+ */
481
+- (void)removeLogger:(id <AWSDDLogger>)logger;
482
+
483
+/**
484
+ *  Remove all the current loggers
485
+ */
486
++ (void)removeAllLoggers;
487
+
488
+/**
489
+ *  Remove all the current loggers
490
+ */
491
+- (void)removeAllLoggers;
492
+
493
+/**
494
+ *  Return all the current loggers
495
+ */
496
+@property (class, nonatomic, copy, readonly) NSArray<id<AWSDDLogger>> *allLoggers;
497
+
498
+/**
499
+ *  Return all the current loggers
500
+ */
501
+@property (nonatomic, copy, readonly) NSArray<id<AWSDDLogger>> *allLoggers;
502
+
503
+/**
504
+ *  Return all the current loggers with their level (aka AWSDDLoggerInformation).
505
+ */
506
+@property (class, nonatomic, copy, readonly) NSArray<AWSDDLoggerInformation *> *allLoggersWithLevel;
507
+
508
+/**
509
+ *  Return all the current loggers with their level (aka AWSDDLoggerInformation).
510
+ */
511
+@property (nonatomic, copy, readonly) NSArray<AWSDDLoggerInformation *> *allLoggersWithLevel;
512
+
513
+/**
514
+ * Registered Dynamic Logging
515
+ *
516
+ * These methods allow you to obtain a list of classes that are using registered dynamic logging,
517
+ * and also provides methods to get and set their log level during run time.
518
+ **/
519
+
520
+/**
521
+ *  Returns an array with the classes that are using registered dynamic logging
522
+ */
523
+@property (class, nonatomic, copy, readonly) NSArray<Class> *registeredClasses;
524
+
525
+/**
526
+ *  Returns an array with the classes names that are using registered dynamic logging
527
+ */
528
+@property (class, nonatomic, copy, readonly) NSArray<NSString*> *registeredClassNames;
529
+
530
+/**
531
+ *  Returns the current log level for a certain class
532
+ *
533
+ *  @param aClass `Class` param
534
+ */
535
++ (AWSDDLogLevel)levelForClass:(Class)aClass;
536
+
537
+/**
538
+ *  Returns the current log level for a certain class
539
+ *
540
+ *  @param aClassName string param
541
+ */
542
++ (AWSDDLogLevel)levelForClassWithName:(NSString *)aClassName;
543
+
544
+/**
545
+ *  Set the log level for a certain class
546
+ *
547
+ *  @param level  the new level
548
+ *  @param aClass `Class` param
549
+ */
550
++ (void)setLevel:(AWSDDLogLevel)level forClass:(Class)aClass;
551
+
552
+/**
553
+ *  Set the log level for a certain class
554
+ *
555
+ *  @param level      the new level
556
+ *  @param aClassName string param
557
+ */
558
++ (void)setLevel:(AWSDDLogLevel)level forClassWithName:(NSString *)aClassName;
559
+
560
+@end
561
+
562
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
563
+#pragma mark -
564
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
565
+
566
+/**
567
+ *  This protocol describes a basic logger behavior. 
568
+ *  Basically, it can log messages, store a logFormatter plus a bunch of optional behaviors.
569
+ *  (i.e. flush, get its loggerQueue, get its name, ...
570
+ */
571
+@protocol AWSDDLogger <NSObject>
572
+
573
+/**
574
+ *  The log message method
575
+ *
576
+ *  @param logMessage the message (model)
577
+ */
578
+- (void)logMessage:(AWSDDLogMessage *)logMessage NS_SWIFT_NAME(log(message:));
579
+
580
+/**
581
+ * Formatters may optionally be added to any logger.
582
+ *
583
+ * If no formatter is set, the logger simply logs the message as it is given in logMessage,
584
+ * or it may use its own built in formatting style.
585
+ **/
586
+@property (nonatomic, strong) id <AWSDDLogFormatter> logFormatter;
587
+
588
+@optional
589
+
590
+/**
591
+ * Since logging is asynchronous, adding and removing loggers is also asynchronous.
592
+ * In other words, the loggers are added and removed at appropriate times with regards to log messages.
593
+ *
594
+ * - Loggers will not receive log messages that were executed prior to when they were added.
595
+ * - Loggers will not receive log messages that were executed after they were removed.
596
+ *
597
+ * These methods are executed in the logging thread/queue.
598
+ * This is the same thread/queue that will execute every logMessage: invocation.
599
+ * Loggers may use these methods for thread synchronization or other setup/teardown tasks.
600
+ **/
601
+- (void)didAddLogger;
602
+
603
+/**
604
+ * Since logging is asynchronous, adding and removing loggers is also asynchronous.
605
+ * In other words, the loggers are added and removed at appropriate times with regards to log messages.
606
+ *
607
+ * - Loggers will not receive log messages that were executed prior to when they were added.
608
+ * - Loggers will not receive log messages that were executed after they were removed.
609
+ *
610
+ * These methods are executed in the logging thread/queue given in parameter.
611
+ * This is the same thread/queue that will execute every logMessage: invocation.
612
+ * Loggers may use the queue parameter to set specific values on the queue with dispatch_set_specific() function.
613
+ **/
614
+- (void)didAddLoggerInQueue:(dispatch_queue_t)queue;
615
+
616
+/**
617
+ *  See the above description for `didAddLoger`
618
+ */
619
+- (void)willRemoveLogger;
620
+
621
+/**
622
+ * Some loggers may buffer IO for optimization purposes.
623
+ * For example, a database logger may only save occasionaly as the disk IO is slow.
624
+ * In such loggers, this method should be implemented to flush any pending IO.
625
+ *
626
+ * This allows invocations of AWSDDLog's flushLog method to be propogated to loggers that need it.
627
+ *
628
+ * Note that AWSDDLog's flushLog method is invoked automatically when the application quits,
629
+ * and it may be also invoked manually by the developer prior to application crashes, or other such reasons.
630
+ **/
631
+- (void)flush;
632
+
633
+/**
634
+ * Each logger is executed concurrently with respect to the other loggers.
635
+ * Thus, a dedicated dispatch queue is used for each logger.
636
+ * Logger implementations may optionally choose to provide their own dispatch queue.
637
+ **/
638
+@property (nonatomic, DISPATCH_QUEUE_REFERENCE_TYPE, readonly) dispatch_queue_t loggerQueue;
639
+
640
+/**
641
+ * If the logger implementation does not choose to provide its own queue,
642
+ * one will automatically be created for it.
643
+ * The created queue will receive its name from this method.
644
+ * This may be helpful for debugging or profiling reasons.
645
+ **/
646
+@property (nonatomic, readonly) NSString *loggerName;
647
+
648
+@end
649
+
650
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
651
+#pragma mark -
652
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
653
+
654
+/**
655
+ *  This protocol describes the behavior of a log formatter
656
+ */
657
+@protocol AWSDDLogFormatter <NSObject>
658
+@required
659
+
660
+/**
661
+ * Formatters may optionally be added to any logger.
662
+ * This allows for increased flexibility in the logging environment.
663
+ * For example, log messages for log files may be formatted differently than log messages for the console.
664
+ *
665
+ * For more information about formatters, see the "Custom Formatters" page:
666
+ * Documentation/CustomFormatters.md
667
+ *
668
+ * The formatter may also optionally filter the log message by returning nil,
669
+ * in which case the logger will not log the message.
670
+ **/
671
+- (NSString * __nullable)formatLogMessage:(AWSDDLogMessage *)logMessage NS_SWIFT_NAME(format(message:));
672
+
673
+@optional
674
+
675
+/**
676
+ * A single formatter instance can be added to multiple loggers.
677
+ * These methods provides hooks to notify the formatter of when it's added/removed.
678
+ *
679
+ * This is primarily for thread-safety.
680
+ * If a formatter is explicitly not thread-safe, it may wish to throw an exception if added to multiple loggers.
681
+ * Or if a formatter has potentially thread-unsafe code (e.g. NSDateFormatter),
682
+ * it could possibly use these hooks to switch to thread-safe versions of the code.
683
+ **/
684
+- (void)didAddToLogger:(id <AWSDDLogger>)logger;
685
+
686
+/**
687
+ * A single formatter instance can be added to multiple loggers.
688
+ * These methods provides hooks to notify the formatter of when it's added/removed.
689
+ *
690
+ * This is primarily for thread-safety.
691
+ * If a formatter is explicitly not thread-safe, it may wish to throw an exception if added to multiple loggers.
692
+ * Or if a formatter has potentially thread-unsafe code (e.g. NSDateFormatter),
693
+ * it could possibly use these hooks to switch to thread-safe versions of the code or use dispatch_set_specific()
694
+.* to add its own specific values.
695
+ **/
696
+- (void)didAddToLogger:(id <AWSDDLogger>)logger inQueue:(dispatch_queue_t)queue;
697
+
698
+/**
699
+ *  See the above description for `didAddToLogger:`
700
+ */
701
+- (void)willRemoveFromLogger:(id <AWSDDLogger>)logger;
702
+
703
+@end
704
+
705
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
706
+#pragma mark -
707
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
708
+
709
+/**
710
+ *  This protocol describes a dynamic logging component
711
+ */
712
+@protocol AWSDDRegisteredDynamicLogging
713
+
714
+/**
715
+ * Implement these methods to allow a file's log level to be managed from a central location.
716
+ *
717
+ * This is useful if you'd like to be able to change log levels for various parts
718
+ * of your code from within the running application.
719
+ *
720
+ * Imagine pulling up the settings for your application,
721
+ * and being able to configure the logging level on a per file basis.
722
+ *
723
+ * The implementation can be very straight-forward:
724
+ *
725
+ * ```
726
+ * + (int)ddLogLevel
727
+ * {
728
+ *     return ddLogLevel;
729
+ * }
730
+ *
731
+ * + (void)ddSetLogLevel:(AWSDDLogLevel)level
732
+ * {
733
+ *     ddLogLevel = level;
734
+ * }
735
+ * ```
736
+ **/
737
+@property (class, nonatomic, readwrite, setter=ddSetLogLevel:) AWSDDLogLevel ddLogLevel;
738
+
739
+@end
740
+
741
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
742
+#pragma mark -
743
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
744
+
745
+#ifndef NS_DESIGNATED_INITIALIZER
746
+    #define NS_DESIGNATED_INITIALIZER
747
+#endif
748
+
749
+/**
750
+ *  Log message options, allow copying certain log elements
751
+ */
752
+typedef NS_OPTIONS(NSInteger, AWSDDLogMessageOptions){
753
+    /**
754
+     *  Use this to use a copy of the file path
755
+     */
756
+    AWSDDLogMessageCopyFile        = 1 << 0,
757
+    /**
758
+     *  Use this to use a copy of the function name
759
+     */
760
+    AWSDDLogMessageCopyFunction    = 1 << 1,
761
+    /**
762
+     *  Use this to use avoid a copy of the message
763
+     */
764
+    AWSDDLogMessageDontCopyMessage = 1 << 2
765
+};
766
+
767
+/**
768
+ * The `AWSDDLogMessage` class encapsulates information about the log message.
769
+ * If you write custom loggers or formatters, you will be dealing with objects of this class.
770
+ **/
771
+@interface AWSDDLogMessage : NSObject <NSCopying>
772
+{
773
+    // Direct accessors to be used only for performance
774
+    @public
775
+    NSString *_message;
776
+    AWSDDLogLevel _level;
777
+    AWSDDLogFlag _flag;
778
+    NSInteger _context;
779
+    NSString *_file;
780
+    NSString *_fileName;
781
+    NSString *_function;
782
+    NSUInteger _line;
783
+    id _tag;
784
+    AWSDDLogMessageOptions _options;
785
+    NSDate *_timestamp;
786
+    NSString *_threadID;
787
+    NSString *_threadName;
788
+    NSString *_queueLabel;
789
+}
790
+
791
+/**
792
+ *  Default `init` for empty messages.
793
+ */
794
+- (instancetype)init NS_DESIGNATED_INITIALIZER;
795
+
796
+/**
797
+ * Standard init method for a log message object.
798
+ * Used by the logging primitives. (And the macros use the logging primitives.)
799
+ *
800
+ * If you find need to manually create logMessage objects, there is one thing you should be aware of:
801
+ *
802
+ * If no flags are passed, the method expects the file and function parameters to be string literals.
803
+ * That is, it expects the given strings to exist for the duration of the object's lifetime,
804
+ * and it expects the given strings to be immutable.
805
+ * In other words, it does not copy these strings, it simply points to them.
806
+ * This is due to the fact that __FILE__ and __FUNCTION__ are usually used to specify these parameters,
807
+ * so it makes sense to optimize and skip the unnecessary allocations.
808
+ * However, if you need them to be copied you may use the options parameter to specify this.
809
+ *
810
+ *  @param message   the message
811
+ *  @param level     the log level
812
+ *  @param flag      the log flag
813
+ *  @param context   the context (if any is defined)
814
+ *  @param file      the current file
815
+ *  @param function  the current function
816
+ *  @param line      the current code line
817
+ *  @param tag       potential tag
818
+ *  @param options   a bitmask which supports AWSDDLogMessageCopyFile and AWSDDLogMessageCopyFunction.
819
+ *  @param timestamp the log timestamp
820
+ *
821
+ *  @return a new instance of a log message model object
822
+ */
823
+- (instancetype)initWithMessage:(NSString *)message
824
+                          level:(AWSDDLogLevel)level
825
+                           flag:(AWSDDLogFlag)flag
826
+                        context:(NSInteger)context
827
+                           file:(NSString *)file
828
+                       function:(NSString * __nullable)function
829
+                           line:(NSUInteger)line
830
+                            tag:(id __nullable)tag
831
+                        options:(AWSDDLogMessageOptions)options
832
+                      timestamp:(NSDate * __nullable)timestamp NS_DESIGNATED_INITIALIZER;
833
+
834
+/**
835
+ * Read-only properties
836
+ **/
837
+
838
+/**
839
+ *  The log message
840
+ */
841
+@property (readonly, nonatomic) NSString *message;
842
+@property (readonly, nonatomic) AWSDDLogLevel level;
843
+@property (readonly, nonatomic) AWSDDLogFlag flag;
844
+@property (readonly, nonatomic) NSInteger context;
845
+@property (readonly, nonatomic) NSString *file;
846
+@property (readonly, nonatomic) NSString *fileName;
847
+@property (readonly, nonatomic) NSString * __nullable function;
848
+@property (readonly, nonatomic) NSUInteger line;
849
+@property (readonly, nonatomic) id __nullable tag;
850
+@property (readonly, nonatomic) AWSDDLogMessageOptions options;
851
+@property (readonly, nonatomic) NSDate *timestamp;
852
+@property (readonly, nonatomic) NSString *threadID; // ID as it appears in NSLog calculated from the machThreadID
853
+@property (readonly, nonatomic) NSString *threadName;
854
+@property (readonly, nonatomic) NSString *queueLabel;
855
+
856
+@end
857
+
858
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
859
+#pragma mark -
860
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
861
+
862
+/**
863
+ * The `AWSDDLogger` protocol specifies that an optional formatter can be added to a logger.
864
+ * Most (but not all) loggers will want to support formatters.
865
+ *
866
+ * However, writting getters and setters in a thread safe manner,
867
+ * while still maintaining maximum speed for the logging process, is a difficult task.
868
+ *
869
+ * To do it right, the implementation of the getter/setter has strict requiremenets:
870
+ * - Must NOT require the `logMessage:` method to acquire a lock.
871
+ * - Must NOT require the `logMessage:` method to access an atomic property (also a lock of sorts).
872
+ *
873
+ * To simplify things, an abstract logger is provided that implements the getter and setter.
874
+ *
875
+ * Logger implementations may simply extend this class,
876
+ * and they can ACCESS THE FORMATTER VARIABLE DIRECTLY from within their `logMessage:` method!
877
+ **/
878
+@interface AWSDDAbstractLogger : NSObject <AWSDDLogger>
879
+{
880
+    // Direct accessors to be used only for performance
881
+    @public
882
+    id <AWSDDLogFormatter> _logFormatter;
883
+    dispatch_queue_t _loggerQueue;
884
+}
885
+
886
+@property (nonatomic, strong, nullable) id <AWSDDLogFormatter> logFormatter;
887
+@property (nonatomic, DISPATCH_QUEUE_REFERENCE_TYPE) dispatch_queue_t loggerQueue;
888
+
889
+// For thread-safety assertions
890
+
891
+/**
892
+ *  Return YES if the current logger uses a global queue for logging
893
+ */
894
+@property (nonatomic, readonly, getter=isOnGlobalLoggingQueue)  BOOL onGlobalLoggingQueue;
895
+
896
+/**
897
+ *  Return YES if the current logger uses the internal designated queue for logging
898
+ */
899
+@property (nonatomic, readonly, getter=isOnInternalLoggerQueue) BOOL onInternalLoggerQueue;
900
+
901
+@end
902
+
903
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
904
+#pragma mark -
905
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
906
+
907
+@interface AWSDDLoggerInformation : NSObject
908
+
909
+@property (nonatomic, readonly) id <AWSDDLogger> logger;
910
+@property (nonatomic, readonly) AWSDDLogLevel level;
911
+
912
++ (AWSDDLoggerInformation *)informationWithLogger:(id <AWSDDLogger>)logger
913
+                           andLevel:(AWSDDLogLevel)level;
914
+
915
+@end
916
+
917
+NS_ASSUME_NONNULL_END

+ 94
- 0
AWSCore.framework/Headers/AWSDDLogMacros.h 查看文件

@@ -0,0 +1,94 @@
1
+// Software License Agreement (BSD License)
2
+//
3
+// Copyright (c) 2010-2016, Deusty, LLC
4
+// All rights reserved.
5
+//
6
+// Redistribution and use of this software in source and binary forms,
7
+// with or without modification, are permitted provided that the following conditions are met:
8
+//
9
+// * Redistributions of source code must retain the above copyright notice,
10
+//   this list of conditions and the following disclaimer.
11
+//
12
+// * Neither the name of Deusty nor the names of its contributors may be used
13
+//   to endorse or promote products derived from this software without specific
14
+//   prior written permission of Deusty, LLC.
15
+
16
+// Disable legacy macros
17
+#ifndef AWSDD_LEGACY_MACROS
18
+    #define AWSDD_LEGACY_MACROS 0
19
+#endif
20
+
21
+#import "AWSDDLog.h"
22
+
23
+/**
24
+ * Whether async should be used by log messages, excluding error messages that are always sent sync.
25
+ **/
26
+#ifndef AWSDD_LOG_ASYNC_ENABLED
27
+    #define AWSDD_LOG_ASYNC_ENABLED YES
28
+#endif
29
+
30
+/**
31
+ * These are the two macros that all other macros below compile into.
32
+ * These big multiline macros makes all the other macros easier to read.
33
+ **/
34
+#define AWSDD_LOG_MACRO(isAsynchronous, lvl, flg, ctx, atag, fnct, frmt, ...) \
35
+        [AWSDDLog log : isAsynchronous                                     \
36
+             level : lvl                                                \
37
+              flag : flg                                                \
38
+           context : ctx                                                \
39
+              file : __FILE__                                           \
40
+          function : fnct                                               \
41
+              line : __LINE__                                           \
42
+               tag : atag                                               \
43
+            format : (frmt), ## __VA_ARGS__]
44
+
45
+#define LOG_MACRO_TO_AWSDDLOG(ddlog, isAsynchronous, lvl, flg, ctx, atag, fnct, frmt, ...) \
46
+        [ddlog log : isAsynchronous                                     \
47
+             level : lvl                                                \
48
+              flag : flg                                                \
49
+           context : ctx                                                \
50
+              file : __FILE__                                           \
51
+          function : fnct                                               \
52
+              line : __LINE__                                           \
53
+               tag : atag                                               \
54
+            format : (frmt), ## __VA_ARGS__]
55
+
56
+/**
57
+ * Define version of the macro that only execute if the log level is above the threshold.
58
+ * The compiled versions essentially look like this:
59
+ *
60
+ * if (logFlagForThisLogMsg & ddLogLevel) { execute log message }
61
+ *
62
+ * When LOG_LEVEL_DEF is defined as ddLogLevel.
63
+ *
64
+ * As shown further below, Lumberjack actually uses a bitmask as opposed to primitive log levels.
65
+ * This allows for a great amount of flexibility and some pretty advanced fine grained logging techniques.
66
+ *
67
+ * Note that when compiler optimizations are enabled (as they are for your release builds),
68
+ * the log messages above your logging threshold will automatically be compiled out.
69
+ *
70
+ * (If the compiler sees LOG_LEVEL_DEF/ddLogLevel declared as a constant, the compiler simply checks to see
71
+ *  if the 'if' statement would execute, and if not it strips it from the binary.)
72
+ *
73
+ * We also define shorthand versions for asynchronous and synchronous logging.
74
+ **/
75
+#define AWSDD_LOG_MAYBE(async, lvl, flg, ctx, tag, fnct, frmt, ...) \
76
+        do { AWSDD_LOG_MACRO(async, lvl, flg, ctx, tag, fnct, frmt, ##__VA_ARGS__); } while(0)
77
+
78
+#define LOG_MAYBE_TO_AWSDDLOG(ddlog, async, lvl, flg, ctx, tag, fnct, frmt, ...) \
79
+        do { LOG_MACRO_TO_AWSDDLOG(ddlog, async, lvl, flg, ctx, tag, fnct, frmt, ##__VA_ARGS__); } while(0)
80
+
81
+/**
82
+ * Ready to use log macros with no context or tag.
83
+ **/
84
+#define AWSDDLogError(frmt, ...)   AWSDD_LOG_MAYBE(NO,                [AWSDDLog sharedInstance].logLevel, AWSDDLogFlagError,   0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
85
+#define AWSDDLogWarn(frmt, ...)    AWSDD_LOG_MAYBE(AWSDD_LOG_ASYNC_ENABLED, [AWSDDLog sharedInstance].logLevel, AWSDDLogFlagWarning, 0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
86
+#define AWSDDLogInfo(frmt, ...)    AWSDD_LOG_MAYBE(AWSDD_LOG_ASYNC_ENABLED, [AWSDDLog sharedInstance].logLevel, AWSDDLogFlagInfo,    0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
87
+#define AWSDDLogDebug(frmt, ...)   AWSDD_LOG_MAYBE(AWSDD_LOG_ASYNC_ENABLED, [AWSDDLog sharedInstance].logLevel, AWSDDLogFlagDebug,   0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
88
+#define AWSDDLogVerbose(frmt, ...) AWSDD_LOG_MAYBE(AWSDD_LOG_ASYNC_ENABLED, [AWSDDLog sharedInstance].logLevel, AWSDDLogFlagVerbose, 0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
89
+
90
+#define AWSDDLogErrorToAWSDDLog(ddlog, frmt, ...)   LOG_MAYBE_TO_AWSDDLOG(ddlog, NO,                [AWSDDLog sharedInstance].logLevel, AWSDDLogFlagError,   0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
91
+#define AWSDDLogWarnToAWSDDLog(ddlog, frmt, ...)    LOG_MAYBE_TO_AWSDDLOG(ddlog, AWSDD_LOG_ASYNC_ENABLED, [AWSDDLog sharedInstance].logLevel, AWSDDLogFlagWarning, 0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
92
+#define AWSDDLogInfoToAWSDDLog(ddlog, frmt, ...)    LOG_MAYBE_TO_AWSDDLOG(ddlog, AWSDD_LOG_ASYNC_ENABLED, [AWSDDLog sharedInstance].logLevel, AWSDDLogFlagInfo,    0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
93
+#define AWSDDLogDebugToAWSDDLog(ddlog, frmt, ...)   LOG_MAYBE_TO_AWSDDLOG(ddlog, AWSDD_LOG_ASYNC_ENABLED, [AWSDDLog sharedInstance].logLevel, AWSDDLogFlagDebug,   0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
94
+#define AWSDDLogVerboseToAWSDDLog(ddlog, frmt, ...) LOG_MAYBE_TO_AWSDDLOG(ddlog, AWSDD_LOG_ASYNC_ENABLED, [AWSDDLog sharedInstance].logLevel, AWSDDLogFlagVerbose, 0, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)

+ 38
- 0
AWSCore.framework/Headers/AWSDDOSLogger.h 查看文件

@@ -0,0 +1,38 @@
1
+// Software License Agreement (BSD License)
2
+//
3
+// Copyright (c) 2010-2016, Deusty, LLC
4
+// All rights reserved.
5
+//
6
+// Redistribution and use of this software in source and binary forms,
7
+// with or without modification, are permitted provided that the following conditions are met:
8
+//
9
+// * Redistributions of source code must retain the above copyright notice,
10
+//   this list of conditions and the following disclaimer.
11
+//
12
+// * Neither the name of Deusty nor the names of its contributors may be used
13
+//   to endorse or promote products derived from this software without specific
14
+//   prior written permission of Deusty, LLC.
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+// Disable legacy macros
19
+#ifndef DD_LEGACY_MACROS
20
+    #define DD_LEGACY_MACROS 0
21
+#endif
22
+
23
+#import "AWSDDLog.h"
24
+
25
+/**
26
+ * This class provides a logger for the Apple os_log facility.
27
+ **/
28
+API_AVAILABLE(ios(10.0), macos(10.12), tvos(10.0), watchos(3.0))
29
+@interface AWSDDOSLogger : AWSDDAbstractLogger <AWSDDLogger>
30
+
31
+/**
32
+ *  Singleton method
33
+ *
34
+ *  @return the shared instance
35
+ */
36
+@property (class, readonly, strong) AWSDDOSLogger *sharedInstance;
37
+
38
+@end

+ 178
- 0
AWSCore.framework/Headers/AWSDDTTYLogger.h 查看文件

@@ -0,0 +1,178 @@
1
+// Software License Agreement (BSD License)
2
+//
3
+// Copyright (c) 2010-2016, Deusty, LLC
4
+// All rights reserved.
5
+//
6
+// Redistribution and use of this software in source and binary forms,
7
+// with or without modification, are permitted provided that the following conditions are met:
8
+//
9
+// * Redistributions of source code must retain the above copyright notice,
10
+//   this list of conditions and the following disclaimer.
11
+//
12
+// * Neither the name of Deusty nor the names of its contributors may be used
13
+//   to endorse or promote products derived from this software without specific
14
+//   prior written permission of Deusty, LLC.
15
+
16
+// Disable legacy macros
17
+#ifndef AWSDD_LEGACY_MACROS
18
+    #define AWSDD_LEGACY_MACROS 0
19
+#endif
20
+
21
+#import "AWSDDLog.h"
22
+
23
+#define LOG_CONTEXT_ALL INT_MAX
24
+
25
+#pragma clang diagnostic push
26
+#pragma clang diagnostic ignored "-Wunused-function"
27
+#if !(TARGET_OS_OSX)
28
+    // iOS or tvOS or watchOS
29
+    #import <UIKit/UIColor.h>
30
+    typedef UIColor AWSDDColor;
31
+    static inline AWSDDColor* AWSDDMakeColor(CGFloat r, CGFloat g, CGFloat b) {return [AWSDDColor colorWithRed:(r/255.0f) green:(g/255.0f) blue:(b/255.0f) alpha:1.0f];}
32
+#elif defined(AWSDD_CLI) || !__has_include(<AppKit/NSColor.h>)
33
+    // OS X CLI
34
+    #import "CLIColor.h"
35
+    typedef CLIColor AWSDDColor;
36
+    static inline AWSDDColor* AWSDDMakeColor(CGFloat r, CGFloat g, CGFloat b) {return [AWSDDColor colorWithCalibratedRed:(r/255.0f) green:(g/255.0f) blue:(b/255.0f) alpha:1.0f];}
37
+#else
38
+    // OS X with AppKit
39
+    #import <AppKit/NSColor.h>
40
+    typedef NSColor AWSDDColor;
41
+    static inline AWSDDColor* AWSDDMakeColor(CGFloat r, CGFloat g, CGFloat b) {return [AWSDDColor colorWithCalibratedRed:(r/255.0f) green:(g/255.0f) blue:(b/255.0f) alpha:1.0f];}
42
+#endif
43
+#pragma clang diagnostic pop
44
+
45
+
46
+/**
47
+ * This class provides a logger for Terminal output or Xcode console output,
48
+ * depending on where you are running your code.
49
+ *
50
+ * As described in the "Getting Started" page,
51
+ * the traditional NSLog() function directs it's output to two places:
52
+ *
53
+ * - Apple System Log (so it shows up in Console.app)
54
+ * - StdErr (if stderr is a TTY, so log statements show up in Xcode console)
55
+ *
56
+ * To duplicate NSLog() functionality you can simply add this logger and an asl logger.
57
+ * However, if you instead choose to use file logging (for faster performance),
58
+ * you may choose to use only a file logger and a tty logger.
59
+ **/
60
+@interface AWSDDTTYLogger : AWSDDAbstractLogger <AWSDDLogger>
61
+
62
+/**
63
+ *  Singleton method
64
+ */
65
+@property (class, readonly, strong) AWSDDTTYLogger *sharedInstance;
66
+
67
+/* Inherited from the AWSDDLogger protocol:
68
+ *
69
+ * Formatters may optionally be added to any logger.
70
+ *
71
+ * If no formatter is set, the logger simply logs the message as it is given in logMessage,
72
+ * or it may use its own built in formatting style.
73
+ *
74
+ * More information about formatters can be found here:
75
+ * Documentation/CustomFormatters.md
76
+ *
77
+ * The actual implementation of these methods is inherited from AWSDDAbstractLogger.
78
+
79
+   - (id <AWSDDLogFormatter>)logFormatter;
80
+   - (void)setLogFormatter:(id <AWSDDLogFormatter>)formatter;
81
+
82
+ */
83
+
84
+/**
85
+ * Want to use different colors for different log levels?
86
+ * Enable this property.
87
+ *
88
+ * If you run the application via the Terminal (not Xcode),
89
+ * the logger will map colors to xterm-256color or xterm-color (if available).
90
+ *
91
+ * Xcode does NOT natively support colors in the Xcode debugging console.
92
+ * You'll need to install the XcodeColors plugin to see colors in the Xcode console.
93
+ * https://github.com/robbiehanson/XcodeColors
94
+ *
95
+ * The default value is NO.
96
+ **/
97
+@property (readwrite, assign) BOOL colorsEnabled;
98
+
99
+/**
100
+ * When using a custom formatter you can set the `logMessage` method not to append
101
+ * `\n` character after each output. This allows for some greater flexibility with
102
+ * custom formatters. Default value is YES.
103
+ **/
104
+@property (nonatomic, readwrite, assign) BOOL automaticallyAppendNewlineForCustomFormatters;
105
+
106
+/**
107
+ * The default color set (foregroundColor, backgroundColor) is:
108
+ *
109
+ * - AWSDDLogFlagError   = (red, nil)
110
+ * - AWSDDLogFlagWarning = (orange, nil)
111
+ *
112
+ * You can customize the colors however you see fit.
113
+ * Please note that you are passing a flag, NOT a level.
114
+ *
115
+ * GOOD : [ttyLogger setForegroundColor:pink backgroundColor:nil forFlag:AWSDDLogFlagInfo];  // <- Good :)
116
+ *  BAD : [ttyLogger setForegroundColor:pink backgroundColor:nil forFlag:AWSDDLogLevelInfo]; // <- BAD! :(
117
+ *
118
+ * AWSDDLogFlagInfo  = 0...00100
119
+ * AWSDDLogLevelInfo = 0...00111 <- Would match AWSDDLogFlagInfo and AWSDDLogFlagWarning and AWSDDLogFlagError
120
+ *
121
+ * If you run the application within Xcode, then the XcodeColors plugin is required.
122
+ *
123
+ * If you run the application from a shell, then AWSDDTTYLogger will automatically map the given color to
124
+ * the closest available color. (xterm-256color or xterm-color which have 256 and 16 supported colors respectively.)
125
+ *
126
+ * This method invokes setForegroundColor:backgroundColor:forFlag:context: and applies it to `LOG_CONTEXT_ALL`.
127
+ **/
128
+- (void)setForegroundColor:(AWSDDColor *)txtColor backgroundColor:(AWSDDColor *)bgColor forFlag:(AWSDDLogFlag)mask;
129
+
130
+/**
131
+ * Just like setForegroundColor:backgroundColor:flag, but allows you to specify a particular logging context.
132
+ *
133
+ * A logging context is often used to identify log messages coming from a 3rd party framework,
134
+ * although logging context's can be used for many different functions.
135
+ *
136
+ * Use LOG_CONTEXT_ALL to set the deafult color for all contexts that have no specific color set defined.
137
+ *
138
+ * Logging context's are explained in further detail here:
139
+ * Documentation/CustomContext.md
140
+ **/
141
+- (void)setForegroundColor:(AWSDDColor *)txtColor backgroundColor:(AWSDDColor *)bgColor forFlag:(AWSDDLogFlag)mask context:(NSInteger)ctxt;
142
+
143
+/**
144
+ * Similar to the methods above, but allows you to map AWSDDLogMessage->tag to a particular color profile.
145
+ * For example, you could do something like this:
146
+ *
147
+ * static NSString *const PurpleTag = @"PurpleTag";
148
+ *
149
+ * #define AWSDDLogPurple(frmt, ...) LOG_OBJC_TAG_MACRO(NO, 0, 0, 0, PurpleTag, frmt, ##__VA_ARGS__)
150
+ * 
151
+ * And then where you configure CocoaLumberjack:
152
+ *
153
+ * purple = AWSDDMakeColor((64/255.0), (0/255.0), (128/255.0));
154
+ *
155
+ * or any UIColor/NSColor constructor.
156
+ *
157
+ * Note: For CLI OS X projects that don't link with AppKit use CLIColor objects instead
158
+ *
159
+ * [[AWSDDTTYLogger sharedInstance] setForegroundColor:purple backgroundColor:nil forTag:PurpleTag];
160
+ * [AWSDDLog addLogger:[AWSDDTTYLogger sharedInstance]];
161
+ *
162
+ * This would essentially give you a straight NSLog replacement that prints in purple:
163
+ *
164
+ * AWSDDLogPurple(@"I'm a purple log message!");
165
+ **/
166
+- (void)setForegroundColor:(AWSDDColor *)txtColor backgroundColor:(AWSDDColor *)bgColor forTag:(id <NSCopying>)tag;
167
+
168
+/**
169
+ * Clearing color profiles.
170
+ **/
171
+- (void)clearColorsForFlag:(AWSDDLogFlag)mask;
172
+- (void)clearColorsForFlag:(AWSDDLogFlag)mask context:(NSInteger)context;
173
+- (void)clearColorsForTag:(id <NSCopying>)tag;
174
+- (void)clearColorsForAllFlags;
175
+- (void)clearColorsForAllTags;
176
+- (void)clearAllColors;
177
+
178
+@end

+ 62
- 0
AWSCore.framework/Headers/AWSExecutor.h 查看文件

@@ -0,0 +1,62 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+NS_ASSUME_NONNULL_BEGIN
14
+
15
+/*!
16
+ An object that can run a given block.
17
+ */
18
+@interface AWSExecutor : NSObject
19
+
20
+/*!
21
+ Returns a default executor, which runs continuations immediately until the call stack gets too
22
+ deep, then dispatches to a new GCD queue.
23
+ */
24
++ (instancetype)defaultExecutor;
25
+
26
+/*!
27
+ Returns an executor that runs continuations on the thread where the previous task was completed.
28
+ */
29
++ (instancetype)immediateExecutor;
30
+
31
+/*!
32
+ Returns an executor that runs continuations on the main thread.
33
+ */
34
++ (instancetype)mainThreadExecutor;
35
+
36
+/*!
37
+ Returns a new executor that uses the given block to execute continuations.
38
+ @param block The block to use.
39
+ */
40
++ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block;
41
+
42
+/*!
43
+ Returns a new executor that runs continuations on the given queue.
44
+ @param queue The instance of `dispatch_queue_t` to dispatch all continuations onto.
45
+ */
46
++ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue;
47
+
48
+/*!
49
+ Returns a new executor that runs continuations on the given queue.
50
+ @param queue The instance of `NSOperationQueue` to run all continuations on.
51
+ */
52
++ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue;
53
+
54
+/*!
55
+ Runs the given block using this executor's particular strategy.
56
+ @param block The block to execute.
57
+ */
58
+- (void)execute:(void(^)(void))block;
59
+
60
+@end
61
+
62
+NS_ASSUME_NONNULL_END

+ 53
- 0
AWSCore.framework/Headers/AWSFMDB+AWSHelpers.h 查看文件

@@ -0,0 +1,53 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <AWSCore/AWSCore.h>
17
+#import "AWSFMDatabasePool.h"
18
+#import "AWSFMDatabaseQueue.h"
19
+
20
+NS_ASSUME_NONNULL_BEGIN
21
+
22
+@interface AWSFMDatabaseQueue (AWSHelpers)
23
+
24
+/**
25
+ Convenience method to open a database queue with the SQLITE_OPEN_FULLMUTEX flag so it can be safely accessed across
26
+ threads.
27
+
28
+ @param aPath The file path of the database.
29
+
30
+ @return The `FMDatabaseQueue` object. `nil` on error.
31
+ */
32
+
33
++ (instancetype)serialDatabaseQueueWithPath:(NSString*)aPath;
34
+
35
+@end
36
+
37
+
38
+@interface AWSFMDatabasePool (AWSHelpers)
39
+
40
+/**
41
+ Convenience method to create a database pool with the SQLITE_OPEN_FULLMUTEX flag so it can be safely accessed across
42
+ threads.
43
+
44
+ @param aPath The file path of the database.
45
+
46
+ @return The `FMDatabasePool` object. `nil` on error.
47
+ */
48
+
49
++ (instancetype)serialDatabasePoolWithPath:(NSString*)aPath;
50
+
51
+@end
52
+
53
+NS_ASSUME_NONNULL_END

+ 8
- 0
AWSCore.framework/Headers/AWSFMDB.h 查看文件

@@ -0,0 +1,8 @@
1
+#import "AWSFMDatabase.h"
2
+#import "AWSFMResultSet.h"
3
+#import "AWSFMDatabaseAdditions.h"
4
+#import "AWSFMDatabaseQueue.h"
5
+#import "AWSFMDatabasePool.h"
6
+
7
+// AWS Helpers
8
+#import "AWSFMDB+AWSHelpers.h"

+ 1080
- 0
AWSCore.framework/Headers/AWSFMDatabase.h
文件差異過大導致無法顯示
查看文件


+ 277
- 0
AWSCore.framework/Headers/AWSFMDatabaseAdditions.h 查看文件

@@ -0,0 +1,277 @@
1
+//
2
+//  FMDatabaseAdditions.h
3
+//  fmdb
4
+//
5
+//  Created by August Mueller on 10/30/05.
6
+//  Copyright 2005 Flying Meat Inc.. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+#import "AWSFMDatabase.h"
11
+
12
+
13
+/** Category of additions for `<FMDatabase>` class.
14
+ 
15
+ ### See also
16
+
17
+ - `<FMDatabase>`
18
+ */
19
+
20
+@interface AWSFMDatabase (AWSFMDatabaseAdditions)
21
+
22
+///----------------------------------------
23
+/// @name Return results of SQL to variable
24
+///----------------------------------------
25
+
26
+/** Return `int` value for query
27
+ 
28
+ @param query The SQL query to be performed. 
29
+ @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
30
+
31
+ @return `int` value.
32
+ 
33
+ @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
34
+ */
35
+
36
+- (int)intForQuery:(NSString*)query, ...;
37
+
38
+/** Return `long` value for query
39
+
40
+ @param query The SQL query to be performed.
41
+ @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
42
+
43
+ @return `long` value.
44
+ 
45
+ @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
46
+ */
47
+
48
+- (long)longForQuery:(NSString*)query, ...;
49
+
50
+/** Return `BOOL` value for query
51
+
52
+ @param query The SQL query to be performed.
53
+ @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
54
+
55
+ @return `BOOL` value.
56
+ 
57
+ @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
58
+ */
59
+
60
+- (BOOL)boolForQuery:(NSString*)query, ...;
61
+
62
+/** Return `double` value for query
63
+
64
+ @param query The SQL query to be performed.
65
+ @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
66
+
67
+ @return `double` value.
68
+ 
69
+ @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
70
+ */
71
+
72
+- (double)doubleForQuery:(NSString*)query, ...;
73
+
74
+/** Return `NSString` value for query
75
+
76
+ @param query The SQL query to be performed.
77
+ @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
78
+
79
+ @return `NSString` value.
80
+ 
81
+ @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
82
+ */
83
+
84
+- (NSString*)stringForQuery:(NSString*)query, ...;
85
+
86
+/** Return `NSData` value for query
87
+
88
+ @param query The SQL query to be performed.
89
+ @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
90
+
91
+ @return `NSData` value.
92
+ 
93
+ @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
94
+ */
95
+
96
+- (NSData*)dataForQuery:(NSString*)query, ...;
97
+
98
+/** Return `NSDate` value for query
99
+
100
+ @param query The SQL query to be performed.
101
+ @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
102
+
103
+ @return `NSDate` value.
104
+ 
105
+ @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
106
+ */
107
+
108
+- (NSDate*)dateForQuery:(NSString*)query, ...;
109
+
110
+
111
+// Notice that there's no dataNoCopyForQuery:.
112
+// That would be a bad idea, because we close out the result set, and then what
113
+// happens to the data that we just didn't copy?  Who knows, not I.
114
+
115
+
116
+///--------------------------------
117
+/// @name Schema related operations
118
+///--------------------------------
119
+
120
+/** Does table exist in database?
121
+
122
+ @param tableName The name of the table being looked for.
123
+
124
+ @return `YES` if table found; `NO` if not found.
125
+ */
126
+
127
+- (BOOL)tableExists:(NSString*)tableName;
128
+
129
+/** The schema of the database.
130
+ 
131
+ This will be the schema for the entire database. For each entity, each row of the result set will include the following fields:
132
+ 
133
+ - `type` - The type of entity (e.g. table, index, view, or trigger)
134
+ - `name` - The name of the object
135
+ - `tbl_name` - The name of the table to which the object references
136
+ - `rootpage` - The page number of the root b-tree page for tables and indices
137
+ - `sql` - The SQL that created the entity
138
+
139
+ @return `FMResultSet` of schema; `nil` on error.
140
+ 
141
+ @see [SQLite File Format](http://www.sqlite.org/fileformat.html)
142
+ */
143
+
144
+- (AWSFMResultSet*)getSchema;
145
+
146
+/** The schema of the database.
147
+
148
+ This will be the schema for a particular table as report by SQLite `PRAGMA`, for example:
149
+ 
150
+    PRAGMA table_info('employees')
151
+ 
152
+ This will report:
153
+ 
154
+ - `cid` - The column ID number
155
+ - `name` - The name of the column
156
+ - `type` - The data type specified for the column
157
+ - `notnull` - whether the field is defined as NOT NULL (i.e. values required)
158
+ - `dflt_value` - The default value for the column
159
+ - `pk` - Whether the field is part of the primary key of the table
160
+
161
+ @param tableName The name of the table for whom the schema will be returned.
162
+ 
163
+ @return `FMResultSet` of schema; `nil` on error.
164
+ 
165
+ @see [table_info](http://www.sqlite.org/pragma.html#pragma_table_info)
166
+ */
167
+
168
+- (AWSFMResultSet*)getTableSchema:(NSString*)tableName;
169
+
170
+/** Test to see if particular column exists for particular table in database
171
+ 
172
+ @param columnName The name of the column.
173
+ 
174
+ @param tableName The name of the table.
175
+ 
176
+ @return `YES` if column exists in table in question; `NO` otherwise.
177
+ */
178
+
179
+- (BOOL)columnExists:(NSString*)columnName inTableWithName:(NSString*)tableName;
180
+
181
+/** Test to see if particular column exists for particular table in database
182
+
183
+ @param columnName The name of the column.
184
+
185
+ @param tableName The name of the table.
186
+
187
+ @return `YES` if column exists in table in question; `NO` otherwise.
188
+ 
189
+ @see columnExists:inTableWithName:
190
+ 
191
+ @warning Deprecated - use `<columnExists:inTableWithName:>` instead.
192
+ */
193
+
194
+- (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __attribute__ ((deprecated));
195
+
196
+
197
+/** Validate SQL statement
198
+ 
199
+ This validates SQL statement by performing `sqlite3_prepare_v2`, but not returning the results, but instead immediately calling `sqlite3_finalize`.
200
+ 
201
+ @param sql The SQL statement being validated.
202
+ 
203
+ @param error This is a pointer to a `NSError` object that will receive the autoreleased `NSError` object if there was any error. If this is `nil`, no `NSError` result will be returned.
204
+ 
205
+ @return `YES` if validation succeeded without incident; `NO` otherwise.
206
+ 
207
+ */
208
+
209
+- (BOOL)validateSQL:(NSString*)sql error:(NSError**)error;
210
+
211
+
212
+///-----------------------------------
213
+/// @name Application identifier tasks
214
+///-----------------------------------
215
+
216
+/** Retrieve application ID
217
+ 
218
+ @return The `uint32_t` numeric value of the application ID.
219
+ 
220
+ @see setApplicationID:
221
+ */
222
+
223
+- (uint32_t)applicationID;
224
+
225
+/** Set the application ID
226
+
227
+ @param appID The `uint32_t` numeric value of the application ID.
228
+ 
229
+ @see applicationID
230
+ */
231
+
232
+- (void)setApplicationID:(uint32_t)appID;
233
+
234
+#if TARGET_OS_MAC && !TARGET_OS_IPHONE
235
+/** Retrieve application ID string
236
+
237
+ @return The `NSString` value of the application ID.
238
+
239
+ @see setApplicationIDString:
240
+ */
241
+
242
+
243
+- (NSString*)applicationIDString;
244
+
245
+/** Set the application ID string
246
+
247
+ @param string The `NSString` value of the application ID.
248
+
249
+ @see applicationIDString
250
+ */
251
+
252
+- (void)setApplicationIDString:(NSString*)string;
253
+#endif
254
+
255
+///-----------------------------------
256
+/// @name user version identifier tasks
257
+///-----------------------------------
258
+
259
+/** Retrieve user version
260
+ 
261
+ @return The `uint32_t` numeric value of the user version.
262
+ 
263
+ @see setUserVersion:
264
+ */
265
+
266
+- (uint32_t)userVersion;
267
+
268
+/** Set the user-version
269
+ 
270
+ @param version The `uint32_t` numeric value of the user version.
271
+ 
272
+ @see userVersion
273
+ */
274
+
275
+- (void)setUserVersion:(uint32_t)version;
276
+
277
+@end

+ 200
- 0
AWSCore.framework/Headers/AWSFMDatabasePool.h 查看文件

@@ -0,0 +1,200 @@
1
+//
2
+//  FMDatabasePool.h
3
+//  fmdb
4
+//
5
+//  Created by August Mueller on 6/22/11.
6
+//  Copyright 2011 Flying Meat Inc. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+@class AWSFMDatabase;
12
+
13
+/** Pool of `<FMDatabase>` objects.
14
+
15
+ ### See also
16
+ 
17
+ - `<FMDatabaseQueue>`
18
+ - `<FMDatabase>`
19
+
20
+ @warning Before using `FMDatabasePool`, please consider using `<FMDatabaseQueue>` instead.
21
+
22
+ If you really really really know what you're doing and `FMDatabasePool` is what
23
+ you really really need (ie, you're using a read only database), OK you can use
24
+ it.  But just be careful not to deadlock!
25
+
26
+ For an example on deadlocking, search for:
27
+ `ONLY_USE_THE_POOL_IF_YOU_ARE_DOING_READS_OTHERWISE_YOULL_DEADLOCK_USE_FMDATABASEQUEUE_INSTEAD`
28
+ in the main.m file.
29
+ */
30
+
31
+@interface AWSFMDatabasePool : NSObject {
32
+    NSString            *_path;
33
+    
34
+    dispatch_queue_t    _lockQueue;
35
+    
36
+    NSMutableArray      *_databaseInPool;
37
+    NSMutableArray      *_databaseOutPool;
38
+    
39
+    __unsafe_unretained id _delegate;
40
+    
41
+    NSUInteger          _maximumNumberOfDatabasesToCreate;
42
+    int                 _openFlags;
43
+}
44
+
45
+/** Database path */
46
+
47
+@property (atomic, retain) NSString *path;
48
+
49
+/** Delegate object */
50
+
51
+@property (atomic, assign) id delegate;
52
+
53
+/** Maximum number of databases to create */
54
+
55
+@property (atomic, assign) NSUInteger maximumNumberOfDatabasesToCreate;
56
+
57
+/** Open flags */
58
+
59
+@property (atomic, readonly) int openFlags;
60
+
61
+
62
+///---------------------
63
+/// @name Initialization
64
+///---------------------
65
+
66
+/** Create pool using path.
67
+
68
+ @param aPath The file path of the database.
69
+
70
+ @return The `FMDatabasePool` object. `nil` on error.
71
+ */
72
+
73
++ (instancetype)databasePoolWithPath:(NSString*)aPath;
74
+
75
+/** Create pool using path and specified flags
76
+
77
+ @param aPath The file path of the database.
78
+ @param openFlags Flags passed to the openWithFlags method of the database
79
+
80
+ @return The `FMDatabasePool` object. `nil` on error.
81
+ */
82
+
83
++ (instancetype)databasePoolWithPath:(NSString*)aPath flags:(int)openFlags;
84
+
85
+/** Create pool using path.
86
+
87
+ @param aPath The file path of the database.
88
+
89
+ @return The `FMDatabasePool` object. `nil` on error.
90
+ */
91
+
92
+- (instancetype)initWithPath:(NSString*)aPath;
93
+
94
+/** Create pool using path and specified flags.
95
+
96
+ @param aPath The file path of the database.
97
+ @param openFlags Flags passed to the openWithFlags method of the database
98
+
99
+ @return The `FMDatabasePool` object. `nil` on error.
100
+ */
101
+
102
+- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags;
103
+
104
+///------------------------------------------------
105
+/// @name Keeping track of checked in/out databases
106
+///------------------------------------------------
107
+
108
+/** Number of checked-in databases in pool
109
+ 
110
+ @returns Number of databases
111
+ */
112
+
113
+- (NSUInteger)countOfCheckedInDatabases;
114
+
115
+/** Number of checked-out databases in pool
116
+
117
+ @returns Number of databases
118
+ */
119
+
120
+- (NSUInteger)countOfCheckedOutDatabases;
121
+
122
+/** Total number of databases in pool
123
+
124
+ @returns Number of databases
125
+ */
126
+
127
+- (NSUInteger)countOfOpenDatabases;
128
+
129
+/** Release all databases in pool */
130
+
131
+- (void)releaseAllDatabases;
132
+
133
+///------------------------------------------
134
+/// @name Perform database operations in pool
135
+///------------------------------------------
136
+
137
+/** Synchronously perform database operations in pool.
138
+
139
+ @param block The code to be run on the `FMDatabasePool` pool.
140
+ */
141
+
142
+- (void)inDatabase:(void (^)(AWSFMDatabase *db))block;
143
+
144
+/** Synchronously perform database operations in pool using transaction.
145
+
146
+ @param block The code to be run on the `FMDatabasePool` pool.
147
+ */
148
+
149
+- (void)inTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
150
+
151
+/** Synchronously perform database operations in pool using deferred transaction.
152
+
153
+ @param block The code to be run on the `FMDatabasePool` pool.
154
+ */
155
+
156
+- (void)inDeferredTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
157
+
158
+/** Synchronously perform database operations in pool using save point.
159
+
160
+ @param block The code to be run on the `FMDatabasePool` pool.
161
+ 
162
+ @return `NSError` object if error; `nil` if successful.
163
+
164
+ @warning You can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock. If you need to nest, use `<[FMDatabase startSavePointWithName:error:]>` instead.
165
+*/
166
+
167
+- (NSError*)inSavePoint:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
168
+
169
+@end
170
+
171
+
172
+/** FMDatabasePool delegate category
173
+ 
174
+ This is a category that defines the protocol for the FMDatabasePool delegate
175
+ */
176
+
177
+@interface NSObject (AWSFMDatabasePoolDelegate)
178
+
179
+/** Asks the delegate whether database should be added to the pool. 
180
+ 
181
+ @param pool     The `FMDatabasePool` object.
182
+ @param database The `FMDatabase` object.
183
+ 
184
+ @return `YES` if it should add database to pool; `NO` if not.
185
+ 
186
+ */
187
+
188
+- (BOOL)databasePool:(AWSFMDatabasePool*)pool shouldAddDatabaseToPool:(AWSFMDatabase*)database;
189
+
190
+/** Tells the delegate that database was added to the pool.
191
+ 
192
+ @param pool     The `FMDatabasePool` object.
193
+ @param database The `FMDatabase` object.
194
+
195
+ */
196
+
197
+- (void)databasePool:(AWSFMDatabasePool*)pool didAddDatabase:(AWSFMDatabase*)database;
198
+
199
+@end
200
+

+ 182
- 0
AWSCore.framework/Headers/AWSFMDatabaseQueue.h 查看文件

@@ -0,0 +1,182 @@
1
+//
2
+//  FMDatabaseQueue.h
3
+//  fmdb
4
+//
5
+//  Created by August Mueller on 6/22/11.
6
+//  Copyright 2011 Flying Meat Inc. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+@class AWSFMDatabase;
12
+
13
+/** To perform queries and updates on multiple threads, you'll want to use `FMDatabaseQueue`.
14
+
15
+ Using a single instance of `<FMDatabase>` from multiple threads at once is a bad idea.  It has always been OK to make a `<FMDatabase>` object *per thread*.  Just don't share a single instance across threads, and definitely not across multiple threads at the same time.
16
+
17
+ Instead, use `FMDatabaseQueue`. Here's how to use it:
18
+
19
+ First, make your queue.
20
+
21
+    FMDatabaseQueue *queue = [FMDatabaseQueue databaseQueueWithPath:aPath];
22
+
23
+ Then use it like so:
24
+
25
+    [queue inDatabase:^(FMDatabase *db) {
26
+        [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:1]];
27
+        [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:2]];
28
+        [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:3]];
29
+
30
+        FMResultSet *rs = [db executeQuery:@"select * from foo"];
31
+        while ([rs next]) {
32
+            //…
33
+        }
34
+    }];
35
+
36
+ An easy way to wrap things up in a transaction can be done like this:
37
+
38
+    [queue inTransaction:^(FMDatabase *db, BOOL *rollback) {
39
+        [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:1]];
40
+        [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:2]];
41
+        [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:3]];
42
+
43
+        if (whoopsSomethingWrongHappened) {
44
+            *rollback = YES;
45
+            return;
46
+        }
47
+        // etc…
48
+        [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:4]];
49
+    }];
50
+
51
+ `FMDatabaseQueue` will run the blocks on a serialized queue (hence the name of the class).  So if you call `FMDatabaseQueue`'s methods from multiple threads at the same time, they will be executed in the order they are received.  This way queries and updates won't step on each other's toes, and every one is happy.
52
+
53
+ ### See also
54
+
55
+ - `<FMDatabase>`
56
+
57
+ @warning Do not instantiate a single `<FMDatabase>` object and use it across multiple threads. Use `FMDatabaseQueue` instead.
58
+ 
59
+ @warning The calls to `FMDatabaseQueue`'s methods are blocking.  So even though you are passing along blocks, they will **not** be run on another thread.
60
+
61
+ */
62
+
63
+@interface AWSFMDatabaseQueue : NSObject {
64
+    NSString            *_path;
65
+    dispatch_queue_t    _queue;
66
+    AWSFMDatabase          *_db;
67
+    int                 _openFlags;
68
+}
69
+
70
+/** Path of database */
71
+
72
+@property (atomic, retain) NSString *path;
73
+
74
+/** Open flags */
75
+
76
+@property (atomic, readonly) int openFlags;
77
+
78
+///----------------------------------------------------
79
+/// @name Initialization, opening, and closing of queue
80
+///----------------------------------------------------
81
+
82
+/** Create queue using path.
83
+ 
84
+ @param aPath The file path of the database.
85
+ 
86
+ @return The `FMDatabaseQueue` object. `nil` on error.
87
+ */
88
+
89
++ (instancetype)databaseQueueWithPath:(NSString*)aPath;
90
+
91
+/** Create queue using path and specified flags.
92
+ 
93
+ @param aPath The file path of the database.
94
+ @param openFlags Flags passed to the openWithFlags method of the database
95
+ 
96
+ @return The `FMDatabaseQueue` object. `nil` on error.
97
+ */
98
++ (instancetype)databaseQueueWithPath:(NSString*)aPath flags:(int)openFlags;
99
+
100
+/** Create queue using path.
101
+
102
+ @param aPath The file path of the database.
103
+
104
+ @return The `FMDatabaseQueue` object. `nil` on error.
105
+ */
106
+
107
+- (instancetype)initWithPath:(NSString*)aPath;
108
+
109
+/** Create queue using path and specified flags.
110
+ 
111
+ @param aPath The file path of the database.
112
+ @param openFlags Flags passed to the openWithFlags method of the database
113
+ 
114
+ @return The `FMDatabaseQueue` object. `nil` on error.
115
+ */
116
+
117
+- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags;
118
+
119
+/** Create queue using path and specified flags.
120
+ 
121
+ @param aPath The file path of the database.
122
+ @param openFlags Flags passed to the openWithFlags method of the database
123
+ @param vfsName The name of a custom virtual file system
124
+ 
125
+ @return The `FMDatabaseQueue` object. `nil` on error.
126
+ */
127
+
128
+- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName;
129
+
130
+/** Returns the Class of 'FMDatabase' subclass, that will be used to instantiate database object.
131
+ 
132
+ Subclasses can override this method to return specified Class of 'FMDatabase' subclass.
133
+ 
134
+ @return The Class of 'FMDatabase' subclass, that will be used to instantiate database object.
135
+ */
136
+
137
++ (Class)databaseClass;
138
+
139
+/** Close database used by queue. */
140
+
141
+- (void)close;
142
+
143
+///-----------------------------------------------
144
+/// @name Dispatching database operations to queue
145
+///-----------------------------------------------
146
+
147
+/** Synchronously perform database operations on queue.
148
+ 
149
+ @param block The code to be run on the queue of `FMDatabaseQueue`
150
+ */
151
+
152
+- (void)inDatabase:(void (^)(AWSFMDatabase *db))block;
153
+
154
+/** Synchronously perform database operations on queue, using transactions.
155
+
156
+ @param block The code to be run on the queue of `FMDatabaseQueue`
157
+ */
158
+
159
+- (void)inTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
160
+
161
+/** Synchronously perform database operations on queue, using deferred transactions.
162
+
163
+ @param block The code to be run on the queue of `FMDatabaseQueue`
164
+ */
165
+
166
+- (void)inDeferredTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
167
+
168
+///-----------------------------------------------
169
+/// @name Dispatching database operations to queue
170
+///-----------------------------------------------
171
+
172
+/** Synchronously perform database operations using save point.
173
+
174
+ @param block The code to be run on the queue of `FMDatabaseQueue`
175
+ */
176
+
177
+// NOTE: you can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock.
178
+// If you need to nest, use FMDatabase's startSavePointWithName:error: instead.
179
+- (NSError*)inSavePoint:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
180
+
181
+@end
182
+

+ 468
- 0
AWSCore.framework/Headers/AWSFMResultSet.h 查看文件

@@ -0,0 +1,468 @@
1
+#import <Foundation/Foundation.h>
2
+
3
+#ifndef __has_feature      // Optional.
4
+#define __has_feature(x) 0 // Compatibility with non-clang compilers.
5
+#endif
6
+
7
+#ifndef NS_RETURNS_NOT_RETAINED
8
+#if __has_feature(attribute_ns_returns_not_retained)
9
+#define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
10
+#else
11
+#define NS_RETURNS_NOT_RETAINED
12
+#endif
13
+#endif
14
+
15
+@class AWSFMDatabase;
16
+@class AWSFMStatement;
17
+
18
+/** Represents the results of executing a query on an `<FMDatabase>`.
19
+ 
20
+ ### See also
21
+ 
22
+ - `<FMDatabase>`
23
+ */
24
+
25
+@interface AWSFMResultSet : NSObject {
26
+    AWSFMDatabase          *_parentDB;
27
+    AWSFMStatement         *_statement;
28
+    
29
+    NSString            *_query;
30
+    NSMutableDictionary *_columnNameToIndexMap;
31
+}
32
+
33
+///-----------------
34
+/// @name Properties
35
+///-----------------
36
+
37
+/** Executed query */
38
+
39
+@property (atomic, retain) NSString *query;
40
+
41
+/** `NSMutableDictionary` mapping column names to numeric index */
42
+
43
+@property (readonly) NSMutableDictionary *columnNameToIndexMap;
44
+
45
+/** `FMStatement` used by result set. */
46
+
47
+@property (atomic, retain) AWSFMStatement *statement;
48
+
49
+///------------------------------------
50
+/// @name Creating and closing database
51
+///------------------------------------
52
+
53
+/** Create result set from `<FMStatement>`
54
+ 
55
+ @param statement A `<FMStatement>` to be performed
56
+ 
57
+ @param aDB A `<FMDatabase>` to be used
58
+ 
59
+ @return A `FMResultSet` on success; `nil` on failure
60
+ */
61
+
62
++ (instancetype)resultSetWithStatement:(AWSFMStatement *)statement usingParentDatabase:(AWSFMDatabase*)aDB;
63
+
64
+/** Close result set */
65
+
66
+- (void)close;
67
+
68
+- (void)setParentDB:(AWSFMDatabase *)newDb;
69
+
70
+///---------------------------------------
71
+/// @name Iterating through the result set
72
+///---------------------------------------
73
+
74
+/** Retrieve next row for result set.
75
+ 
76
+ You must always invoke `next` or `nextWithError` before attempting to access the values returned in a query, even if you're only expecting one.
77
+
78
+ @return `YES` if row successfully retrieved; `NO` if end of result set reached
79
+ 
80
+ @see hasAnotherRow
81
+ */
82
+
83
+- (BOOL)next;
84
+
85
+/** Retrieve next row for result set.
86
+ 
87
+  You must always invoke `next` or `nextWithError` before attempting to access the values returned in a query, even if you're only expecting one.
88
+ 
89
+ @param outErr A 'NSError' object to receive any error object (if any).
90
+ 
91
+ @return 'YES' if row successfully retrieved; 'NO' if end of result set reached
92
+ 
93
+ @see hasAnotherRow
94
+ */
95
+
96
+- (BOOL)nextWithError:(NSError **)outErr;
97
+
98
+/** Did the last call to `<next>` succeed in retrieving another row?
99
+
100
+ @return `YES` if the last call to `<next>` succeeded in retrieving another record; `NO` if not.
101
+ 
102
+ @see next
103
+ 
104
+ @warning The `hasAnotherRow` method must follow a call to `<next>`. If the previous database interaction was something other than a call to `next`, then this method may return `NO`, whether there is another row of data or not.
105
+ */
106
+
107
+- (BOOL)hasAnotherRow;
108
+
109
+///---------------------------------------------
110
+/// @name Retrieving information from result set
111
+///---------------------------------------------
112
+
113
+/** How many columns in result set
114
+ 
115
+ @return Integer value of the number of columns.
116
+ */
117
+
118
+- (int)columnCount;
119
+
120
+/** Column index for column name
121
+
122
+ @param columnName `NSString` value of the name of the column.
123
+
124
+ @return Zero-based index for column.
125
+ */
126
+
127
+- (int)columnIndexForName:(NSString*)columnName;
128
+
129
+/** Column name for column index
130
+
131
+ @param columnIdx Zero-based index for column.
132
+
133
+ @return columnName `NSString` value of the name of the column.
134
+ */
135
+
136
+- (NSString*)columnNameForIndex:(int)columnIdx;
137
+
138
+/** Result set integer value for column.
139
+
140
+ @param columnName `NSString` value of the name of the column.
141
+
142
+ @return `int` value of the result set's column.
143
+ */
144
+
145
+- (int)intForColumn:(NSString*)columnName;
146
+
147
+/** Result set integer value for column.
148
+
149
+ @param columnIdx Zero-based index for column.
150
+
151
+ @return `int` value of the result set's column.
152
+ */
153
+
154
+- (int)intForColumnIndex:(int)columnIdx;
155
+
156
+/** Result set `long` value for column.
157
+
158
+ @param columnName `NSString` value of the name of the column.
159
+
160
+ @return `long` value of the result set's column.
161
+ */
162
+
163
+- (long)longForColumn:(NSString*)columnName;
164
+
165
+/** Result set long value for column.
166
+
167
+ @param columnIdx Zero-based index for column.
168
+
169
+ @return `long` value of the result set's column.
170
+ */
171
+
172
+- (long)longForColumnIndex:(int)columnIdx;
173
+
174
+/** Result set `long long int` value for column.
175
+
176
+ @param columnName `NSString` value of the name of the column.
177
+
178
+ @return `long long int` value of the result set's column.
179
+ */
180
+
181
+- (long long int)longLongIntForColumn:(NSString*)columnName;
182
+
183
+/** Result set `long long int` value for column.
184
+
185
+ @param columnIdx Zero-based index for column.
186
+
187
+ @return `long long int` value of the result set's column.
188
+ */
189
+
190
+- (long long int)longLongIntForColumnIndex:(int)columnIdx;
191
+
192
+/** Result set `unsigned long long int` value for column.
193
+
194
+ @param columnName `NSString` value of the name of the column.
195
+
196
+ @return `unsigned long long int` value of the result set's column.
197
+ */
198
+
199
+- (unsigned long long int)unsignedLongLongIntForColumn:(NSString*)columnName;
200
+
201
+/** Result set `unsigned long long int` value for column.
202
+
203
+ @param columnIdx Zero-based index for column.
204
+
205
+ @return `unsigned long long int` value of the result set's column.
206
+ */
207
+
208
+- (unsigned long long int)unsignedLongLongIntForColumnIndex:(int)columnIdx;
209
+
210
+/** Result set `BOOL` value for column.
211
+
212
+ @param columnName `NSString` value of the name of the column.
213
+
214
+ @return `BOOL` value of the result set's column.
215
+ */
216
+
217
+- (BOOL)boolForColumn:(NSString*)columnName;
218
+
219
+/** Result set `BOOL` value for column.
220
+
221
+ @param columnIdx Zero-based index for column.
222
+
223
+ @return `BOOL` value of the result set's column.
224
+ */
225
+
226
+- (BOOL)boolForColumnIndex:(int)columnIdx;
227
+
228
+/** Result set `double` value for column.
229
+
230
+ @param columnName `NSString` value of the name of the column.
231
+
232
+ @return `double` value of the result set's column.
233
+ 
234
+ */
235
+
236
+- (double)doubleForColumn:(NSString*)columnName;
237
+
238
+/** Result set `double` value for column.
239
+
240
+ @param columnIdx Zero-based index for column.
241
+
242
+ @return `double` value of the result set's column.
243
+ 
244
+ */
245
+
246
+- (double)doubleForColumnIndex:(int)columnIdx;
247
+
248
+/** Result set `NSString` value for column.
249
+
250
+ @param columnName `NSString` value of the name of the column.
251
+
252
+ @return `NSString` value of the result set's column.
253
+ 
254
+ */
255
+
256
+- (NSString*)stringForColumn:(NSString*)columnName;
257
+
258
+/** Result set `NSString` value for column.
259
+
260
+ @param columnIdx Zero-based index for column.
261
+
262
+ @return `NSString` value of the result set's column.
263
+ */
264
+
265
+- (NSString*)stringForColumnIndex:(int)columnIdx;
266
+
267
+/** Result set `NSDate` value for column.
268
+
269
+ @param columnName `NSString` value of the name of the column.
270
+
271
+ @return `NSDate` value of the result set's column.
272
+ */
273
+
274
+- (NSDate*)dateForColumn:(NSString*)columnName;
275
+
276
+/** Result set `NSDate` value for column.
277
+
278
+ @param columnIdx Zero-based index for column.
279
+
280
+ @return `NSDate` value of the result set's column.
281
+ 
282
+ */
283
+
284
+- (NSDate*)dateForColumnIndex:(int)columnIdx;
285
+
286
+/** Result set `NSData` value for column.
287
+ 
288
+ This is useful when storing binary data in table (such as image or the like).
289
+
290
+ @param columnName `NSString` value of the name of the column.
291
+
292
+ @return `NSData` value of the result set's column.
293
+ 
294
+ */
295
+
296
+- (NSData*)dataForColumn:(NSString*)columnName;
297
+
298
+/** Result set `NSData` value for column.
299
+
300
+ @param columnIdx Zero-based index for column.
301
+
302
+ @return `NSData` value of the result set's column.
303
+ */
304
+
305
+- (NSData*)dataForColumnIndex:(int)columnIdx;
306
+
307
+/** Result set `(const unsigned char *)` value for column.
308
+
309
+ @param columnName `NSString` value of the name of the column.
310
+
311
+ @return `(const unsigned char *)` value of the result set's column.
312
+ */
313
+
314
+- (const unsigned char *)UTF8StringForColumnName:(NSString*)columnName;
315
+
316
+/** Result set `(const unsigned char *)` value for column.
317
+
318
+ @param columnIdx Zero-based index for column.
319
+
320
+ @return `(const unsigned char *)` value of the result set's column.
321
+ */
322
+
323
+- (const unsigned char *)UTF8StringForColumnIndex:(int)columnIdx;
324
+
325
+/** Result set object for column.
326
+
327
+ @param columnName `NSString` value of the name of the column.
328
+
329
+ @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
330
+
331
+ @see objectForKeyedSubscript:
332
+ */
333
+
334
+- (id)objectForColumnName:(NSString*)columnName;
335
+
336
+/** Result set object for column.
337
+
338
+ @param columnIdx Zero-based index for column.
339
+
340
+ @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
341
+
342
+ @see objectAtIndexedSubscript:
343
+ */
344
+
345
+- (id)objectForColumnIndex:(int)columnIdx;
346
+
347
+/** Result set object for column.
348
+ 
349
+ This method allows the use of the "boxed" syntax supported in Modern Objective-C. For example, by defining this method, the following syntax is now supported:
350
+ 
351
+    id result = rs[@"employee_name"];
352
+ 
353
+ This simplified syntax is equivalent to calling:
354
+ 
355
+    id result = [rs objectForKeyedSubscript:@"employee_name"];
356
+ 
357
+ which is, it turns out, equivalent to calling:
358
+ 
359
+    id result = [rs objectForColumnName:@"employee_name"];
360
+
361
+ @param columnName `NSString` value of the name of the column.
362
+
363
+ @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
364
+ */
365
+
366
+- (id)objectForKeyedSubscript:(NSString *)columnName;
367
+
368
+/** Result set object for column.
369
+
370
+ This method allows the use of the "boxed" syntax supported in Modern Objective-C. For example, by defining this method, the following syntax is now supported:
371
+
372
+    id result = rs[0];
373
+
374
+ This simplified syntax is equivalent to calling:
375
+
376
+    id result = [rs objectForKeyedSubscript:0];
377
+
378
+ which is, it turns out, equivalent to calling:
379
+
380
+    id result = [rs objectForColumnName:0];
381
+
382
+ @param columnIdx Zero-based index for column.
383
+
384
+ @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
385
+ */
386
+
387
+- (id)objectAtIndexedSubscript:(int)columnIdx;
388
+
389
+/** Result set `NSData` value for column.
390
+
391
+ @param columnName `NSString` value of the name of the column.
392
+
393
+ @return `NSData` value of the result set's column.
394
+
395
+ @warning If you are going to use this data after you iterate over the next row, or after you close the
396
+result set, make sure to make a copy of the data first (or just use `<dataForColumn:>`/`<dataForColumnIndex:>`)
397
+If you don't, you're going to be in a world of hurt when you try and use the data.
398
+ 
399
+ */
400
+
401
+- (NSData*)dataNoCopyForColumn:(NSString*)columnName NS_RETURNS_NOT_RETAINED;
402
+
403
+/** Result set `NSData` value for column.
404
+
405
+ @param columnIdx Zero-based index for column.
406
+
407
+ @return `NSData` value of the result set's column.
408
+
409
+ @warning If you are going to use this data after you iterate over the next row, or after you close the
410
+ result set, make sure to make a copy of the data first (or just use `<dataForColumn:>`/`<dataForColumnIndex:>`)
411
+ If you don't, you're going to be in a world of hurt when you try and use the data.
412
+
413
+ */
414
+
415
+- (NSData*)dataNoCopyForColumnIndex:(int)columnIdx NS_RETURNS_NOT_RETAINED;
416
+
417
+/** Is the column `NULL`?
418
+ 
419
+ @param columnIdx Zero-based index for column.
420
+
421
+ @return `YES` if column is `NULL`; `NO` if not `NULL`.
422
+ */
423
+
424
+- (BOOL)columnIndexIsNull:(int)columnIdx;
425
+
426
+/** Is the column `NULL`?
427
+
428
+ @param columnName `NSString` value of the name of the column.
429
+
430
+ @return `YES` if column is `NULL`; `NO` if not `NULL`.
431
+ */
432
+
433
+- (BOOL)columnIsNull:(NSString*)columnName;
434
+
435
+
436
+/** Returns a dictionary of the row results mapped to case sensitive keys of the column names. 
437
+ 
438
+ @returns `NSDictionary` of the row results.
439
+ 
440
+ @warning The keys to the dictionary are case sensitive of the column names.
441
+ */
442
+
443
+- (NSDictionary*)resultDictionary;
444
+ 
445
+/** Returns a dictionary of the row results
446
+ 
447
+ @see resultDictionary
448
+ 
449
+ @warning **Deprecated**: Please use `<resultDictionary>` instead.  Also, beware that `<resultDictionary>` is case sensitive! 
450
+ */
451
+
452
+- (NSDictionary*)resultDict  __attribute__ ((deprecated));
453
+
454
+///-----------------------------
455
+/// @name Key value coding magic
456
+///-----------------------------
457
+
458
+/** Performs `setValue` to yield support for key value observing.
459
+ 
460
+ @param object The object for which the values will be set. This is the key-value-coding compliant object that you might, for example, observe.
461
+
462
+ */
463
+
464
+- (void)kvcMagic:(id)object;
465
+
466
+ 
467
+@end
468
+

+ 44
- 0
AWSCore.framework/Headers/AWSGZIP.h 查看文件

@@ -0,0 +1,44 @@
1
+//
2
+//  GZIP.h
3
+//
4
+//  Version 1.0.3
5
+//
6
+//  Created by Nick Lockwood on 03/06/2012.
7
+//  Copyright (C) 2012 Charcoal Design
8
+//
9
+//  Distributed under the permissive zlib License
10
+//  Get the latest version from here:
11
+//
12
+//  https://github.com/nicklockwood/GZIP
13
+//
14
+//  This software is provided 'as-is', without any express or implied
15
+//  warranty.  In no event will the authors be held liable for any damages
16
+//  arising from the use of this software.
17
+//
18
+//  Permission is granted to anyone to use this software for any purpose,
19
+//  including commercial applications, and to alter it and redistribute it
20
+//  freely, subject to the following restrictions:
21
+//
22
+//  1. The origin of this software must not be misrepresented; you must not
23
+//  claim that you wrote the original software. If you use this software
24
+//  in a product, an acknowledgment in the product documentation would be
25
+//  appreciated but is not required.
26
+//
27
+//  2. Altered source versions must be plainly marked as such, and must not be
28
+//  misrepresented as being the original software.
29
+//
30
+//  3. This notice may not be removed or altered from any source distribution.
31
+//
32
+
33
+
34
+#import <Foundation/Foundation.h>
35
+
36
+void awsgzip_loadGZIP(void);
37
+
38
+@interface NSData (AWSGZIP)
39
+
40
+- (NSData *)awsgzip_gzippedDataWithCompressionLevel:(float)level;
41
+- (NSData *)awsgzip_gzippedData;
42
+- (NSData *)awsgzip_gunzippedData;
43
+
44
+@end

+ 25
- 0
AWSCore.framework/Headers/AWSGeneric.h 查看文件

@@ -0,0 +1,25 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+#pragma once
14
+
15
+/**
16
+ This exists to use along with `AWSTask` and `AWSTaskCompletionSource`.
17
+
18
+ Instead of returning a `AWSTask` with no generic type, or a generic type of 'NSNull'
19
+ when there is no usable result from a task, we use the type 'AWSVoid', which will always have a value of `nil`.
20
+
21
+ This allows you to provide a more enforced API contract to the caller,
22
+ as sending any message to `AWSVoid` will result in a compile time error.
23
+ */
24
+@class _AWSVoid_Nonexistant;
25
+typedef _AWSVoid_Nonexistant *AWSVoid;

+ 147
- 0
AWSCore.framework/Headers/AWSIdentityProvider.h 查看文件

@@ -0,0 +1,147 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import "AWSServiceEnum.h"
18
+
19
+NS_ASSUME_NONNULL_BEGIN
20
+
21
+FOUNDATION_EXPORT NSString *const AWSCognitoIdentityIdChangedNotification;
22
+FOUNDATION_EXPORT NSString *const AWSCognitoNotificationPreviousId;
23
+FOUNDATION_EXPORT NSString *const AWSCognitoNotificationNewId;
24
+
25
+FOUNDATION_EXPORT NSString *const AWSIdentityProviderDigits;
26
+FOUNDATION_EXPORT NSString *const AWSIdentityProviderFacebook;
27
+FOUNDATION_EXPORT NSString *const AWSIdentityProviderGoogle;
28
+FOUNDATION_EXPORT NSString *const AWSIdentityProviderLoginWithAmazon;
29
+FOUNDATION_EXPORT NSString *const AWSIdentityProviderTwitter;
30
+
31
+FOUNDATION_EXPORT NSString *const AWSIdentityProviderAmazonCognitoIdentity;
32
+
33
+FOUNDATION_EXPORT NSString *const AWSCognitoCredentialsProviderHelperErrorDomain;
34
+typedef NS_ENUM(NSInteger, AWSCognitoCredentialsProviderHelperErrorType) {
35
+    AWSCognitoCredentialsProviderHelperErrorTypeIdentityIsNil,
36
+    AWSCognitoCredentialsProviderHelperErrorTypeTokenRefreshTimeout,
37
+};
38
+
39
+@class AWSTask<__covariant ResultType>;
40
+
41
+/**
42
+ AWSIdentityProvider provides an interface for acquiring an identity token from a provider.
43
+ */
44
+@protocol AWSIdentityProvider <NSObject>
45
+
46
+/**
47
+ The name of the identity provider. e.g. graph.facebook.com.
48
+ */
49
+@property (nonatomic, readonly) NSString *identityProviderName;
50
+
51
+/**
52
+ Returns the token associated with this provider. If the token is cached and invalid, should refresh and return the valid token.
53
+ */
54
+- (AWSTask<NSString *> *)token;
55
+
56
+@end
57
+
58
+/**
59
+ `AWSIdentityProviderManager` provides an interface for creating the `logins` dictionary for Amazon Cognito Identity.
60
+ */
61
+@protocol AWSIdentityProviderManager <NSObject>
62
+
63
+/**
64
+ Each entry in logins represents a single login with an identity provider. The key is the domain of the login provider (e.g. 'graph.facebook.com') and the value is the OAuth/OpenId Connect token that results from an authentication with that login provider.
65
+ */
66
+- (AWSTask<NSDictionary<NSString *, NSString *> *> *)logins;
67
+
68
+@optional
69
+/**
70
+ * If the token contains the role arn and there are multiple roles, return the custom role to assume.  This is currently only supported for SAML identity providers.
71
+ */
72
+@property (nonatomic, readonly) NSString *customRoleArn;
73
+
74
+@end
75
+
76
+/**
77
+ AWSCognitoCredentialsProviderHelper provides a Cognito specific identity provider. Cognito Identity providers are associated with an identity pool. If the identity pool supports authenticated access, multiple logins may be added to link to the Cognito identity.
78
+ */
79
+@protocol AWSCognitoCredentialsProviderHelper <AWSIdentityProvider, AWSIdentityProviderManager>
80
+
81
+/**
82
+ The identity pool for this provider. Used to when making calls to the Amazon Cognito service
83
+ */
84
+@property (nonatomic, strong, readonly) NSString *identityPoolId;
85
+
86
+/**
87
+ The identity id as determined by the Amazon Cognito service
88
+ */
89
+@property (nonatomic, strong, nullable) NSString *identityId;
90
+
91
+/**
92
+ */
93
+@property (nonatomic, strong, readonly, nullable) id<AWSIdentityProviderManager> identityProviderManager;
94
+
95
+/**
96
+ Get/retrieve the identity id for this provider. If an identity id is already set on this provider, no remote call is made and the identity will be returned as a result of the AWSTask (the identityId is also available as a property). If no identityId is set on this provider, one will be retrieved from the service.
97
+ */
98
+- (AWSTask<NSString *> *)getIdentityId;
99
+
100
+/**
101
+ Is this provider considered 'authenticated'. By default, only returns YES if logins is set.
102
+ */
103
+- (BOOL)isAuthenticated;
104
+
105
+/**
106
+ Clear saved values for identityId, token, and logins.
107
+ */
108
+- (void)clear;
109
+
110
+@end
111
+
112
+/**
113
+ An abstract implementation of the AWSCognitoCredentialsProviderHelper.
114
+ */
115
+@interface AWSAbstractCognitoCredentialsProviderHelper : NSObject <AWSCognitoCredentialsProviderHelper>
116
+
117
+/**
118
+ The identity pool for this provider. Used to when making calls to the Amazon Cognito service
119
+ */
120
+@property (nonatomic, strong, readonly) NSString *identityPoolId;
121
+
122
+/**
123
+ The identity id as determined by the Amazon Cognito service
124
+ */
125
+@property (nonatomic, strong, nullable) NSString *identityId;
126
+
127
+/**
128
+ The identity provider manager that asynchronously returns `logins`.
129
+ */
130
+@property (nonatomic, strong, readonly, nullable) id<AWSIdentityProviderManager> identityProviderManager;
131
+
132
+@end
133
+
134
+/**
135
+ An abstract implementation of the AWSCognitoCredentialsProviderHelper. Developers should extend this class when they want to implement developer authenticated identities and want to support the basic Amazon Cognito authflow in the same application.
136
+ */
137
+@interface AWSCognitoCredentialsProviderHelper : AWSAbstractCognitoCredentialsProviderHelper
138
+
139
+@property (nonatomic, assign) BOOL useEnhancedFlow;
140
+
141
+- (instancetype)initWithRegionType:(AWSRegionType)regionType
142
+                    identityPoolId:(NSString *)identityPoolId
143
+                   useEnhancedFlow:(BOOL)useEnhancedFlow
144
+           identityProviderManager:(nullable id<AWSIdentityProviderManager>)identityProviderManager;
145
+@end
146
+
147
+NS_ASSUME_NONNULL_END

+ 49
- 0
AWSCore.framework/Headers/AWSInfo.h 查看文件

@@ -0,0 +1,49 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import "AWSServiceEnum.h"
18
+
19
+NS_ASSUME_NONNULL_BEGIN
20
+
21
+FOUNDATION_EXPORT NSString *const AWSInfoDefault;
22
+
23
+@class AWSServiceInfo;
24
+@class AWSCognitoCredentialsProvider;
25
+
26
+@interface AWSInfo : NSObject
27
+
28
+@property (nonatomic, readonly) NSDictionary <NSString *, id> *rootInfoDictionary;
29
+
30
++ (instancetype)defaultAWSInfo;
31
+
32
+- (nullable AWSServiceInfo *)serviceInfo:(NSString *)serviceName
33
+                                  forKey:(NSString *)key;
34
+
35
+- (nullable AWSServiceInfo *)defaultServiceInfo:(NSString *)serviceName;
36
+
37
+@end
38
+
39
+@interface AWSServiceInfo : NSObject
40
+
41
+@property (nonatomic, readonly) AWSCognitoCredentialsProvider *cognitoCredentialsProvider;
42
+
43
+@property (nonatomic, readonly) AWSRegionType region;
44
+
45
+@property (nonatomic, readonly) NSDictionary <NSString *, id> *infoDictionary;
46
+
47
+@end
48
+
49
+NS_ASSUME_NONNULL_END

+ 204
- 0
AWSCore.framework/Headers/AWSKSReachability.h 查看文件

@@ -0,0 +1,204 @@
1
+//
2
+//  KSReachability.h
3
+//
4
+//  Created by Karl Stenerud on 5/5/12.
5
+//
6
+//  Copyright (c) 2012 Karl Stenerud. All rights reserved.
7
+//
8
+// Permission is hereby granted, free of charge, to any person obtaining a copy
9
+// of this software and associated documentation files (the "Software"), to deal
10
+// in the Software without restriction, including without limitation the rights
11
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+// copies of the Software, and to permit persons to whom the Software is
13
+// furnished to do so, subject to the following conditions:
14
+//
15
+// The above copyright notice and this permission notice shall remain in place
16
+// in this source code.
17
+//
18
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+// THE SOFTWARE.
25
+//
26
+
27
+#import <Foundation/Foundation.h>
28
+#import <SystemConfiguration/SystemConfiguration.h>
29
+
30
+
31
+/** This is the notification name used in the Apple reachability example.
32
+ * It is not used internally, and is merely a suggested notification name.
33
+ */
34
+#define kAWSDefaultNetworkReachabilityChangedNotification @"kAWSNetworkReachabilityChangedNotification"
35
+
36
+
37
+@class AWSKSReachability;
38
+
39
+typedef void(^AWSKSReachabilityCallback)(AWSKSReachability* reachability);
40
+
41
+
42
+/** Monitors network connectivity.
43
+ *
44
+ * You can elect to be notified via blocks (onReachabilityChanged),
45
+ * notifications (notificationName), or KVO (flags, reachable, and WWANOnly).
46
+ *
47
+ * All notification methods are disabled by default.
48
+ *
49
+ * Note: Upon construction, this object will fetch its initial reachability
50
+ * state in the background. This means that the reachability status will ALWAYS
51
+ * be "unreachable" until some time after object construction (possibly up to 10
52
+ * seconds, depending on how long the DNS lookup takes). Use the "initialized"
53
+ * property to monitor initialization, or set the callback "onInitializationComplete".
54
+ */
55
+@interface AWSKSReachability : NSObject
56
+
57
+#pragma mark Constructors
58
+
59
+/** Reachability to a specific host. Returns nil if an initialization error occurs.
60
+ *
61
+ * @param hostname The name or IP address of the host to monitor. If nil or
62
+ *                 empty string, check reachability to the internet in general.
63
+ */
64
++ (AWSKSReachability*) reachabilityToHost:(NSString*) hostname;
65
+
66
+/** Reachability to the local (wired or wifi) network. Returns nil if an initialization error occurs.
67
+ */
68
++ (AWSKSReachability*) reachabilityToLocalNetwork;
69
+
70
+/** Reachability to the internet. Returns nil if an initialization error occurs.
71
+ */
72
++ (AWSKSReachability*) reachabilityToInternet;
73
+
74
+
75
+#pragma mark General Information
76
+
77
+/** The host we are monitoring reachability to, if any. */
78
+@property(nonatomic,readonly,retain) NSString* hostname;
79
+
80
+
81
+#pragma mark Notifications and Callbacks
82
+
83
+/** If non-nil, called when the KSReachability object has finished initializing.
84
+ * If initialization has already completed, calls on the next main thread run loop.
85
+ * This block will only be called once, and then discarded (released).
86
+ * Block will be invoked on the main thread.
87
+ */
88
+@property(atomic,readwrite,copy) AWSKSReachabilityCallback onInitializationComplete;
89
+
90
+/** If non-nil, called whenever reachability flags change.
91
+ * Block will be invoked on the main thread.
92
+ */
93
+@property(atomic,readwrite,copy) AWSKSReachabilityCallback onReachabilityChanged;
94
+
95
+/** The notification to send when reachability changes (nil = don't send).
96
+ * Default = nil
97
+ */
98
+@property(nonatomic,readwrite,retain) NSString* notificationName;
99
+
100
+
101
+#pragma mark KVO Compliant Status Properties
102
+
103
+/** The current reachability flags.
104
+ * This property will always report 0 while "initialized" property = NO.
105
+ */
106
+@property(nonatomic,readonly,assign) SCNetworkReachabilityFlags flags;
107
+
108
+/** Whether the host is reachable or not.
109
+ * This property will always report NO while "initialized" property = NO.
110
+ */
111
+@property(nonatomic,readonly,assign) BOOL reachable;
112
+
113
+/* If YES, the host is only reachable by WWAN (iOS only).
114
+ * This property will always report NO while "initialized" property = NO.
115
+ */
116
+@property(nonatomic,readonly,assign) BOOL WWANOnly;
117
+
118
+/** If YES, this object's status properties are valid. */
119
+@property(atomic,readonly,assign) BOOL initialized;
120
+
121
+@end
122
+
123
+
124
+
125
+/** A one-time operation to perform as soon as a host is deemed reachable.
126
+ * The operation will only be performed once, regardless of how many times a
127
+ * host becomes reachable.
128
+ */
129
+@interface AWSKSReachableOperation: NSObject
130
+
131
+/** Constructor. Returns nil if an initialization error occurs.
132
+ *
133
+ * @param hostname The name or IP address of the host to monitor. If nil or
134
+ *                 empty string, check reachability to the internet in general.
135
+ *                 If hostname is a URL string, it will use the host portion.
136
+ *
137
+ * @param allowWWAN If NO, a WWAN-only connection is not enough to trigger
138
+ *                  this operation.
139
+ *
140
+ * @param onReachabilityAchieved Invoke when the host becomes reachable.
141
+ *                               This will be invoked ONE TIME ONLY, no matter
142
+ *                               how many times reachability changes.
143
+ *                               Block will be invoked on the main thread.
144
+ */
145
++ (AWSKSReachableOperation*) operationWithHost:(NSString*) hostname
146
+                                  allowWWAN:(BOOL) allowWWAN
147
+                     onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved;
148
+
149
+/** Constructor. Returns nil if an initialization error occurs.
150
+ *
151
+ * @param reachability A reachability instance. Note: This object will overwrite
152
+ *                     the onReachabilityChanged property.
153
+ *
154
+ * @param allowWWAN If NO, a WWAN-only connection is not enough to trigger
155
+ *                  this operation.
156
+ *
157
+ * @param onReachabilityAchieved Invoke when the host becomes reachable.
158
+ *                               This will be invoked ONE TIME ONLY, no matter
159
+ *                               how many times reachability changes.
160
+ *                               Block will be invoked on the main thread.
161
+ */
162
++ (AWSKSReachableOperation*) operationWithReachability:(AWSKSReachability*) reachability
163
+                                          allowWWAN:(BOOL) allowWWAN
164
+                             onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved;
165
+
166
+/** Initializer. Returns nil if an initialization error occurs.
167
+ *
168
+ * @param hostname The name or IP address of the host to monitor. If nil or
169
+ *                 empty string, check reachability to the internet in general.
170
+ *                 If hostname is a URL string, it will use the host portion.
171
+ *
172
+ * @param allowWWAN If NO, a WWAN-only connection is not enough to trigger
173
+ *                  this operation.
174
+ *
175
+ * @param onReachabilityAchieved Invoke when the host becomes reachable.
176
+ *                               This will be invoked ONE TIME ONLY, no matter
177
+ *                               how many times reachability changes.
178
+ *                               Block will be invoked on the main thread.
179
+ */
180
+- (id) initWithHost:(NSString*) hostname
181
+          allowWWAN:(BOOL) allowWWAN
182
+onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved;
183
+
184
+/** Initializer. Returns nil if an initialization error occurs.
185
+ *
186
+ * @param reachability A reachability instance. Note: This object will overwrite
187
+ *                     the onReachabilityChanged property.
188
+ *
189
+ * @param allowWWAN If NO, a WWAN-only connection is not enough to trigger
190
+ *                  this operation.
191
+ *
192
+ * @param onReachabilityAchieved Invoke when the host becomes reachable.
193
+ *                               This will be invoked ONE TIME ONLY, no matter
194
+ *                               how many times reachability changes.
195
+ *                               Block will be invoked on the main thread.
196
+ */
197
+- (id) initWithReachability:(AWSKSReachability*) reachability
198
+                  allowWWAN:(BOOL) allowWWAN
199
+     onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved;
200
+
201
+/** Access to internal reachability instance. Use this to monitor for errors. */
202
+@property(nonatomic,readonly,retain) AWSKSReachability* reachability;
203
+
204
+@end

+ 97
- 0
AWSCore.framework/Headers/AWSLogging.h 查看文件

@@ -0,0 +1,97 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+#define AWSLogFormat @"%@ line:%d | %s | "
19
+
20
+#define AWSLogError(fmt, ...)    [[AWSLogger defaultLogger] log:AWSLogLevelError format:(AWSLogFormat fmt), [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__]
21
+#define AWSLogWarn(fmt, ...)    [[AWSLogger defaultLogger] log:AWSLogLevelWarn format:(AWSLogFormat fmt), [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__]
22
+#define AWSLogInfo(fmt, ...)    [[AWSLogger defaultLogger] log:AWSLogLevelInfo format:(AWSLogFormat fmt), [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__]
23
+#define AWSLogDebug(fmt, ...)    [[AWSLogger defaultLogger] log:AWSLogLevelDebug format:(AWSLogFormat fmt), [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__]
24
+#define AWSLogVerbose(fmt, ...)    [[AWSLogger defaultLogger] log:AWSLogLevelVerbose format:(AWSLogFormat fmt), [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__]
25
+
26
+typedef NS_ENUM(NSInteger, AWSLogLevel) {
27
+    AWSLogLevelUnknown = -1,
28
+    AWSLogLevelNone = 0,
29
+    AWSLogLevelError = 1,
30
+    AWSLogLevelWarn = 2,
31
+    AWSLogLevelInfo = 3,
32
+    AWSLogLevelDebug = 4,
33
+    AWSLogLevelVerbose = 5
34
+};
35
+
36
+/**
37
+ `AWSLogger` is an utility class that handles logging to the console. Changing log levels during development may make debugging easier. You can change the log level by importing `AWSCore.h` and calling:
38
+
39
+ *Swift*
40
+
41
+     AWSLogger.defaultLogger().logLevel = .None
42
+
43
+ The following logging level options are available:
44
+
45
+     .None
46
+     .Error
47
+     .Warn
48
+     .Info
49
+     .Debug (This is the default.)
50
+     .Verbose
51
+
52
+ *Objective-C*
53
+
54
+     [AWSLogger defaultLogger].logLevel = AWSLogLevelNone;
55
+
56
+ The following logging level options are available:
57
+
58
+     AWSLogLevelNone
59
+     AWSLogLevelError
60
+     AWSLogLevelWarn
61
+     AWSLogLevelInfo
62
+     AWSLogLevelDebug (This is the default.)
63
+     AWSLogLevelVerbose
64
+
65
+ @note We recommend setting the log level to `None` before publishing to the Apple App Store.
66
+ */
67
+__attribute__((deprecated("use AWSDDLog instead")))
68
+@interface AWSLogger : NSObject
69
+
70
+/**
71
+ The log level setting. The default value is `Debug`.
72
+ */
73
+@property (atomic, assign) AWSLogLevel logLevel;
74
+
75
+/**
76
+ Returns the shared logger object.
77
+
78
+ @return The shared logger object.
79
+ */
80
++ (instancetype)defaultLogger;
81
+
82
+/**
83
+ Prints out the formatted logs to the console. You can use the following predefined shorthand methods instead:
84
+
85
+     AWSLogError(fmt, ...)
86
+     AWSLogWarn(fmt, ...)
87
+     AWSLogInfo(fmt, ...)
88
+     AWSLogDebug(fmt, ...)
89
+     AWSLogVerbose(fmt, ...)
90
+
91
+ @param logLevel The level of this log.
92
+ @param fmt      The formatted string to log.
93
+ */
94
+- (void)log:(AWSLogLevel)logLevel
95
+     format:(NSString *)fmt, ... NS_FORMAT_FUNCTION(2, 3);
96
+
97
+@end

+ 172
- 0
AWSCore.framework/Headers/AWSMTLJSONAdapter.h 查看文件

@@ -0,0 +1,172 @@
1
+//
2
+//  MTLJSONAdapter.h
3
+//  Mantle
4
+//
5
+//  Created by Justin Spahr-Summers on 2013-02-12.
6
+//  Copyright (c) 2013 GitHub. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+@class AWSMTLModel;
12
+
13
+// A MTLModel object that supports being parsed from and serialized to JSON.
14
+@protocol AWSMTLJSONSerializing
15
+@required
16
+
17
+// Specifies how to map property keys to different key paths in JSON.
18
+//
19
+// Subclasses overriding this method should combine their values with those of
20
+// `super`.
21
+//
22
+// Any property keys not present in the dictionary are assumed to match the JSON
23
+// key that should be used. Any keys associated with NSNull will not participate
24
+// in JSON serialization.
25
+//
26
+// Returns a dictionary mapping property keys to JSON key paths (as strings) or
27
+// NSNull values.
28
++ (NSDictionary *)JSONKeyPathsByPropertyKey;
29
+
30
+@optional
31
+
32
+// Specifies how to convert a JSON value to the given property key. If
33
+// reversible, the transformer will also be used to convert the property value
34
+// back to JSON.
35
+//
36
+// If the receiver implements a `+<key>JSONTransformer` method, MTLJSONAdapter
37
+// will use the result of that method instead.
38
+//
39
+// Returns a value transformer, or nil if no transformation should be performed.
40
++ (NSValueTransformer *)JSONTransformerForKey:(NSString *)key;
41
+
42
+// Overridden to parse the receiver as a different class, based on information
43
+// in the provided dictionary.
44
+//
45
+// This is mostly useful for class clusters, where the abstract base class would
46
+// be passed into -[MTLJSONAdapter initWithJSONDictionary:modelClass:], but
47
+// a subclass should be instantiated instead.
48
+//
49
+// JSONDictionary - The JSON dictionary that will be parsed.
50
+//
51
+// Returns the class that should be parsed (which may be the receiver), or nil
52
+// to abort parsing (e.g., if the data is invalid).
53
++ (Class)classForParsingJSONDictionary:(NSDictionary *)JSONDictionary;
54
+
55
+@end
56
+
57
+// The domain for errors originating from MTLJSONAdapter.
58
+extern NSString * const AWSMTLJSONAdapterErrorDomain;
59
+
60
+// +classForParsingJSONDictionary: returned nil for the given dictionary.
61
+extern const NSInteger AWSMTLJSONAdapterErrorNoClassFound;
62
+
63
+// The provided JSONDictionary is not valid.
64
+extern const NSInteger AWSMTLJSONAdapterErrorInvalidJSONDictionary;
65
+
66
+// The model's implementation of +JSONKeyPathsByPropertyKey included a key which
67
+// does not actually exist in +propertyKeys.
68
+extern const NSInteger AWSMTLJSONAdapterErrorInvalidJSONMapping;
69
+
70
+// Converts a MTLModel object to and from a JSON dictionary.
71
+@interface AWSMTLJSONAdapter : NSObject
72
+
73
+// The model object that the receiver was initialized with, or that the receiver
74
+// parsed from a JSON dictionary.
75
+@property (nonatomic, strong, readonly) AWSMTLModel<AWSMTLJSONSerializing> *model;
76
+
77
+// Attempts to parse a JSON dictionary into a model object.
78
+//
79
+// modelClass     - The MTLModel subclass to attempt to parse from the JSON.
80
+//                  This class must conform to <MTLJSONSerializing>. This
81
+//                  argument must not be nil.
82
+// JSONDictionary - A dictionary representing JSON data. This should match the
83
+//                  format returned by NSJSONSerialization. If this argument is
84
+//                  nil, the method returns nil.
85
+// error          - If not NULL, this may be set to an error that occurs during
86
+//                  parsing or initializing an instance of `modelClass`.
87
+//
88
+// Returns an instance of `modelClass` upon success, or nil if a parsing error
89
+// occurred.
90
++ (id)modelOfClass:(Class)modelClass fromJSONDictionary:(NSDictionary *)JSONDictionary error:(NSError **)error;
91
+
92
+// Attempts to parse an array of JSON dictionary objects into a model objects
93
+// of a specific class.
94
+//
95
+// modelClass - The MTLModel subclass to attempt to parse from the JSON. This
96
+//              class must conform to <MTLJSONSerializing>. This argument must
97
+//              not be nil.
98
+// JSONArray  - A array of dictionaries representing JSON data. This should
99
+//              match the format returned by NSJSONSerialization. If this
100
+//              argument is nil, the method returns nil.
101
+// error      - If not NULL, this may be set to an error that occurs during
102
+//              parsing or initializing an any of the instances of
103
+//              `modelClass`.
104
+//
105
+// Returns an array of `modelClass` instances upon success, or nil if a parsing
106
+// error occurred.
107
++ (NSArray *)modelsOfClass:(Class)modelClass fromJSONArray:(NSArray *)JSONArray error:(NSError **)error;
108
+
109
+// Converts a model into a JSON representation.
110
+//
111
+// model - The model to use for JSON serialization. This argument must not be
112
+//         nil.
113
+//
114
+// Returns a JSON dictionary, or nil if a serialization error occurred.
115
++ (NSDictionary *)JSONDictionaryFromModel:(AWSMTLModel<AWSMTLJSONSerializing> *)model;
116
+
117
+// Converts a array of models into a JSON representation.
118
+//
119
+// models - The array of models to use for JSON serialization. This argument
120
+//          must not be nil.
121
+//
122
+// Returns a JSON array, or nil if a serialization error occurred for any
123
+// model.
124
++ (NSArray *)JSONArrayFromModels:(NSArray *)models;
125
+
126
+// Initializes the receiver by attempting to parse a JSON dictionary into
127
+// a model object.
128
+//
129
+// JSONDictionary - A dictionary representing JSON data. This should match the
130
+//                  format returned by NSJSONSerialization. If this argument is
131
+//                  nil, the method returns nil and an error with code
132
+//                  MTLJSONAdapterErrorInvalidJSONDictionary.
133
+// modelClass     - The MTLModel subclass to attempt to parse from the JSON.
134
+//                  This class must conform to <MTLJSONSerializing>. This
135
+//                  argument must not be nil.
136
+// error          - If not NULL, this may be set to an error that occurs during
137
+//                  parsing or initializing an instance of `modelClass`.
138
+//
139
+// Returns an initialized adapter upon success, or nil if a parsing error
140
+// occurred.
141
+- (id)initWithJSONDictionary:(NSDictionary *)JSONDictionary modelClass:(Class)modelClass error:(NSError **)error;
142
+
143
+// Initializes the receiver with an existing model.
144
+//
145
+// model - The model to use for JSON serialization. This argument must not be
146
+//         nil.
147
+- (id)initWithModel:(AWSMTLModel<AWSMTLJSONSerializing> *)model;
148
+
149
+// Serializes the receiver's `model` into JSON.
150
+//
151
+// Returns a JSON dictionary, or nil if a serialization error occurred.
152
+- (NSDictionary *)JSONDictionary;
153
+
154
+// Looks up the JSON key path in the model's +propertyKeys.
155
+//
156
+// Subclasses may override this method to customize the adapter's seralizing
157
+// behavior. You should not call this method directly.
158
+//
159
+// key - The property key to retrieve the corresponding JSON key path for. This
160
+//       argument must not be nil.
161
+//
162
+// Returns a key path to use, or nil to omit the property from JSON.
163
+- (NSString *)JSONKeyPathForPropertyKey:(NSString *)key;
164
+
165
+@end
166
+
167
+@interface AWSMTLJSONAdapter (Deprecated)
168
+
169
++ (id)modelOfClass:(Class)modelClass fromJSONDictionary:(NSDictionary *)JSONDictionary __attribute__((deprecated("Replaced by +modelOfClass:fromJSONDictionary:error:")));
170
+- (id)initWithJSONDictionary:(NSDictionary *)JSONDictionary modelClass:(Class)modelClass __attribute__((deprecated("Replaced by -initWithJSONDictionary:modelClass:error:")));
171
+
172
+@end

+ 215
- 0
AWSCore.framework/Headers/AWSMTLManagedObjectAdapter.h 查看文件

@@ -0,0 +1,215 @@
1
+//
2
+//  MTLManagedObjectAdapter.h
3
+//  Mantle
4
+//
5
+//  Created by Justin Spahr-Summers on 2013-03-29.
6
+//  Copyright (c) 2013 GitHub. All rights reserved.
7
+//
8
+
9
+#import <CoreData/CoreData.h>
10
+
11
+@class AWSMTLModel;
12
+
13
+// A MTLModel object that supports being serialized to and from Core Data as an
14
+// NSManagedObject.
15
+@protocol AWSMTLManagedObjectSerializing
16
+@required
17
+
18
+// The name of the Core Data entity that the receiver serializes to and
19
+// deserializes from.
20
+//
21
+// This method must not return nil.
22
++ (NSString *)managedObjectEntityName;
23
+
24
+// Specifies how to map property keys to different keys on the receiver's
25
+// +managedObjectEntity.
26
+//
27
+// Entity attributes will be mapped to and from the receiver's properties using
28
+// +entityAttributeTransformerForKey:. Entity relationships will be mapped to
29
+// and from MTLModel objects using +relationshipModelClassesByPropertyKey.
30
+// Fetched properties are not supported.
31
+//
32
+// Subclasses overriding this method should combine their values with those of
33
+// `super`.
34
+//
35
+// Any property keys not present in the dictionary are assumed to match the
36
+// entity key that should be used. Any keys associated with NSNull will not
37
+// participate in managed object serialization.
38
+//
39
+// Returns a dictionary mapping property keys to entity keys (as strings) or
40
+// NSNull values.
41
++ (NSDictionary *)managedObjectKeysByPropertyKey;
42
+
43
+@optional
44
+
45
+// Specifies a set of property keys used by the adapter to check for an already
46
+// existing managed object when converting the MTLModel to its related
47
+// NSManagedObject.
48
+//
49
+// The adapter will first map any keys provided by this method to the correct
50
+// keys in managedObjectKeysByPropertyKey.
51
+//
52
+// The adapter will then perform a fetch request in the provided context for a
53
+// managed object that matches the MTLModel's managedObjectEntityName and has
54
+// equal values set for the property keys on the MTLModel.
55
+//
56
+// The managed object returned by the fetch request will then be set with all
57
+// values from the MTLModel that the managed object is being converted from.
58
+//
59
+// If a property value of our MTLModel is yet another MTLModel which needs to be
60
+// converted to a managed object, the class for that MTLModel can also implement
61
+// this method to perform its own uniqing.
62
+//
63
+// For example:
64
+// 1. An MTLModel subclass has id_number = 10.
65
+// 2. An NSManagedObject accessible to the adapter's context has idnumber = 10.
66
+// 3. managedObjectKeysByPropertyKey returns @{@"id_number" : @"idnumber"}
67
+// 4. propertyKeysForManagedObjectUniquing returns
68
+//    [NSSet setWithObject:@"id_number"];
69
+// 5. Then our fetch request may return this managed object (or another managed
70
+//    object with idnumber = 10).
71
+//
72
+// NOTE: If multiple managed objects follow the same uniquing criteria only one
73
+// of them will be set with our MTLModel's values.
74
++ (NSSet *)propertyKeysForManagedObjectUniquing;
75
+
76
+// Specifies how to convert the given property key to a managed object
77
+// attribute. If reversible, the transformer will also be used to convert the
78
+// managed object attribute back to the property.
79
+//
80
+// If the receiver implements a `+<key>EntityAttributeTransformer` method,
81
+// MTLManagedObjectAdapter will use the result of that method instead.
82
+//
83
+// Returns a value transformer, or nil if no transformation should be performed.
84
++ (NSValueTransformer *)entityAttributeTransformerForKey:(NSString *)key;
85
+
86
+// Specifies the MTLModel subclasses that should be deserialized to the
87
+// receiver's property keys when a property key corresponds to an entity
88
+// relationship.
89
+//
90
+// In other words, the dictionary returned by this method is used to decode
91
+// managed object relationships into MTLModels (or NSArrays or NSSets thereof)
92
+// set on the receiver.
93
+//
94
+// If a property key is omitted from the returned dictionary, but present in
95
+// +managedObjectKeysByPropertyKey, and the receiver's +managedObjectEntity has
96
+// a relationship at the corresponding key, an exception will be thrown during
97
+// deserialization.
98
+//
99
+// Subclasses overriding this method should combine their values with those of
100
+// `super`.
101
+//
102
+// Returns a dictionary mapping property keys to the Class objects that should
103
+// be used.
104
++ (NSDictionary *)relationshipModelClassesByPropertyKey;
105
+
106
+// Overridden to deserialize a different class instead of the receiver, based on
107
+// information in the provided object.
108
+//
109
+// This is mostly useful for class clusters, where the abstract base class would
110
+// be passed into +[MTLManagedObjectAdapter
111
+// modelOfClass:fromManagedObject:error:], but a subclass should be instantiated
112
+// instead.
113
+//
114
+// managedObject - The object that will be deserialized.
115
+//
116
+// Returns the class that should be instantiated (which may be the receiver), or
117
+// nil to abort parsing (e.g., if the data is invalid).
118
++ (Class)classForDeserializingManagedObject:(NSManagedObject *)managedObject;
119
+
120
+// Overriden when merging the value of the given key on the receiver with the
121
+// value of the same key from the given `NSManagedObject` requires custom
122
+// handling.
123
+//
124
+// By default, this method is not implemented, and precedence will be given to
125
+// the value of the receiving model implicitly.
126
+//
127
+// When implemented, this method is called when an existing `NSManagedObject`
128
+// is found for the receiving model, before updating the `NSManagedObject`'s
129
+// properties.
130
+//
131
+// When implementing, you should use `+managedObjectKeysByPropertyKey` to map
132
+// the given `key` to the appropriate `NSManagedObject` property.
133
+- (void)mergeValueForKey:(NSString *)key fromManagedObject:(NSManagedObject *)managedObject;
134
+
135
+// Overriden when merging values on the receiver with the given
136
+// `NSManagedObject` requires custom handling.
137
+//
138
+// By default, this method is not implemented, and precedence will be given to
139
+// the values of the receiving model implicitly.
140
+//
141
+// When implemented, this method is called when an existing `NSManagedObject`
142
+// is found for the receiving model, before updating the `NSManagedObject`'s
143
+// properties.
144
+//
145
+// When implementing, you should use `+managedObjectKeysByPropertyKey` to map
146
+// the given `key` to the appropriate `NSManagedObject` property.
147
+//
148
+// If you have also implemented `mergeValueForKey:fromManagedObject:` you have
149
+// to make sure to call `mergeValueForKey:fromManagedObject:` from this method
150
+// when appropriate.
151
+- (void)mergeValuesForKeysFromManagedObject:(NSManagedObject *)managedObject;
152
+
153
+@end
154
+
155
+// The domain for errors originating from MTLManagedObjectAdapter.
156
+extern NSString * const AWSMTLManagedObjectAdapterErrorDomain;
157
+
158
+// +classForDeserializingManagedObject: returned nil for the given object.
159
+extern const NSInteger AWSMTLManagedObjectAdapterErrorNoClassFound;
160
+
161
+// An NSManagedObject failed to initialize.
162
+extern const NSInteger AWSMTLManagedObjectAdapterErrorInitializationFailed;
163
+
164
+// The managed object key specified by +managedObjectKeysByPropertyKey does not
165
+// exist in the NSEntityDescription.
166
+extern const NSInteger AWSMTLManagedObjectAdapterErrorInvalidManagedObjectKey;
167
+
168
+// The managed object property specified has a type that isn't supported by
169
+// MTLManagedObjectAdapter.
170
+extern const NSInteger AWSMTLManagedObjectAdapterErrorUnsupportedManagedObjectPropertyType;
171
+
172
+// The fetch request to find an existing managed object based on
173
+// `+propertyKeysForManagedObjectUniquing` failed.
174
+extern const NSInteger AWSMTLManagedObjectAdapterErrorUniqueFetchRequestFailed;
175
+
176
+// A MTLModel property cannot be serialized to or deserialized from an
177
+// NSManagedObject relationship.
178
+//
179
+// For a to-one relationship, this means that the property does not contain
180
+// a MTLModel, or the MTLModel does not conform to <MTLManagedObjectSerializing>.
181
+//
182
+// For a to-many relationship, this means that the property does not contain an
183
+// NSArray or NSSet of MTLModel<MTLManagedObjectSerializing> instances.
184
+extern const NSInteger AWSMTLManagedObjectAdapterErrorUnsupportedRelationshipClass;
185
+
186
+// The model's implementation of +managedObjectKeysByPropertyKey included a key
187
+// which does not actually exist in +propertyKeys.
188
+extern const NSInteger AWSMTLManagedObjectAdapterErrorInvalidManagedObjectMapping;
189
+
190
+// Converts a MTLModel object to and from an NSManagedObject.
191
+@interface AWSMTLManagedObjectAdapter : NSObject
192
+
193
+// Attempts to deserialize an NSManagedObject into a MTLModel object.
194
+//
195
+// modelClass    - The MTLModel subclass to return. This class must conform to
196
+//                 <MTLManagedObjectSerializing>. This argument must not be nil.
197
+// managedObject - The managed object to deserialize. If this argument is nil,
198
+//                 the method returns nil.
199
+// error         - If not NULL, this may be set to an error that occurs during
200
+//                 deserialization or initializing an instance of `modelClass`.
201
+//
202
+// Returns an instance of `modelClass` upon success, or nil if an error
203
+// occurred.
204
++ (id)modelOfClass:(Class)modelClass fromManagedObject:(NSManagedObject *)managedObject error:(NSError **)error;
205
+
206
+// Serializes a MTLModel into an NSManagedObject.
207
+//
208
+// model   - The model object to serialize. This argument must not be nil.
209
+// context - The context into which to insert the created managed object. This
210
+//           argument must not be nil.
211
+// error   - If not NULL, this may be set to an error that occurs during
212
+//           serialization or insertion.
213
++ (id)managedObjectFromModel:(AWSMTLModel<AWSMTLManagedObjectSerializing> *)model insertingIntoContext:(NSManagedObjectContext *)context error:(NSError **)error;
214
+
215
+@end

+ 130
- 0
AWSCore.framework/Headers/AWSMTLModel+NSCoding.h 查看文件

@@ -0,0 +1,130 @@
1
+//
2
+//  MTLModel+NSCoding.h
3
+//  Mantle
4
+//
5
+//  Created by Justin Spahr-Summers on 2013-02-12.
6
+//  Copyright (c) 2013 GitHub. All rights reserved.
7
+//
8
+
9
+#import "AWSMTLModel.h"
10
+
11
+void awsmtl_loadMTLNSCoding(void);
12
+
13
+// Defines how a MTLModel property key should be encoded into an archive.
14
+//
15
+// MTLModelEncodingBehaviorExcluded      - The property should never be encoded.
16
+// MTLModelEncodingBehaviorUnconditional - The property should always be
17
+//                                         encoded.
18
+// MTLModelEncodingBehaviorConditional   - The object should be encoded only
19
+//                                         if unconditionally encoded elsewhere.
20
+//                                         This should only be used for object
21
+//                                         properties.
22
+typedef enum : NSUInteger {
23
+    AWSMTLModelEncodingBehaviorExcluded = 0,
24
+    AWSMTLModelEncodingBehaviorUnconditional,
25
+    AWSMTLModelEncodingBehaviorConditional,
26
+} AWSMTLModelEncodingBehavior;
27
+
28
+// Implements default archiving and unarchiving behaviors for MTLModel.
29
+@interface AWSMTLModel (NSCoding) <NSCoding>
30
+
31
+// Initializes the receiver from an archive.
32
+//
33
+// This will decode the original +modelVersion of the archived object, then
34
+// invoke -decodeValueForKey:withCoder:modelVersion: for each of the receiver's
35
+// +propertyKeys.
36
+//
37
+// Returns an initialized model object, or nil if a decoding error occurred.
38
+- (id)initWithCoder:(NSCoder *)coder;
39
+
40
+// Archives the receiver using the given coder.
41
+//
42
+// This will encode the receiver's +modelVersion, then the receiver's properties
43
+// according to the behaviors specified in +encodingBehaviorsByPropertyKey.
44
+- (void)encodeWithCoder:(NSCoder *)coder;
45
+
46
+// Determines how the +propertyKeys of the class are encoded into an archive.
47
+// The values of this dictionary should be boxed MTLModelEncodingBehavior
48
+// values.
49
+//
50
+// Any keys not present in the dictionary will be excluded from the archive.
51
+//
52
+// Subclasses overriding this method should combine their values with those of
53
+// `super`.
54
+//
55
+// Returns a dictionary mapping the receiver's +propertyKeys to default encoding
56
+// behaviors. If a property is an object with `weak` semantics, the default
57
+// behavior is MTLModelEncodingBehaviorConditional; otherwise, the default is
58
+// MTLModelEncodingBehaviorUnconditional.
59
++ (NSDictionary *)encodingBehaviorsByPropertyKey;
60
+
61
+// Determines the classes that are allowed to be decoded for each of the
62
+// receiver's properties when using <NSSecureCoding>. The values of this
63
+// dictionary should be NSArrays of Class objects.
64
+//
65
+// If any encodable keys (as determined by +encodingBehaviorsByPropertyKey) are
66
+// not present in the dictionary, an exception will be thrown during secure
67
+// encoding or decoding.
68
+//
69
+// Subclasses overriding this method should combine their values with those of
70
+// `super`.
71
+//
72
+// Returns a dictionary mapping the receiver's encodable keys (as determined by
73
+// +encodingBehaviorsByPropertyKey) to default allowed classes, based on the
74
+// type that each property is declared as. If type of an encodable property
75
+// cannot be determined (e.g., it is declared as `id`), it will be omitted from
76
+// the dictionary, and subclasses must provide a valid value to prevent an
77
+// exception being thrown during encoding/decoding.
78
++ (NSDictionary *)allowedSecureCodingClassesByPropertyKey;
79
+
80
+// Decodes the value of the given property key from an archive.
81
+//
82
+// By default, this method looks for a `-decode<Key>WithCoder:modelVersion:`
83
+// method on the receiver, and invokes it if found.
84
+//
85
+// If the custom method is not implemented and `coder` does not require secure
86
+// coding, `-[NSCoder decodeObjectForKey:]` will be invoked with the given
87
+// `key`.
88
+//
89
+// If the custom method is not implemented and `coder` requires secure coding,
90
+// `-[NSCoder decodeObjectOfClasses:forKey:]` will be invoked with the
91
+// information from +allowedSecureCodingClassesByPropertyKey and the given `key`. The
92
+// receiver must conform to <NSSecureCoding> for this to work correctly.
93
+//
94
+// key          - The property key to decode the value for. This argument cannot
95
+//                be nil.
96
+// coder        - The NSCoder representing the archive being decoded. This
97
+//                argument cannot be nil.
98
+// modelVersion - The version of the original model object that was encoded.
99
+//
100
+// Returns the decoded and boxed value, or nil if the key was not present.
101
+- (id)decodeValueForKey:(NSString *)key withCoder:(NSCoder *)coder modelVersion:(NSUInteger)modelVersion;
102
+
103
+// The version of this MTLModel subclass.
104
+//
105
+// This version number is saved in archives so that later model changes can be
106
+// made backwards-compatible with old versions.
107
+//
108
+// Subclasses should override this method to return a higher version number
109
+// whenever a breaking change is made to the model.
110
+//
111
+// Returns 0.
112
++ (NSUInteger)modelVersion;
113
+
114
+@end
115
+
116
+// This method must be overridden to support archives created by older versions
117
+// of Mantle (before the `MTLModel+NSCoding` interface existed).
118
+@interface AWSMTLModel (OldArchiveSupport)
119
+
120
+// Converts an archived external representation to a dictionary suitable for
121
+// passing to -initWithDictionary:.
122
+//
123
+// externalRepresentation - The decoded external representation of the receiver.
124
+// fromVersion            - The model version at the time the external
125
+//                          representation was encoded.
126
+//
127
+// Returns nil by default, indicating that conversion failed.
128
++ (NSDictionary *)dictionaryValueFromArchivedExternalRepresentation:(NSDictionary *)externalRepresentation version:(NSUInteger)fromVersion;
129
+
130
+@end

+ 125
- 0
AWSCore.framework/Headers/AWSMTLModel.h 查看文件

@@ -0,0 +1,125 @@
1
+//
2
+//  MTLModel.h
3
+//  Mantle
4
+//
5
+//  Created by Justin Spahr-Summers on 2012-09-11.
6
+//  Copyright (c) 2012 GitHub. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+// An abstract base class for model objects, using reflection to provide
12
+// sensible default behaviors.
13
+//
14
+// The default implementations of <NSCopying>, -hash, and -isEqual: make use of
15
+// the +propertyKeys method.
16
+@interface AWSMTLModel : NSObject <NSCopying>
17
+
18
+// Returns a new instance of the receiver initialized using
19
+// -initWithDictionary:error:.
20
++ (instancetype)modelWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error;
21
+
22
+// Initializes the receiver with default values.
23
+//
24
+// This is the designated initializer for this class.
25
+- (instancetype)init;
26
+
27
+// Initializes the receiver using key-value coding, setting the keys and values
28
+// in the given dictionary.
29
+//
30
+// Subclass implementations may override this method, calling the super
31
+// implementation, in order to perform further processing and initialization
32
+// after deserialization.
33
+//
34
+// dictionaryValue - Property keys and values to set on the receiver. Any NSNull
35
+//                   values will be converted to nil before being used. KVC
36
+//                   validation methods will automatically be invoked for all of
37
+//                   the properties given. If nil, this method is equivalent to
38
+//                   -init.
39
+// error           - If not NULL, this may be set to any error that occurs
40
+//                   (like a KVC validation error).
41
+//
42
+// Returns an initialized model object, or nil if validation failed.
43
+- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error;
44
+
45
+// Returns the keys for all @property declarations, except for `readonly`
46
+// properties without ivars, or properties on MTLModel itself.
47
++ (NSSet *)propertyKeys;
48
+
49
+// A dictionary representing the properties of the receiver.
50
+//
51
+// The default implementation combines the values corresponding to all
52
+// +propertyKeys into a dictionary, with any nil values represented by NSNull.
53
+//
54
+// This property must never be nil.
55
+@property (nonatomic, copy, readonly) NSDictionary *dictionaryValue;
56
+
57
+// Merges the value of the given key on the receiver with the value of the same
58
+// key from the given model object, giving precedence to the other model object.
59
+//
60
+// By default, this method looks for a `-merge<Key>FromModel:` method on the
61
+// receiver, and invokes it if found. If not found, and `model` is not nil, the
62
+// value for the given key is taken from `model`.
63
+- (void)mergeValueForKey:(NSString *)key fromModel:(AWSMTLModel *)model;
64
+
65
+// Merges the values of the given model object into the receiver, using
66
+// -mergeValueForKey:fromModel: for each key in +propertyKeys.
67
+//
68
+// `model` must be an instance of the receiver's class or a subclass thereof.
69
+- (void)mergeValuesForKeysFromModel:(AWSMTLModel *)model;
70
+
71
+// Compares the receiver with another object for equality.
72
+//
73
+// The default implementation is equivalent to comparing both models'
74
+// -dictionaryValue.
75
+//
76
+// Note that this may lead to infinite loops if the receiver holds a circular
77
+// reference to another MTLModel and both use the default behavior.
78
+// It is recommended to override -isEqual: in this scenario.
79
+- (BOOL)isEqual:(id)object;
80
+
81
+// A string that describes the contents of the receiver.
82
+//
83
+// The default implementation is based on the receiver's class and its
84
+// -dictionaryValue.
85
+//
86
+// Note that this may lead to infinite loops if the receiver holds a circular
87
+// reference to another MTLModel and both use the default behavior.
88
+// It is recommended to override -description in this scenario.
89
+- (NSString *)description;
90
+
91
+@end
92
+
93
+// Implements validation logic for MTLModel.
94
+@interface AWSMTLModel (Validation)
95
+
96
+// Validates the model.
97
+//
98
+// The default implementation simply invokes -validateValue:forKey:error: with
99
+// all +propertyKeys and their current value. If -validateValue:forKey:error:
100
+// returns a new value, the property is set to that new value.
101
+//
102
+// error - If not NULL, this may be set to any error that occurs during
103
+//         validation
104
+//
105
+// Returns YES if the model is valid, or NO if the validation failed.
106
+- (BOOL)validate:(NSError **)error;
107
+
108
+@end
109
+
110
+@interface AWSMTLModel (Unavailable)
111
+
112
++ (instancetype)modelWithDictionary:(NSDictionary *)dictionaryValue __attribute__((deprecated("Replaced by +modelWithDictionary:error:")));
113
+- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue __attribute__((deprecated("Replaced by -initWithDictionary:error:")));
114
+
115
++ (instancetype)modelWithExternalRepresentation:(NSDictionary *)externalRepresentation __attribute__((deprecated("Replaced by -[MTLJSONAdapter initWithJSONDictionary:modelClass:]")));
116
+- (instancetype)initWithExternalRepresentation:(NSDictionary *)externalRepresentation __attribute__((deprecated("Replaced by -[MTLJSONAdapter initWithJSONDictionary:modelClass:]")));
117
+
118
+@property (nonatomic, copy, readonly) NSDictionary *externalRepresentation __attribute__((deprecated("Replaced by MTLJSONAdapter.JSONDictionary")));
119
+
120
++ (NSDictionary *)externalRepresentationKeyPathsByPropertyKey __attribute__((deprecated("Replaced by +JSONKeyPathsByPropertyKey in <MTLJSONSerializing>")));
121
++ (NSValueTransformer *)transformerForKey:(NSString *)key __attribute__((deprecated("Replaced by +JSONTransformerForKey: in <MTLJSONSerializing>")));
122
+
123
++ (NSDictionary *)migrateExternalRepresentation:(NSDictionary *)externalRepresentation fromVersion:(NSUInteger)fromVersion __attribute__((deprecated("Replaced by -decodeValueForKey:withCoder:modelVersion:")));
124
+
125
+@end

+ 29
- 0
AWSCore.framework/Headers/AWSMTLValueTransformer.h 查看文件

@@ -0,0 +1,29 @@
1
+//
2
+//  MTLValueTransformer.h
3
+//  Mantle
4
+//
5
+//  Created by Justin Spahr-Summers on 2012-09-11.
6
+//  Copyright (c) 2012 GitHub. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+typedef id (^AWSMTLValueTransformerBlock)(id);
12
+
13
+//
14
+// A value transformer supporting block-based transformation.
15
+//
16
+@interface AWSMTLValueTransformer : NSValueTransformer
17
+
18
+// Returns a transformer which transforms values using the given block. Reverse
19
+// transformations will not be allowed.
20
++ (instancetype)transformerWithBlock:(AWSMTLValueTransformerBlock)transformationBlock;
21
+
22
+// Returns a transformer which transforms values using the given block, for
23
+// forward or reverse transformations.
24
++ (instancetype)reversibleTransformerWithBlock:(AWSMTLValueTransformerBlock)transformationBlock;
25
+
26
+// Returns a transformer which transforms values using the given blocks.
27
++ (instancetype)reversibleTransformerWithForwardBlock:(AWSMTLValueTransformerBlock)forwardBlock reverseBlock:(AWSMTLValueTransformerBlock)reverseBlock;
28
+
29
+@end

+ 26
- 0
AWSCore.framework/Headers/AWSMantle.h 查看文件

@@ -0,0 +1,26 @@
1
+//
2
+//  Mantle.h
3
+//  Mantle
4
+//
5
+//  Created by Justin Spahr-Summers on 2012-09-04.
6
+//  Copyright (c) 2012 GitHub. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+//! Project version number for Mantle.
12
+FOUNDATION_EXPORT double AWSMantleVersionNumber;
13
+
14
+//! Project version string for Mantle.
15
+FOUNDATION_EXPORT const unsigned char AWSMantleVersionString[];
16
+
17
+#import "AWSMTLJSONAdapter.h"
18
+#import "AWSMTLManagedObjectAdapter.h"
19
+#import "AWSMTLModel.h"
20
+#import "AWSMTLModel+NSCoding.h"
21
+#import "AWSMTLValueTransformer.h"
22
+#import "NSArray+AWSMTLManipulationAdditions.h"
23
+#import "NSDictionary+AWSMTLManipulationAdditions.h"
24
+#import "NSObject+AWSMTLComparisonAdditions.h"
25
+#import "NSValueTransformer+AWSMTLInversionAdditions.h"
26
+#import "NSValueTransformer+AWSMTLPredefinedTransformerAdditions.h"

+ 38
- 0
AWSCore.framework/Headers/AWSModel.h 查看文件

@@ -0,0 +1,38 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import "AWSMantle.h"
17
+
18
+@interface AWSModel : AWSMTLModel <AWSMTLJSONSerializing>
19
+
20
+@end
21
+
22
+@interface AWSModelUtility : NSObject
23
+
24
++ (NSDictionary *)mapMTLDictionaryFromJSONArrayDictionary:(NSDictionary *)JSONArrayDictionary
25
+                                         arrayElementType:(NSString *)arrayElementType
26
+                                           withModelClass:(Class)modelClass;
27
++ (NSDictionary *)JSONArrayDictionaryFromMapMTLDictionary:(NSDictionary *)mapMTLDictionary
28
+                                         arrayElementType:(NSString *)arrayElementType;
29
+
30
++ (NSArray *)mapMTLArrayFromJSONArray:(NSArray *)JSONArray
31
+                       withModelClass:(Class)modelClass;
32
++ (NSArray *)JSONArrayFromMapMTLArray:(NSArray *)mapMTLArray;
33
+
34
++ (NSDictionary *)mapMTLDictionaryFromJSONDictionary:(NSDictionary *)JSONDictionary
35
+                                      withModelClass:(Class)modelClass;
36
++ (NSDictionary *)JSONDictionaryFromMapMTLDictionary:(NSDictionary *)mapMTLDictionary;
37
+
38
+@end

+ 212
- 0
AWSCore.framework/Headers/AWSNetworking.h 查看文件

@@ -0,0 +1,212 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import "AWSModel.h"
18
+
19
+FOUNDATION_EXPORT NSString *const AWSNetworkingErrorDomain;
20
+typedef NS_ENUM(NSInteger, AWSNetworkingErrorType) {
21
+    AWSNetworkingErrorUnknown,
22
+    AWSNetworkingErrorCancelled
23
+};
24
+
25
+typedef NS_ENUM(NSInteger, AWSNetworkingRetryType) {
26
+    AWSNetworkingRetryTypeUnknown,
27
+    AWSNetworkingRetryTypeShouldNotRetry,
28
+    AWSNetworkingRetryTypeShouldRetry,
29
+    AWSNetworkingRetryTypeShouldRefreshCredentialsAndRetry,
30
+    AWSNetworkingRetryTypeShouldCorrectClockSkewAndRetry,
31
+    AWSNetworkingRetryTypeResetStreamAndRetry
32
+};
33
+
34
+@class AWSNetworkingConfiguration;
35
+@class AWSNetworkingRequest;
36
+@class AWSTask<__covariant ResultType>;
37
+
38
+typedef void (^AWSNetworkingUploadProgressBlock) (int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend);
39
+typedef void (^AWSNetworkingDownloadProgressBlock) (int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite);
40
+
41
+#pragma mark - AWSHTTPMethod
42
+
43
+typedef NS_ENUM(NSInteger, AWSHTTPMethod) {
44
+    AWSHTTPMethodUnknown,
45
+    AWSHTTPMethodGET,
46
+    AWSHTTPMethodHEAD,
47
+    AWSHTTPMethodPOST,
48
+    AWSHTTPMethodPUT,
49
+    AWSHTTPMethodPATCH,
50
+    AWSHTTPMethodDELETE
51
+};
52
+
53
+@interface NSString (AWSHTTPMethod)
54
+
55
++ (instancetype)aws_stringWithHTTPMethod:(AWSHTTPMethod)HTTPMethod;
56
+
57
+@end
58
+
59
+#pragma mark - AWSNetworking
60
+
61
+@interface AWSNetworking : NSObject
62
+
63
+- (instancetype)initWithConfiguration:(AWSNetworkingConfiguration *)configuration;
64
+
65
+- (AWSTask *)sendRequest:(AWSNetworkingRequest *)request;
66
+
67
+@end
68
+
69
+#pragma mark - Protocols
70
+
71
+@protocol AWSURLRequestSerializer <NSObject>
72
+
73
+@required
74
+- (AWSTask *)validateRequest:(NSURLRequest *)request;
75
+- (AWSTask *)serializeRequest:(NSMutableURLRequest *)request
76
+                     headers:(NSDictionary *)headers
77
+                  parameters:(NSDictionary *)parameters;
78
+
79
+@end
80
+
81
+@protocol AWSNetworkingRequestInterceptor <NSObject>
82
+
83
+@required
84
+- (AWSTask *)interceptRequest:(NSMutableURLRequest *)request;
85
+
86
+@end
87
+
88
+@protocol AWSNetworkingHTTPResponseInterceptor <NSObject>
89
+
90
+@required
91
+- (AWSTask *)interceptResponse:(NSHTTPURLResponse *)response
92
+                         data:(id)data
93
+              originalRequest:(NSURLRequest *)originalRequest
94
+               currentRequest:(NSURLRequest *)currentRequest;
95
+
96
+@end
97
+
98
+@protocol AWSHTTPURLResponseSerializer <NSObject>
99
+
100
+@required
101
+
102
+- (BOOL)validateResponse:(NSHTTPURLResponse *)response
103
+             fromRequest:(NSURLRequest *)request
104
+                    data:(id)data
105
+                   error:(NSError *__autoreleasing *)error;
106
+- (id)responseObjectForResponse:(NSHTTPURLResponse *)response
107
+                originalRequest:(NSURLRequest *)originalRequest
108
+                 currentRequest:(NSURLRequest *)currentRequest
109
+                           data:(id)data
110
+                          error:(NSError *__autoreleasing *)error;
111
+
112
+@end
113
+
114
+@protocol AWSURLRequestRetryHandler <NSObject>
115
+
116
+@required
117
+
118
+@property (nonatomic, assign) uint32_t maxRetryCount;
119
+
120
+- (AWSNetworkingRetryType)shouldRetry:(uint32_t)currentRetryCount
121
+                      originalRequest:(AWSNetworkingRequest *)originalRequest
122
+                             response:(NSHTTPURLResponse *)response
123
+                                 data:(NSData *)data
124
+                                error:(NSError *)error;
125
+
126
+- (NSTimeInterval)timeIntervalForRetry:(uint32_t)currentRetryCount
127
+                              response:(NSHTTPURLResponse *)response
128
+                                  data:(NSData *)data
129
+                                 error:(NSError *)error;
130
+
131
+@optional
132
+
133
+- (NSDictionary *)resetParameters:(NSDictionary *)parameters;
134
+
135
+@end
136
+
137
+
138
+#pragma mark - AWSNetworkingConfiguration
139
+
140
+@interface AWSNetworkingConfiguration : NSObject <NSCopying>
141
+
142
+@property (nonatomic, readonly) NSURL *URL;
143
+@property (nonatomic, strong) NSURL *baseURL;
144
+@property (nonatomic, strong) NSString *URLString;
145
+@property (nonatomic, assign) AWSHTTPMethod HTTPMethod;
146
+@property (nonatomic, strong) NSDictionary *headers;
147
+@property (nonatomic, assign) BOOL allowsCellularAccess;
148
+@property (nonatomic, strong) NSString *sharedContainerIdentifier;
149
+
150
+@property (nonatomic, strong) id<AWSURLRequestSerializer> requestSerializer;
151
+@property (nonatomic, strong) NSArray<id<AWSNetworkingRequestInterceptor>> *requestInterceptors;
152
+@property (nonatomic, strong) id<AWSHTTPURLResponseSerializer> responseSerializer;
153
+@property (nonatomic, strong) NSArray<id<AWSNetworkingHTTPResponseInterceptor>> *responseInterceptors;
154
+@property (nonatomic, strong) id<AWSURLRequestRetryHandler> retryHandler;
155
+
156
+/**
157
+ The maximum number of retries for failed requests. The value needs to be between 0 and 10 inclusive. If set to higher than 10, it becomes 10.
158
+ */
159
+@property (nonatomic, assign) uint32_t maxRetryCount;
160
+
161
+/**
162
+ The timeout interval to use when waiting for additional data.
163
+ */
164
+@property (nonatomic, assign) NSTimeInterval timeoutIntervalForRequest;
165
+
166
+/**
167
+ The maximum amount of time that a resource request should be allowed to take.
168
+ */
169
+@property (nonatomic, assign) NSTimeInterval timeoutIntervalForResource;
170
+
171
+@end
172
+
173
+#pragma mark - AWSNetworkingRequest
174
+
175
+@interface AWSNetworkingRequest : AWSNetworkingConfiguration
176
+
177
+@property (nonatomic, strong) NSDictionary *parameters;
178
+@property (nonatomic, strong) NSURL *uploadingFileURL;
179
+@property (nonatomic, strong) NSURL *downloadingFileURL;
180
+@property (nonatomic, assign) BOOL shouldWriteDirectly;
181
+
182
+@property (nonatomic, copy) AWSNetworkingUploadProgressBlock uploadProgress;
183
+@property (nonatomic, copy) AWSNetworkingDownloadProgressBlock downloadProgress;
184
+
185
+@property (readonly, nonatomic, strong) NSURLSessionTask *task;
186
+@property (readonly, nonatomic, assign, getter = isCancelled) BOOL cancelled;
187
+
188
+- (void)assignProperties:(AWSNetworkingConfiguration *)configuration;
189
+- (void)cancel;
190
+- (void)pause;
191
+
192
+@end
193
+
194
+@interface AWSRequest : AWSModel
195
+
196
+@property (nonatomic, copy) AWSNetworkingUploadProgressBlock uploadProgress;
197
+@property (nonatomic, copy) AWSNetworkingDownloadProgressBlock downloadProgress;
198
+@property (nonatomic, assign, readonly, getter = isCancelled) BOOL cancelled;
199
+@property (nonatomic, strong) NSURL *downloadingFileURL;
200
+
201
+- (AWSTask *)cancel;
202
+- (AWSTask *)pause;
203
+
204
+@end
205
+
206
+@interface AWSNetworkingRequestInterceptor : NSObject <AWSNetworkingRequestInterceptor>
207
+
208
+@property (nonatomic, readonly) NSString *userAgent;
209
+
210
+- (instancetype)initWithUserAgent:(NSString *)userAgent;
211
+
212
+@end

+ 22
- 0
AWSCore.framework/Headers/AWSSTS.h 查看文件

@@ -0,0 +1,22 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+
19
+
20
+
21
+#import "AWSCore.h"
22
+#import "AWSSTSService.h"

+ 483
- 0
AWSCore.framework/Headers/AWSSTSModel.h 查看文件

@@ -0,0 +1,483 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import "AWSNetworking.h"
18
+#import "AWSModel.h"
19
+
20
+NS_ASSUME_NONNULL_BEGIN
21
+
22
+FOUNDATION_EXPORT NSString *const AWSSTSErrorDomain;
23
+
24
+typedef NS_ENUM(NSInteger, AWSSTSErrorType) {
25
+    AWSSTSErrorUnknown,
26
+    AWSSTSErrorExpiredToken,
27
+    AWSSTSErrorIDPCommunicationError,
28
+    AWSSTSErrorIDPRejectedClaim,
29
+    AWSSTSErrorInvalidAuthorizationMessage,
30
+    AWSSTSErrorInvalidIdentityToken,
31
+    AWSSTSErrorMalformedPolicyDocument,
32
+    AWSSTSErrorPackedPolicyTooLarge,
33
+    AWSSTSErrorRegionDisabled,
34
+};
35
+
36
+@class AWSSTSAssumeRoleRequest;
37
+@class AWSSTSAssumeRoleResponse;
38
+@class AWSSTSAssumeRoleWithSAMLRequest;
39
+@class AWSSTSAssumeRoleWithSAMLResponse;
40
+@class AWSSTSAssumeRoleWithWebIdentityRequest;
41
+@class AWSSTSAssumeRoleWithWebIdentityResponse;
42
+@class AWSSTSAssumedRoleUser;
43
+@class AWSSTSCredentials;
44
+@class AWSSTSDecodeAuthorizationMessageRequest;
45
+@class AWSSTSDecodeAuthorizationMessageResponse;
46
+@class AWSSTSFederatedUser;
47
+@class AWSSTSGetCallerIdentityRequest;
48
+@class AWSSTSGetCallerIdentityResponse;
49
+@class AWSSTSGetFederationTokenRequest;
50
+@class AWSSTSGetFederationTokenResponse;
51
+@class AWSSTSGetSessionTokenRequest;
52
+@class AWSSTSGetSessionTokenResponse;
53
+
54
+/**
55
+ 
56
+ */
57
+@interface AWSSTSAssumeRoleRequest : AWSRequest
58
+
59
+
60
+/**
61
+ <p>The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. This setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting, the operation fails. For example, if you specify a session duration of 12 hours, but your administrator set the maximum session duration to 6 hours, your operation fails. To learn how to view the maximum value for your role, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View the Maximum Session Duration Setting for a Role</a> in the <i>IAM User Guide</i>.</p><p>By default, the value is set to 3600 seconds. </p><note><p>The <code>DurationSeconds</code> parameter is separate from the duration of a console session that you might request using the returned credentials. The request to the federation endpoint for a console sign-in token takes a <code>SessionDuration</code> parameter that specifies the maximum length of the console session. For more information, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html">Creating a URL that Enables Federated Users to Access the AWS Management Console</a> in the <i>IAM User Guide</i>.</p></note>
62
+ */
63
+@property (nonatomic, strong) NSNumber * _Nullable durationSeconds;
64
+
65
+/**
66
+ <p>A unique identifier that is used by third parties when assuming roles in their customers' accounts. For each role that the third party can assume, they should instruct their customers to ensure the role's trust policy checks for the external ID that the third party generated. Each time the third party assumes the role, they should pass the customer's external ID. The external ID is useful in order to help third parties bind a role to the customer who created it. For more information about the external ID, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html">How to Use an External ID When Granting Access to Your AWS Resources to a Third Party</a> in the <i>IAM User Guide</i>.</p><p>The regex used to validated this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-</p>
67
+ */
68
+@property (nonatomic, strong) NSString * _Nullable externalId;
69
+
70
+/**
71
+ <p>An IAM policy in JSON format.</p><p>This parameter is optional. If you pass a policy, the temporary security credentials that are returned by the operation have the permissions that are allowed by both (the intersection of) the access policy of the role that is being assumed, <i>and</i> the policy that you pass. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use the passed policy to grant permissions that are in excess of those allowed by the access policy of the role that is being assumed. For more information, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html">Permissions for AssumeRole, AssumeRoleWithSAML, and AssumeRoleWithWebIdentity</a> in the <i>IAM User Guide</i>.</p><p>The format for this parameter, as described by its regex pattern, is a string of characters up to 2048 characters in length. The characters can be any ASCII character from the space character to the end of the valid character list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.</p><note><p>The policy plain text must be 2048 bytes or shorter. However, an internal conversion compresses it into a packed binary format with a separate limit. The PackedPolicySize response element indicates by percentage how close to the upper size limit the policy is, with 100% equaling the maximum allowed size.</p></note>
72
+ */
73
+@property (nonatomic, strong) NSString * _Nullable policy;
74
+
75
+/**
76
+ <p>The Amazon Resource Name (ARN) of the role to assume.</p>
77
+ */
78
+@property (nonatomic, strong) NSString * _Nullable roleArn;
79
+
80
+/**
81
+ <p>An identifier for the assumed role session.</p><p>Use the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal. This means that subsequent cross-account API requests using the temporary security credentials will expose the role session name to the external account in their CloudTrail logs.</p><p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
82
+ */
83
+@property (nonatomic, strong) NSString * _Nullable roleSessionName;
84
+
85
+/**
86
+ <p>The identification number of the MFA device that is associated with the user who is making the <code>AssumeRole</code> call. Specify this value if the trust policy of the role being assumed includes a condition that requires MFA authentication. The value is either the serial number for a hardware device (such as <code>GAHT12345678</code>) or an Amazon Resource Name (ARN) for a virtual device (such as <code>arn:aws:iam::123456789012:mfa/user</code>).</p><p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
87
+ */
88
+@property (nonatomic, strong) NSString * _Nullable serialNumber;
89
+
90
+/**
91
+ <p>The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is, if the policy includes a condition that tests for MFA). If the role being assumed requires MFA and if the <code>TokenCode</code> value is missing or expired, the <code>AssumeRole</code> call returns an "access denied" error.</p><p>The format for this parameter, as described by its regex pattern, is a sequence of six numeric digits.</p>
92
+ */
93
+@property (nonatomic, strong) NSString * _Nullable tokenCode;
94
+
95
+@end
96
+
97
+/**
98
+ <p>Contains the response to a successful <a>AssumeRole</a> request, including temporary AWS credentials that can be used to make AWS requests. </p>
99
+ */
100
+@interface AWSSTSAssumeRoleResponse : AWSModel
101
+
102
+
103
+/**
104
+ <p>The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you can use to refer to the resulting temporary security credentials. For example, you can reference these credentials as a principal in a resource-based policy by using the ARN or assumed role ID. The ARN and ID include the <code>RoleSessionName</code> that you specified when you called <code>AssumeRole</code>. </p>
105
+ */
106
+@property (nonatomic, strong) AWSSTSAssumedRoleUser * _Nullable assumedRoleUser;
107
+
108
+/**
109
+ <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p><p><b>Note:</b> The size of the security token that STS APIs return is not fixed. We strongly recommend that you make no assumptions about the maximum size. As of this writing, the typical size is less than 4096 bytes, but that can vary. Also, future updates to AWS might require larger sizes.</p>
110
+ */
111
+@property (nonatomic, strong) AWSSTSCredentials * _Nullable credentials;
112
+
113
+/**
114
+ <p>A percentage value that indicates the size of the policy in packed form. The service rejects any policy with a packed size greater than 100 percent, which means the policy exceeded the allowed space.</p>
115
+ */
116
+@property (nonatomic, strong) NSNumber * _Nullable packedPolicySize;
117
+
118
+@end
119
+
120
+/**
121
+ 
122
+ */
123
+@interface AWSSTSAssumeRoleWithSAMLRequest : AWSRequest
124
+
125
+
126
+/**
127
+ <p>The duration, in seconds, of the role session. Your role session lasts for the duration that you specify for the <code>DurationSeconds</code> parameter, or until the time specified in the SAML authentication response's <code>SessionNotOnOrAfter</code> value, whichever is shorter. You can provide a <code>DurationSeconds</code> value from 900 seconds (15 minutes) up to the maximum session duration setting for the role. This setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting, the operation fails. For example, if you specify a session duration of 12 hours, but your administrator set the maximum session duration to 6 hours, your operation fails. To learn how to view the maximum value for your role, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View the Maximum Session Duration Setting for a Role</a> in the <i>IAM User Guide</i>.</p><p>By default, the value is set to 3600 seconds. </p><note><p>The <code>DurationSeconds</code> parameter is separate from the duration of a console session that you might request using the returned credentials. The request to the federation endpoint for a console sign-in token takes a <code>SessionDuration</code> parameter that specifies the maximum length of the console session. For more information, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html">Creating a URL that Enables Federated Users to Access the AWS Management Console</a> in the <i>IAM User Guide</i>.</p></note>
128
+ */
129
+@property (nonatomic, strong) NSNumber * _Nullable durationSeconds;
130
+
131
+/**
132
+ <p>An IAM policy in JSON format.</p><p>The policy parameter is optional. If you pass a policy, the temporary security credentials that are returned by the operation have the permissions that are allowed by both the access policy of the role that is being assumed, <i><b>and</b></i> the policy that you pass. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use the passed policy to grant permissions that are in excess of those allowed by the access policy of the role that is being assumed. For more information, <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html">Permissions for AssumeRole, AssumeRoleWithSAML, and AssumeRoleWithWebIdentity</a> in the <i>IAM User Guide</i>. </p><p>The format for this parameter, as described by its regex pattern, is a string of characters up to 2048 characters in length. The characters can be any ASCII character from the space character to the end of the valid character list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.</p><note><p>The policy plain text must be 2048 bytes or shorter. However, an internal conversion compresses it into a packed binary format with a separate limit. The PackedPolicySize response element indicates by percentage how close to the upper size limit the policy is, with 100% equaling the maximum allowed size.</p></note>
133
+ */
134
+@property (nonatomic, strong) NSString * _Nullable policy;
135
+
136
+/**
137
+ <p>The Amazon Resource Name (ARN) of the SAML provider in IAM that describes the IdP.</p>
138
+ */
139
+@property (nonatomic, strong) NSString * _Nullable principalArn;
140
+
141
+/**
142
+ <p>The Amazon Resource Name (ARN) of the role that the caller is assuming.</p>
143
+ */
144
+@property (nonatomic, strong) NSString * _Nullable roleArn;
145
+
146
+/**
147
+ <p>The base-64 encoded SAML authentication response provided by the IdP.</p><p>For more information, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html">Configuring a Relying Party and Adding Claims</a> in the <i>Using IAM</i> guide. </p>
148
+ */
149
+@property (nonatomic, strong) NSString * _Nullable SAMLAssertion;
150
+
151
+@end
152
+
153
+/**
154
+ <p>Contains the response to a successful <a>AssumeRoleWithSAML</a> request, including temporary AWS credentials that can be used to make AWS requests. </p>
155
+ */
156
+@interface AWSSTSAssumeRoleWithSAMLResponse : AWSModel
157
+
158
+
159
+/**
160
+ <p>The identifiers for the temporary security credentials that the operation returns.</p>
161
+ */
162
+@property (nonatomic, strong) AWSSTSAssumedRoleUser * _Nullable assumedRoleUser;
163
+
164
+/**
165
+ <p> The value of the <code>Recipient</code> attribute of the <code>SubjectConfirmationData</code> element of the SAML assertion. </p>
166
+ */
167
+@property (nonatomic, strong) NSString * _Nullable audience;
168
+
169
+/**
170
+ <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p><p><b>Note:</b> The size of the security token that STS APIs return is not fixed. We strongly recommend that you make no assumptions about the maximum size. As of this writing, the typical size is less than 4096 bytes, but that can vary. Also, future updates to AWS might require larger sizes.</p>
171
+ */
172
+@property (nonatomic, strong) AWSSTSCredentials * _Nullable credentials;
173
+
174
+/**
175
+ <p>The value of the <code>Issuer</code> element of the SAML assertion.</p>
176
+ */
177
+@property (nonatomic, strong) NSString * _Nullable issuer;
178
+
179
+/**
180
+ <p>A hash value based on the concatenation of the <code>Issuer</code> response value, the AWS account ID, and the friendly name (the last part of the ARN) of the SAML provider in IAM. The combination of <code>NameQualifier</code> and <code>Subject</code> can be used to uniquely identify a federated user. </p><p>The following pseudocode shows how the hash value is calculated:</p><p><code>BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) )</code></p>
181
+ */
182
+@property (nonatomic, strong) NSString * _Nullable nameQualifier;
183
+
184
+/**
185
+ <p>A percentage value that indicates the size of the policy in packed form. The service rejects any policy with a packed size greater than 100 percent, which means the policy exceeded the allowed space.</p>
186
+ */
187
+@property (nonatomic, strong) NSNumber * _Nullable packedPolicySize;
188
+
189
+/**
190
+ <p>The value of the <code>NameID</code> element in the <code>Subject</code> element of the SAML assertion.</p>
191
+ */
192
+@property (nonatomic, strong) NSString * _Nullable subject;
193
+
194
+/**
195
+ <p> The format of the name ID, as defined by the <code>Format</code> attribute in the <code>NameID</code> element of the SAML assertion. Typical examples of the format are <code>transient</code> or <code>persistent</code>. </p><p> If the format includes the prefix <code>urn:oasis:names:tc:SAML:2.0:nameid-format</code>, that prefix is removed. For example, <code>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</code> is returned as <code>transient</code>. If the format includes any other prefix, the format is returned with no modifications.</p>
196
+ */
197
+@property (nonatomic, strong) NSString * _Nullable subjectType;
198
+
199
+@end
200
+
201
+/**
202
+ 
203
+ */
204
+@interface AWSSTSAssumeRoleWithWebIdentityRequest : AWSRequest
205
+
206
+
207
+/**
208
+ <p>The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. This setting can have a value from 1 hour to 12 hours. If you specify a value higher than this setting, the operation fails. For example, if you specify a session duration of 12 hours, but your administrator set the maximum session duration to 6 hours, your operation fails. To learn how to view the maximum value for your role, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View the Maximum Session Duration Setting for a Role</a> in the <i>IAM User Guide</i>.</p><p>By default, the value is set to 3600 seconds. </p><note><p>The <code>DurationSeconds</code> parameter is separate from the duration of a console session that you might request using the returned credentials. The request to the federation endpoint for a console sign-in token takes a <code>SessionDuration</code> parameter that specifies the maximum length of the console session. For more information, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html">Creating a URL that Enables Federated Users to Access the AWS Management Console</a> in the <i>IAM User Guide</i>.</p></note>
209
+ */
210
+@property (nonatomic, strong) NSNumber * _Nullable durationSeconds;
211
+
212
+/**
213
+ <p>An IAM policy in JSON format.</p><p>The policy parameter is optional. If you pass a policy, the temporary security credentials that are returned by the operation have the permissions that are allowed by both the access policy of the role that is being assumed, <i><b>and</b></i> the policy that you pass. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use the passed policy to grant permissions that are in excess of those allowed by the access policy of the role that is being assumed. For more information, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html">Permissions for AssumeRoleWithWebIdentity</a> in the <i>IAM User Guide</i>. </p><p>The format for this parameter, as described by its regex pattern, is a string of characters up to 2048 characters in length. The characters can be any ASCII character from the space character to the end of the valid character list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.</p><note><p>The policy plain text must be 2048 bytes or shorter. However, an internal conversion compresses it into a packed binary format with a separate limit. The PackedPolicySize response element indicates by percentage how close to the upper size limit the policy is, with 100% equaling the maximum allowed size.</p></note>
214
+ */
215
+@property (nonatomic, strong) NSString * _Nullable policy;
216
+
217
+/**
218
+ <p>The fully qualified host component of the domain name of the identity provider.</p><p>Specify this value only for OAuth 2.0 access tokens. Currently <code>www.amazon.com</code> and <code>graph.facebook.com</code> are the only supported identity providers for OAuth 2.0 access tokens. Do not include URL schemes and port numbers.</p><p>Do not specify this value for OpenID Connect ID tokens.</p>
219
+ */
220
+@property (nonatomic, strong) NSString * _Nullable providerId;
221
+
222
+/**
223
+ <p>The Amazon Resource Name (ARN) of the role that the caller is assuming.</p>
224
+ */
225
+@property (nonatomic, strong) NSString * _Nullable roleArn;
226
+
227
+/**
228
+ <p>An identifier for the assumed role session. Typically, you pass the name or identifier that is associated with the user who is using your application. That way, the temporary security credentials that your application will use are associated with that user. This session name is included as part of the ARN and assumed role ID in the <code>AssumedRoleUser</code> response element.</p><p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
229
+ */
230
+@property (nonatomic, strong) NSString * _Nullable roleSessionName;
231
+
232
+/**
233
+ <p>The OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity provider. Your application must get this token by authenticating the user who is using your application with a web identity provider before the application makes an <code>AssumeRoleWithWebIdentity</code> call. </p>
234
+ */
235
+@property (nonatomic, strong) NSString * _Nullable webIdentityToken;
236
+
237
+@end
238
+
239
+/**
240
+ <p>Contains the response to a successful <a>AssumeRoleWithWebIdentity</a> request, including temporary AWS credentials that can be used to make AWS requests. </p>
241
+ */
242
+@interface AWSSTSAssumeRoleWithWebIdentityResponse : AWSModel
243
+
244
+
245
+/**
246
+ <p>The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you can use to refer to the resulting temporary security credentials. For example, you can reference these credentials as a principal in a resource-based policy by using the ARN or assumed role ID. The ARN and ID include the <code>RoleSessionName</code> that you specified when you called <code>AssumeRole</code>. </p>
247
+ */
248
+@property (nonatomic, strong) AWSSTSAssumedRoleUser * _Nullable assumedRoleUser;
249
+
250
+/**
251
+ <p>The intended audience (also known as client ID) of the web identity token. This is traditionally the client identifier issued to the application that requested the web identity token.</p>
252
+ */
253
+@property (nonatomic, strong) NSString * _Nullable audience;
254
+
255
+/**
256
+ <p>The temporary security credentials, which include an access key ID, a secret access key, and a security token.</p><p><b>Note:</b> The size of the security token that STS APIs return is not fixed. We strongly recommend that you make no assumptions about the maximum size. As of this writing, the typical size is less than 4096 bytes, but that can vary. Also, future updates to AWS might require larger sizes.</p>
257
+ */
258
+@property (nonatomic, strong) AWSSTSCredentials * _Nullable credentials;
259
+
260
+/**
261
+ <p>A percentage value that indicates the size of the policy in packed form. The service rejects any policy with a packed size greater than 100 percent, which means the policy exceeded the allowed space.</p>
262
+ */
263
+@property (nonatomic, strong) NSNumber * _Nullable packedPolicySize;
264
+
265
+/**
266
+ <p> The issuing authority of the web identity token presented. For OpenID Connect ID Tokens this contains the value of the <code>iss</code> field. For OAuth 2.0 access tokens, this contains the value of the <code>ProviderId</code> parameter that was passed in the <code>AssumeRoleWithWebIdentity</code> request.</p>
267
+ */
268
+@property (nonatomic, strong) NSString * _Nullable provider;
269
+
270
+/**
271
+ <p>The unique user identifier that is returned by the identity provider. This identifier is associated with the <code>WebIdentityToken</code> that was submitted with the <code>AssumeRoleWithWebIdentity</code> call. The identifier is typically unique to the user and the application that acquired the <code>WebIdentityToken</code> (pairwise identifier). For OpenID Connect ID tokens, this field contains the value returned by the identity provider as the token's <code>sub</code> (Subject) claim. </p>
272
+ */
273
+@property (nonatomic, strong) NSString * _Nullable subjectFromWebIdentityToken;
274
+
275
+@end
276
+
277
+/**
278
+ <p>The identifiers for the temporary security credentials that the operation returns.</p>
279
+ Required parameters: [AssumedRoleId, Arn]
280
+ */
281
+@interface AWSSTSAssumedRoleUser : AWSModel
282
+
283
+
284
+/**
285
+ <p>The ARN of the temporary security credentials that are returned from the <a>AssumeRole</a> action. For more information about ARNs and how to use them in policies, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html">IAM Identifiers</a> in <i>Using IAM</i>. </p>
286
+ */
287
+@property (nonatomic, strong) NSString * _Nullable arn;
288
+
289
+/**
290
+ <p>A unique identifier that contains the role ID and the role session name of the role that is being assumed. The role ID is generated by AWS when the role is created.</p>
291
+ */
292
+@property (nonatomic, strong) NSString * _Nullable assumedRoleId;
293
+
294
+@end
295
+
296
+/**
297
+ <p>AWS credentials for API authentication.</p>
298
+ Required parameters: [AccessKeyId, SecretAccessKey, SessionToken, Expiration]
299
+ */
300
+@interface AWSSTSCredentials : AWSModel
301
+
302
+
303
+/**
304
+ <p>The access key ID that identifies the temporary security credentials.</p>
305
+ */
306
+@property (nonatomic, strong) NSString * _Nullable accessKeyId;
307
+
308
+/**
309
+ <p>The date on which the current credentials expire.</p>
310
+ */
311
+@property (nonatomic, strong) NSDate * _Nullable expiration;
312
+
313
+/**
314
+ <p>The secret access key that can be used to sign requests.</p>
315
+ */
316
+@property (nonatomic, strong) NSString * _Nullable secretAccessKey;
317
+
318
+/**
319
+ <p>The token that users must pass to the service API to use the temporary credentials.</p>
320
+ */
321
+@property (nonatomic, strong) NSString * _Nullable sessionToken;
322
+
323
+@end
324
+
325
+/**
326
+ 
327
+ */
328
+@interface AWSSTSDecodeAuthorizationMessageRequest : AWSRequest
329
+
330
+
331
+/**
332
+ <p>The encoded message that was returned with the response.</p>
333
+ */
334
+@property (nonatomic, strong) NSString * _Nullable encodedMessage;
335
+
336
+@end
337
+
338
+/**
339
+ <p>A document that contains additional information about the authorization status of a request from an encoded message that is returned in response to an AWS request.</p>
340
+ */
341
+@interface AWSSTSDecodeAuthorizationMessageResponse : AWSModel
342
+
343
+
344
+/**
345
+ <p>An XML document that contains the decoded message.</p>
346
+ */
347
+@property (nonatomic, strong) NSString * _Nullable decodedMessage;
348
+
349
+@end
350
+
351
+/**
352
+ <p>Identifiers for the federated user that is associated with the credentials.</p>
353
+ Required parameters: [FederatedUserId, Arn]
354
+ */
355
+@interface AWSSTSFederatedUser : AWSModel
356
+
357
+
358
+/**
359
+ <p>The ARN that specifies the federated user that is associated with the credentials. For more information about ARNs and how to use them in policies, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html">IAM Identifiers</a> in <i>Using IAM</i>. </p>
360
+ */
361
+@property (nonatomic, strong) NSString * _Nullable arn;
362
+
363
+/**
364
+ <p>The string that identifies the federated user associated with the credentials, similar to the unique ID of an IAM user.</p>
365
+ */
366
+@property (nonatomic, strong) NSString * _Nullable federatedUserId;
367
+
368
+@end
369
+
370
+/**
371
+ 
372
+ */
373
+@interface AWSSTSGetCallerIdentityRequest : AWSRequest
374
+
375
+
376
+@end
377
+
378
+/**
379
+ <p>Contains the response to a successful <a>GetCallerIdentity</a> request, including information about the entity making the request.</p>
380
+ */
381
+@interface AWSSTSGetCallerIdentityResponse : AWSModel
382
+
383
+
384
+/**
385
+ <p>The AWS account ID number of the account that owns or contains the calling entity.</p>
386
+ */
387
+@property (nonatomic, strong) NSString * _Nullable account;
388
+
389
+/**
390
+ <p>The AWS ARN associated with the calling entity.</p>
391
+ */
392
+@property (nonatomic, strong) NSString * _Nullable arn;
393
+
394
+/**
395
+ <p>The unique identifier of the calling entity. The exact value depends on the type of entity making the call. The values returned are those listed in the <b>aws:userid</b> column in the <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable">Principal table</a> found on the <b>Policy Variables</b> reference page in the <i>IAM User Guide</i>.</p>
396
+ */
397
+@property (nonatomic, strong) NSString * _Nullable userId;
398
+
399
+@end
400
+
401
+/**
402
+ 
403
+ */
404
+@interface AWSSTSGetFederationTokenRequest : AWSRequest
405
+
406
+
407
+/**
408
+ <p>The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 900 seconds (15 minutes) to 129600 seconds (36 hours), with 43200 seconds (12 hours) as the default. Sessions obtained using AWS account (root) credentials are restricted to a maximum of 3600 seconds (one hour). If the specified duration is longer than one hour, the session obtained by using AWS account (root) credentials defaults to one hour.</p>
409
+ */
410
+@property (nonatomic, strong) NSNumber * _Nullable durationSeconds;
411
+
412
+/**
413
+ <p>The name of the federated user. The name is used as an identifier for the temporary security credentials (such as <code>Bob</code>). For example, you can reference the federated user name in a resource-based policy, such as in an Amazon S3 bucket policy.</p><p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
414
+ */
415
+@property (nonatomic, strong) NSString * _Nullable name;
416
+
417
+/**
418
+ <p>An IAM policy in JSON format that is passed with the <code>GetFederationToken</code> call and evaluated along with the policy or policies that are attached to the IAM user whose credentials are used to call <code>GetFederationToken</code>. The passed policy is used to scope down the permissions that are available to the IAM user, by allowing only a subset of the permissions that are granted to the IAM user. The passed policy cannot grant more permissions than those granted to the IAM user. The final permissions for the federated user are the most restrictive set based on the intersection of the passed policy and the IAM user policy.</p><p>If you do not pass a policy, the resulting temporary security credentials have no effective permissions. The only exception is when the temporary security credentials are used to access a resource that has a resource-based policy that specifically allows the federated user to access the resource.</p><p>The format for this parameter, as described by its regex pattern, is a string of characters up to 2048 characters in length. The characters can be any ASCII character from the space character to the end of the valid character list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.</p><note><p>The policy plain text must be 2048 bytes or shorter. However, an internal conversion compresses it into a packed binary format with a separate limit. The PackedPolicySize response element indicates by percentage how close to the upper size limit the policy is, with 100% equaling the maximum allowed size.</p></note><p>For more information about how permissions work, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getfederationtoken.html">Permissions for GetFederationToken</a>.</p>
419
+ */
420
+@property (nonatomic, strong) NSString * _Nullable policy;
421
+
422
+@end
423
+
424
+/**
425
+ <p>Contains the response to a successful <a>GetFederationToken</a> request, including temporary AWS credentials that can be used to make AWS requests. </p>
426
+ */
427
+@interface AWSSTSGetFederationTokenResponse : AWSModel
428
+
429
+
430
+/**
431
+ <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p><p><b>Note:</b> The size of the security token that STS APIs return is not fixed. We strongly recommend that you make no assumptions about the maximum size. As of this writing, the typical size is less than 4096 bytes, but that can vary. Also, future updates to AWS might require larger sizes.</p>
432
+ */
433
+@property (nonatomic, strong) AWSSTSCredentials * _Nullable credentials;
434
+
435
+/**
436
+ <p>Identifiers for the federated user associated with the credentials (such as <code>arn:aws:sts::123456789012:federated-user/Bob</code> or <code>123456789012:Bob</code>). You can use the federated user's ARN in your resource-based policies, such as an Amazon S3 bucket policy. </p>
437
+ */
438
+@property (nonatomic, strong) AWSSTSFederatedUser * _Nullable federatedUser;
439
+
440
+/**
441
+ <p>A percentage value indicating the size of the policy in packed form. The service rejects policies for which the packed size is greater than 100 percent of the allowed value.</p>
442
+ */
443
+@property (nonatomic, strong) NSNumber * _Nullable packedPolicySize;
444
+
445
+@end
446
+
447
+/**
448
+ 
449
+ */
450
+@interface AWSSTSGetSessionTokenRequest : AWSRequest
451
+
452
+
453
+/**
454
+ <p>The duration, in seconds, that the credentials should remain valid. Acceptable durations for IAM user sessions range from 900 seconds (15 minutes) to 129600 seconds (36 hours), with 43200 seconds (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600 seconds (one hour). If the duration is longer than one hour, the session for AWS account owners defaults to one hour.</p>
455
+ */
456
+@property (nonatomic, strong) NSNumber * _Nullable durationSeconds;
457
+
458
+/**
459
+ <p>The identification number of the MFA device that is associated with the IAM user who is making the <code>GetSessionToken</code> call. Specify this value if the IAM user has a policy that requires MFA authentication. The value is either the serial number for a hardware device (such as <code>GAHT12345678</code>) or an Amazon Resource Name (ARN) for a virtual device (such as <code>arn:aws:iam::123456789012:mfa/user</code>). You can find the device for an IAM user by going to the AWS Management Console and viewing the user's security credentials. </p><p>The regex used to validated this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-</p>
460
+ */
461
+@property (nonatomic, strong) NSString * _Nullable serialNumber;
462
+
463
+/**
464
+ <p>The value provided by the MFA device, if MFA is required. If any policy requires the IAM user to submit an MFA code, specify this value. If MFA authentication is required, and the user does not provide a code when requesting a set of temporary security credentials, the user will receive an "access denied" response when requesting resources that require MFA authentication.</p><p>The format for this parameter, as described by its regex pattern, is a sequence of six numeric digits.</p>
465
+ */
466
+@property (nonatomic, strong) NSString * _Nullable tokenCode;
467
+
468
+@end
469
+
470
+/**
471
+ <p>Contains the response to a successful <a>GetSessionToken</a> request, including temporary AWS credentials that can be used to make AWS requests. </p>
472
+ */
473
+@interface AWSSTSGetSessionTokenResponse : AWSModel
474
+
475
+
476
+/**
477
+ <p>The temporary security credentials, which include an access key ID, a secret access key, and a security (or session) token.</p><p><b>Note:</b> The size of the security token that STS APIs return is not fixed. We strongly recommend that you make no assumptions about the maximum size. As of this writing, the typical size is less than 4096 bytes, but that can vary. Also, future updates to AWS might require larger sizes.</p>
478
+ */
479
+@property (nonatomic, strong) AWSSTSCredentials * _Nullable credentials;
480
+
481
+@end
482
+
483
+NS_ASSUME_NONNULL_END

+ 24
- 0
AWSCore.framework/Headers/AWSSTSResources.h 查看文件

@@ -0,0 +1,24 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+@interface AWSSTSResources : NSObject
19
+
20
++ (instancetype)sharedInstance;
21
+
22
+- (NSDictionary *)JSONObject;
23
+
24
+@end

+ 351
- 0
AWSCore.framework/Headers/AWSSTSService.h
文件差異過大導致無法顯示
查看文件


+ 171
- 0
AWSCore.framework/Headers/AWSSerialization.h 查看文件

@@ -0,0 +1,171 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+// defined domain for errors from AWSRuntime.
19
+FOUNDATION_EXPORT NSString *const AWSXMLBuilderErrorDomain;
20
+
21
+/* NSError codes in AWSErrorDomain. */
22
+typedef NS_ENUM(NSInteger, AWSXMLBuilderErrorType) {
23
+    // AWSJSON Validation related errors
24
+    AWSXMLBuilderUnknownError = 900, // Unknown Error found
25
+    AWSXMLBuilderDefinitionFileIsEmpty = 901,
26
+    AWSXMLBuilderUndefinedXMLNamespace = 902,
27
+    AWSXMLBuilderUndefinedActionRule = 903,
28
+    AWSXMLBuilderMissingRequiredXMLElements = 904,
29
+    AWSXMLBuilderInvalidXMLValue = 905,
30
+    AWSXMLBuilderUnCatchedRuleTypeInDifinitionFile = 906,
31
+};
32
+
33
+// defined domain for errors from AWSRuntime.
34
+FOUNDATION_EXPORT NSString *const AWSXMLParserErrorDomain;
35
+
36
+/* NSError codes in AWSErrorDomain. */
37
+typedef NS_ENUM(NSInteger, AWSXMLParserErrorType) {
38
+    // AWSJSON Validation related errors
39
+    AWSXMLParserUnknownError, // Unknown Error found
40
+    AWSXMLParserNoTypeDefinitionInRule, // Unknown Type in JSON Definition (rules) file
41
+    AWSXMLParserUnHandledType, //Unhandled Type
42
+    AWSXMLParserUnExpectedType, //Unexpected type
43
+    AWSXMLParserDefinitionFileIsEmpty, //the rule is empty.
44
+    AWSXMLParserUnexpectedXMLElement,
45
+    AWSXMLParserXMLNameNotFoundInDefinition, //can not find the 'xmlname' key in definition file for unflattened xml list
46
+    AWSXMLParserMissingRequiredXMLElements,
47
+    AWSXMLParserInvalidXMLValue,
48
+};
49
+
50
+//defined domain for errors from AWSRuntime.
51
+FOUNDATION_EXPORT NSString *const AWSQueryParamBuilderErrorDomain;
52
+
53
+/* NSError codes in AWSErrorDomain. */
54
+typedef NS_ENUM(NSInteger, AWSQueryParamBuilderErrorType) {
55
+    AWSQueryParamBuilderUnknownError,
56
+    AWSQueryParamBuilderDefinitionFileIsEmpty,
57
+    AWSQueryParamBuilderUndefinedActionRule,
58
+    AWSQueryParamBuilderInternalError,
59
+    AWSQueryParamBuilderInvalidParameter,
60
+};
61
+
62
+//defined domain for errors from AWSRuntime.
63
+FOUNDATION_EXPORT NSString *const AWSEC2ParamBuilderErrorDomain;
64
+
65
+/* NSError codes in AWSErrorDomain. */
66
+typedef NS_ENUM(NSInteger, AWSEC2ParamBuilderErrorType) {
67
+    AWSEC2ParamBuilderUnknownError,
68
+    AWSEC2ParamBuilderDefinitionFileIsEmpty,
69
+    AWSEC2ParamBuilderUndefinedActionRule,
70
+    AWSEC2ParamBuilderInternalError,
71
+    AWSEC2ParamBuilderInvalidParameter,
72
+};
73
+
74
+//defined domain for errors from AWSRuntime.
75
+FOUNDATION_EXPORT NSString *const AWSJSONBuilderErrorDomain;
76
+
77
+/* NSError codes in AWSErrorDomain. */
78
+typedef NS_ENUM(NSInteger, AWSJSONBuilderErrorType) {
79
+    AWSJSONBuilderUnknownError,
80
+    AWSJSONBuilderDefinitionFileIsEmpty,
81
+    AWSJSONBuilderUndefinedActionRule,
82
+    AWSJSONBuilderInternalError,
83
+    AWSJSONBuilderInvalidParameter,
84
+};
85
+
86
+//defined domain for errors from AWSRuntime.
87
+FOUNDATION_EXPORT NSString *const AWSJSONParserErrorDomain;
88
+
89
+/* NSError codes in AWSErrorDomain. */
90
+typedef NS_ENUM(NSInteger, AWSJSONParserErrorType) {
91
+    AWSJSONParserUnknownError,
92
+    AWSJSONParserDefinitionFileIsEmpty,
93
+    AWSJSONParserUndefinedActionRule,
94
+    AWSJSONParserInternalError,
95
+    AWSJSONParserInvalidParameter,
96
+};
97
+
98
+@interface AWSJSONDictionary : NSDictionary
99
+
100
+- (instancetype)initWithDictionary:(NSDictionary *)otherDictionary
101
+                JSONDefinitionRule:(NSDictionary *)rule;
102
+- (NSUInteger)count;
103
+- (id)objectForKey:(id)aKey;
104
+
105
+@end
106
+
107
+@interface AWSXMLBuilder : NSObject
108
+
109
++ (NSData *)xmlDataForDictionary:(NSDictionary *)params
110
+                      actionName:(NSString *)actionName
111
+           serviceDefinitionRule:(NSDictionary *)serviceDefinitionRule
112
+                           error:(NSError *__autoreleasing *)error;
113
+
114
++ (NSString *)xmlStringForDictionary:(NSDictionary *)params
115
+                          actionName:(NSString *)actionName
116
+               serviceDefinitionRule:(NSDictionary *)serviceDefinitionRule
117
+                               error:(NSError *__autoreleasing *)error;
118
+
119
+@end
120
+
121
+@interface AWSXMLParser : NSObject
122
+
123
++ (AWSXMLParser *)sharedInstance;
124
+
125
+- (NSMutableDictionary *)dictionaryForXMLData:(NSData *)data
126
+                                   actionName:(NSString *)actionName
127
+                        serviceDefinitionRule:(NSDictionary *)serviceDefinitionRule
128
+                                        error:(NSError *__autoreleasing *)error;
129
+
130
+@end
131
+
132
+@interface AWSQueryParamBuilder : NSObject
133
+
134
++ (NSDictionary *)buildFormattedParams:(NSDictionary *)params
135
+                            actionName:(NSString *)actionName
136
+                 serviceDefinitionRule:(NSDictionary *)serviceDefinitionRule
137
+                                 error:(NSError *__autoreleasing *)error;
138
+
139
+@end
140
+
141
+@interface AWSEC2ParamBuilder : NSObject
142
+
143
++ (NSDictionary *)buildFormattedParams:(NSDictionary *)params
144
+                            actionName:(NSString *)actionName
145
+                 serviceDefinitionRule:(NSDictionary *)serviceDefinitionRule
146
+                                 error:(NSError *__autoreleasing *)error;
147
+
148
+@end
149
+
150
+@interface AWSJSONBuilder : NSObject
151
+
152
++ (NSData *)jsonDataForDictionary:(NSDictionary *)params
153
+                       actionName:(NSString *)actionName
154
+            serviceDefinitionRule:(NSDictionary *)serviceDefinitionRule
155
+                            error:(NSError *__autoreleasing *)error;
156
+
157
+@end
158
+
159
+@interface AWSJSONParser : NSObject
160
+
161
++ (NSDictionary *)dictionaryForJsonData:(NSData *)data
162
+                               response:(NSHTTPURLResponse *)response
163
+                             actionName:(NSString *)actionName
164
+                  serviceDefinitionRule:(NSDictionary *)serviceDefinitionRule
165
+                                  error:(NSError *__autoreleasing *)error;
166
+
167
+@end
168
+
169
+
170
+
171
+

+ 142
- 0
AWSCore.framework/Headers/AWSService.h 查看文件

@@ -0,0 +1,142 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import "AWSNetworking.h"
18
+#import "AWSCredentialsProvider.h"
19
+#import "AWSServiceEnum.h"
20
+
21
+//! SDK version for AWS Core
22
+FOUNDATION_EXPORT NSString *const AWSiOSSDKVersion;
23
+
24
+FOUNDATION_EXPORT NSString *const AWSServiceErrorDomain;
25
+
26
+typedef NS_ENUM(NSInteger, AWSServiceErrorType) {
27
+    AWSServiceErrorUnknown,
28
+    AWSServiceErrorRequestTimeTooSkewed,
29
+    AWSServiceErrorInvalidSignatureException,
30
+    AWSServiceErrorSignatureDoesNotMatch,
31
+    AWSServiceErrorRequestExpired,
32
+    AWSServiceErrorAuthFailure,
33
+    AWSServiceErrorAccessDeniedException,
34
+    AWSServiceErrorUnrecognizedClientException,
35
+    AWSServiceErrorIncompleteSignature,
36
+    AWSServiceErrorInvalidClientTokenId,
37
+    AWSServiceErrorMissingAuthenticationToken,
38
+    AWSServiceErrorAccessDenied,
39
+    AWSServiceErrorExpiredToken,
40
+    AWSServiceErrorInvalidAccessKeyId,
41
+    AWSServiceErrorInvalidToken,
42
+    AWSServiceErrorTokenRefreshRequired,
43
+    AWSServiceErrorAccessFailure,
44
+    AWSServiceErrorAuthMissingFailure,
45
+    AWSServiceErrorThrottling,
46
+    AWSServiceErrorThrottlingException,
47
+};
48
+
49
+@class AWSEndpoint;
50
+
51
+#pragma mark - AWSService
52
+
53
+/**
54
+ An abstract representation of AWS services.
55
+ */
56
+@interface AWSService : NSObject
57
+
58
++ (NSDictionary<NSString *, NSNumber *> *)errorCodeDictionary;
59
+
60
+@end
61
+
62
+#pragma mark - AWSServiceManager
63
+
64
+@class AWSServiceConfiguration;
65
+
66
+/**
67
+ The service manager class that manages the default service configuration.
68
+ */
69
+@interface AWSServiceManager : NSObject
70
+
71
+/**
72
+ The default service configuration object. This property can be set only once, and any subsequent setters are ignored.
73
+ */
74
+@property (nonatomic, copy) AWSServiceConfiguration *defaultServiceConfiguration;
75
+
76
+/**
77
+ Returns a default singleton object. You should use this singleton method instead of creating an instance of the service manager.
78
+
79
+ @return The default service manager. This is a singleton object.
80
+ */
81
++ (instancetype)defaultServiceManager;
82
+
83
+@end
84
+
85
+#pragma mark - AWSServiceConfiguration
86
+
87
+/**
88
+ A service configuration object.
89
+ */
90
+@interface AWSServiceConfiguration : AWSNetworkingConfiguration
91
+
92
+@property (nonatomic, assign, readonly) AWSRegionType regionType;
93
+@property (nonatomic, strong, readonly) id<AWSCredentialsProvider> credentialsProvider;
94
+@property (nonatomic, strong, readonly) AWSEndpoint *endpoint;
95
+@property (nonatomic, readonly) NSString *userAgent;
96
+
97
++ (NSString *)baseUserAgent;
98
+
99
++ (void)addGlobalUserAgentProductToken:(NSString *)productToken;
100
+
101
+- (instancetype)initWithRegion:(AWSRegionType)regionType
102
+           credentialsProvider:(id<AWSCredentialsProvider>)credentialsProvider;
103
+
104
+- (instancetype)initWithRegion:(AWSRegionType)regionType
105
+                      endpoint:(AWSEndpoint *)endpoint
106
+           credentialsProvider:(id<AWSCredentialsProvider>)credentialsProvider;
107
+
108
+- (void)addUserAgentProductToken:(NSString *)productToken;
109
+
110
+@end
111
+
112
+#pragma mark - AWSEndpoint
113
+
114
+@interface AWSEndpoint : NSObject
115
+
116
+@property (nonatomic, readonly) AWSRegionType regionType;
117
+@property (nonatomic, readonly) NSString *regionName;
118
+@property (nonatomic, readonly) AWSServiceType serviceType;
119
+@property (nonatomic, readonly) NSString *serviceName;
120
+@property (nonatomic, readonly) NSURL *URL;
121
+@property (nonatomic, readonly) NSString *hostName;
122
+@property (nonatomic, readonly) BOOL useUnsafeURL;
123
+
124
++ (NSString *)regionNameFromType:(AWSRegionType)regionType;
125
+
126
+- (instancetype)initWithRegion:(AWSRegionType)regionType
127
+                       service:(AWSServiceType)serviceType
128
+                  useUnsafeURL:(BOOL)useUnsafeURL;
129
+
130
+- (instancetype)initWithRegion:(AWSRegionType)regionType
131
+                       service:(AWSServiceType)serviceType
132
+                           URL:(NSURL *)URL;
133
+
134
+- (instancetype)initWithRegion:(AWSRegionType)regionType
135
+                   serviceName:(NSString *)serviceName
136
+                           URL:(NSURL *)URL;
137
+
138
+- (instancetype)initWithURL:(NSURL *)URL;
139
+
140
+- (instancetype)initWithURLString:(NSString *)URLString;
141
+
142
+@end

+ 258
- 0
AWSCore.framework/Headers/AWSServiceEnum.h 查看文件

@@ -0,0 +1,258 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#ifndef AWSiOSSDK_AWSServiceEnum_h
17
+#define AWSiOSSDK_AWSServiceEnum_h
18
+
19
+/**
20
+ *  Enums for AWS regions.
21
+ *
22
+ *  For information about which regions are supported for each service, see the linked website:
23
+ *  http://docs.aws.amazon.com/general/latest/gr/rande.html
24
+ */
25
+typedef NS_ENUM(NSInteger, AWSRegionType) {
26
+    /**
27
+     *  Unknown Region
28
+     */
29
+    AWSRegionUnknown NS_SWIFT_NAME(Unknown),
30
+    /**
31
+     *  US East (N. Virginia)
32
+     */
33
+    AWSRegionUSEast1 NS_SWIFT_NAME(USEast1),
34
+    /**
35
+     *  US East (Ohio)
36
+     */
37
+    AWSRegionUSEast2 NS_SWIFT_NAME(USEast2),
38
+    /**
39
+     *  US West (N. California)
40
+     */
41
+    AWSRegionUSWest1 NS_SWIFT_NAME(USWest1),
42
+    /**
43
+     *  US West (Oregon)
44
+     */
45
+    AWSRegionUSWest2 NS_SWIFT_NAME(USWest2),
46
+    /**
47
+     *  EU (Ireland)
48
+     */
49
+    AWSRegionEUWest1 NS_SWIFT_NAME(EUWest1),
50
+    /**
51
+     *  EU (London)
52
+     */
53
+    AWSRegionEUWest2 NS_SWIFT_NAME(EUWest2),
54
+    /**
55
+     *  EU (Frankfurt)
56
+     */
57
+    AWSRegionEUCentral1 NS_SWIFT_NAME(EUCentral1),
58
+    /**
59
+     *  Asia Pacific (Singapore)
60
+     */
61
+    AWSRegionAPSoutheast1 NS_SWIFT_NAME(APSoutheast1),
62
+    /**
63
+     *  Asia Pacific (Tokyo)
64
+     */
65
+    AWSRegionAPNortheast1 NS_SWIFT_NAME(APNortheast1),
66
+    /**
67
+     *  Asia Pacific (Seoul)
68
+     */
69
+    AWSRegionAPNortheast2 NS_SWIFT_NAME(APNortheast2),
70
+    /**
71
+     *  Asia Pacific (Sydney)
72
+     */
73
+    AWSRegionAPSoutheast2 NS_SWIFT_NAME(APSoutheast2),
74
+    /**
75
+     *  Asia Pacific (Mumbai)
76
+     */
77
+    AWSRegionAPSouth1 NS_SWIFT_NAME(APSouth1),
78
+    /**
79
+     *  South America (Sao Paulo)
80
+     */
81
+    AWSRegionSAEast1 NS_SWIFT_NAME(SAEast1),
82
+    /**
83
+     *  China (Beijing)
84
+     */
85
+    AWSRegionCNNorth1 NS_SWIFT_NAME(CNNorth1),
86
+    /**
87
+     *  Canada (Central)
88
+     */
89
+    AWSRegionCACentral1 NS_SWIFT_NAME(CACentral1),
90
+    /**
91
+     *  AWS GovCloud (US West)
92
+     */
93
+    AWSRegionUSGovWest1 NS_SWIFT_NAME(USGovWest1),
94
+    /**
95
+     *  China (Ningxia)
96
+     */
97
+    AWSRegionCNNorthWest1 NS_SWIFT_NAME(CNNorthWest1),
98
+    /**
99
+     *  EU (Paris)
100
+     */
101
+    AWSRegionEUWest3 NS_SWIFT_NAME(EUWest3),
102
+    /**
103
+     *  AWS GovCloud (US East)
104
+     */
105
+    AWSRegionUSGovEast1 NS_SWIFT_NAME(USGovEast1),
106
+    /**
107
+     *  EU (Stockholm)
108
+     */
109
+    AWSRegionEUNorth1 NS_SWIFT_NAME(EUNorth1),
110
+};
111
+
112
+/**
113
+ *  Enums for AWS services.
114
+ *
115
+ *  For information about which regions are supported for each service, see the linked website:
116
+ *  http://docs.aws.amazon.com/general/latest/gr/rande.html
117
+ */
118
+typedef NS_ENUM(NSInteger, AWSServiceType) {
119
+    /**
120
+     *  Unknown service
121
+     */
122
+    AWSServiceUnknown NS_SWIFT_NAME(Unknown),
123
+    /**
124
+     *  Amazon API Gateway
125
+     */
126
+    AWSServiceAPIGateway NS_SWIFT_NAME(APIGateway),
127
+    /**
128
+     *  Auto Scaling
129
+     */
130
+    AWSServiceAutoScaling NS_SWIFT_NAME(AutoScaling),
131
+    /**
132
+     *  Amazon CloudWatch
133
+     */
134
+    AWSServiceCloudWatch NS_SWIFT_NAME(CloudWatch),
135
+    /**
136
+     *  Amazon Cognito Identity
137
+     */
138
+    AWSServiceCognitoIdentity NS_SWIFT_NAME(CognitoIdentity),
139
+    /**
140
+     *  Amazon Cognito Identity Provider
141
+     */
142
+    AWSServiceCognitoIdentityProvider NS_SWIFT_NAME(CognitoIdentityProvider),
143
+    /**
144
+     *  Amazon Cognito Sync
145
+     */
146
+    AWSServiceCognitoSync NS_SWIFT_NAME(CognitoSync),
147
+    /**
148
+     *  Amazon DynamoDB
149
+     */
150
+    AWSServiceDynamoDB NS_SWIFT_NAME(DynamoDB),
151
+    /**
152
+     *  Amazon Elastic Compute Cloud (EC2)
153
+     */
154
+    AWSServiceEC2 NS_SWIFT_NAME(EC2),
155
+    /**
156
+     *  Elastic Load Balancing
157
+     */
158
+    AWSServiceElasticLoadBalancing NS_SWIFT_NAME(ElasticLoadBalancing),
159
+    /**
160
+     *  AWS IoT
161
+     */
162
+    AWSServiceIoT NS_SWIFT_NAME(IoT),
163
+    /**
164
+     *  AWS IoT Data
165
+     */
166
+    AWSServiceIoTData NS_SWIFT_NAME(IoTData),
167
+    /**
168
+     *  Amazon Kinesis Firehose
169
+     */
170
+    AWSServiceFirehose NS_SWIFT_NAME(Firehose),
171
+    /**
172
+     *  Amazon Kinesis
173
+     */
174
+    AWSServiceKinesis NS_SWIFT_NAME(Kinesis),
175
+    /**
176
+     *  AWS Key Management Service (KMS)
177
+     */
178
+    AWSServiceKMS NS_SWIFT_NAME(KMS),
179
+    /**
180
+     *  AWS Lambda
181
+     */
182
+    AWSServiceLambda NS_SWIFT_NAME(Lambda),
183
+    /**
184
+     *  Amazon Lex Runtime Service
185
+     */
186
+    AWSServiceLexRuntime NS_SWIFT_NAME(LexRuntime),
187
+    /**
188
+     *  Amazon Cloudwatch logs
189
+     */
190
+    AWSServiceLogs NS_SWIFT_NAME(Logs),
191
+    /**
192
+     *  Amazon Machine Learning
193
+     */
194
+    AWSServiceMachineLearning NS_SWIFT_NAME(MachineLearning),
195
+    /**
196
+     *  Amazon Mobile Analytics
197
+     */
198
+    AWSServiceMobileAnalytics NS_SWIFT_NAME(MobileAnalytics),
199
+    /**
200
+     *  Amazon Mobile Targeting
201
+     */
202
+    AWSServiceMobileTargeting NS_SWIFT_NAME(MobileTargeting),
203
+    /**
204
+     *  Amazon Polly
205
+     */
206
+    AWSServicePolly NS_SWIFT_NAME(Polly),
207
+    /**
208
+     *  Amazon Rekognition
209
+     */
210
+    AWSServiceRekognition NS_SWIFT_NAME(Rekognition),
211
+    /**
212
+     *  Amazon Simple Storage Service (S3)
213
+     */
214
+    AWSServiceS3 NS_SWIFT_NAME(S3),
215
+    /**
216
+     *  Amazon Simple Email Service (SES)
217
+     */
218
+    AWSServiceSES NS_SWIFT_NAME(SES),
219
+    /**
220
+     *  Amazon SimpleDB
221
+     */
222
+    AWSServiceSimpleDB NS_SWIFT_NAME(SimpleDB),
223
+    /**
224
+     *  Amazon Simple Notification Service (SNS)
225
+     */
226
+    AWSServiceSNS NS_SWIFT_NAME(SNS),
227
+    /**
228
+     *  Amazon Simple Queue Service (SQS)
229
+     */
230
+    AWSServiceSQS NS_SWIFT_NAME(SQS),
231
+    /**
232
+     *  AWS Security Token Service (STS)
233
+     */
234
+    AWSServiceSTS NS_SWIFT_NAME(STS),
235
+    /**
236
+     *  Amazon Transcribe
237
+     */
238
+    AWSServiceTranscribe NS_SWIFT_NAME(Transcribe),
239
+    /**
240
+     *  Amazon Translate
241
+     */
242
+    AWSServiceTranslate NS_SWIFT_NAME(Translate),
243
+    /**
244
+     *  Amazon Comprehend
245
+     */
246
+    AWSServiceComprehend NS_SWIFT_NAME(Comprehend),
247
+    /**
248
+     *  Amazon Kinesis Video
249
+     */
250
+    AWSServiceKinesisVideo NS_SWIFT_NAME(KinesisVideo),
251
+    /**
252
+     *  Amazon Kinesis Video Archived Media
253
+     */
254
+    AWSServiceKinesisVideoArchivedMedia NS_SWIFT_NAME(KinesisVideoArchivedMedia),
255
+    
256
+};
257
+
258
+#endif

+ 101
- 0
AWSCore.framework/Headers/AWSSignature.h 查看文件

@@ -0,0 +1,101 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import "AWSNetworking.h"
18
+
19
+FOUNDATION_EXPORT NSString *const AWSSignatureV4Algorithm;
20
+FOUNDATION_EXPORT NSString *const AWSSignatureV4Terminator;
21
+
22
+@class AWSEndpoint;
23
+
24
+@protocol AWSCredentialsProvider;
25
+
26
+@interface AWSSignatureSignerUtility : NSObject
27
+
28
++ (NSData *)sha256HMacWithData:(NSData *)data withKey:(NSData *)key;
29
++ (NSString *)hashString:(NSString *)stringToHash;
30
++ (NSData *)hash:(NSData *)dataToHash;
31
++ (NSString *)hexEncode:(NSString *)string;
32
++ (NSString *)HMACSign:(NSData *)data withKey:(NSString *)key usingAlgorithm:(uint32_t)algorithm;
33
+
34
+@end
35
+
36
+@interface AWSSignatureV4Signer : NSObject <AWSNetworkingRequestInterceptor>
37
+
38
+@property (nonatomic, strong, readonly) id<AWSCredentialsProvider> credentialsProvider;
39
+
40
+- (instancetype)initWithCredentialsProvider:(id<AWSCredentialsProvider>)credentialsProvider
41
+                                   endpoint:(AWSEndpoint *)endpoint;
42
+
43
++ (AWSTask<NSURL *> *)generateQueryStringForSignatureV4WithCredentialProvider:(id<AWSCredentialsProvider>)credentialsProvider
44
+                                                                   httpMethod:(AWSHTTPMethod)httpMethod
45
+                                                               expireDuration:(int32_t)expireDuration
46
+                                                                     endpoint:(AWSEndpoint *)endpoint
47
+                                                                      keyPath:(NSString *)keyPath
48
+                                                               requestHeaders:(NSDictionary<NSString *, NSString *> *)requestHeaders
49
+                                                            requestParameters:(NSDictionary<NSString *, id> *)requestParameters
50
+                                                                     signBody:(BOOL)signBody;
51
+
52
++ (NSString *)getCanonicalizedRequest:(NSString *)method
53
+                                 path:(NSString *)path
54
+                                query:(NSString *)query
55
+                              headers:(NSDictionary *)headers
56
+                        contentSha256:(NSString *)contentSha256;
57
+
58
++ (NSData *)getV4DerivedKey:(NSString *)secret
59
+                       date:(NSString *)dateStamp
60
+                     region:(NSString *)regionName
61
+                    service:(NSString *)serviceName;
62
+
63
++ (NSString *)getSignedHeadersString:(NSDictionary *)headers;
64
+
65
+@end
66
+
67
+@interface AWSSignatureV2Signer : NSObject <AWSNetworkingRequestInterceptor>
68
+
69
+@property (nonatomic, strong, readonly) id<AWSCredentialsProvider> credentialsProvider;
70
+
71
++ (instancetype)signerWithCredentialsProvider:(id<AWSCredentialsProvider>)credentialsProvider
72
+                                     endpoint:(AWSEndpoint *)endpoint;
73
+
74
+- (instancetype)initWithCredentialsProvider:(id<AWSCredentialsProvider>)credentialsProvider
75
+                                   endpoint:(AWSEndpoint *)endpoint;
76
+
77
+@end
78
+
79
+/**
80
+ * A subclass of NSInputStream that wraps an input stream and adds
81
+ * signature of chunk data.
82
+ **/
83
+@interface AWSS3ChunkedEncodingInputStream : NSInputStream <NSStreamDelegate>
84
+
85
+@property (atomic, assign) int64_t totalLengthOfChunkSignatureSent;
86
+/**
87
+ * Initialize the input stream with date, scope, signing key and signature
88
+ * of request headers.
89
+ **/
90
+- (instancetype)initWithInputStream:(NSInputStream *)stream
91
+                               date:(NSDate *)date
92
+                              scope:(NSString *)scope
93
+                           kSigning:(NSData *)kSigning
94
+                    headerSignature:(NSString *)headerSignature;
95
+
96
+/**
97
+ * Computes new content length after data being chunked encoded.
98
+ **/
99
++ (NSUInteger)computeContentLengthForChunkedData:(NSUInteger)dataLength;
100
+
101
+@end

+ 26
- 0
AWSCore.framework/Headers/AWSSynchronizedMutableDictionary.h 查看文件

@@ -0,0 +1,26 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+@interface AWSSynchronizedMutableDictionary : NSObject
19
+
20
+- (id)objectForKey:(id)aKey;
21
+- (void)removeObjectForKey:(id)aKey;
22
+- (void)removeObject:(id)object;
23
+- (void)setObject:(id)anObject forKey:(id <NSCopying>)aKey;
24
+- (NSArray *)allKeys;
25
+
26
+@end

+ 177
- 0
AWSCore.framework/Headers/AWSTMCache.h 查看文件

@@ -0,0 +1,177 @@
1
+/**
2
+ `TMCache` is a thread safe key/value store designed for persisting temporary objects that are expensive to
3
+ reproduce, such as downloaded data or the results of slow processing. It is comprised of two self-similar
4
+ stores, one in memory (<TMMemoryCache>) and one on disk (<TMDiskCache>).
5
+ 
6
+ `TMCache` itself actually does very little; its main function is providing a front end for a common use case:
7
+ a small, fast memory cache that asynchronously persists itself to a large, slow disk cache. When objects are
8
+ removed from the memory cache in response to an "apocalyptic" event they remain in the disk cache and are
9
+ repopulated in memory the next time they are accessed. `TMCache` also does the tedious work of creating a
10
+ dispatch group to wait for both caches to finish their operations without blocking each other.
11
+ 
12
+ The parallel caches are accessible as public properties (<memoryCache> and <diskCache>) and can be manipulated
13
+ separately if necessary. See the docs for <TMMemoryCache> and <TMDiskCache> for more details.
14
+ */
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+#import "AWSTMDiskCache.h"
19
+#import "AWSTMMemoryCache.h"
20
+
21
+@class AWSTMCache;
22
+
23
+typedef void (^AWSTMCacheBlock)(AWSTMCache *cache);
24
+typedef void (^AWSTMCacheObjectBlock)(AWSTMCache *cache, NSString *key, id object);
25
+
26
+@interface AWSTMCache : NSObject
27
+
28
+#pragma mark -
29
+/// @name Core
30
+
31
+/**
32
+ The name of this cache, used to create the <diskCache> and also appearing in stack traces.
33
+ */
34
+@property (readonly) NSString *name;
35
+
36
+/**
37
+ A concurrent queue on which blocks passed to the asynchronous access methods are run.
38
+ */
39
+@property (readonly) dispatch_queue_t queue;
40
+
41
+/**
42
+ Synchronously retrieves the total byte count of the <diskCache> on the shared disk queue.
43
+ */
44
+@property (readonly) NSUInteger diskByteCount;
45
+
46
+/**
47
+ The underlying disk cache, see <TMDiskCache> for additional configuration and trimming options.
48
+ */
49
+@property (readonly) AWSTMDiskCache *diskCache;
50
+
51
+/**
52
+ The underlying memory cache, see <TMMemoryCache> for additional configuration and trimming options.
53
+ */
54
+@property (readonly) AWSTMMemoryCache *memoryCache;
55
+
56
+#pragma mark -
57
+/// @name Initialization
58
+
59
+/**
60
+ A shared cache.
61
+ 
62
+ @result The shared singleton cache instance.
63
+ */
64
++ (instancetype)sharedCache;
65
+
66
+/**
67
+ Multiple instances with the same name are allowed and can safely access
68
+ the same data on disk thanks to the magic of seriality. Also used to create the <diskCache>.
69
+ 
70
+ @see name
71
+ @param name The name of the cache.
72
+ @result A new cache with the specified name.
73
+ */
74
+- (instancetype)initWithName:(NSString *)name;
75
+
76
+/**
77
+ The designated initializer. Multiple instances with the same name are allowed and can safely access
78
+ the same data on disk thanks to the magic of seriality. Also used to create the <diskCache>.
79
+ 
80
+ @see name
81
+ @param name The name of the cache.
82
+ @param rootPath The path of the cache on disk.
83
+ @result A new cache with the specified name.
84
+ */
85
+- (instancetype)initWithName:(NSString *)name rootPath:(NSString *)rootPath;
86
+
87
+#pragma mark -
88
+/// @name Asynchronous Methods
89
+
90
+/**
91
+ Retrieves the object for the specified key. This method returns immediately and executes the passed
92
+ block after the object is available, potentially in parallel with other blocks on the <queue>.
93
+ 
94
+ @param key The key associated with the requested object.
95
+ @param block A block to be executed concurrently when the object is available.
96
+ */
97
+- (void)objectForKey:(NSString *)key block:(AWSTMCacheObjectBlock)block;
98
+
99
+/**
100
+ Stores an object in the cache for the specified key. This method returns immediately and executes the
101
+ passed block after the object has been stored, potentially in parallel with other blocks on the <queue>.
102
+ 
103
+ @param object An object to store in the cache.
104
+ @param key A key to associate with the object. This string will be copied.
105
+ @param block A block to be executed concurrently after the object has been stored, or nil.
106
+ */
107
+- (void)setObject:(id <NSCoding>)object forKey:(NSString *)key block:(AWSTMCacheObjectBlock)block;
108
+
109
+/**
110
+ Removes the object for the specified key. This method returns immediately and executes the passed
111
+ block after the object has been removed, potentially in parallel with other blocks on the <queue>.
112
+ 
113
+ @param key The key associated with the object to be removed.
114
+ @param block A block to be executed concurrently after the object has been removed, or nil.
115
+ */
116
+- (void)removeObjectForKey:(NSString *)key block:(AWSTMCacheObjectBlock)block;
117
+
118
+/**
119
+ Removes all objects from the cache that have not been used since the specified date. This method returns immediately and
120
+ executes the passed block after the cache has been trimmed, potentially in parallel with other blocks on the <queue>.
121
+ 
122
+ @param date Objects that haven't been accessed since this date are removed from the cache.
123
+ @param block A block to be executed concurrently after the cache has been trimmed, or nil.
124
+ */
125
+- (void)trimToDate:(NSDate *)date block:(AWSTMCacheBlock)block;
126
+
127
+/**
128
+ Removes all objects from the cache.This method returns immediately and executes the passed block after the
129
+ cache has been cleared, potentially in parallel with other blocks on the <queue>.
130
+ 
131
+ @param block A block to be executed concurrently after the cache has been cleared, or nil.
132
+ */
133
+- (void)removeAllObjects:(AWSTMCacheBlock)block;
134
+
135
+#pragma mark -
136
+/// @name Synchronous Methods
137
+
138
+/**
139
+ Retrieves the object for the specified key. This method blocks the calling thread until the object is available.
140
+ 
141
+ @see objectForKey:block:
142
+ @param key The key associated with the object.
143
+ @result The object for the specified key.
144
+ */
145
+- (id)objectForKey:(NSString *)key;
146
+
147
+/**
148
+ Stores an object in the cache for the specified key. This method blocks the calling thread until the object has been set.
149
+ 
150
+ @see setObject:forKey:block:
151
+ @param object An object to store in the cache.
152
+ @param key A key to associate with the object. This string will be copied.
153
+ */
154
+- (void)setObject:(id <NSCoding>)object forKey:(NSString *)key;
155
+
156
+/**
157
+ Removes the object for the specified key. This method blocks the calling thread until the object
158
+ has been removed.
159
+ 
160
+ @param key The key associated with the object to be removed.
161
+ */
162
+- (void)removeObjectForKey:(NSString *)key;
163
+
164
+/**
165
+ Removes all objects from the cache that have not been used since the specified date.
166
+ This method blocks the calling thread until the cache has been trimmed.
167
+ 
168
+ @param date Objects that haven't been accessed since this date are removed from the cache.
169
+ */
170
+- (void)trimToDate:(NSDate *)date;
171
+
172
+/**
173
+ Removes all objects from the cache. This method blocks the calling thread until the cache has been cleared.
174
+ */
175
+- (void)removeAllObjects;
176
+
177
+@end

+ 350
- 0
AWSCore.framework/Headers/AWSTMDiskCache.h 查看文件

@@ -0,0 +1,350 @@
1
+/**
2
+ `TMDiskCache` is a thread safe key/value store backed by the file system. It accepts any object conforming
3
+ to the `NSCoding` protocol, which includes the basic Foundation data types and collection classes and also
4
+ many UIKit classes, notably `UIImage`. All work is performed on a serial queue shared by all instances in
5
+ the app, and archiving is handled by `NSKeyedArchiver`. This is a particular advantage for `UIImage` because
6
+ it skips `UIImagePNGRepresentation()` and retains information like scale and orientation.
7
+ 
8
+ The designated initializer for `TMDiskCache` is <initWithName:>. The <name> string is used to create a directory
9
+ under Library/Caches that scopes disk access for any instance sharing this name. Multiple instances with the
10
+ same name are allowed because all disk access is serialized on the <sharedQueue>. The <name> also appears in
11
+ stack traces and return value for `description:`.
12
+ 
13
+ Unless otherwise noted, all properties and methods are safe to access from any thread at any time. All blocks
14
+ will cause the queue to wait, making it safe to access and manipulate the actual cache files on disk for the
15
+ duration of the block. In addition, the <sharedQueue> can be set to target an existing serial I/O queue, should
16
+ your app already have one.
17
+ 
18
+ Because this cache is bound by disk I/O it can be much slower than <TMMemoryCache>, although values stored in
19
+ `TMDiskCache` persist after application relaunch. Using <TMCache> is recommended over using `TMDiskCache`
20
+ by itself, as it adds a fast layer of additional memory caching while still writing to disk.
21
+
22
+ All access to the cache is dated so the that the least-used objects can be trimmed first. Setting an optional
23
+ <ageLimit> will trigger a GCD timer to periodically to trim the cache with <trimToDate:>.
24
+ */
25
+
26
+#import <Foundation/Foundation.h>
27
+
28
+@class AWSTMDiskCache;
29
+@protocol AWSTMCacheBackgroundTaskManager;
30
+
31
+typedef void (^AWSTMDiskCacheBlock)(AWSTMDiskCache *cache);
32
+typedef void (^AWSTMDiskCacheObjectBlock)(AWSTMDiskCache *cache, NSString *key, id <NSCoding> object, NSURL *fileURL);
33
+
34
+@interface AWSTMDiskCache : NSObject
35
+
36
+#pragma mark -
37
+/// @name Core
38
+
39
+/**
40
+ The name of this cache, used to create a directory under Library/Caches and also appearing in stack traces.
41
+ */
42
+@property (readonly) NSString *name;
43
+
44
+/**
45
+ The URL of the directory used by this cache, usually `Library/Caches/com.tumblr.TMDiskCache.(name)`
46
+ 
47
+ @warning Do not interact with files under this URL except on the <sharedQueue>.
48
+ */
49
+@property (readonly) NSURL *cacheURL;
50
+
51
+/**
52
+ The total number of bytes used on disk, as reported by `NSURLTotalFileAllocatedSizeKey`.
53
+ 
54
+ @warning This property is technically safe to access from any thread, but it reflects the value *right now*,
55
+ not taking into account any pending operations. In most cases this value should only be read from a block on the
56
+ <sharedQueue>, which will ensure its accuracy and prevent it from changing during the lifetime of the block.
57
+ 
58
+ For example:
59
+ 
60
+    // some background thread, not a block already running on the shared queue
61
+
62
+    dispatch_sync([TMDiskCache sharedQueue], ^{
63
+        NSLog(@"accurate, unchanging byte count: %d", [[TMDiskCache sharedCache] byteCount]);
64
+    });
65
+ */
66
+@property (readonly) NSUInteger byteCount;
67
+
68
+/**
69
+ The maximum number of bytes allowed on disk. This value is checked every time an object is set, if the written
70
+ size exceeds the limit a trim call is queued. Defaults to `0.0`, meaning no practical limit.
71
+ 
72
+ @warning Do not read this property on the <sharedQueue> (including asynchronous method blocks).
73
+ */
74
+@property (assign) NSUInteger byteLimit;
75
+
76
+/**
77
+ The maximum number of seconds an object is allowed to exist in the cache. Setting this to a value
78
+ greater than `0.0` will start a recurring GCD timer with the same period that calls <trimToDate:>.
79
+ Setting it back to `0.0` will stop the timer. Defaults to `0.0`, meaning no limit.
80
+ 
81
+ @warning Do not read this property on the <sharedQueue> (including asynchronous method blocks).
82
+ */
83
+@property (assign) NSTimeInterval ageLimit;
84
+
85
+#pragma mark -
86
+/// @name Event Blocks
87
+
88
+/**
89
+ A block to be executed just before an object is added to the cache. The queue waits during execution.
90
+ */
91
+@property (copy) AWSTMDiskCacheObjectBlock willAddObjectBlock;
92
+
93
+/**
94
+ A block to be executed just before an object is removed from the cache. The queue waits during execution.
95
+ */
96
+@property (copy) AWSTMDiskCacheObjectBlock willRemoveObjectBlock;
97
+
98
+/**
99
+ A block to be executed just before all objects are removed from the cache as a result of <removeAllObjects:>.
100
+ The queue waits during execution.
101
+ */
102
+@property (copy) AWSTMDiskCacheBlock willRemoveAllObjectsBlock;
103
+
104
+/**
105
+ A block to be executed just after an object is added to the cache. The queue waits during execution.
106
+ */
107
+@property (copy) AWSTMDiskCacheObjectBlock didAddObjectBlock;
108
+
109
+/**
110
+ A block to be executed just after an object is removed from the cache. The queue waits during execution.
111
+ */
112
+@property (copy) AWSTMDiskCacheObjectBlock didRemoveObjectBlock;
113
+
114
+/**
115
+ A block to be executed just after all objects are removed from the cache as a result of <removeAllObjects:>.
116
+ The queue waits during execution.
117
+ */
118
+@property (copy) AWSTMDiskCacheBlock didRemoveAllObjectsBlock;
119
+
120
+#pragma mark -
121
+/// @name Initialization
122
+
123
+/**
124
+ A shared cache.
125
+ 
126
+ @result The shared singleton cache instance.
127
+ */
128
++ (instancetype)sharedCache;
129
+
130
+/**
131
+ A shared serial queue, used by all instances of this class. Use `dispatch_set_target_queue` to integrate
132
+ this queue with an exisiting serial I/O queue.
133
+ 
134
+ @result The shared singleton queue instance.
135
+ */
136
++ (dispatch_queue_t)sharedQueue;
137
+
138
+/**
139
+ Empties the trash with `DISPATCH_QUEUE_PRIORITY_BACKGROUND`. Does not block the <sharedQueue>.
140
+ */
141
++ (void)emptyTrash;
142
+
143
+
144
+/**
145
+ Multiple instances with the same name are allowed and can safely access
146
+ the same data on disk thanks to the magic of seriality.
147
+ 
148
+ @see name
149
+ @param name The name of the cache.
150
+ @result A new cache with the specified name.
151
+ */
152
+- (instancetype)initWithName:(NSString *)name;
153
+
154
+/**
155
+ The designated initializer. Multiple instances with the same name are allowed and can safely access
156
+ the same data on disk thanks to the magic of seriality.
157
+ 
158
+ @see name
159
+ @param name The name of the cache.
160
+ @param rootPath The path of the cache.
161
+ @result A new cache with the specified name.
162
+ */
163
+- (instancetype)initWithName:(NSString *)name rootPath:(NSString *)rootPath;
164
+
165
+#pragma mark -
166
+/// @name Asynchronous Methods
167
+
168
+/**
169
+ Retrieves the object for the specified key. This method returns immediately and executes the passed
170
+ block as soon as the object is available on the serial <sharedQueue>.
171
+ 
172
+ @warning The fileURL is only valid for the duration of this block, do not use it after the block ends.
173
+ 
174
+ @param key The key associated with the requested object.
175
+ @param block A block to be executed serially when the object is available.
176
+ */
177
+- (void)objectForKey:(NSString *)key block:(AWSTMDiskCacheObjectBlock)block;
178
+
179
+/**
180
+ Retrieves the fileURL for the specified key without actually reading the data from disk. This method
181
+ returns immediately and executes the passed block as soon as the object is available on the serial
182
+ <sharedQueue>.
183
+ 
184
+ @warning Access is protected for the duration of the block, but to maintain safe disk access do not
185
+ access this fileURL after the block has ended. Do all work on the <sharedQueue>.
186
+ 
187
+ @param key The key associated with the requested object.
188
+ @param block A block to be executed serially when the file URL is available.
189
+ */
190
+- (void)fileURLForKey:(NSString *)key block:(AWSTMDiskCacheObjectBlock)block;
191
+
192
+/**
193
+ Stores an object in the cache for the specified key. This method returns immediately and executes the
194
+ passed block as soon as the object has been stored.
195
+ 
196
+ @param object An object to store in the cache.
197
+ @param key A key to associate with the object. This string will be copied.
198
+ @param block A block to be executed serially after the object has been stored, or nil.
199
+ */
200
+- (void)setObject:(id <NSCoding>)object forKey:(NSString *)key block:(AWSTMDiskCacheObjectBlock)block;
201
+
202
+/**
203
+ Removes the object for the specified key. This method returns immediately and executes the passed block
204
+ as soon as the object has been removed.
205
+ 
206
+ @param key The key associated with the object to be removed.
207
+ @param block A block to be executed serially after the object has been removed, or nil.
208
+ */
209
+- (void)removeObjectForKey:(NSString *)key block:(AWSTMDiskCacheObjectBlock)block;
210
+
211
+/**
212
+ Removes all objects from the cache that have not been used since the specified date.
213
+ This method returns immediately and executes the passed block as soon as the cache has been trimmed.
214
+
215
+ @param date Objects that haven't been accessed since this date are removed from the cache.
216
+ @param block A block to be executed serially after the cache has been trimmed, or nil.
217
+ */
218
+- (void)trimToDate:(NSDate *)date block:(AWSTMDiskCacheBlock)block;
219
+
220
+/**
221
+ Removes objects from the cache, largest first, until the cache is equal to or smaller than the specified byteCount.
222
+ This method returns immediately and executes the passed block as soon as the cache has been trimmed.
223
+ 
224
+ @param byteCount The cache will be trimmed equal to or smaller than this size.
225
+ @param block A block to be executed serially after the cache has been trimmed, or nil.
226
+ */
227
+- (void)trimToSize:(NSUInteger)byteCount block:(AWSTMDiskCacheBlock)block;
228
+
229
+/**
230
+ Removes objects from the cache, ordered by date (least recently used first), until the cache is equal to or smaller
231
+ than the specified byteCount. This method returns immediately and executes the passed block as soon as the cache has
232
+ been trimmed.
233
+
234
+ @param byteCount The cache will be trimmed equal to or smaller than this size.
235
+ @param block A block to be executed serially after the cache has been trimmed, or nil.
236
+ */
237
+- (void)trimToSizeByDate:(NSUInteger)byteCount block:(AWSTMDiskCacheBlock)block;
238
+
239
+/**
240
+ Removes all objects from the cache. This method returns immediately and executes the passed block as soon as the
241
+ cache has been cleared.
242
+ 
243
+ @param block A block to be executed serially after the cache has been cleared, or nil.
244
+ */
245
+- (void)removeAllObjects:(AWSTMDiskCacheBlock)block;
246
+
247
+/**
248
+ Loops through all objects in the cache (reads and writes are suspended during the enumeration). Data is not actually
249
+ read from disk, the `object` parameter of the block will be `nil` but the `fileURL` will be available.
250
+ This method returns immediately.
251
+
252
+ @param block A block to be executed for every object in the cache.
253
+ @param completionBlock An optional block to be executed after the enumeration is complete.
254
+ */
255
+- (void)enumerateObjectsWithBlock:(AWSTMDiskCacheObjectBlock)block completionBlock:(AWSTMDiskCacheBlock)completionBlock;
256
+
257
+#pragma mark -
258
+/// @name Synchronous Methods
259
+
260
+/**
261
+ Retrieves the object for the specified key. This method blocks the calling thread until the
262
+ object is available.
263
+ 
264
+ @see objectForKey:block:
265
+ @param key The key associated with the object.
266
+ @result The object for the specified key.
267
+ */
268
+- (id <NSCoding>)objectForKey:(NSString *)key;
269
+
270
+/**
271
+ Retrieves the file URL for the specified key. This method blocks the calling thread until the
272
+ url is available. Do not use this URL anywhere but on the <sharedQueue>. This method probably
273
+ shouldn't even exist, just use the asynchronous one.
274
+ 
275
+ @see fileURLForKey:block:
276
+ @param key The key associated with the object.
277
+ @result The file URL for the specified key.
278
+ */
279
+- (NSURL *)fileURLForKey:(NSString *)key;
280
+
281
+/**
282
+ Stores an object in the cache for the specified key. This method blocks the calling thread until
283
+ the object has been stored.
284
+ 
285
+ @see setObject:forKey:block:
286
+ @param object An object to store in the cache.
287
+ @param key A key to associate with the object. This string will be copied.
288
+ */
289
+- (void)setObject:(id <NSCoding>)object forKey:(NSString *)key;
290
+
291
+/**
292
+ Removes the object for the specified key. This method blocks the calling thread until the object
293
+ has been removed.
294
+ 
295
+ @param key The key associated with the object to be removed.
296
+ */
297
+- (void)removeObjectForKey:(NSString *)key;
298
+
299
+/**
300
+ Removes all objects from the cache that have not been used since the specified date.
301
+ This method blocks the calling thread until the cache has been trimmed.
302
+
303
+ @param date Objects that haven't been accessed since this date are removed from the cache.
304
+ */
305
+- (void)trimToDate:(NSDate *)date;
306
+
307
+/**
308
+ Removes objects from the cache, largest first, until the cache is equal to or smaller than the
309
+ specified byteCount. This method blocks the calling thread until the cache has been trimmed.
310
+ 
311
+ @param byteCount The cache will be trimmed equal to or smaller than this size.
312
+ */
313
+- (void)trimToSize:(NSUInteger)byteCount;
314
+
315
+/**
316
+ Removes objects from the cache, ordered by date (least recently used first), until the cache is equal to or
317
+ smaller than the specified byteCount. This method blocks the calling thread until the cache has been trimmed.
318
+
319
+ @param byteCount The cache will be trimmed equal to or smaller than this size.
320
+ */
321
+- (void)trimToSizeByDate:(NSUInteger)byteCount;
322
+
323
+/**
324
+ Removes all objects from the cache. This method blocks the calling thread until the cache has been cleared.
325
+ */
326
+- (void)removeAllObjects;
327
+
328
+/**
329
+ Loops through all objects in the cache (reads and writes are suspended during the enumeration). Data is not actually
330
+ read from disk, the `object` parameter of the block will be `nil` but the `fileURL` will be available.
331
+ This method blocks the calling thread until all objects have been enumerated.
332
+
333
+ @param block A block to be executed for every object in the cache.
334
+
335
+ @warning Do not call this method within the event blocks (<didRemoveObjectBlock>, etc.)
336
+ Instead use the asynchronous version, <enumerateObjectsWithBlock:completionBlock:>.
337
+ */
338
+- (void)enumerateObjectsWithBlock:(AWSTMDiskCacheObjectBlock)block;
339
+
340
+#pragma mark -
341
+/// @name Background Tasks
342
+
343
+/**
344
+ Set a global manager to be used for setting up/tearing down any background tasks needed by TMCache.
345
+ 
346
+ @param backgroundTaskManager Background task manager.
347
+ */
348
++ (void)setBackgroundTaskManager:(id <AWSTMCacheBackgroundTaskManager>)backgroundTaskManager;
349
+
350
+@end

+ 310
- 0
AWSCore.framework/Headers/AWSTMMemoryCache.h 查看文件

@@ -0,0 +1,310 @@
1
+/**
2
+ `TMMemoryCache` is a fast, thread safe key/value store similar to `NSCache`. On iOS it will clear itself
3
+ automatically to reduce memory usage when the app receives a memory warning or goes into the background.
4
+
5
+ Access is natively asynchronous. Every method accepts a callback block that runs on a concurrent
6
+ <queue>, with cache writes protected by GCD barriers. Synchronous variations are provided.
7
+ 
8
+ All access to the cache is dated so the that the least-used objects can be trimmed first. Setting an
9
+ optional <ageLimit> will trigger a GCD timer to periodically to trim the cache to that age.
10
+ 
11
+ Objects can optionally be set with a "cost", which could be a byte count or any other meaningful integer.
12
+ Setting a <costLimit> will automatically keep the cache below that value with <trimToCostByDate:>.
13
+
14
+ Values will not persist after application relaunch or returning from the background. See <TMCache> for
15
+ a memory cache backed by a disk cache.
16
+ */
17
+
18
+#import <Foundation/Foundation.h>
19
+
20
+@class AWSTMMemoryCache;
21
+
22
+typedef void (^AWSTMMemoryCacheBlock)(AWSTMMemoryCache *cache);
23
+typedef void (^AWSTMMemoryCacheObjectBlock)(AWSTMMemoryCache *cache, NSString *key, id object);
24
+
25
+@interface AWSTMMemoryCache : NSObject
26
+
27
+#pragma mark -
28
+/// @name Core
29
+
30
+/**
31
+ A concurrent queue on which all work is done. It is exposed here so that it can be set to target some
32
+ other queue, such as a global concurrent queue with a priority other than the default.
33
+ */
34
+@property (readonly) dispatch_queue_t queue;
35
+
36
+/**
37
+ The total accumulated cost.
38
+ */
39
+@property (readonly) NSUInteger totalCost;
40
+
41
+/**
42
+ The maximum cost allowed to accumulate before objects begin to be removed with <trimToCostByDate:>.
43
+ */
44
+@property (assign) NSUInteger costLimit;
45
+
46
+/**
47
+ The maximum number of seconds an object is allowed to exist in the cache. Setting this to a value
48
+ greater than `0.0` will start a recurring GCD timer with the same period that calls <trimToDate:>.
49
+ Setting it back to `0.0` will stop the timer. Defaults to `0.0`.
50
+ */
51
+@property (assign) NSTimeInterval ageLimit;
52
+
53
+/**
54
+ When `YES` on iOS the cache will remove all objects when the app receives a memory warning.
55
+ Defaults to `YES`.
56
+ */
57
+@property (assign) BOOL removeAllObjectsOnMemoryWarning;
58
+
59
+/**
60
+ When `YES` on iOS the cache will remove all objects when the app enters the background.
61
+ Defaults to `YES`.
62
+ */
63
+@property (assign) BOOL removeAllObjectsOnEnteringBackground;
64
+
65
+#pragma mark -
66
+/// @name Event Blocks
67
+
68
+/**
69
+ A block to be executed just before an object is added to the cache. This block will be excuted within
70
+ a barrier, i.e. all reads and writes are suspended for the duration of the block.
71
+ */
72
+@property (copy) AWSTMMemoryCacheObjectBlock willAddObjectBlock;
73
+
74
+/**
75
+ A block to be executed just before an object is removed from the cache. This block will be excuted
76
+ within a barrier, i.e. all reads and writes are suspended for the duration of the block.
77
+ */
78
+@property (copy) AWSTMMemoryCacheObjectBlock willRemoveObjectBlock;
79
+
80
+/**
81
+ A block to be executed just before all objects are removed from the cache as a result of <removeAllObjects:>.
82
+ This block will be excuted within a barrier, i.e. all reads and writes are suspended for the duration of the block.
83
+ */
84
+@property (copy) AWSTMMemoryCacheBlock willRemoveAllObjectsBlock;
85
+
86
+/**
87
+ A block to be executed just after an object is added to the cache. This block will be excuted within
88
+ a barrier, i.e. all reads and writes are suspended for the duration of the block.
89
+ */
90
+@property (copy) AWSTMMemoryCacheObjectBlock didAddObjectBlock;
91
+
92
+/**
93
+ A block to be executed just after an object is removed from the cache. This block will be excuted
94
+ within a barrier, i.e. all reads and writes are suspended for the duration of the block.
95
+ */
96
+@property (copy) AWSTMMemoryCacheObjectBlock didRemoveObjectBlock;
97
+
98
+/**
99
+ A block to be executed just after all objects are removed from the cache as a result of <removeAllObjects:>.
100
+ This block will be excuted within a barrier, i.e. all reads and writes are suspended for the duration of the block.
101
+ */
102
+@property (copy) AWSTMMemoryCacheBlock didRemoveAllObjectsBlock;
103
+
104
+/**
105
+ A block to be executed upon receiving a memory warning (iOS only) potentially in parallel with other blocks on the <queue>.
106
+ This block will be executed regardless of the value of <removeAllObjectsOnMemoryWarning>. Defaults to `nil`.
107
+ */
108
+@property (copy) AWSTMMemoryCacheBlock didReceiveMemoryWarningBlock;
109
+
110
+/**
111
+ A block to be executed when the app enters the background (iOS only) potentially in parallel with other blocks on the <queue>.
112
+ This block will be executed regardless of the value of <removeAllObjectsOnEnteringBackground>. Defaults to `nil`.
113
+ */
114
+@property (copy) AWSTMMemoryCacheBlock didEnterBackgroundBlock;
115
+
116
+#pragma mark -
117
+/// @name Shared Cache
118
+
119
+/**
120
+ A shared cache.
121
+ 
122
+ @result The shared singleton cache instance.
123
+ */
124
++ (instancetype)sharedCache;
125
+
126
+#pragma mark -
127
+/// @name Asynchronous Methods
128
+
129
+/**
130
+ Retrieves the object for the specified key. This method returns immediately and executes the passed
131
+ block after the object is available, potentially in parallel with other blocks on the <queue>.
132
+ 
133
+ @param key The key associated with the requested object.
134
+ @param block A block to be executed concurrently when the object is available.
135
+ */
136
+- (void)objectForKey:(NSString *)key block:(AWSTMMemoryCacheObjectBlock)block;
137
+
138
+/**
139
+ Stores an object in the cache for the specified key. This method returns immediately and executes the
140
+ passed block after the object has been stored, potentially in parallel with other blocks on the <queue>.
141
+ 
142
+ @param object An object to store in the cache.
143
+ @param key A key to associate with the object. This string will be copied.
144
+ @param block A block to be executed concurrently after the object has been stored, or nil.
145
+ */
146
+- (void)setObject:(id)object forKey:(NSString *)key block:(AWSTMMemoryCacheObjectBlock)block;
147
+
148
+/**
149
+ Stores an object in the cache for the specified key and the specified cost. If the cost causes the total
150
+ to go over the <costLimit> the cache is trimmed (oldest objects first). This method returns immediately
151
+ and executes the passed block after the object has been stored, potentially in parallel with other blocks
152
+ on the <queue>.
153
+ 
154
+ @param object An object to store in the cache.
155
+ @param key A key to associate with the object. This string will be copied.
156
+ @param cost An amount to add to the <totalCost>.
157
+ @param block A block to be executed concurrently after the object has been stored, or nil.
158
+ */
159
+- (void)setObject:(id)object forKey:(NSString *)key withCost:(NSUInteger)cost block:(AWSTMMemoryCacheObjectBlock)block;
160
+
161
+/**
162
+ Removes the object for the specified key. This method returns immediately and executes the passed
163
+ block after the object has been removed, potentially in parallel with other blocks on the <queue>.
164
+ 
165
+ @param key The key associated with the object to be removed.
166
+ @param block A block to be executed concurrently after the object has been removed, or nil.
167
+ */
168
+- (void)removeObjectForKey:(NSString *)key block:(AWSTMMemoryCacheObjectBlock)block;
169
+
170
+/**
171
+ Removes all objects from the cache that have not been used since the specified date.
172
+ This method returns immediately and executes the passed block after the cache has been trimmed,
173
+ potentially in parallel with other blocks on the <queue>.
174
+ 
175
+ @param date Objects that haven't been accessed since this date are removed from the cache.
176
+ @param block A block to be executed concurrently after the cache has been trimmed, or nil.
177
+ */
178
+- (void)trimToDate:(NSDate *)date block:(AWSTMMemoryCacheBlock)block;
179
+
180
+/**
181
+ Removes objects from the cache, costliest objects first, until the <totalCost> is below the specified
182
+ value. This method returns immediately and executes the passed block after the cache has been trimmed,
183
+ potentially in parallel with other blocks on the <queue>.
184
+ 
185
+ @param cost The total accumulation allowed to remain after the cache has been trimmed.
186
+ @param block A block to be executed concurrently after the cache has been trimmed, or nil.
187
+ */
188
+- (void)trimToCost:(NSUInteger)cost block:(AWSTMMemoryCacheBlock)block;
189
+
190
+/**
191
+ Removes objects from the cache, ordered by date (least recently used first), until the <totalCost> is below
192
+ the specified value. This method returns immediately and executes the passed block after the cache has been
193
+ trimmed, potentially in parallel with other blocks on the <queue>.
194
+
195
+ @param cost The total accumulation allowed to remain after the cache has been trimmed.
196
+ @param block A block to be executed concurrently after the cache has been trimmed, or nil.
197
+ */
198
+- (void)trimToCostByDate:(NSUInteger)cost block:(AWSTMMemoryCacheBlock)block;
199
+
200
+/**
201
+ Removes all objects from the cache. This method returns immediately and executes the passed block after
202
+ the cache has been cleared, potentially in parallel with other blocks on the <queue>.
203
+ 
204
+ @param block A block to be executed concurrently after the cache has been cleared, or nil.
205
+ */
206
+- (void)removeAllObjects:(AWSTMMemoryCacheBlock)block;
207
+
208
+/**
209
+ Loops through all objects in the cache within a memory barrier (reads and writes are suspended during the enumeration).
210
+ This method returns immediately.
211
+
212
+ @param block A block to be executed for every object in the cache.
213
+ @param completionBlock An optional block to be executed concurrently when the enumeration is complete.
214
+ */
215
+- (void)enumerateObjectsWithBlock:(AWSTMMemoryCacheObjectBlock)block completionBlock:(AWSTMMemoryCacheBlock)completionBlock;
216
+
217
+#pragma mark -
218
+/// @name Synchronous Methods
219
+
220
+/**
221
+ Retrieves the object for the specified key. This method blocks the calling thread until the
222
+ object is available.
223
+ 
224
+ @see objectForKey:block:
225
+ @param key The key associated with the object.
226
+ @result The object for the specified key.
227
+ */
228
+- (id)objectForKey:(NSString *)key;
229
+
230
+/**
231
+ Stores an object in the cache for the specified key. This method blocks the calling thread until the object
232
+ has been set.
233
+
234
+ @see setObject:forKey:block:
235
+ @param object An object to store in the cache.
236
+ @param key A key to associate with the object. This string will be copied.
237
+ */
238
+- (void)setObject:(id)object forKey:(NSString *)key;
239
+
240
+/**
241
+ Stores an object in the cache for the specified key and the specified cost. If the cost causes the total
242
+ to go over the <costLimit> the cache is trimmed (oldest objects first). This method blocks the calling thread
243
+ until the object has been stored.
244
+
245
+ @param object An object to store in the cache.
246
+ @param key A key to associate with the object. This string will be copied.
247
+ @param cost An amount to add to the <totalCost>.
248
+ */
249
+- (void)setObject:(id)object forKey:(NSString *)key withCost:(NSUInteger)cost;
250
+
251
+/**
252
+ Removes the object for the specified key. This method blocks the calling thread until the object
253
+ has been removed.
254
+ 
255
+ @param key The key associated with the object to be removed.
256
+ */
257
+- (void)removeObjectForKey:(NSString *)key;
258
+
259
+/**
260
+ Removes all objects from the cache that have not been used since the specified date.
261
+ This method blocks the calling thread until the cache has been trimmed.
262
+ 
263
+ @param date Objects that haven't been accessed since this date are removed from the cache.
264
+ */
265
+- (void)trimToDate:(NSDate *)date;
266
+
267
+/**
268
+ Removes objects from the cache, costliest objects first, until the <totalCost> is below the specified
269
+ value. This method blocks the calling thread until the cache has been trimmed.
270
+ 
271
+ @param cost The total accumulation allowed to remain after the cache has been trimmed.
272
+ */
273
+- (void)trimToCost:(NSUInteger)cost;
274
+
275
+/**
276
+ Removes objects from the cache, ordered by date (least recently used first), until the <totalCost> is below
277
+ the specified value. This method blocks the calling thread until the cache has been trimmed.
278
+
279
+ @param cost The total accumulation allowed to remain after the cache has been trimmed.
280
+ */
281
+- (void)trimToCostByDate:(NSUInteger)cost;
282
+
283
+/**
284
+ Removes all objects from the cache. This method blocks the calling thread until the cache has been cleared.
285
+ */
286
+- (void)removeAllObjects;
287
+
288
+/**
289
+ Loops through all objects in the cache within a memory barrier (reads and writes are suspended during the enumeration).
290
+ This method blocks the calling thread until all objects have been enumerated.
291
+
292
+ @param block A block to be executed for every object in the cache.
293
+ 
294
+ @warning Do not call this method within the event blocks (<didReceiveMemoryWarningBlock>, etc.)
295
+ Instead use the asynchronous version, <enumerateObjectsWithBlock:completionBlock:>.
296
+ 
297
+ */
298
+- (void)enumerateObjectsWithBlock:(AWSTMMemoryCacheObjectBlock)block;
299
+
300
+/**
301
+ Handle a memory warning.
302
+ */
303
+- (void)handleMemoryWarning __deprecated_msg("This happens automatically in TMCache 2.1. There’s no longer a need to call it directly.");
304
+
305
+/**
306
+ Handle the application having been backgrounded.
307
+ */
308
+- (void)handleApplicationBackgrounding __deprecated_msg("This happens automatically in TMCache 2.1. There’s no longer a need to call it directly.");
309
+
310
+@end

+ 266
- 0
AWSCore.framework/Headers/AWSTask.h 查看文件

@@ -0,0 +1,266 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+#import "AWSCancellationToken.h"
14
+#import "AWSGeneric.h"
15
+
16
+NS_ASSUME_NONNULL_BEGIN
17
+
18
+/*!
19
+ Error domain used if there was multiple errors on <AWSTask taskForCompletionOfAllTasks:>.
20
+ */
21
+extern NSString *const AWSTaskErrorDomain;
22
+
23
+/*!
24
+ An error code used for <AWSTask taskForCompletionOfAllTasks:>, if there were multiple errors.
25
+ */
26
+extern NSInteger const kAWSMultipleErrorsError;
27
+
28
+/*!
29
+ An error userInfo key used if there were multiple errors on <AWSTask taskForCompletionOfAllTasks:>.
30
+ Value type is `NSArray<NSError *> *`.
31
+ */
32
+extern NSString *const AWSTaskMultipleErrorsUserInfoKey;
33
+
34
+@class AWSExecutor;
35
+@class AWSTask;
36
+
37
+/*!
38
+ The consumer view of a Task. A AWSTask has methods to
39
+ inspect the state of the task, and to add continuations to
40
+ be run once the task is complete.
41
+ */
42
+@interface AWSTask<__covariant ResultType> : NSObject
43
+
44
+/*!
45
+ A block that can act as a continuation for a task.
46
+ */
47
+typedef __nullable id(^AWSContinuationBlock)(AWSTask<ResultType> *t);
48
+
49
+/*!
50
+ Creates a task that is already completed with the given result.
51
+ @param result The result for the task.
52
+ */
53
++ (instancetype)taskWithResult:(nullable ResultType)result;
54
+
55
+/*!
56
+ Creates a task that is already completed with the given error.
57
+ @param error The error for the task.
58
+ */
59
++ (instancetype)taskWithError:(NSError *)error;
60
+
61
+/*!
62
+ Creates a task that is already cancelled.
63
+ */
64
++ (instancetype)cancelledTask;
65
+
66
+/*!
67
+ Returns a task that will be completed (with result == nil) once
68
+ all of the input tasks have completed.
69
+ @param tasks An `NSArray` of the tasks to use as an input.
70
+ */
71
++ (instancetype)taskForCompletionOfAllTasks:(nullable NSArray<AWSTask *> *)tasks;
72
+
73
+/*!
74
+ Returns a task that will be completed once all of the input tasks have completed.
75
+ If all tasks complete successfully without being faulted or cancelled the result will be
76
+ an `NSArray` of all task results in the order they were provided.
77
+ @param tasks An `NSArray` of the tasks to use as an input.
78
+ */
79
++ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray<AWSTask *> *)tasks;
80
+
81
+/*!
82
+ Returns a task that will be completed once there is at least one successful task.
83
+ The first task to successuly complete will set the result, all other tasks results are
84
+ ignored.
85
+ @param tasks An `NSArray` of the tasks to use as an input.
86
+ */
87
++ (instancetype)taskForCompletionOfAnyTask:(nullable NSArray<AWSTask *> *)tasks;
88
+
89
+/*!
90
+ Returns a task that will be completed a certain amount of time in the future.
91
+ @param millis The approximate number of milliseconds to wait before the
92
+ task will be finished (with result == nil).
93
+ */
94
++ (AWSTask<AWSVoid> *)taskWithDelay:(int)millis;
95
+
96
+/*!
97
+ Returns a task that will be completed a certain amount of time in the future.
98
+ @param millis The approximate number of milliseconds to wait before the
99
+ task will be finished (with result == nil).
100
+ @param token The cancellation token (optional).
101
+ */
102
++ (AWSTask<AWSVoid> *)taskWithDelay:(int)millis cancellationToken:(nullable AWSCancellationToken *)token;
103
+
104
+/*!
105
+ Returns a task that will be completed after the given block completes with
106
+ the specified executor.
107
+ @param executor A AWSExecutor responsible for determining how the
108
+ continuation block will be run.
109
+ @param block The block to immediately schedule to run with the given executor.
110
+ @returns A task that will be completed after block has run.
111
+ If block returns a AWSTask, then the task returned from
112
+ this method will not be completed until that task is completed.
113
+ */
114
++ (instancetype)taskFromExecutor:(AWSExecutor *)executor withBlock:(nullable id (^)(void))block;
115
+
116
+// Properties that will be set on the task once it is completed.
117
+
118
+/*!
119
+ The result of a successful task.
120
+ */
121
+@property (nullable, nonatomic, strong, readonly) ResultType result;
122
+
123
+/*!
124
+ The error of a failed task.
125
+ */
126
+@property (nullable, nonatomic, strong, readonly) NSError *error;
127
+
128
+/*!
129
+ Whether this task has been cancelled.
130
+ */
131
+@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled;
132
+
133
+/*!
134
+ Whether this task has completed due to an error.
135
+ */
136
+@property (nonatomic, assign, readonly, getter=isFaulted) BOOL faulted;
137
+
138
+/*!
139
+ Whether this task has completed.
140
+ */
141
+@property (nonatomic, assign, readonly, getter=isCompleted) BOOL completed;
142
+
143
+/*!
144
+ Enqueues the given block to be run once this task is complete.
145
+ This method uses a default execution strategy. The block will be
146
+ run on the thread where the previous task completes, unless the
147
+ stack depth is too deep, in which case it will be run on a
148
+ dispatch queue with default priority.
149
+ @param block The block to be run once this task is complete.
150
+ @returns A task that will be completed after block has run.
151
+ If block returns a AWSTask, then the task returned from
152
+ this method will not be completed until that task is completed.
153
+ */
154
+- (AWSTask *)continueWithBlock:(AWSContinuationBlock)block NS_SWIFT_NAME(continueWith(block:));
155
+
156
+/*!
157
+ Enqueues the given block to be run once this task is complete.
158
+ This method uses a default execution strategy. The block will be
159
+ run on the thread where the previous task completes, unless the
160
+ stack depth is too deep, in which case it will be run on a
161
+ dispatch queue with default priority.
162
+ @param block The block to be run once this task is complete.
163
+ @param cancellationToken The cancellation token (optional).
164
+ @returns A task that will be completed after block has run.
165
+ If block returns a AWSTask, then the task returned from
166
+ this method will not be completed until that task is completed.
167
+ */
168
+- (AWSTask *)continueWithBlock:(AWSContinuationBlock)block
169
+            cancellationToken:(nullable AWSCancellationToken *)cancellationToken NS_SWIFT_NAME(continueWith(block:cancellationToken:));
170
+
171
+/*!
172
+ Enqueues the given block to be run once this task is complete.
173
+ @param executor A AWSExecutor responsible for determining how the
174
+ continuation block will be run.
175
+ @param block The block to be run once this task is complete.
176
+ @returns A task that will be completed after block has run.
177
+ If block returns a AWSTask, then the task returned from
178
+ this method will not be completed until that task is completed.
179
+ */
180
+- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor
181
+                       withBlock:(AWSContinuationBlock)block NS_SWIFT_NAME(continueWith(executor:block:));
182
+
183
+/*!
184
+ Enqueues the given block to be run once this task is complete.
185
+ @param executor A AWSExecutor responsible for determining how the
186
+ continuation block will be run.
187
+ @param block The block to be run once this task is complete.
188
+ @param cancellationToken The cancellation token (optional).
189
+ @returns A task that will be completed after block has run.
190
+ If block returns a AWSTask, then the task returned from
191
+ his method will not be completed until that task is completed.
192
+ */
193
+- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor
194
+                           block:(AWSContinuationBlock)block
195
+               cancellationToken:(nullable AWSCancellationToken *)cancellationToken
196
+NS_SWIFT_NAME(continueWith(executor:block:cancellationToken:));
197
+
198
+/*!
199
+ Identical to continueWithBlock:, except that the block is only run
200
+ if this task did not produce a cancellation or an error.
201
+ If it did, then the failure will be propagated to the returned
202
+ task.
203
+ @param block The block to be run once this task is complete.
204
+ @returns A task that will be completed after block has run.
205
+ If block returns a AWSTask, then the task returned from
206
+ this method will not be completed until that task is completed.
207
+ */
208
+- (AWSTask *)continueWithSuccessBlock:(AWSContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(block:));
209
+
210
+/*!
211
+ Identical to continueWithBlock:, except that the block is only run
212
+ if this task did not produce a cancellation or an error.
213
+ If it did, then the failure will be propagated to the returned
214
+ task.
215
+ @param block The block to be run once this task is complete.
216
+ @param cancellationToken The cancellation token (optional).
217
+ @returns A task that will be completed after block has run.
218
+ If block returns a AWSTask, then the task returned from
219
+ this method will not be completed until that task is completed.
220
+ */
221
+- (AWSTask *)continueWithSuccessBlock:(AWSContinuationBlock)block
222
+                   cancellationToken:(nullable AWSCancellationToken *)cancellationToken
223
+NS_SWIFT_NAME(continueOnSuccessWith(block:cancellationToken:));
224
+
225
+/*!
226
+ Identical to continueWithExecutor:withBlock:, except that the block
227
+ is only run if this task did not produce a cancellation, error, or an error.
228
+ If it did, then the failure will be propagated to the returned task.
229
+ @param executor A AWSExecutor responsible for determining how the
230
+ continuation block will be run.
231
+ @param block The block to be run once this task is complete.
232
+ @returns A task that will be completed after block has run.
233
+ If block returns a AWSTask, then the task returned from
234
+ this method will not be completed until that task is completed.
235
+ */
236
+- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor
237
+                withSuccessBlock:(AWSContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(executor:block:));
238
+
239
+/*!
240
+ Identical to continueWithExecutor:withBlock:, except that the block
241
+ is only run if this task did not produce a cancellation or an error.
242
+ If it did, then the failure will be propagated to the returned task.
243
+ @param executor A AWSExecutor responsible for determining how the
244
+ continuation block will be run.
245
+ @param block The block to be run once this task is complete.
246
+ @param cancellationToken The cancellation token (optional).
247
+ @returns A task that will be completed after block has run.
248
+ If block returns a AWSTask, then the task returned from
249
+ this method will not be completed until that task is completed.
250
+ */
251
+- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor
252
+                    successBlock:(AWSContinuationBlock)block
253
+               cancellationToken:(nullable AWSCancellationToken *)cancellationToken
254
+NS_SWIFT_NAME(continueOnSuccessWith(executor:block:cancellationToken:));
255
+
256
+/*!
257
+ Waits until this operation is completed.
258
+ This method is inefficient and consumes a thread resource while
259
+ it's running. It should be avoided. This method logs a warning
260
+ message if it is used on the main thread.
261
+ */
262
+- (void)waitUntilFinished;
263
+
264
+@end
265
+
266
+NS_ASSUME_NONNULL_END

+ 75
- 0
AWSCore.framework/Headers/AWSTaskCompletionSource.h 查看文件

@@ -0,0 +1,75 @@
1
+/*
2
+ *  Copyright (c) 2014, Facebook, Inc.
3
+ *  All rights reserved.
4
+ *
5
+ *  This source code is licensed under the BSD-style license found in the
6
+ *  LICENSE file in the root directory of this source tree. An additional grant
7
+ *  of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ */
10
+
11
+#import <Foundation/Foundation.h>
12
+
13
+NS_ASSUME_NONNULL_BEGIN
14
+
15
+@class AWSTask<__covariant ResultType>;
16
+
17
+/*!
18
+ A AWSTaskCompletionSource represents the producer side of tasks.
19
+ It is a task that also has methods for changing the state of the
20
+ task by settings its completion values.
21
+ */
22
+@interface AWSTaskCompletionSource<__covariant ResultType> : NSObject
23
+
24
+/*!
25
+ Creates a new unfinished task.
26
+ */
27
++ (instancetype)taskCompletionSource;
28
+
29
+/*!
30
+ The task associated with this TaskCompletionSource.
31
+ */
32
+@property (nonatomic, strong, readonly) AWSTask<ResultType> *task;
33
+
34
+/*!
35
+ Completes the task by setting the result.
36
+ Attempting to set this for a completed task will raise an exception.
37
+ @param result The result of the task.
38
+ */
39
+- (void)setResult:(nullable ResultType)result NS_SWIFT_NAME(set(result:));
40
+
41
+/*!
42
+ Completes the task by setting the error.
43
+ Attempting to set this for a completed task will raise an exception.
44
+ @param error The error for the task.
45
+ */
46
+- (void)setError:(NSError *)error NS_SWIFT_NAME(set(error:));
47
+
48
+/*!
49
+ Completes the task by marking it as cancelled.
50
+ Attempting to set this for a completed task will raise an exception.
51
+ */
52
+- (void)cancel;
53
+
54
+/*!
55
+ Sets the result of the task if it wasn't already completed.
56
+ @returns whether the new value was set.
57
+ */
58
+- (BOOL)trySetResult:(nullable ResultType)result NS_SWIFT_NAME(trySet(result:));
59
+
60
+/*!
61
+ Sets the error of the task if it wasn't already completed.
62
+ @param error The error for the task.
63
+ @returns whether the new value was set.
64
+ */
65
+- (BOOL)trySetError:(NSError *)error NS_SWIFT_NAME(trySet(error:));
66
+
67
+/*!
68
+ Sets the cancellation state of the task if it wasn't already completed.
69
+ @returns whether the new value was set.
70
+ */
71
+- (BOOL)trySetCancelled;
72
+
73
+@end
74
+
75
+NS_ASSUME_NONNULL_END

+ 274
- 0
AWSCore.framework/Headers/AWSUICKeyChainStore.h 查看文件

@@ -0,0 +1,274 @@
1
+//
2
+//  UICKeyChainStore.h
3
+//  UICKeyChainStore
4
+//
5
+//  Created by Kishikawa Katsumi on 11/11/20.
6
+//  Copyright (c) 2011 Kishikawa Katsumi. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+#if !__has_feature(nullability)
12
+#define NS_ASSUME_NONNULL_BEGIN
13
+#define NS_ASSUME_NONNULL_END
14
+#define nullable
15
+#define nonnull
16
+#define null_unspecified
17
+#define null_resettable
18
+#define __nullable
19
+#define __nonnull
20
+#define __null_unspecified
21
+#endif
22
+
23
+#if __has_extension(objc_generics)
24
+#define UIC_KEY_TYPE <NSString *>
25
+#define UIC_CREDENTIAL_TYPE <NSDictionary <NSString *, NSString *>*>
26
+#else
27
+#define UIC_KEY_TYPE
28
+#define UIC_CREDENTIAL_TYPE
29
+#endif
30
+
31
+NS_ASSUME_NONNULL_BEGIN
32
+
33
+extern NSString * const AWSUICKeyChainStoreErrorDomain;
34
+
35
+typedef NS_ENUM(NSInteger, AWSUICKeyChainStoreErrorCode) {
36
+    AWSUICKeyChainStoreErrorInvalidArguments = 1,
37
+};
38
+
39
+typedef NS_ENUM(NSInteger, AWSUICKeyChainStoreItemClass) {
40
+    AWSUICKeyChainStoreItemClassGenericPassword = 1,
41
+    AWSUICKeyChainStoreItemClassInternetPassword,
42
+};
43
+
44
+typedef NS_ENUM(NSInteger, AWSUICKeyChainStoreProtocolType) {
45
+    AWSUICKeyChainStoreProtocolTypeFTP = 1,
46
+    AWSUICKeyChainStoreProtocolTypeFTPAccount,
47
+    AWSUICKeyChainStoreProtocolTypeHTTP,
48
+    AWSUICKeyChainStoreProtocolTypeIRC,
49
+    AWSUICKeyChainStoreProtocolTypeNNTP,
50
+    AWSUICKeyChainStoreProtocolTypePOP3,
51
+    AWSUICKeyChainStoreProtocolTypeSMTP,
52
+    AWSUICKeyChainStoreProtocolTypeSOCKS,
53
+    AWSUICKeyChainStoreProtocolTypeIMAP,
54
+    AWSUICKeyChainStoreProtocolTypeLDAP,
55
+    AWSUICKeyChainStoreProtocolTypeAppleTalk,
56
+    AWSUICKeyChainStoreProtocolTypeAFP,
57
+    AWSUICKeyChainStoreProtocolTypeTelnet,
58
+    AWSUICKeyChainStoreProtocolTypeSSH,
59
+    AWSUICKeyChainStoreProtocolTypeFTPS,
60
+    AWSUICKeyChainStoreProtocolTypeHTTPS,
61
+    AWSUICKeyChainStoreProtocolTypeHTTPProxy,
62
+    AWSUICKeyChainStoreProtocolTypeHTTPSProxy,
63
+    AWSUICKeyChainStoreProtocolTypeFTPProxy,
64
+    AWSUICKeyChainStoreProtocolTypeSMB,
65
+    AWSUICKeyChainStoreProtocolTypeRTSP,
66
+    AWSUICKeyChainStoreProtocolTypeRTSPProxy,
67
+    AWSUICKeyChainStoreProtocolTypeDAAP,
68
+    AWSUICKeyChainStoreProtocolTypeEPPC,
69
+    AWSUICKeyChainStoreProtocolTypeNNTPS,
70
+    AWSUICKeyChainStoreProtocolTypeLDAPS,
71
+    AWSUICKeyChainStoreProtocolTypeTelnetS,
72
+    AWSUICKeyChainStoreProtocolTypeIRCS,
73
+    AWSUICKeyChainStoreProtocolTypePOP3S,
74
+};
75
+
76
+typedef NS_ENUM(NSInteger, AWSUICKeyChainStoreAuthenticationType) {
77
+    AWSUICKeyChainStoreAuthenticationTypeNTLM = 1,
78
+    AWSUICKeyChainStoreAuthenticationTypeMSN,
79
+    AWSUICKeyChainStoreAuthenticationTypeDPA,
80
+    AWSUICKeyChainStoreAuthenticationTypeRPA,
81
+    AWSUICKeyChainStoreAuthenticationTypeHTTPBasic,
82
+    AWSUICKeyChainStoreAuthenticationTypeHTTPDigest,
83
+    AWSUICKeyChainStoreAuthenticationTypeHTMLForm,
84
+    AWSUICKeyChainStoreAuthenticationTypeDefault,
85
+};
86
+
87
+typedef NS_ENUM(NSInteger, AWSUICKeyChainStoreAccessibility) {
88
+    AWSUICKeyChainStoreAccessibilityWhenUnlocked = 1,
89
+    AWSUICKeyChainStoreAccessibilityAfterFirstUnlock,
90
+    AWSUICKeyChainStoreAccessibilityAlways,
91
+    AWSUICKeyChainStoreAccessibilityWhenPasscodeSetThisDeviceOnly
92
+    __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0),
93
+    AWSUICKeyChainStoreAccessibilityWhenUnlockedThisDeviceOnly,
94
+    AWSUICKeyChainStoreAccessibilityAfterFirstUnlockThisDeviceOnly,
95
+    AWSUICKeyChainStoreAccessibilityAlwaysThisDeviceOnly,
96
+}
97
+__OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_4_0);
98
+
99
+typedef NS_ENUM(NSInteger, AWSUICKeyChainStoreAuthenticationPolicy) {
100
+    AWSUICKeyChainStoreAuthenticationPolicyUserPresence = kSecAccessControlUserPresence,
101
+};
102
+
103
+@interface AWSUICKeyChainStore : NSObject
104
+
105
+@property (nonatomic, readonly) AWSUICKeyChainStoreItemClass itemClass;
106
+
107
+@property (nonatomic, readonly, nullable) NSString *service;
108
+@property (nonatomic, readonly, nullable) NSString *accessGroup;
109
+
110
+@property (nonatomic, readonly, nullable) NSURL *server;
111
+@property (nonatomic, readonly) AWSUICKeyChainStoreProtocolType protocolType;
112
+@property (nonatomic, readonly) AWSUICKeyChainStoreAuthenticationType authenticationType;
113
+
114
+@property (nonatomic) AWSUICKeyChainStoreAccessibility accessibility;
115
+@property (nonatomic, readonly) AWSUICKeyChainStoreAuthenticationPolicy authenticationPolicy
116
+__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
117
+
118
+@property (nonatomic) BOOL synchronizable;
119
+
120
+@property (nonatomic, nullable) NSString *authenticationPrompt
121
+__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_8_0);
122
+
123
+@property (nonatomic, readonly, nullable) NSArray UIC_KEY_TYPE *allKeys;
124
+@property (nonatomic, readonly, nullable) NSArray *allItems;
125
+
126
++ (NSString *)defaultService;
127
++ (void)setDefaultService:(NSString *)defaultService;
128
+
129
++ (AWSUICKeyChainStore *)keyChainStore;
130
++ (AWSUICKeyChainStore *)keyChainStoreWithService:(nullable NSString *)service;
131
++ (AWSUICKeyChainStore *)keyChainStoreWithService:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
132
+
133
++ (AWSUICKeyChainStore *)keyChainStoreWithServer:(NSURL *)server protocolType:(AWSUICKeyChainStoreProtocolType)protocolType;
134
++ (AWSUICKeyChainStore *)keyChainStoreWithServer:(NSURL *)server protocolType:(AWSUICKeyChainStoreProtocolType)protocolType authenticationType:(AWSUICKeyChainStoreAuthenticationType)authenticationType;
135
+
136
+- (instancetype)init;
137
+- (instancetype)initWithService:(nullable NSString *)service;
138
+- (instancetype)initWithService:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
139
+
140
+- (instancetype)initWithServer:(NSURL *)server protocolType:(AWSUICKeyChainStoreProtocolType)protocolType;
141
+- (instancetype)initWithServer:(NSURL *)server protocolType:(AWSUICKeyChainStoreProtocolType)protocolType authenticationType:(AWSUICKeyChainStoreAuthenticationType)authenticationType;
142
+
143
++ (nullable NSString *)stringForKey:(NSString *)key;
144
++ (nullable NSString *)stringForKey:(NSString *)key service:(nullable NSString *)service;
145
++ (nullable NSString *)stringForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
146
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key;
147
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service;
148
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
149
+
150
++ (nullable NSData *)dataForKey:(NSString *)key;
151
++ (nullable NSData *)dataForKey:(NSString *)key service:(nullable NSString *)service;
152
++ (nullable NSData *)dataForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
153
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key;
154
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service;
155
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
156
+
157
+- (BOOL)contains:(nullable NSString *)key;
158
+
159
+- (BOOL)setString:(nullable NSString *)string forKey:(nullable NSString *)key;
160
+- (BOOL)setString:(nullable NSString *)string forKey:(nullable NSString *)key label:(nullable NSString *)label comment:(nullable NSString *)comment;
161
+- (nullable NSString *)stringForKey:(NSString *)key;
162
+
163
+- (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key;
164
+- (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key label:(nullable NSString *)label comment:(nullable NSString *)comment;
165
+- (nullable NSData *)dataForKey:(NSString *)key;
166
+
167
++ (BOOL)removeItemForKey:(NSString *)key;
168
++ (BOOL)removeItemForKey:(NSString *)key service:(nullable NSString *)service;
169
++ (BOOL)removeItemForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
170
+
171
++ (BOOL)removeAllItems;
172
++ (BOOL)removeAllItemsForService:(nullable NSString *)service;
173
++ (BOOL)removeAllItemsForService:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
174
+
175
+- (BOOL)removeItemForKey:(NSString *)key;
176
+
177
+- (BOOL)removeAllItems;
178
+
179
+- (nullable NSString *)objectForKeyedSubscript:(NSString<NSCopying> *)key;
180
+- (void)setObject:(nullable NSString *)obj forKeyedSubscript:(NSString<NSCopying> *)key;
181
+
182
++ (nullable NSArray UIC_KEY_TYPE *)allKeysWithItemClass:(AWSUICKeyChainStoreItemClass)itemClass;
183
+- (nullable NSArray UIC_KEY_TYPE *)allKeys;
184
+
185
++ (nullable NSArray *)allItemsWithItemClass:(AWSUICKeyChainStoreItemClass)itemClass;
186
+- (nullable NSArray *)allItems;
187
+
188
+- (void)setAccessibility:(AWSUICKeyChainStoreAccessibility)accessibility authenticationPolicy:(AWSUICKeyChainStoreAuthenticationPolicy)authenticationPolicy
189
+__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
190
+
191
+#if TARGET_OS_IOS
192
+- (void)sharedPasswordWithCompletion:(nullable void (^)(NSString * __nullable account, NSString * __nullable password, NSError * __nullable error))completion;
193
+- (void)sharedPasswordForAccount:(NSString *)account completion:(nullable void (^)(NSString * __nullable password, NSError * __nullable error))completion;
194
+
195
+- (void)setSharedPassword:(nullable NSString *)password forAccount:(NSString *)account completion:(nullable void (^)(NSError * __nullable error))completion;
196
+- (void)removeSharedPasswordForAccount:(NSString *)account completion:(nullable void (^)(NSError * __nullable error))completion;
197
+
198
++ (void)requestSharedWebCredentialWithCompletion:(nullable void (^)(NSArray UIC_CREDENTIAL_TYPE *credentials, NSError * __nullable error))completion;
199
++ (void)requestSharedWebCredentialForDomain:(nullable NSString *)domain account:(nullable NSString *)account completion:(nullable void (^)(NSArray UIC_CREDENTIAL_TYPE *credentials, NSError * __nullable error))completion;
200
+
201
++ (NSString *)generatePassword;
202
+#endif
203
+
204
+@end
205
+
206
+@interface AWSUICKeyChainStore (ErrorHandling)
207
+
208
++ (nullable NSString *)stringForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
209
++ (nullable NSString *)stringForKey:(NSString *)key service:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
210
++ (nullable NSString *)stringForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
211
+
212
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
213
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
214
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
215
+
216
++ (nullable NSData *)dataForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
217
++ (nullable NSData *)dataForKey:(NSString *)key service:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
218
++ (nullable NSData *)dataForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
219
+
220
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
221
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
222
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
223
+
224
+- (BOOL)setString:(nullable NSString *)string forKey:(NSString * )key error:(NSError * __nullable __autoreleasing * __nullable)error;
225
+- (BOOL)setString:(nullable NSString *)string forKey:(NSString * )key label:(nullable NSString *)label comment:(nullable NSString *)comment error:(NSError * __nullable __autoreleasing * __nullable)error;
226
+
227
+- (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
228
+- (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key label:(nullable NSString *)label comment:(nullable NSString *)comment error:(NSError * __nullable __autoreleasing * __nullable)error;
229
+
230
+- (nullable NSString *)stringForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
231
+- (nullable NSData *)dataForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
232
+
233
++ (BOOL)removeItemForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
234
++ (BOOL)removeItemForKey:(NSString *)key service:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
235
++ (BOOL)removeItemForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
236
+
237
++ (BOOL)removeAllItemsWithError:(NSError * __nullable __autoreleasing * __nullable)error;
238
++ (BOOL)removeAllItemsForService:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
239
++ (BOOL)removeAllItemsForService:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
240
+
241
+- (BOOL)removeItemForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
242
+- (BOOL)removeAllItemsWithError:(NSError * __nullable __autoreleasing * __nullable)error;
243
+
244
+@end
245
+
246
+@interface AWSUICKeyChainStore (ForwardCompatibility)
247
+
248
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute;
249
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
250
+
251
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service genericAttribute:(nullable id)genericAttribute;
252
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
253
+
254
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup genericAttribute:(nullable id)genericAttribute;
255
++ (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
256
+
257
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute;
258
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
259
+
260
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service genericAttribute:(nullable id)genericAttribute;
261
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
262
+
263
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup genericAttribute:(nullable id)genericAttribute;
264
++ (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
265
+
266
+- (BOOL)setString:(nullable NSString *)string forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute;
267
+- (BOOL)setString:(nullable NSString *)string forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
268
+
269
+- (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute;
270
+- (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
271
+
272
+@end
273
+
274
+NS_ASSUME_NONNULL_END

+ 26
- 0
AWSCore.framework/Headers/AWSURLRequestRetryHandler.h 查看文件

@@ -0,0 +1,26 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+#import "AWSNetworking.h"
19
+
20
+@interface AWSURLRequestRetryHandler : NSObject <AWSURLRequestRetryHandler>
21
+
22
+@property (nonatomic, assign) uint32_t maxRetryCount;
23
+
24
+- (instancetype)initWithMaximumRetryCount:(uint32_t)maxRetryCount;
25
+
26
+@end

+ 47
- 0
AWSCore.framework/Headers/AWSURLRequestSerialization.h 查看文件

@@ -0,0 +1,47 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+#import "AWSNetworking.h"
19
+#import "AWSSerialization.h"
20
+
21
+@interface AWSJSONRequestSerializer : NSObject <AWSURLRequestSerializer>
22
+
23
+- (instancetype)initWithJSONDefinition:(NSDictionary *)JSONDefinition
24
+                            actionName:(NSString *)actionName;
25
+
26
+@end
27
+
28
+@interface AWSXMLRequestSerializer : NSObject <AWSURLRequestSerializer>
29
+
30
+- (instancetype)initWithJSONDefinition:(NSDictionary *)JSONDefinition
31
+                      actionName:(NSString *)actionName;
32
+
33
++ (BOOL)constructURIandHeadersAndBody:(NSMutableURLRequest *)request
34
+                                rules:(AWSJSONDictionary *)rules
35
+                           parameters:(NSDictionary *)params
36
+                            uriSchema:(NSString *)uriSchema
37
+                                error:(NSError *__autoreleasing *)error;
38
+@end
39
+
40
+@interface AWSQueryStringRequestSerializer : NSObject <AWSURLRequestSerializer>
41
+
42
+- (instancetype)initWithJSONDefinition:(NSDictionary *)JSONDefinition
43
+                            actionName:(NSString *)actionName;
44
+
45
+@property (nonatomic, strong) NSDictionary *additionalParameters;
46
+
47
+@end

+ 47
- 0
AWSCore.framework/Headers/AWSURLResponseSerialization.h 查看文件

@@ -0,0 +1,47 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+#import "AWSNetworking.h"
19
+#import "AWSSerialization.h"
20
+
21
+@interface AWSJSONResponseSerializer : NSObject <AWSHTTPURLResponseSerializer>
22
+
23
+@property (nonatomic, strong, readonly) NSDictionary *serviceDefinitionJSON;
24
+@property (nonatomic, strong, readonly) NSString *actionName;
25
+@property (nonatomic, assign, readonly) Class outputClass;
26
+
27
+- (instancetype)initWithJSONDefinition:(NSDictionary *)JSONDefinition
28
+                            actionName:(NSString *)actionName
29
+                           outputClass:(Class)outputClass;
30
+
31
+@end
32
+
33
+@interface AWSXMLResponseSerializer : NSObject <AWSHTTPURLResponseSerializer>
34
+
35
+@property (nonatomic, assign) Class outputClass;
36
+
37
+- (instancetype)initWithJSONDefinition:(NSDictionary *)JSONDefinition
38
+                            actionName:(NSString *)actionName
39
+                           outputClass:(Class)outputClass;
40
+
41
++ (NSMutableDictionary *)parseResponse:(NSHTTPURLResponse *)response
42
+                                 rules:(AWSJSONDictionary *)rules
43
+                        bodyDictionary:(NSMutableDictionary *)bodyDictionary
44
+                                 error:(NSError *__autoreleasing *)error;
45
+@end
46
+
47
+

+ 27
- 0
AWSCore.framework/Headers/AWSURLSessionManager.h 查看文件

@@ -0,0 +1,27 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import "AWSNetworking.h"
18
+
19
+@interface AWSURLSessionManager : NSObject <NSURLSessionDelegate, NSURLSessionDataDelegate>
20
+
21
+@property (nonatomic, strong) AWSNetworkingConfiguration *configuration;
22
+
23
+- (instancetype)initWithConfiguration:(AWSNetworkingConfiguration *)configuration;
24
+
25
+- (AWSTask *)dataTaskWithRequest:(AWSNetworkingRequest *)request;
26
+
27
+@end

+ 39
- 0
AWSCore.framework/Headers/AWSValidation.h 查看文件

@@ -0,0 +1,39 @@
1
+//
2
+// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+// defined domain for errors from AWSRuntime.
19
+FOUNDATION_EXPORT NSString *const AWSValidationErrorDomain;
20
+
21
+/* NSError codes in AWSErrorDomain. */
22
+typedef NS_ENUM(NSInteger, AWSValidationErrorType) {
23
+    // AWSJSON Validation related errors
24
+    AWSValidationUnknownError, // Unknown Error found during JSON Validation
25
+    AWSValidationUnexpectedParameter, // Unexpected Parameters found in HTTP Body
26
+    AWSValidationUnhandledType,
27
+    AWSValidationMissingRequiredParameter,
28
+    AWSValidationOutOfRangeParameter,
29
+    AWSValidationInvalidStringParameter,
30
+    AWSValidationUnexpectedStringParameter,
31
+    AWSValidationInvalidParameterType,
32
+    AWSValidationInvalidBase64Data,
33
+    AWSValidationHeaderTargetInvalid,
34
+    AWSValidationHeaderAPIActionIsUndefined,
35
+    AWSValidationHeaderDefinitionFileIsNotFound,
36
+    AWSValidationHeaderDefinitionFileIsEmpty,
37
+    AWSValidationHeaderAPIActionIsInvalid,
38
+    AWSValidationURIIsInvalid
39
+};

+ 28
- 0
AWSCore.framework/Headers/NSArray+AWSMTLManipulationAdditions.h 查看文件

@@ -0,0 +1,28 @@
1
+//
2
+//  NSArray+MTLManipulationAdditions.h
3
+//  Mantle
4
+//
5
+//  Created by Josh Abernathy on 9/19/12.
6
+//  Copyright (c) 2012 GitHub. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+@interface NSArray (AWSMTLManipulationAdditions)
12
+
13
+// The first object in the array or nil if the array is empty.
14
+// Forwards to `firstObject` which has been first declared in iOS7, but works with iOS4/10.6.
15
+@property (nonatomic, readonly, strong) id awsmtl_firstObject;
16
+
17
+// Returns a new array without all instances of the given object.
18
+- (NSArray *)awsmtl_arrayByRemovingObject:(id)object;
19
+
20
+// Returns a new array without the first object. If the array is empty, it
21
+// returns the empty array.
22
+- (NSArray *)awsmtl_arrayByRemovingFirstObject;
23
+
24
+// Returns a new array without the last object. If the array is empty, it
25
+// returns the empty array.
26
+- (NSArray *)awsmtl_arrayByRemovingLastObject;
27
+
28
+@end

+ 25
- 0
AWSCore.framework/Headers/NSDictionary+AWSMTLManipulationAdditions.h 查看文件

@@ -0,0 +1,25 @@
1
+//
2
+//  NSDictionary+MTLManipulationAdditions.h
3
+//  Mantle
4
+//
5
+//  Created by Justin Spahr-Summers on 2012-09-24.
6
+//  Copyright (c) 2012 GitHub. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+@interface NSDictionary (AWSMTLManipulationAdditions)
12
+
13
+// Merges the keys and values from the given dictionary into the receiver. If
14
+// both the receiver and `dictionary` have a given key, the value from
15
+// `dictionary` is used.
16
+//
17
+// Returns a new dictionary containing the entries of the receiver combined with
18
+// those of `dictionary`.
19
+- (NSDictionary *)awsmtl_dictionaryByAddingEntriesFromDictionary:(NSDictionary *)dictionary;
20
+
21
+// Creates a new dictionary with all the entries for the given keys removed from
22
+// the receiver.
23
+- (NSDictionary *)awsmtl_dictionaryByRemovingEntriesWithKeys:(NSSet *)keys;
24
+
25
+@end

+ 15
- 0
AWSCore.framework/Headers/NSObject+AWSMTLComparisonAdditions.h 查看文件

@@ -0,0 +1,15 @@
1
+//
2
+//  NSObject+MTLComparisonAdditions.h
3
+//  Mantle
4
+//
5
+//  Created by Josh Vera on 10/26/12.
6
+//  Copyright (c) 2012 GitHub. All rights reserved.
7
+//
8
+//  Portions copyright (c) 2011 Bitswift. All rights reserved.
9
+//  See the LICENSE file for more information.
10
+//
11
+
12
+#import <Foundation/Foundation.h>
13
+
14
+// Returns whether both objects are identical or equal via -isEqual:
15
+BOOL AWSMTLEqualObjects(id obj1, id obj2);

+ 21
- 0
AWSCore.framework/Headers/NSValueTransformer+AWSMTLInversionAdditions.h 查看文件

@@ -0,0 +1,21 @@
1
+//
2
+//  NSValueTransformer+MTLInversionAdditions.h
3
+//  Mantle
4
+//
5
+//  Created by Justin Spahr-Summers on 2013-05-18.
6
+//  Copyright (c) 2013 GitHub. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+@interface NSValueTransformer (AWSMTLInversionAdditions)
12
+
13
+// Flips the direction of the receiver's transformation, such that
14
+// -transformedValue: will become -reverseTransformedValue:, and vice-versa.
15
+//
16
+// The receiver must allow reverse transformation.
17
+//
18
+// Returns an inverted transformer.
19
+- (NSValueTransformer *)awsmtl_invertedTransformer;
20
+
21
+@end

+ 86
- 0
AWSCore.framework/Headers/NSValueTransformer+AWSMTLPredefinedTransformerAdditions.h 查看文件

@@ -0,0 +1,86 @@
1
+//
2
+//  NSValueTransformer+MTLPredefinedTransformerAdditions.h
3
+//  Mantle
4
+//
5
+//  Created by Justin Spahr-Summers on 2012-09-27.
6
+//  Copyright (c) 2012 GitHub. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+void awsmtl_loadMTLPredefinedTransformerAdditions(void);
12
+
13
+// The name for a value transformer that converts strings into URLs and back.
14
+extern NSString * const AWSMTLURLValueTransformerName;
15
+
16
+// Ensure an NSNumber is backed by __NSCFBoolean/CFBooleanRef
17
+//
18
+// NSJSONSerialization, and likely other serialization libraries, ordinarily
19
+// serialize NSNumbers as numbers, and thus booleans would be serialized as
20
+// 0/1. The exception is when the NSNumber is backed by __NSCFBoolean, which,
21
+// though very much an implementation detail, is detected and serialized as a
22
+// proper boolean.
23
+extern NSString * const AWSMTLBooleanValueTransformerName;
24
+
25
+@interface NSValueTransformer (AWSMTLPredefinedTransformerAdditions)
26
+
27
+// Creates a reversible transformer to convert a JSON dictionary into a MTLModel
28
+// object, and vice-versa.
29
+//
30
+// modelClass - The MTLModel subclass to attempt to parse from the JSON. This
31
+//              class must conform to <MTLJSONSerializing>. This argument must
32
+//              not be nil.
33
+//
34
+// Returns a reversible transformer which uses MTLJSONAdapter for transforming
35
+// values back and forth.
36
++ (NSValueTransformer *)awsmtl_JSONDictionaryTransformerWithModelClass:(Class)modelClass;
37
+
38
+// Creates a reversible transformer to convert an array of JSON dictionaries
39
+// into an array of MTLModel objects, and vice-versa.
40
+//
41
+// modelClass - The MTLModel subclass to attempt to parse from each JSON
42
+//              dictionary. This class must conform to <MTLJSONSerializing>.
43
+//              This argument must not be nil.
44
+//
45
+// Returns a reversible transformer which uses MTLJSONAdapter for transforming
46
+// array elements back and forth.
47
++ (NSValueTransformer *)awsmtl_JSONArrayTransformerWithModelClass:(Class)modelClass;
48
+
49
+// A reversible value transformer to transform between the keys and objects of a
50
+// dictionary.
51
+//
52
+// dictionary          - The dictionary whose keys and values should be
53
+//                       transformed between. This argument must not be nil.
54
+// defaultValue        - The result to fall back to, in case no key matching the
55
+//                       input value was found during a forward transformation.
56
+// reverseDefaultValue - The result to fall back to, in case no value matching
57
+//                       the input value was found during a reverse
58
+//                       transformation.
59
+//
60
+// Can for example be used for transforming between enum values and their string
61
+// representation.
62
+//
63
+//   NSValueTransformer *valueTransformer = [NSValueTransformer awsmtl_valueMappingTransformerWithDictionary:@{
64
+//     @"foo": @(EnumDataTypeFoo),
65
+//     @"bar": @(EnumDataTypeBar),
66
+//   } defaultValue: @(EnumDataTypeUndefined) reverseDefaultValue: @"undefined"];
67
+//
68
+// Returns a transformer that will map from keys to values in dictionary
69
+// for forward transformation, and from values to keys for reverse
70
+// transformations. If no matching key or value can be found, the respective
71
+// default value is returned.
72
++ (NSValueTransformer *)awsmtl_valueMappingTransformerWithDictionary:(NSDictionary *)dictionary defaultValue:(id)defaultValue reverseDefaultValue:(id)reverseDefaultValue;
73
+
74
+// Returns a value transformer created by calling
75
+// `+mtl_valueMappingTransformerWithDictionary:defaultValue:reverseDefaultValue:`
76
+// with a default value of `nil` and a reverse default value of `nil`.
77
++ (NSValueTransformer *)awsmtl_valueMappingTransformerWithDictionary:(NSDictionary *)dictionary;
78
+
79
+@end
80
+
81
+@interface NSValueTransformer (UnavailableAWSMTLPredefinedTransformerAdditions)
82
+
83
++ (NSValueTransformer *)awsmtl_externalRepresentationTransformerWithModelClass:(Class)modelClass __attribute__((deprecated("Replaced by +mtl_JSONDictionaryTransformerWithModelClass:")));
84
++ (NSValueTransformer *)awsmtl_externalRepresentationArrayTransformerWithModelClass:(Class)modelClass __attribute__((deprecated("Replaced by +mtl_JSONArrayTransformerWithModelClass:")));
85
+
86
+@end

二進制
AWSCore.framework/Info.plist 查看文件


+ 6
- 0
AWSCore.framework/Modules/module.modulemap 查看文件

@@ -0,0 +1,6 @@
1
+framework module AWSCore {
2
+  umbrella header "AWSCore.h"
3
+
4
+  export *
5
+  module * { export * }
6
+}

+ 72
- 0
AWSCore.framework/strip-frameworks.sh 查看文件

@@ -0,0 +1,72 @@
1
+################################################################################
2
+#
3
+# Copyright 2015 Realm Inc.
4
+#
5
+# Licensed under the Apache License, Version 2.0 (the "License");
6
+# you may not use this file except in compliance with the License.
7
+# You may obtain a copy of the License at
8
+#
9
+# http://www.apache.org/licenses/LICENSE-2.0
10
+#
11
+# Unless required by applicable law or agreed to in writing, software
12
+# distributed under the License is distributed on an "AS IS" BASIS,
13
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+# See the License for the specific language governing permissions and
15
+# limitations under the License.
16
+#
17
+################################################################################
18
+
19
+# This script strips all non-valid architectures from dynamic libraries in
20
+# the application's `Frameworks` directory.
21
+#
22
+# The following environment variables are required:
23
+#
24
+# BUILT_PRODUCTS_DIR
25
+# FRAMEWORKS_FOLDER_PATH
26
+# VALID_ARCHS
27
+# EXPANDED_CODE_SIGN_IDENTITY
28
+
29
+
30
+# Signs a framework with the provided identity
31
+code_sign() {
32
+  # Use the current code_sign_identitiy
33
+  echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
34
+  echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1"
35
+  /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1"
36
+}
37
+
38
+# Set working directory to product’s embedded frameworks 
39
+cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
40
+
41
+if [ "$ACTION" = "install" ]; then
42
+  echo "Copy .bcsymbolmap files to .xcarchive"
43
+  find . -name '*.bcsymbolmap' -type f -exec mv {} "${CONFIGURATION_BUILD_DIR}" \;
44
+else
45
+  # Delete *.bcsymbolmap files from framework bundle unless archiving
46
+  find . -name '*.bcsymbolmap' -type f -exec rm -rf "{}" +\;
47
+fi
48
+
49
+echo "Stripping frameworks"
50
+
51
+for file in $(find . -type f -perm +111); do
52
+  # Skip non-dynamic libraries
53
+  if ! [[ "$(file "$file")" == *"dynamically linked shared library"* ]]; then
54
+    continue
55
+  fi
56
+  # Get architectures for current file
57
+  archs="$(lipo -info "${file}" | rev | cut -d ':' -f1 | rev)"
58
+  stripped=""
59
+  for arch in $archs; do
60
+    if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
61
+      # Strip non-valid architectures in-place
62
+      lipo -remove "$arch" -output "$file" "$file" || exit 1
63
+      stripped="$stripped $arch"
64
+    fi
65
+  done
66
+  if [[ "$stripped" != "" ]]; then
67
+    echo "Stripped $file of architectures:$stripped"
68
+    if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then
69
+      code_sign "${file}"
70
+    fi
71
+  fi
72
+done

二進制
AWSSNS.framework/AWSSNS 查看文件


+ 42
- 0
AWSSNS.framework/Headers/AWSSNS.h 查看文件

@@ -0,0 +1,42 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+/*!
19
+ Project version number for the AWSSNS framework.
20
+
21
+ @warning This value is deprecated and will be removed in an upcoming minor
22
+ version of the SDK. It conflicts with the umbrella header generated by
23
+ CocoaPods, and is not implemented at all in cases where this SDK is imported
24
+ as a CocoaPod static library. As this numeric value does not support
25
+ patch-level versioning, you should use AWSSNSSDKVersion instead.
26
+ @deprecated Use AWSSNSSDKVersion instead.
27
+ */
28
+FOUNDATION_EXPORT double AWSSNSVersionNumber DEPRECATED_MSG_ATTRIBUTE("Use AWSSNSSDKVersion instead.");
29
+
30
+/*!
31
+ Project version string for the AWSSNS framework.
32
+
33
+ @warning This value is deprecated and will be removed in an upcoming minor
34
+ version of the SDK. It conflicts with the umbrella header generated by
35
+ CocoaPods, and is not implemented at all in cases where this SDK is imported
36
+ as a CocoaPod static library.
37
+ @deprecated Use AWSSNSSDKVersion instead.
38
+ */
39
+FOUNDATION_EXPORT const unsigned char AWSSNSVersionString[] DEPRECATED_MSG_ATTRIBUTE("Use AWSSNSSDKVersion instead.");
40
+
41
+#import <AWSCore/AWSCore.h>
42
+#import "AWSSNSService.h"

+ 1051
- 0
AWSSNS.framework/Headers/AWSSNSModel.h
文件差異過大導致無法顯示
查看文件


+ 24
- 0
AWSSNS.framework/Headers/AWSSNSResources.h 查看文件

@@ -0,0 +1,24 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+
18
+@interface AWSSNSResources : NSObject
19
+
20
++ (instancetype)sharedInstance;
21
+
22
+- (NSDictionary *)JSONObject;
23
+
24
+@end

+ 899
- 0
AWSSNS.framework/Headers/AWSSNSService.h 查看文件

@@ -0,0 +1,899 @@
1
+//
2
+// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+//
4
+// Licensed under the Apache License, Version 2.0 (the "License").
5
+// You may not use this file except in compliance with the License.
6
+// A copy of the License is located at
7
+//
8
+// http://aws.amazon.com/apache2.0
9
+//
10
+// or in the "license" file accompanying this file. This file is distributed
11
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+// express or implied. See the License for the specific language governing
13
+// permissions and limitations under the License.
14
+//
15
+
16
+#import <Foundation/Foundation.h>
17
+#import <AWSCore/AWSCore.h>
18
+#import "AWSSNSModel.h"
19
+#import "AWSSNSResources.h"
20
+
21
+NS_ASSUME_NONNULL_BEGIN
22
+
23
+//! SDK version for AWSSNS
24
+FOUNDATION_EXPORT NSString *const AWSSNSSDKVersion;
25
+
26
+/**
27
+ <fullname>Amazon Simple Notification Service</fullname><p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build distributed web-enabled applications. Applications can use Amazon SNS to easily push real-time notification messages to interested subscribers over multiple delivery protocols. For more information about this product see <a href="http://aws.amazon.com/sns/">http://aws.amazon.com/sns</a>. For detailed information about Amazon SNS features and their associated API calls, see the <a href="http://docs.aws.amazon.com/sns/latest/dg/">Amazon SNS Developer Guide</a>. </p><p>We also provide SDKs that enable you to access Amazon SNS from your preferred programming language. The SDKs contain functionality that automatically takes care of tasks such as: cryptographically signing your service requests, retrying requests, and handling error responses. For a list of available SDKs, go to <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>. </p>
28
+ */
29
+@interface AWSSNS : AWSService
30
+
31
+/**
32
+ The service configuration used to instantiate this service client.
33
+ 
34
+ @warning Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.
35
+ */
36
+@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration;
37
+
38
+/**
39
+ Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with `defaultServiceConfiguration` from `[AWSServiceManager defaultServiceManager]`. The reference to this object is maintained by the SDK, and you do not need to retain it manually.
40
+
41
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
42
+ 
43
+ *Swift*
44
+
45
+     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
46
+        let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
47
+        let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
48
+        AWSServiceManager.default().defaultServiceConfiguration = configuration
49
+ 
50
+        return true
51
+    }
52
+
53
+ *Objective-C*
54
+
55
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
56
+          AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
57
+                                                                                                          identityPoolId:@"YourIdentityPoolId"];
58
+          AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
59
+                                                                               credentialsProvider:credentialsProvider];
60
+          [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
61
+
62
+          return YES;
63
+      }
64
+
65
+ Then call the following to get the default service client:
66
+
67
+ *Swift*
68
+
69
+     let SNS = AWSSNS.default()
70
+
71
+ *Objective-C*
72
+
73
+     AWSSNS *SNS = [AWSSNS defaultSNS];
74
+
75
+ @return The default service client.
76
+ */
77
++ (instancetype)defaultSNS;
78
+
79
+/**
80
+ Creates a service client with the given service configuration and registers it for the key.
81
+
82
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
83
+
84
+ *Swift*
85
+
86
+     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
87
+        let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
88
+        let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
89
+        AWSSNS.register(with: configuration!, forKey: "USWest2SNS")
90
+ 
91
+        return true
92
+    }
93
+
94
+ *Objective-C*
95
+
96
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
97
+         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
98
+                                                                                                         identityPoolId:@"YourIdentityPoolId"];
99
+         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
100
+                                                                              credentialsProvider:credentialsProvider];
101
+
102
+         [AWSSNS registerSNSWithConfiguration:configuration forKey:@"USWest2SNS"];
103
+
104
+         return YES;
105
+     }
106
+
107
+ Then call the following to get the service client:
108
+
109
+ *Swift*
110
+
111
+     let SNS = AWSSNS(forKey: "USWest2SNS")
112
+
113
+ *Objective-C*
114
+
115
+     AWSSNS *SNS = [AWSSNS SNSForKey:@"USWest2SNS"];
116
+
117
+ @warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
118
+
119
+ @param configuration A service configuration object.
120
+ @param key           A string to identify the service client.
121
+ */
122
++ (void)registerSNSWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key;
123
+
124
+/**
125
+ Retrieves the service client associated with the key. You need to call `+ registerSNSWithConfiguration:forKey:` before invoking this method.
126
+
127
+ For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
128
+
129
+ *Swift*
130
+
131
+     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
132
+        let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
133
+        let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
134
+        AWSSNS.register(with: configuration!, forKey: "USWest2SNS")
135
+ 
136
+        return true
137
+    }
138
+
139
+ *Objective-C*
140
+
141
+     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
142
+         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
143
+                                                                                                         identityPoolId:@"YourIdentityPoolId"];
144
+         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
145
+                                                                              credentialsProvider:credentialsProvider];
146
+
147
+         [AWSSNS registerSNSWithConfiguration:configuration forKey:@"USWest2SNS"];
148
+
149
+         return YES;
150
+     }
151
+
152
+ Then call the following to get the service client:
153
+
154
+ *Swift*
155
+
156
+     let SNS = AWSSNS(forKey: "USWest2SNS")
157
+
158
+ *Objective-C*
159
+
160
+     AWSSNS *SNS = [AWSSNS SNSForKey:@"USWest2SNS"];
161
+
162
+ @param key A string to identify the service client.
163
+
164
+ @return An instance of the service client.
165
+ */
166
++ (instancetype)SNSForKey:(NSString *)key;
167
+
168
+/**
169
+ Removes the service client associated with the key and release it.
170
+ 
171
+ @warning Before calling this method, make sure no method is running on this client.
172
+ 
173
+ @param key A string to identify the service client.
174
+ */
175
++ (void)removeSNSForKey:(NSString *)key;
176
+
177
+/**
178
+ <p>Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.</p>
179
+ 
180
+ @param request A container for the necessary parameters to execute the AddPermission service method.
181
+
182
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
183
+ 
184
+ @see AWSSNSAddPermissionInput
185
+ */
186
+- (AWSTask *)addPermission:(AWSSNSAddPermissionInput *)request;
187
+
188
+/**
189
+ <p>Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.</p>
190
+ 
191
+ @param request A container for the necessary parameters to execute the AddPermission service method.
192
+ @param completionHandler The completion handler to call when the load request is complete.
193
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
194
+ 
195
+ @see AWSSNSAddPermissionInput
196
+ */
197
+- (void)addPermission:(AWSSNSAddPermissionInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
198
+
199
+/**
200
+ <p>Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account. You cannot send SMS messages to a number that is opted out.</p><p>To resume sending messages, you can opt in the number by using the <code>OptInPhoneNumber</code> action.</p>
201
+ 
202
+ @param request A container for the necessary parameters to execute the CheckIfPhoneNumberIsOptedOut service method.
203
+
204
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSCheckIfPhoneNumberIsOptedOutResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
205
+ 
206
+ @see AWSSNSCheckIfPhoneNumberIsOptedOutInput
207
+ @see AWSSNSCheckIfPhoneNumberIsOptedOutResponse
208
+ */
209
+- (AWSTask<AWSSNSCheckIfPhoneNumberIsOptedOutResponse *> *)checkIfPhoneNumberIsOptedOut:(AWSSNSCheckIfPhoneNumberIsOptedOutInput *)request;
210
+
211
+/**
212
+ <p>Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account. You cannot send SMS messages to a number that is opted out.</p><p>To resume sending messages, you can opt in the number by using the <code>OptInPhoneNumber</code> action.</p>
213
+ 
214
+ @param request A container for the necessary parameters to execute the CheckIfPhoneNumberIsOptedOut service method.
215
+ @param completionHandler The completion handler to call when the load request is complete.
216
+                          `response` - A response object, or `nil` if the request failed.
217
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
218
+ 
219
+ @see AWSSNSCheckIfPhoneNumberIsOptedOutInput
220
+ @see AWSSNSCheckIfPhoneNumberIsOptedOutResponse
221
+ */
222
+- (void)checkIfPhoneNumberIsOptedOut:(AWSSNSCheckIfPhoneNumberIsOptedOutInput *)request completionHandler:(void (^ _Nullable)(AWSSNSCheckIfPhoneNumberIsOptedOutResponse * _Nullable response, NSError * _Nullable error))completionHandler;
223
+
224
+/**
225
+ <p>Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier <code>Subscribe</code> action. If the token is valid, the action creates a new subscription and returns its Amazon Resource Name (ARN). This call requires an AWS signature only when the <code>AuthenticateOnUnsubscribe</code> flag is set to "true".</p>
226
+ 
227
+ @param request A container for the necessary parameters to execute the ConfirmSubscription service method.
228
+
229
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSConfirmSubscriptionResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorSubscriptionLimitExceeded`, `AWSSNSErrorInvalidParameter`, `AWSSNSErrorNotFound`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
230
+ 
231
+ @see AWSSNSConfirmSubscriptionInput
232
+ @see AWSSNSConfirmSubscriptionResponse
233
+ */
234
+- (AWSTask<AWSSNSConfirmSubscriptionResponse *> *)confirmSubscription:(AWSSNSConfirmSubscriptionInput *)request;
235
+
236
+/**
237
+ <p>Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier <code>Subscribe</code> action. If the token is valid, the action creates a new subscription and returns its Amazon Resource Name (ARN). This call requires an AWS signature only when the <code>AuthenticateOnUnsubscribe</code> flag is set to "true".</p>
238
+ 
239
+ @param request A container for the necessary parameters to execute the ConfirmSubscription service method.
240
+ @param completionHandler The completion handler to call when the load request is complete.
241
+                          `response` - A response object, or `nil` if the request failed.
242
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorSubscriptionLimitExceeded`, `AWSSNSErrorInvalidParameter`, `AWSSNSErrorNotFound`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
243
+ 
244
+ @see AWSSNSConfirmSubscriptionInput
245
+ @see AWSSNSConfirmSubscriptionResponse
246
+ */
247
+- (void)confirmSubscription:(AWSSNSConfirmSubscriptionInput *)request completionHandler:(void (^ _Nullable)(AWSSNSConfirmSubscriptionResponse * _Nullable response, NSError * _Nullable error))completionHandler;
248
+
249
+/**
250
+ <p>Creates a platform application object for one of the supported push notification services, such as APNS and GCM, to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes when using the <code>CreatePlatformApplication</code> action. The PlatformPrincipal is received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". For GCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id". The PlatformCredential is also received from the notification service. For WNS, PlatformPrincipal is "Package Security Identifier". For MPNS, PlatformPrincipal is "TLS certificate". For Baidu, PlatformPrincipal is "API key".</p><p>For APNS/APNS_SANDBOX, PlatformCredential is "private key". For GCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret". For WNS, PlatformCredential is "secret key". For MPNS, PlatformCredential is "private key". For Baidu, PlatformCredential is "secret key". The PlatformApplicationArn that is returned when using <code>CreatePlatformApplication</code> is then used as an attribute for the <code>CreatePlatformEndpoint</code> action. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. For more information about obtaining the PlatformPrincipal and PlatformCredential for each of the supported push notification services, see <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html">Getting Started with Apple Push Notification Service</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-adm.html">Getting Started with Amazon Device Messaging</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-baidu.html">Getting Started with Baidu Cloud Push</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html">Getting Started with Google Cloud Messaging for Android</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-mpns.html">Getting Started with MPNS</a>, or <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-wns.html">Getting Started with WNS</a>. </p>
251
+ 
252
+ @param request A container for the necessary parameters to execute the CreatePlatformApplication service method.
253
+
254
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSCreatePlatformApplicationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
255
+ 
256
+ @see AWSSNSCreatePlatformApplicationInput
257
+ @see AWSSNSCreatePlatformApplicationResponse
258
+ */
259
+- (AWSTask<AWSSNSCreatePlatformApplicationResponse *> *)createPlatformApplication:(AWSSNSCreatePlatformApplicationInput *)request;
260
+
261
+/**
262
+ <p>Creates a platform application object for one of the supported push notification services, such as APNS and GCM, to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes when using the <code>CreatePlatformApplication</code> action. The PlatformPrincipal is received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". For GCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id". The PlatformCredential is also received from the notification service. For WNS, PlatformPrincipal is "Package Security Identifier". For MPNS, PlatformPrincipal is "TLS certificate". For Baidu, PlatformPrincipal is "API key".</p><p>For APNS/APNS_SANDBOX, PlatformCredential is "private key". For GCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret". For WNS, PlatformCredential is "secret key". For MPNS, PlatformCredential is "private key". For Baidu, PlatformCredential is "secret key". The PlatformApplicationArn that is returned when using <code>CreatePlatformApplication</code> is then used as an attribute for the <code>CreatePlatformEndpoint</code> action. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. For more information about obtaining the PlatformPrincipal and PlatformCredential for each of the supported push notification services, see <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html">Getting Started with Apple Push Notification Service</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-adm.html">Getting Started with Amazon Device Messaging</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-baidu.html">Getting Started with Baidu Cloud Push</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html">Getting Started with Google Cloud Messaging for Android</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-mpns.html">Getting Started with MPNS</a>, or <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-wns.html">Getting Started with WNS</a>. </p>
263
+ 
264
+ @param request A container for the necessary parameters to execute the CreatePlatformApplication service method.
265
+ @param completionHandler The completion handler to call when the load request is complete.
266
+                          `response` - A response object, or `nil` if the request failed.
267
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
268
+ 
269
+ @see AWSSNSCreatePlatformApplicationInput
270
+ @see AWSSNSCreatePlatformApplicationResponse
271
+ */
272
+- (void)createPlatformApplication:(AWSSNSCreatePlatformApplicationInput *)request completionHandler:(void (^ _Nullable)(AWSSNSCreatePlatformApplicationResponse * _Nullable response, NSError * _Nullable error))completionHandler;
273
+
274
+/**
275
+ <p>Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM and APNS. <code>CreatePlatformEndpoint</code> requires the PlatformApplicationArn that is returned from <code>CreatePlatformApplication</code>. The EndpointArn that is returned when using <code>CreatePlatformEndpoint</code> can then be used by the <code>Publish</code> action to send a message to a mobile app or by the <code>Subscribe</code> action for subscription to a topic. The <code>CreatePlatformEndpoint</code> action is idempotent, so if the requester already owns an endpoint with the same device token and attributes, that endpoint's ARN is returned without creating a new endpoint. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>When using <code>CreatePlatformEndpoint</code> with Baidu, two attributes must be provided: ChannelId and UserId. The token field must also contain the ChannelId. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html">Creating an Amazon SNS Endpoint for Baidu</a>. </p>
276
+ 
277
+ @param request A container for the necessary parameters to execute the CreatePlatformEndpoint service method.
278
+
279
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSCreateEndpointResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
280
+ 
281
+ @see AWSSNSCreatePlatformEndpointInput
282
+ @see AWSSNSCreateEndpointResponse
283
+ */
284
+- (AWSTask<AWSSNSCreateEndpointResponse *> *)createPlatformEndpoint:(AWSSNSCreatePlatformEndpointInput *)request;
285
+
286
+/**
287
+ <p>Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM and APNS. <code>CreatePlatformEndpoint</code> requires the PlatformApplicationArn that is returned from <code>CreatePlatformApplication</code>. The EndpointArn that is returned when using <code>CreatePlatformEndpoint</code> can then be used by the <code>Publish</code> action to send a message to a mobile app or by the <code>Subscribe</code> action for subscription to a topic. The <code>CreatePlatformEndpoint</code> action is idempotent, so if the requester already owns an endpoint with the same device token and attributes, that endpoint's ARN is returned without creating a new endpoint. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>When using <code>CreatePlatformEndpoint</code> with Baidu, two attributes must be provided: ChannelId and UserId. The token field must also contain the ChannelId. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html">Creating an Amazon SNS Endpoint for Baidu</a>. </p>
288
+ 
289
+ @param request A container for the necessary parameters to execute the CreatePlatformEndpoint service method.
290
+ @param completionHandler The completion handler to call when the load request is complete.
291
+                          `response` - A response object, or `nil` if the request failed.
292
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
293
+ 
294
+ @see AWSSNSCreatePlatformEndpointInput
295
+ @see AWSSNSCreateEndpointResponse
296
+ */
297
+- (void)createPlatformEndpoint:(AWSSNSCreatePlatformEndpointInput *)request completionHandler:(void (^ _Nullable)(AWSSNSCreateEndpointResponse * _Nullable response, NSError * _Nullable error))completionHandler;
298
+
299
+/**
300
+ <p>Creates a topic to which notifications can be published. Users can create at most 100,000 topics. For more information, see <a href="http://aws.amazon.com/sns/">http://aws.amazon.com/sns</a>. This action is idempotent, so if the requester already owns a topic with the specified name, that topic's ARN is returned without creating a new topic.</p>
301
+ 
302
+ @param request A container for the necessary parameters to execute the CreateTopic service method.
303
+
304
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSCreateTopicResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorTopicLimitExceeded`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
305
+ 
306
+ @see AWSSNSCreateTopicInput
307
+ @see AWSSNSCreateTopicResponse
308
+ */
309
+- (AWSTask<AWSSNSCreateTopicResponse *> *)createTopic:(AWSSNSCreateTopicInput *)request;
310
+
311
+/**
312
+ <p>Creates a topic to which notifications can be published. Users can create at most 100,000 topics. For more information, see <a href="http://aws.amazon.com/sns/">http://aws.amazon.com/sns</a>. This action is idempotent, so if the requester already owns a topic with the specified name, that topic's ARN is returned without creating a new topic.</p>
313
+ 
314
+ @param request A container for the necessary parameters to execute the CreateTopic service method.
315
+ @param completionHandler The completion handler to call when the load request is complete.
316
+                          `response` - A response object, or `nil` if the request failed.
317
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorTopicLimitExceeded`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
318
+ 
319
+ @see AWSSNSCreateTopicInput
320
+ @see AWSSNSCreateTopicResponse
321
+ */
322
+- (void)createTopic:(AWSSNSCreateTopicInput *)request completionHandler:(void (^ _Nullable)(AWSSNSCreateTopicResponse * _Nullable response, NSError * _Nullable error))completionHandler;
323
+
324
+/**
325
+ <p>Deletes the endpoint for a device and mobile app from Amazon SNS. This action is idempotent. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>When you delete an endpoint that is also subscribed to a topic, then you must also unsubscribe the endpoint from the topic.</p>
326
+ 
327
+ @param request A container for the necessary parameters to execute the DeleteEndpoint service method.
328
+
329
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
330
+ 
331
+ @see AWSSNSDeleteEndpointInput
332
+ */
333
+- (AWSTask *)deleteEndpoint:(AWSSNSDeleteEndpointInput *)request;
334
+
335
+/**
336
+ <p>Deletes the endpoint for a device and mobile app from Amazon SNS. This action is idempotent. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>When you delete an endpoint that is also subscribed to a topic, then you must also unsubscribe the endpoint from the topic.</p>
337
+ 
338
+ @param request A container for the necessary parameters to execute the DeleteEndpoint service method.
339
+ @param completionHandler The completion handler to call when the load request is complete.
340
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
341
+ 
342
+ @see AWSSNSDeleteEndpointInput
343
+ */
344
+- (void)deleteEndpoint:(AWSSNSDeleteEndpointInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
345
+
346
+/**
347
+ <p>Deletes a platform application object for one of the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
348
+ 
349
+ @param request A container for the necessary parameters to execute the DeletePlatformApplication service method.
350
+
351
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
352
+ 
353
+ @see AWSSNSDeletePlatformApplicationInput
354
+ */
355
+- (AWSTask *)deletePlatformApplication:(AWSSNSDeletePlatformApplicationInput *)request;
356
+
357
+/**
358
+ <p>Deletes a platform application object for one of the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
359
+ 
360
+ @param request A container for the necessary parameters to execute the DeletePlatformApplication service method.
361
+ @param completionHandler The completion handler to call when the load request is complete.
362
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
363
+ 
364
+ @see AWSSNSDeletePlatformApplicationInput
365
+ */
366
+- (void)deletePlatformApplication:(AWSSNSDeletePlatformApplicationInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
367
+
368
+/**
369
+ <p>Deletes a topic and all its subscriptions. Deleting a topic might prevent some messages previously sent to the topic from being delivered to subscribers. This action is idempotent, so deleting a topic that does not exist does not result in an error.</p>
370
+ 
371
+ @param request A container for the necessary parameters to execute the DeleteTopic service method.
372
+
373
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
374
+ 
375
+ @see AWSSNSDeleteTopicInput
376
+ */
377
+- (AWSTask *)deleteTopic:(AWSSNSDeleteTopicInput *)request;
378
+
379
+/**
380
+ <p>Deletes a topic and all its subscriptions. Deleting a topic might prevent some messages previously sent to the topic from being delivered to subscribers. This action is idempotent, so deleting a topic that does not exist does not result in an error.</p>
381
+ 
382
+ @param request A container for the necessary parameters to execute the DeleteTopic service method.
383
+ @param completionHandler The completion handler to call when the load request is complete.
384
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
385
+ 
386
+ @see AWSSNSDeleteTopicInput
387
+ */
388
+- (void)deleteTopic:(AWSSNSDeleteTopicInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
389
+
390
+/**
391
+ <p>Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
392
+ 
393
+ @param request A container for the necessary parameters to execute the GetEndpointAttributes service method.
394
+
395
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSGetEndpointAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
396
+ 
397
+ @see AWSSNSGetEndpointAttributesInput
398
+ @see AWSSNSGetEndpointAttributesResponse
399
+ */
400
+- (AWSTask<AWSSNSGetEndpointAttributesResponse *> *)getEndpointAttributes:(AWSSNSGetEndpointAttributesInput *)request;
401
+
402
+/**
403
+ <p>Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
404
+ 
405
+ @param request A container for the necessary parameters to execute the GetEndpointAttributes service method.
406
+ @param completionHandler The completion handler to call when the load request is complete.
407
+                          `response` - A response object, or `nil` if the request failed.
408
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
409
+ 
410
+ @see AWSSNSGetEndpointAttributesInput
411
+ @see AWSSNSGetEndpointAttributesResponse
412
+ */
413
+- (void)getEndpointAttributes:(AWSSNSGetEndpointAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSGetEndpointAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
414
+
415
+/**
416
+ <p>Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
417
+ 
418
+ @param request A container for the necessary parameters to execute the GetPlatformApplicationAttributes service method.
419
+
420
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSGetPlatformApplicationAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
421
+ 
422
+ @see AWSSNSGetPlatformApplicationAttributesInput
423
+ @see AWSSNSGetPlatformApplicationAttributesResponse
424
+ */
425
+- (AWSTask<AWSSNSGetPlatformApplicationAttributesResponse *> *)getPlatformApplicationAttributes:(AWSSNSGetPlatformApplicationAttributesInput *)request;
426
+
427
+/**
428
+ <p>Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
429
+ 
430
+ @param request A container for the necessary parameters to execute the GetPlatformApplicationAttributes service method.
431
+ @param completionHandler The completion handler to call when the load request is complete.
432
+                          `response` - A response object, or `nil` if the request failed.
433
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
434
+ 
435
+ @see AWSSNSGetPlatformApplicationAttributesInput
436
+ @see AWSSNSGetPlatformApplicationAttributesResponse
437
+ */
438
+- (void)getPlatformApplicationAttributes:(AWSSNSGetPlatformApplicationAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSGetPlatformApplicationAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
439
+
440
+/**
441
+ <p>Returns the settings for sending SMS messages from your account.</p><p>These settings are set with the <code>SetSMSAttributes</code> action.</p>
442
+ 
443
+ @param request A container for the necessary parameters to execute the GetSMSAttributes service method.
444
+
445
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSGetSMSAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
446
+ 
447
+ @see AWSSNSGetSMSAttributesInput
448
+ @see AWSSNSGetSMSAttributesResponse
449
+ */
450
+- (AWSTask<AWSSNSGetSMSAttributesResponse *> *)getSMSAttributes:(AWSSNSGetSMSAttributesInput *)request;
451
+
452
+/**
453
+ <p>Returns the settings for sending SMS messages from your account.</p><p>These settings are set with the <code>SetSMSAttributes</code> action.</p>
454
+ 
455
+ @param request A container for the necessary parameters to execute the GetSMSAttributes service method.
456
+ @param completionHandler The completion handler to call when the load request is complete.
457
+                          `response` - A response object, or `nil` if the request failed.
458
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
459
+ 
460
+ @see AWSSNSGetSMSAttributesInput
461
+ @see AWSSNSGetSMSAttributesResponse
462
+ */
463
+- (void)getSMSAttributes:(AWSSNSGetSMSAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSGetSMSAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
464
+
465
+/**
466
+ <p>Returns all of the properties of a subscription.</p>
467
+ 
468
+ @param request A container for the necessary parameters to execute the GetSubscriptionAttributes service method.
469
+
470
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSGetSubscriptionAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
471
+ 
472
+ @see AWSSNSGetSubscriptionAttributesInput
473
+ @see AWSSNSGetSubscriptionAttributesResponse
474
+ */
475
+- (AWSTask<AWSSNSGetSubscriptionAttributesResponse *> *)getSubscriptionAttributes:(AWSSNSGetSubscriptionAttributesInput *)request;
476
+
477
+/**
478
+ <p>Returns all of the properties of a subscription.</p>
479
+ 
480
+ @param request A container for the necessary parameters to execute the GetSubscriptionAttributes service method.
481
+ @param completionHandler The completion handler to call when the load request is complete.
482
+                          `response` - A response object, or `nil` if the request failed.
483
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
484
+ 
485
+ @see AWSSNSGetSubscriptionAttributesInput
486
+ @see AWSSNSGetSubscriptionAttributesResponse
487
+ */
488
+- (void)getSubscriptionAttributes:(AWSSNSGetSubscriptionAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSGetSubscriptionAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
489
+
490
+/**
491
+ <p>Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.</p>
492
+ 
493
+ @param request A container for the necessary parameters to execute the GetTopicAttributes service method.
494
+
495
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSGetTopicAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
496
+ 
497
+ @see AWSSNSGetTopicAttributesInput
498
+ @see AWSSNSGetTopicAttributesResponse
499
+ */
500
+- (AWSTask<AWSSNSGetTopicAttributesResponse *> *)getTopicAttributes:(AWSSNSGetTopicAttributesInput *)request;
501
+
502
+/**
503
+ <p>Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.</p>
504
+ 
505
+ @param request A container for the necessary parameters to execute the GetTopicAttributes service method.
506
+ @param completionHandler The completion handler to call when the load request is complete.
507
+                          `response` - A response object, or `nil` if the request failed.
508
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
509
+ 
510
+ @see AWSSNSGetTopicAttributesInput
511
+ @see AWSSNSGetTopicAttributesResponse
512
+ */
513
+- (void)getTopicAttributes:(AWSSNSGetTopicAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSGetTopicAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
514
+
515
+/**
516
+ <p>Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS. The results for <code>ListEndpointsByPlatformApplication</code> are paginated and return a limited list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call <code>ListEndpointsByPlatformApplication</code> again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>This action is throttled at 30 transactions per second (TPS).</p>
517
+ 
518
+ @param request A container for the necessary parameters to execute the ListEndpointsByPlatformApplication service method.
519
+
520
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListEndpointsByPlatformApplicationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
521
+ 
522
+ @see AWSSNSListEndpointsByPlatformApplicationInput
523
+ @see AWSSNSListEndpointsByPlatformApplicationResponse
524
+ */
525
+- (AWSTask<AWSSNSListEndpointsByPlatformApplicationResponse *> *)listEndpointsByPlatformApplication:(AWSSNSListEndpointsByPlatformApplicationInput *)request;
526
+
527
+/**
528
+ <p>Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS. The results for <code>ListEndpointsByPlatformApplication</code> are paginated and return a limited list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call <code>ListEndpointsByPlatformApplication</code> again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>This action is throttled at 30 transactions per second (TPS).</p>
529
+ 
530
+ @param request A container for the necessary parameters to execute the ListEndpointsByPlatformApplication service method.
531
+ @param completionHandler The completion handler to call when the load request is complete.
532
+                          `response` - A response object, or `nil` if the request failed.
533
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
534
+ 
535
+ @see AWSSNSListEndpointsByPlatformApplicationInput
536
+ @see AWSSNSListEndpointsByPlatformApplicationResponse
537
+ */
538
+- (void)listEndpointsByPlatformApplication:(AWSSNSListEndpointsByPlatformApplicationInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListEndpointsByPlatformApplicationResponse * _Nullable response, NSError * _Nullable error))completionHandler;
539
+
540
+/**
541
+ <p>Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.</p><p>The results for <code>ListPhoneNumbersOptedOut</code> are paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then a <code>NextToken</code> string will be returned. To receive the next page, you call <code>ListPhoneNumbersOptedOut</code> again using the <code>NextToken</code> string received from the previous call. When there are no more records to return, <code>NextToken</code> will be null.</p>
542
+ 
543
+ @param request A container for the necessary parameters to execute the ListPhoneNumbersOptedOut service method.
544
+
545
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListPhoneNumbersOptedOutResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
546
+ 
547
+ @see AWSSNSListPhoneNumbersOptedOutInput
548
+ @see AWSSNSListPhoneNumbersOptedOutResponse
549
+ */
550
+- (AWSTask<AWSSNSListPhoneNumbersOptedOutResponse *> *)listPhoneNumbersOptedOut:(AWSSNSListPhoneNumbersOptedOutInput *)request;
551
+
552
+/**
553
+ <p>Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.</p><p>The results for <code>ListPhoneNumbersOptedOut</code> are paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then a <code>NextToken</code> string will be returned. To receive the next page, you call <code>ListPhoneNumbersOptedOut</code> again using the <code>NextToken</code> string received from the previous call. When there are no more records to return, <code>NextToken</code> will be null.</p>
554
+ 
555
+ @param request A container for the necessary parameters to execute the ListPhoneNumbersOptedOut service method.
556
+ @param completionHandler The completion handler to call when the load request is complete.
557
+                          `response` - A response object, or `nil` if the request failed.
558
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
559
+ 
560
+ @see AWSSNSListPhoneNumbersOptedOutInput
561
+ @see AWSSNSListPhoneNumbersOptedOutResponse
562
+ */
563
+- (void)listPhoneNumbersOptedOut:(AWSSNSListPhoneNumbersOptedOutInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListPhoneNumbersOptedOutResponse * _Nullable response, NSError * _Nullable error))completionHandler;
564
+
565
+/**
566
+ <p>Lists the platform application objects for the supported push notification services, such as APNS and GCM. The results for <code>ListPlatformApplications</code> are paginated and return a limited list of applications, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call <code>ListPlatformApplications</code> using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>This action is throttled at 15 transactions per second (TPS).</p>
567
+ 
568
+ @param request A container for the necessary parameters to execute the ListPlatformApplications service method.
569
+
570
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListPlatformApplicationsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
571
+ 
572
+ @see AWSSNSListPlatformApplicationsInput
573
+ @see AWSSNSListPlatformApplicationsResponse
574
+ */
575
+- (AWSTask<AWSSNSListPlatformApplicationsResponse *> *)listPlatformApplications:(AWSSNSListPlatformApplicationsInput *)request;
576
+
577
+/**
578
+ <p>Lists the platform application objects for the supported push notification services, such as APNS and GCM. The results for <code>ListPlatformApplications</code> are paginated and return a limited list of applications, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you call <code>ListPlatformApplications</code> using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>This action is throttled at 15 transactions per second (TPS).</p>
579
+ 
580
+ @param request A container for the necessary parameters to execute the ListPlatformApplications service method.
581
+ @param completionHandler The completion handler to call when the load request is complete.
582
+                          `response` - A response object, or `nil` if the request failed.
583
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
584
+ 
585
+ @see AWSSNSListPlatformApplicationsInput
586
+ @see AWSSNSListPlatformApplicationsResponse
587
+ */
588
+- (void)listPlatformApplications:(AWSSNSListPlatformApplicationsInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListPlatformApplicationsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
589
+
590
+/**
591
+ <p>Returns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListSubscriptions</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
592
+ 
593
+ @param request A container for the necessary parameters to execute the ListSubscriptions service method.
594
+
595
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListSubscriptionsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
596
+ 
597
+ @see AWSSNSListSubscriptionsInput
598
+ @see AWSSNSListSubscriptionsResponse
599
+ */
600
+- (AWSTask<AWSSNSListSubscriptionsResponse *> *)listSubscriptions:(AWSSNSListSubscriptionsInput *)request;
601
+
602
+/**
603
+ <p>Returns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListSubscriptions</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
604
+ 
605
+ @param request A container for the necessary parameters to execute the ListSubscriptions service method.
606
+ @param completionHandler The completion handler to call when the load request is complete.
607
+                          `response` - A response object, or `nil` if the request failed.
608
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
609
+ 
610
+ @see AWSSNSListSubscriptionsInput
611
+ @see AWSSNSListSubscriptionsResponse
612
+ */
613
+- (void)listSubscriptions:(AWSSNSListSubscriptionsInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListSubscriptionsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
614
+
615
+/**
616
+ <p>Returns a list of the subscriptions to a specific topic. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListSubscriptionsByTopic</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
617
+ 
618
+ @param request A container for the necessary parameters to execute the ListSubscriptionsByTopic service method.
619
+
620
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListSubscriptionsByTopicResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
621
+ 
622
+ @see AWSSNSListSubscriptionsByTopicInput
623
+ @see AWSSNSListSubscriptionsByTopicResponse
624
+ */
625
+- (AWSTask<AWSSNSListSubscriptionsByTopicResponse *> *)listSubscriptionsByTopic:(AWSSNSListSubscriptionsByTopicInput *)request;
626
+
627
+/**
628
+ <p>Returns a list of the subscriptions to a specific topic. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListSubscriptionsByTopic</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
629
+ 
630
+ @param request A container for the necessary parameters to execute the ListSubscriptionsByTopic service method.
631
+ @param completionHandler The completion handler to call when the load request is complete.
632
+                          `response` - A response object, or `nil` if the request failed.
633
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
634
+ 
635
+ @see AWSSNSListSubscriptionsByTopicInput
636
+ @see AWSSNSListSubscriptionsByTopicResponse
637
+ */
638
+- (void)listSubscriptionsByTopic:(AWSSNSListSubscriptionsByTopicInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListSubscriptionsByTopicResponse * _Nullable response, NSError * _Nullable error))completionHandler;
639
+
640
+/**
641
+ <p>Returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. If there are more topics, a <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListTopics</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
642
+ 
643
+ @param request A container for the necessary parameters to execute the ListTopics service method.
644
+
645
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListTopicsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
646
+ 
647
+ @see AWSSNSListTopicsInput
648
+ @see AWSSNSListTopicsResponse
649
+ */
650
+- (AWSTask<AWSSNSListTopicsResponse *> *)listTopics:(AWSSNSListTopicsInput *)request;
651
+
652
+/**
653
+ <p>Returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. If there are more topics, a <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListTopics</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
654
+ 
655
+ @param request A container for the necessary parameters to execute the ListTopics service method.
656
+ @param completionHandler The completion handler to call when the load request is complete.
657
+                          `response` - A response object, or `nil` if the request failed.
658
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
659
+ 
660
+ @see AWSSNSListTopicsInput
661
+ @see AWSSNSListTopicsResponse
662
+ */
663
+- (void)listTopics:(AWSSNSListTopicsInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListTopicsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
664
+
665
+/**
666
+ <p>Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.</p><p>You can opt in a phone number only once every 30 days.</p>
667
+ 
668
+ @param request A container for the necessary parameters to execute the OptInPhoneNumber service method.
669
+
670
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSOptInPhoneNumberResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
671
+ 
672
+ @see AWSSNSOptInPhoneNumberInput
673
+ @see AWSSNSOptInPhoneNumberResponse
674
+ */
675
+- (AWSTask<AWSSNSOptInPhoneNumberResponse *> *)optInPhoneNumber:(AWSSNSOptInPhoneNumberInput *)request;
676
+
677
+/**
678
+ <p>Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.</p><p>You can opt in a phone number only once every 30 days.</p>
679
+ 
680
+ @param request A container for the necessary parameters to execute the OptInPhoneNumber service method.
681
+ @param completionHandler The completion handler to call when the load request is complete.
682
+                          `response` - A response object, or `nil` if the request failed.
683
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
684
+ 
685
+ @see AWSSNSOptInPhoneNumberInput
686
+ @see AWSSNSOptInPhoneNumberResponse
687
+ */
688
+- (void)optInPhoneNumber:(AWSSNSOptInPhoneNumberInput *)request completionHandler:(void (^ _Nullable)(AWSSNSOptInPhoneNumberResponse * _Nullable response, NSError * _Nullable error))completionHandler;
689
+
690
+/**
691
+ <p>Sends a message to an Amazon SNS topic or sends a text message (SMS message) directly to a phone number. </p><p>If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is subscribed to the topic. The format of the message depends on the notification protocol for each subscribed endpoint.</p><p>When a <code>messageId</code> is returned, the message has been saved and Amazon SNS will attempt to deliver it shortly.</p><p>To use the <code>Publish</code> action for sending a message to a mobile endpoint, such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for the TargetArn parameter. The EndpointArn is returned when making a call with the <code>CreatePlatformEndpoint</code> action. </p><p>For more information about formatting messages, see <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html">Send Custom Platform-Specific Payloads in Messages to Mobile Devices</a>. </p>
692
+ 
693
+ @param request A container for the necessary parameters to execute the Publish service method.
694
+
695
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSPublishResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInvalidParameterValue`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorEndpointDisabled`, `AWSSNSErrorPlatformApplicationDisabled`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorKMSDisabled`, `AWSSNSErrorKMSInvalidState`, `AWSSNSErrorKMSNotFound`, `AWSSNSErrorKMSOptInRequired`, `AWSSNSErrorKMSThrottling`, `AWSSNSErrorKMSAccessDenied`, `AWSSNSErrorInvalidSecurity`.
696
+ 
697
+ @see AWSSNSPublishInput
698
+ @see AWSSNSPublishResponse
699
+ */
700
+- (AWSTask<AWSSNSPublishResponse *> *)publish:(AWSSNSPublishInput *)request;
701
+
702
+/**
703
+ <p>Sends a message to an Amazon SNS topic or sends a text message (SMS message) directly to a phone number. </p><p>If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is subscribed to the topic. The format of the message depends on the notification protocol for each subscribed endpoint.</p><p>When a <code>messageId</code> is returned, the message has been saved and Amazon SNS will attempt to deliver it shortly.</p><p>To use the <code>Publish</code> action for sending a message to a mobile endpoint, such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for the TargetArn parameter. The EndpointArn is returned when making a call with the <code>CreatePlatformEndpoint</code> action. </p><p>For more information about formatting messages, see <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html">Send Custom Platform-Specific Payloads in Messages to Mobile Devices</a>. </p>
704
+ 
705
+ @param request A container for the necessary parameters to execute the Publish service method.
706
+ @param completionHandler The completion handler to call when the load request is complete.
707
+                          `response` - A response object, or `nil` if the request failed.
708
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInvalidParameterValue`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorEndpointDisabled`, `AWSSNSErrorPlatformApplicationDisabled`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorKMSDisabled`, `AWSSNSErrorKMSInvalidState`, `AWSSNSErrorKMSNotFound`, `AWSSNSErrorKMSOptInRequired`, `AWSSNSErrorKMSThrottling`, `AWSSNSErrorKMSAccessDenied`, `AWSSNSErrorInvalidSecurity`.
709
+ 
710
+ @see AWSSNSPublishInput
711
+ @see AWSSNSPublishResponse
712
+ */
713
+- (void)publish:(AWSSNSPublishInput *)request completionHandler:(void (^ _Nullable)(AWSSNSPublishResponse * _Nullable response, NSError * _Nullable error))completionHandler;
714
+
715
+/**
716
+ <p>Removes a statement from a topic's access control policy.</p>
717
+ 
718
+ @param request A container for the necessary parameters to execute the RemovePermission service method.
719
+
720
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
721
+ 
722
+ @see AWSSNSRemovePermissionInput
723
+ */
724
+- (AWSTask *)removePermission:(AWSSNSRemovePermissionInput *)request;
725
+
726
+/**
727
+ <p>Removes a statement from a topic's access control policy.</p>
728
+ 
729
+ @param request A container for the necessary parameters to execute the RemovePermission service method.
730
+ @param completionHandler The completion handler to call when the load request is complete.
731
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
732
+ 
733
+ @see AWSSNSRemovePermissionInput
734
+ */
735
+- (void)removePermission:(AWSSNSRemovePermissionInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
736
+
737
+/**
738
+ <p>Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
739
+ 
740
+ @param request A container for the necessary parameters to execute the SetEndpointAttributes service method.
741
+
742
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
743
+ 
744
+ @see AWSSNSSetEndpointAttributesInput
745
+ */
746
+- (AWSTask *)setEndpointAttributes:(AWSSNSSetEndpointAttributesInput *)request;
747
+
748
+/**
749
+ <p>Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
750
+ 
751
+ @param request A container for the necessary parameters to execute the SetEndpointAttributes service method.
752
+ @param completionHandler The completion handler to call when the load request is complete.
753
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
754
+ 
755
+ @see AWSSNSSetEndpointAttributesInput
756
+ */
757
+- (void)setEndpointAttributes:(AWSSNSSetEndpointAttributesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
758
+
759
+/**
760
+ <p>Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. For information on configuring attributes for message delivery status, see <a href="http://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html">Using Amazon SNS Application Attributes for Message Delivery Status</a>. </p>
761
+ 
762
+ @param request A container for the necessary parameters to execute the SetPlatformApplicationAttributes service method.
763
+
764
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
765
+ 
766
+ @see AWSSNSSetPlatformApplicationAttributesInput
767
+ */
768
+- (AWSTask *)setPlatformApplicationAttributes:(AWSSNSSetPlatformApplicationAttributesInput *)request;
769
+
770
+/**
771
+ <p>Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. For information on configuring attributes for message delivery status, see <a href="http://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html">Using Amazon SNS Application Attributes for Message Delivery Status</a>. </p>
772
+ 
773
+ @param request A container for the necessary parameters to execute the SetPlatformApplicationAttributes service method.
774
+ @param completionHandler The completion handler to call when the load request is complete.
775
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
776
+ 
777
+ @see AWSSNSSetPlatformApplicationAttributesInput
778
+ */
779
+- (void)setPlatformApplicationAttributes:(AWSSNSSetPlatformApplicationAttributesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
780
+
781
+/**
782
+ <p>Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports.</p><p>You can override some of these settings for a single message when you use the <code>Publish</code> action with the <code>MessageAttributes.entry.N</code> parameter. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html">Sending an SMS Message</a> in the <i>Amazon SNS Developer Guide</i>.</p>
783
+ 
784
+ @param request A container for the necessary parameters to execute the SetSMSAttributes service method.
785
+
786
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSSetSMSAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
787
+ 
788
+ @see AWSSNSSetSMSAttributesInput
789
+ @see AWSSNSSetSMSAttributesResponse
790
+ */
791
+- (AWSTask<AWSSNSSetSMSAttributesResponse *> *)setSMSAttributes:(AWSSNSSetSMSAttributesInput *)request;
792
+
793
+/**
794
+ <p>Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports.</p><p>You can override some of these settings for a single message when you use the <code>Publish</code> action with the <code>MessageAttributes.entry.N</code> parameter. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html">Sending an SMS Message</a> in the <i>Amazon SNS Developer Guide</i>.</p>
795
+ 
796
+ @param request A container for the necessary parameters to execute the SetSMSAttributes service method.
797
+ @param completionHandler The completion handler to call when the load request is complete.
798
+                          `response` - A response object, or `nil` if the request failed.
799
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
800
+ 
801
+ @see AWSSNSSetSMSAttributesInput
802
+ @see AWSSNSSetSMSAttributesResponse
803
+ */
804
+- (void)setSMSAttributes:(AWSSNSSetSMSAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSSetSMSAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
805
+
806
+/**
807
+ <p>Allows a subscription owner to set an attribute of the subscription to a new value.</p>
808
+ 
809
+ @param request A container for the necessary parameters to execute the SetSubscriptionAttributes service method.
810
+
811
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorFilterPolicyLimitExceeded`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
812
+ 
813
+ @see AWSSNSSetSubscriptionAttributesInput
814
+ */
815
+- (AWSTask *)setSubscriptionAttributes:(AWSSNSSetSubscriptionAttributesInput *)request;
816
+
817
+/**
818
+ <p>Allows a subscription owner to set an attribute of the subscription to a new value.</p>
819
+ 
820
+ @param request A container for the necessary parameters to execute the SetSubscriptionAttributes service method.
821
+ @param completionHandler The completion handler to call when the load request is complete.
822
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorFilterPolicyLimitExceeded`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
823
+ 
824
+ @see AWSSNSSetSubscriptionAttributesInput
825
+ */
826
+- (void)setSubscriptionAttributes:(AWSSNSSetSubscriptionAttributesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
827
+
828
+/**
829
+ <p>Allows a topic owner to set an attribute of the topic to a new value.</p>
830
+ 
831
+ @param request A container for the necessary parameters to execute the SetTopicAttributes service method.
832
+
833
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
834
+ 
835
+ @see AWSSNSSetTopicAttributesInput
836
+ */
837
+- (AWSTask *)setTopicAttributes:(AWSSNSSetTopicAttributesInput *)request;
838
+
839
+/**
840
+ <p>Allows a topic owner to set an attribute of the topic to a new value.</p>
841
+ 
842
+ @param request A container for the necessary parameters to execute the SetTopicAttributes service method.
843
+ @param completionHandler The completion handler to call when the load request is complete.
844
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
845
+ 
846
+ @see AWSSNSSetTopicAttributesInput
847
+ */
848
+- (void)setTopicAttributes:(AWSSNSSetTopicAttributesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
849
+
850
+/**
851
+ <p>Prepares to subscribe an endpoint by sending the endpoint a confirmation message. To actually create a subscription, the endpoint owner must call the <code>ConfirmSubscription</code> action with the token from the confirmation message. Confirmation tokens are valid for three days.</p><p>This action is throttled at 100 transactions per second (TPS).</p>
852
+ 
853
+ @param request A container for the necessary parameters to execute the Subscribe service method.
854
+
855
+ @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSSubscribeResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorSubscriptionLimitExceeded`, `AWSSNSErrorFilterPolicyLimitExceeded`, `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
856
+ 
857
+ @see AWSSNSSubscribeInput
858
+ @see AWSSNSSubscribeResponse
859
+ */
860
+- (AWSTask<AWSSNSSubscribeResponse *> *)subscribe:(AWSSNSSubscribeInput *)request;
861
+
862
+/**
863
+ <p>Prepares to subscribe an endpoint by sending the endpoint a confirmation message. To actually create a subscription, the endpoint owner must call the <code>ConfirmSubscription</code> action with the token from the confirmation message. Confirmation tokens are valid for three days.</p><p>This action is throttled at 100 transactions per second (TPS).</p>
864
+ 
865
+ @param request A container for the necessary parameters to execute the Subscribe service method.
866
+ @param completionHandler The completion handler to call when the load request is complete.
867
+                          `response` - A response object, or `nil` if the request failed.
868
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorSubscriptionLimitExceeded`, `AWSSNSErrorFilterPolicyLimitExceeded`, `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
869
+ 
870
+ @see AWSSNSSubscribeInput
871
+ @see AWSSNSSubscribeResponse
872
+ */
873
+- (void)subscribe:(AWSSNSSubscribeInput *)request completionHandler:(void (^ _Nullable)(AWSSNSSubscribeResponse * _Nullable response, NSError * _Nullable error))completionHandler;
874
+
875
+/**
876
+ <p>Deletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an AWS signature is required. If the <code>Unsubscribe</code> call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the <code>Unsubscribe</code> request was unintended.</p><p>This action is throttled at 100 transactions per second (TPS).</p>
877
+ 
878
+ @param request A container for the necessary parameters to execute the Unsubscribe service method.
879
+
880
+ @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`, `AWSSNSErrorInvalidSecurity`.
881
+ 
882
+ @see AWSSNSUnsubscribeInput
883
+ */
884
+- (AWSTask *)unsubscribe:(AWSSNSUnsubscribeInput *)request;
885
+
886
+/**
887
+ <p>Deletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an AWS signature is required. If the <code>Unsubscribe</code> call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the <code>Unsubscribe</code> request was unintended.</p><p>This action is throttled at 100 transactions per second (TPS).</p>
888
+ 
889
+ @param request A container for the necessary parameters to execute the Unsubscribe service method.
890
+ @param completionHandler The completion handler to call when the load request is complete.
891
+                          `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`, `AWSSNSErrorInvalidSecurity`.
892
+ 
893
+ @see AWSSNSUnsubscribeInput
894
+ */
895
+- (void)unsubscribe:(AWSSNSUnsubscribeInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
896
+
897
+@end
898
+
899
+NS_ASSUME_NONNULL_END

二進制
AWSSNS.framework/Info.plist 查看文件


+ 6
- 0
AWSSNS.framework/Modules/module.modulemap 查看文件

@@ -0,0 +1,6 @@
1
+framework module AWSSNS {
2
+  umbrella header "AWSSNS.h"
3
+
4
+  export *
5
+  module * { export * }
6
+}

+ 111
- 0
EncuestaMarle.xcodeproj/xcshareddata/xcschemes/EncuestaMarle.xcscheme 查看文件

@@ -0,0 +1,111 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Scheme
3
+   LastUpgradeVersion = "1020"
4
+   version = "1.3">
5
+   <BuildAction
6
+      parallelizeBuildables = "YES"
7
+      buildImplicitDependencies = "YES">
8
+      <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "371DA37122621B03006C22EC"
18
+               BuildableName = "EncuestaMarle.app"
19
+               BlueprintName = "EncuestaMarle"
20
+               ReferencedContainer = "container:EncuestaMarle.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
23
+      </BuildActionEntries>
24
+   </BuildAction>
25
+   <TestAction
26
+      buildConfiguration = "Debug"
27
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+      shouldUseLaunchSchemeArgsEnv = "YES">
30
+      <Testables>
31
+         <TestableReference
32
+            skipped = "NO">
33
+            <BuildableReference
34
+               BuildableIdentifier = "primary"
35
+               BlueprintIdentifier = "371DA38822621B06006C22EC"
36
+               BuildableName = "EncuestaMarleTests.xctest"
37
+               BlueprintName = "EncuestaMarleTests"
38
+               ReferencedContainer = "container:EncuestaMarle.xcodeproj">
39
+            </BuildableReference>
40
+         </TestableReference>
41
+         <TestableReference
42
+            skipped = "NO">
43
+            <BuildableReference
44
+               BuildableIdentifier = "primary"
45
+               BlueprintIdentifier = "371DA39322621B06006C22EC"
46
+               BuildableName = "EncuestaMarleUITests.xctest"
47
+               BlueprintName = "EncuestaMarleUITests"
48
+               ReferencedContainer = "container:EncuestaMarle.xcodeproj">
49
+            </BuildableReference>
50
+         </TestableReference>
51
+      </Testables>
52
+      <MacroExpansion>
53
+         <BuildableReference
54
+            BuildableIdentifier = "primary"
55
+            BlueprintIdentifier = "371DA37122621B03006C22EC"
56
+            BuildableName = "EncuestaMarle.app"
57
+            BlueprintName = "EncuestaMarle"
58
+            ReferencedContainer = "container:EncuestaMarle.xcodeproj">
59
+         </BuildableReference>
60
+      </MacroExpansion>
61
+      <AdditionalOptions>
62
+      </AdditionalOptions>
63
+   </TestAction>
64
+   <LaunchAction
65
+      buildConfiguration = "Debug"
66
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
67
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
68
+      launchStyle = "0"
69
+      useCustomWorkingDirectory = "NO"
70
+      ignoresPersistentStateOnLaunch = "NO"
71
+      debugDocumentVersioning = "YES"
72
+      debugServiceExtension = "internal"
73
+      allowLocationSimulation = "YES">
74
+      <BuildableProductRunnable
75
+         runnableDebuggingMode = "0">
76
+         <BuildableReference
77
+            BuildableIdentifier = "primary"
78
+            BlueprintIdentifier = "371DA37122621B03006C22EC"
79
+            BuildableName = "EncuestaMarle.app"
80
+            BlueprintName = "EncuestaMarle"
81
+            ReferencedContainer = "container:EncuestaMarle.xcodeproj">
82
+         </BuildableReference>
83
+      </BuildableProductRunnable>
84
+      <AdditionalOptions>
85
+      </AdditionalOptions>
86
+   </LaunchAction>
87
+   <ProfileAction
88
+      buildConfiguration = "Release"
89
+      shouldUseLaunchSchemeArgsEnv = "YES"
90
+      savedToolIdentifier = ""
91
+      useCustomWorkingDirectory = "NO"
92
+      debugDocumentVersioning = "YES">
93
+      <BuildableProductRunnable
94
+         runnableDebuggingMode = "0">
95
+         <BuildableReference
96
+            BuildableIdentifier = "primary"
97
+            BlueprintIdentifier = "371DA37122621B03006C22EC"
98
+            BuildableName = "EncuestaMarle.app"
99
+            BlueprintName = "EncuestaMarle"
100
+            ReferencedContainer = "container:EncuestaMarle.xcodeproj">
101
+         </BuildableReference>
102
+      </BuildableProductRunnable>
103
+   </ProfileAction>
104
+   <AnalyzeAction
105
+      buildConfiguration = "Debug">
106
+   </AnalyzeAction>
107
+   <ArchiveAction
108
+      buildConfiguration = "Release"
109
+      revealArchiveInOrganizer = "YES">
110
+   </ArchiveAction>
111
+</Scheme>

+ 14
- 0
EncuestaMarle.xcodeproj/xcuserdata/ccorrada.xcuserdatad/xcschemes/xcschememanagement.plist 查看文件

@@ -0,0 +1,14 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>SchemeUserState</key>
6
+	<dict>
7
+		<key>EncuestaMarle.xcscheme_^#shared#^_</key>
8
+		<dict>
9
+			<key>orderHint</key>
10
+			<integer>5</integer>
11
+		</dict>
12
+	</dict>
13
+</dict>
14
+</plist>

+ 10
- 0
EncuestaMarle.xcworkspace/contents.xcworkspacedata 查看文件

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "group:EncuestaMarle.xcodeproj">
6
+   </FileRef>
7
+   <FileRef
8
+      location = "group:Pods/Pods.xcodeproj">
9
+   </FileRef>
10
+</Workspace>

+ 8
- 0
EncuestaMarle.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist 查看文件

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>IDEDidComputeMac32BitWarning</key>
6
+	<true/>
7
+</dict>
8
+</plist>

+ 5
- 0
EncuestaMarle.xcworkspace/xcuserdata/ccorrada.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Bucket
3
+   type = "0"
4
+   version = "2.0">
5
+</Bucket>

+ 5
- 0
EncuestaMarle.xcworkspace/xcuserdata/tatianacastro.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Bucket
3
+   type = "0"
4
+   version = "2.0">
5
+</Bucket>

二進制
EncuestaMarle/Assets.xcassets/233-2336253_consent-clipart-cutout.imageset/233-2336253_consent-clipart-cutout.png 查看文件


EncuestaMarle/Assets.xcassets/233-2336253_consent-clipart.imageset/Contents.json → EncuestaMarle/Assets.xcassets/233-2336253_consent-clipart-cutout.imageset/Contents.json 查看文件

@@ -2,7 +2,7 @@
2 2
   "images" : [
3 3
     {
4 4
       "idiom" : "universal",
5
-      "filename" : "233-2336253_consent-clipart.png",
5
+      "filename" : "233-2336253_consent-clipart-cutout.png",
6 6
       "scale" : "1x"
7 7
     },
8 8
     {

+ 0
- 0
EncuestaMarle/Assets.xcassets/233-2336253_consent-clipart.imageset/233-2336253_consent-clipart.png 查看文件


部分文件因文件數量過多而無法顯示