Skip to content

Commit

Permalink
integrate changes for React
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesGrimont committed Jun 5, 2018
1 parent 5d008d8 commit 4787fb7
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 71 deletions.
14 changes: 12 additions & 2 deletions C8oSDKiOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@
62EDE92D1C762EE500D9213F /* C8oExceptionMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62EDE92C1C762EE500D9213F /* C8oExceptionMessage.swift */; };
62EDE9311C762FFE00D9213F /* C8oFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62EDE9301C762FFE00D9213F /* C8oFileManager.swift */; };
62EDE9331C76314200D9213F /* C8oFullSync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62EDE9321C76314200D9213F /* C8oFullSync.swift */; };
B7368C9220C55EAB00797AA5 /* AEXML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7368C9120C55EAB00797AA5 /* AEXML.framework */; };
B7368C9420C55EAB00797AA5 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7368C9320C55EAB00797AA5 /* Alamofire.framework */; };
B7368C9620C55EB100797AA5 /* SwiftyJSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7368C9520C55EB100797AA5 /* SwiftyJSON.framework */; };
B768792620C0ACCB00608B80 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = B768792520C0ACCA00608B80 /* README.md */; };
B79434C820235DCD00DDE990 /* scripts in Resources */ = {isa = PBXBuildFile; fileRef = B79434C720235DCC00DDE990 /* scripts */; };
D1E67029367412270B12DFA4 /* Pods_C8oSDKiOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EBE744ED5FB126ADD38B6DD /* Pods_C8oSDKiOS.framework */; };
D8245BE8EF45CF77D770CC8D /* Pods_C8oSDKiOSTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 040F84B5718525109D28750D /* Pods_C8oSDKiOSTests.framework */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -120,6 +122,9 @@
62EDE9321C76314200D9213F /* C8oFullSync.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C8oFullSync.swift; sourceTree = "<group>"; };
73A8549AAD8B896907F2F6CB /* Pods-C8oSDKiOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-C8oSDKiOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-C8oSDKiOS/Pods-C8oSDKiOS.debug.xcconfig"; sourceTree = "<group>"; };
7C2A23DDBCB149E8C1358243 /* Pods-C8oSDKiOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-C8oSDKiOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-C8oSDKiOS/Pods-C8oSDKiOS.release.xcconfig"; sourceTree = "<group>"; };
B7368C9120C55EAB00797AA5 /* AEXML.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AEXML.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B7368C9320C55EAB00797AA5 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B7368C9520C55EB100797AA5 /* SwiftyJSON.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftyJSON.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B768792520C0ACCA00608B80 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
B79434C720235DCC00DDE990 /* scripts */ = {isa = PBXFileReference; lastKnownFileType = folder; path = scripts; sourceTree = "<group>"; };
EB9DD9C4928622F71D6AB05F /* Pods-C8oSDKiOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-C8oSDKiOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-C8oSDKiOSTests/Pods-C8oSDKiOSTests.release.xcconfig"; sourceTree = "<group>"; };
Expand All @@ -130,7 +135,9 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D1E67029367412270B12DFA4 /* Pods_C8oSDKiOS.framework in Frameworks */,
B7368C9620C55EB100797AA5 /* SwiftyJSON.framework in Frameworks */,
B7368C9220C55EAB00797AA5 /* AEXML.framework in Frameworks */,
B7368C9420C55EAB00797AA5 /* Alamofire.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -148,6 +155,9 @@
0A4B6BBA5253C1E7B8588B64 /* Frameworks */ = {
isa = PBXGroup;
children = (
B7368C9520C55EB100797AA5 /* SwiftyJSON.framework */,
B7368C9120C55EAB00797AA5 /* AEXML.framework */,
B7368C9320C55EAB00797AA5 /* Alamofire.framework */,
3EBE744ED5FB126ADD38B6DD /* Pods_C8oSDKiOS.framework */,
040F84B5718525109D28750D /* Pods_C8oSDKiOSTests.framework */,
);
Expand Down
2 changes: 1 addition & 1 deletion C8oSDKiOS/C8o.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ open class C8o: C8oBase {
}
})
}

/**
This calls a Convertigo requestable.
Example usage:
Expand Down
125 changes: 57 additions & 68 deletions C8oSDKiOS/C8oBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ open class C8oBase: NSObject {
override init() {
super.init()
}

@objc public var react = false;
@objc public var dictBase: NSMutableDictionary = ["_timeout": -1, "_trustAllCertificates": false, "_cookies": "", "Byte": "","_clientCertificateBinaries": "", "_clientCertificateFiles": "", "_logRemote": true, "_logLevelLocal": C8oLogLevel.none, "_logC8o": true, "_logOnFail": "", "_defaultDatabaseName": "", "_authenticationCookieValue": "", "_fullSyncLocalSuffix": "", "_fullSyncStorageEngine": C8o.FS_STORAGE_SQL, "_fullSyncEncryptionKey": "", "_fullSyncServerUrl":"http://localhost:5984", "_fullSyncUsername": "", "_fullSyncPassword": "","_useEncryption": ""];

// *** HTTP ***//
internal var _timeout: Int? = -1
internal var _trustAllCertificates: Bool? = false
Expand Down Expand Up @@ -53,7 +55,7 @@ open class C8oBase: NSObject {
@see http://www.convertigo.com/document/convertigo-client-sdk/programming-guide/ for more information.
@return The timeout.
*/
open var timeout: Int {
@objc open var timeout: Int {
get { return _timeout! }
}

Expand Down Expand Up @@ -262,73 +264,60 @@ open class C8oBase: NSObject {
open var fullSyncPassword: String {
get { return _fullSyncPassword! }
}

/**
Copy any c8oBase object into another.
Example usage:
@code
myc8o : C8o = C8o()
mySecondC8o : C8o
mySecondC8o.Copy(myC8o)
@endcode
@see http://www.convertigo.com/document/convertigo-client-sdk/programming-guide/ for more information.
@param c8oBase
any C8oBase object that yout wants to copy
@return Void.
*/
internal func copyProperties (_ c8oBase: C8oBase) -> Void {
// *** HTTP ***//

_timeout = c8oBase._timeout
_trustAllCertificates = c8oBase._trustAllCertificates

if (c8oBase._cookies != nil) {
if (_cookies == nil) {
_cookies = NSObject() as? Dictionary<String, String>// CookieCollection()
}
// cookies.Add(c8oBase.cookies)
}

if (c8oBase._clientCertificateBinaries != nil) {
if (_clientCertificateBinaries == nil) {
_clientCertificateBinaries = c8oBase._clientCertificateBinaries
} else {
for entry in c8oBase._clientCertificateBinaries! {

_clientCertificateBinaries?.updateValue(entry.1, forKey: entry.0)
}
}
}

if (c8oBase._clientCertificateFiles != nil) {
if (_clientCertificateFiles == nil) {
_clientCertificateFiles = c8oBase._clientCertificateFiles
} else {
for entry in c8oBase._clientCertificateFiles! {
_clientCertificateFiles?.updateValue(entry.1, forKey: entry.0)
}
}
}

// *** Log ***//

_logRemote = c8oBase._logRemote
_logLevelLocal = c8oBase._logLevelLocal
_logC8o = c8oBase._logC8o
_logOnFail = c8oBase._logOnFail

// *** FullSync ***//

_defaultDatabaseName = c8oBase._defaultDatabaseName
_authenticationCookieValue = c8oBase._authenticationCookieValue
_fullSyncLocalSuffix = c8oBase._fullSyncLocalSuffix

internal func copyProperties (_ c8oBase: C8oBase) -> Void {
// *** HTTP ***//

_timeout = c8oBase._timeout
_trustAllCertificates = c8oBase._trustAllCertificates

if (c8oBase._cookies != nil) {
if (_cookies == nil) {
_cookies = NSObject() as? Dictionary<String, String>// CookieCollection()
}
// cookies.Add(c8oBase.cookies)
}

if (c8oBase._clientCertificateBinaries != nil) {
if (_clientCertificateBinaries == nil) {
_clientCertificateBinaries = c8oBase._clientCertificateBinaries
} else {
for entry in c8oBase._clientCertificateBinaries! {

_clientCertificateBinaries?.updateValue(entry.1, forKey: entry.0)
}
}
}

if (c8oBase._clientCertificateFiles != nil) {
if (_clientCertificateFiles == nil) {
_clientCertificateFiles = c8oBase._clientCertificateFiles
} else {
for entry in c8oBase._clientCertificateFiles! {
_clientCertificateFiles?.updateValue(entry.1, forKey: entry.0)
}
}
}

// *** Log ***//

_logRemote = c8oBase._logRemote
_logLevelLocal = c8oBase._logLevelLocal
_logC8o = c8oBase._logC8o
_logOnFail = c8oBase._logOnFail

// *** FullSync ***//

_defaultDatabaseName = c8oBase._defaultDatabaseName
_authenticationCookieValue = c8oBase._authenticationCookieValue
_fullSyncLocalSuffix = c8oBase._fullSyncLocalSuffix
_fullSyncStorageEngine = c8oBase._fullSyncStorageEngine
_fullSyncEncryptionKey = c8oBase._fullSyncEncryptionKey

_fullSyncServerUrl = c8oBase._fullSyncServerUrl
_fullSyncUsername = c8oBase._fullSyncUsername
_fullSyncPassword = c8oBase._fullSyncPassword
// uiDispatcher = c8oBase.uiDispatcher
}
_fullSyncServerUrl = c8oBase._fullSyncServerUrl
_fullSyncUsername = c8oBase._fullSyncUsername
_fullSyncPassword = c8oBase._fullSyncPassword
// uiDispatcher = c8oBase.uiDispatcher
}
}
1 change: 1 addition & 0 deletions C8oSDKiOS/C8oSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SwiftyJSON

@objc open class C8oSettings: C8oBase {
@objc public override init() {
super.init()
}

@objc public init(c8oSettings: C8oBase) {
Expand Down

0 comments on commit 4787fb7

Please sign in to comment.