Skip to content

Commit 44193fd

Browse files
committed
for 20.12 release
1 parent 0cddaf9 commit 44193fd

File tree

9 files changed

+53
-21
lines changed

9 files changed

+53
-21
lines changed

AsposeCellsCloud.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "AsposeCellsCloud"
19-
s.version = "20.9"
19+
s.version = "20.12"
2020
s.summary = "Aspose.Cells Cloud SDK for Swift."
2121
s.swift_version = "4.1"
2222

AsposeCellsCloud/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>20.9</string>
18+
<string>20.12</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
</dict>

AsposeCellsCloud/Swaggers/APIs.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import Foundation
88

99
open class AsposeCellsCloudAPI {
1010
public static var basePath = "https://api.aspose.cloud/v3.0"
11-
public static var appSid: String?
12-
public static var appKey: String?
11+
public static var clientId: String?
12+
public static var clientSecret: String?
1313
public static var credential: URLCredential?
1414
//public static var customHeaders: [String:String] = ["Authorization":""]
1515
public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()

AsposeCellsCloud/pal/AuthAspose.swift

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,21 @@ public class AuthAspose {
2626

2727
public class func checkAuth(completion: @escaping ((_ error: AuthError?) -> Void )) {
2828

29+
if (AsposeCellsCloudAPI.clientId == nil && AsposeCellsCloudAPI.clientSecret == nil)
30+
{
31+
completion(nil)
32+
return
33+
}
34+
2935
if (AsposeCellsCloudAPI.accessToken == nil) {
30-
31-
guard let appSid = AsposeCellsCloudAPI.appSid, let appKey = AsposeCellsCloudAPI.appKey else {
36+
37+
guard let clientId = AsposeCellsCloudAPI.clientId, let clientSecret = AsposeCellsCloudAPI.clientSecret else {
3238
completion(AuthError.credentialsNotSetError)
3339
return
3440
}
3541

3642
let grantType:String = "client_credentials"
37-
CellsAPI.oAuthPost(grantType: grantType, clientId: appSid, clientSecret: appKey)
43+
CellsAPI.oAuthPost(grantType: grantType, clientId: clientId, clientSecret: clientSecret)
3844
{
3945
(response, error) in
4046
guard error == nil else {
@@ -48,6 +54,8 @@ public class AuthAspose {
4854
completion(nil)
4955
}
5056
}
57+
58+
5159

5260
}
5361
else

AsposeCellsCloudTests/AsposeCellsCloudTests.swift

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ class AsposeCellsCloudTests: XCTestCase {
3131
internal let CELLAREA = "A1:C10"
3232
internal let RANGE = "A1:C10"
3333
//This is only for test, please set your licence here
34-
internal let _appSid = "11111X11-111X-1111-11X1-111111111XX1"
35-
internal let _appKey = "111x11111111xx1111xxxx11xx1x1111"
34+
internal let _clientId = "11111X11-111X-1111-11X1-111111111XX1"
35+
internal let _clientSecret = "111x11111111xx1111xxxx11xx1x1111"
36+
internal let _basePath = "http://192.168.0.1/v3.0"
3637

3738
override func setUp() {
3839
super.setUp()
@@ -48,9 +49,15 @@ class AsposeCellsCloudTests: XCTestCase {
4849

4950
private func readSettings() {
5051

51-
//This is only for test, please set your licence here
52-
AsposeCellsCloudAPI.appSid = self._appSid
53-
AsposeCellsCloudAPI.appKey = self._appKey
52+
//This is only for test, please set your licence or basePath
53+
//Choose Mode A or Mode B, just one of them will be OK.
54+
55+
//Mode A: Set clientId, clientSecret
56+
//AsposeCellsCloudAPI.clientId = self._clientId
57+
//AsposeCellsCloudAPI.clientSecret = self._clientSecret
58+
59+
//Mode B: Set your own basePath
60+
AsposeCellsCloudAPI.basePath = self._basePath
5461

5562
}
5663

@@ -75,12 +82,16 @@ class AsposeCellsCloudTests: XCTestCase {
7582
self.putCreate(path: path, file: url!, versionId: nil, storageName: storageName) {
7683
(response, error) in
7784
guard error == nil else {
85+
let errorinfo = self.GetErrorDataInfo(error: error as! ErrorResponse)
86+
print("error info: \(errorinfo!)")
7887
XCTFail("error uploading file \(path)")
7988
return
8089
}
8190
if let response = response, response.uploaded!.count > 0 {
8291
completion()
8392
} else {
93+
let errorinfo = self.GetErrorDataInfo(error: error as! ErrorResponse)
94+
print("error info: \(errorinfo!)")
8495
XCTFail("error uploading file \(name)")
8596
}
8697

AsposeCellsCloudTests/CellsShapesAPITests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class CellsShapesAPITests: AsposeCellsCloudTests {
173173
let expectation = self.expectation(description: "testcellsShapesPutWorksheetShape")
174174
let name:String = BOOK1
175175
let sheetName:String = SHEET1
176-
let shapeDTO:Shape? = nil
176+
let shapeDTO:Shape? = Shape(link: nil, alternativeText: nil, bottom: nil, top: nil, width: nil, htmlText: nil, textVerticalAlignment: nil, autoShapeType: nil, isPrintable: nil, upperLeftColumn: nil, isLockAspectRatio: nil, isGroup: nil, rotationAngle: nil, zOrderPosition: nil, textHorizontalOverflow: nil, msoDrawingType: nil, textOrientationType: nil, placement: nil, name: nil, isWordArt: nil, linkedCell: nil, upperLeftRow: nil, isLocked: nil, lowerRightRow: nil, isTextWrapped: nil, Y: nil, X: nil, isHidden: nil, _left: nil, _right: nil, text: nil, lowerRightColumn: 10, height: nil, textHorizontalAlignment: nil, textVerticalOverflow: nil)
177177
let drawingType:String = "button"
178178
let upperLeftRow:Int32 = 1
179179
let upperLeftColumn:Int32 = 1
@@ -189,6 +189,8 @@ class CellsShapesAPITests: AsposeCellsCloudTests {
189189
{
190190
(response, error) in
191191
guard error == nil else {
192+
let errorinfo = self.GetErrorDataInfo(error: error as! ErrorResponse)
193+
print("error info: \(errorinfo!)")
192194
XCTFail("error testcellsShapesPutWorksheetShape")
193195
return
194196
}

AsposeCellsCloudTests/CellsStorageAPITests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ class CellsStorageAPITests: AsposeCellsCloudTests {
221221
{
222222
(response, error) in
223223
guard error == nil else {
224+
let errorinfo = self.GetErrorDataInfo(error: error as! ErrorResponse)
225+
print("error info: \(errorinfo!)")
224226
XCTFail("error testgetFileVersions")
225227
return
226228
}

AsposeCellsCloudTests/OAuthAPITests.swift

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ class OAuthAPITests: AsposeCellsCloudTests {
2626
func testoAuthPost()
2727
{
2828
let expectation = self.expectation(description: "testoAuthPost")
29+
/*
2930
let grantType:String = "client_credentials"
30-
let clientId:String = AsposeCellsCloudAPI.appSid!
31-
let clientSecret:String = AsposeCellsCloudAPI.appKey!
31+
let clientId:String = AsposeCellsCloudAPI.clientId!
32+
let clientSecret:String = AsposeCellsCloudAPI.clientSecret!
3233

3334
CellsAPI.oAuthPost(grantType: grantType, clientId: clientId, clientSecret: clientSecret)
3435
{
@@ -44,6 +45,16 @@ class OAuthAPITests: AsposeCellsCloudTests {
4445
expectation.fulfill()
4546
}
4647
}
48+
*/
49+
AuthAspose.checkAuth()
50+
{
51+
(authError) in
52+
guard authError == nil else {
53+
XCTFail("error testoAuthPost")
54+
return
55+
}
56+
expectation.fulfill()
57+
}
4758

4859
self.waitForExpectations(timeout: testTimeout, handler: nil)
4960
}

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ Swift Cloud SDK wraps Aspose.Cells Cloud API. The SDK enhances your Android apps
2020
- Fetch the required shape from worksheet.
2121
- Leverage the power of named ranges.
2222

23-
## New Features & Enhancements in Version 20.9
24-
- Supported sparkline groups.
25-
- Added API to update Pivot Fields.
26-
- Enhanced chart API.
23+
## New Features & Enhancements in Version 20.12
24+
- Aspose.Cells Cloud for Docker.
2725

2826
## Read & Write Spreadsheet Formats
2927

@@ -51,11 +49,11 @@ SXC, FODS
5149

5250
## Get Started with Aspose.Cells Cloud SDK for Swift
5351

54-
First, create an account at [Aspose for Cloud](https://dashboard.aspose.cloud/#/apps) and get your application information. Then, add pod `'AsposeCellsCloud', '~> 20.9'` similar to the following:
52+
First, create an account at [Aspose for Cloud](https://dashboard.aspose.cloud/#/apps) and get your application information. Then, add pod `'AsposeCellsCloud', '~> 20.12'` similar to the following:
5553

5654
```console
5755
target 'MyApp' do
58-
pod 'AsposeCellsCloud', '~> 20.9'
56+
pod 'AsposeCellsCloud', '~> 20.12'
5957
end
6058
```
6159

0 commit comments

Comments
 (0)