Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #19

Open
wants to merge 35 commits into
base: release/2.0.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
fe4f905
Merge pull request #15 from avnet-iotconnect/feature/IoTConect_SDK_2.0
sw-tt-rumitkkhakhi Mar 19, 2024
9557554
Update README.md
sw-tt-kirtanvaghela Apr 29, 2024
b33355d
Update README.md
sw-tt-kirtanvaghela Apr 29, 2024
a5a8ab7
Update README.md
sw-tt-kirtanvaghela May 7, 2024
b6c828c
Update README.md
sw-ot-deveshmevada May 7, 2024
af7ebc5
Update README.md
sw-ot-deveshmevada May 7, 2024
b9d067f
Update README.md
sw-ot-deveshmevada May 7, 2024
2d7a621
Update README.md
sw-ot-deveshmevada May 7, 2024
2f73751
Update README.md
sw-ot-deveshmevada May 7, 2024
743bb03
Update README.md
sw-ot-deveshmevada May 7, 2024
2b50727
Update README.md
sw-ot-deveshmevada May 7, 2024
656ed81
Update README.md
sw-ot-deveshmevada May 7, 2024
30ec0cb
Update README.md
sw-ot-deveshmevada May 7, 2024
7f5f706
Update README.md
sw-ot-deveshmevada May 7, 2024
f4fd88c
Update README.md
sw-ot-deveshmevada May 7, 2024
8a5fbe1
Update README.md
sw-tt-kirtanvaghela May 8, 2024
6fc9fd5
Update README.md
sw-tt-kirtanvaghela May 16, 2024
f0e0c71
Update README.md
sw-ot-deveshmevada May 21, 2024
54cefa1
send data crash issue, remove p12 files
sw-tt-kirtanvaghela May 22, 2024
c3d6d99
create new framework with changed names
sw-tt-kirtanvaghela May 22, 2024
f0f711e
Added app icon
sw-tt-kirtanvaghela May 24, 2024
3c7014c
loader in full screen, API response error in Demo, IQKeyboardmanager …
sw-tt-kirtanvaghela May 27, 2024
e1229cc
some UI related changes
sw-tt-kirtanvaghela Jun 7, 2024
d227cf5
Update README.md
sw-tt-kirtanvaghela Jun 17, 2024
13a2d40
Update README.md
sw-tt-kirtanvaghela Jun 17, 2024
f3d1271
Solved issues
sw-tt-kirtanvaghela Jun 18, 2024
44a53b0
Merge branch 'feature/IoTConect_SDK_2.0' of https://github.com/avnet-…
sw-tt-kirtanvaghela Jun 18, 2024
3333a52
Remove values after send data
sw-tt-kirtanvaghela Jun 20, 2024
0b2f639
added EU env, CPID and uniqued id validation, ignore blank data while…
sw-tt-kirtanvaghela Jun 26, 2024
a4ef70e
Added Eu env for AZ, Faulty data for edge device, ignore blank data, …
sw-tt-kirtanvaghela Jul 4, 2024
4d232a5
solve 1.0 Device crash, add EMEA env
sw-tt-kirtanvaghela Jul 17, 2024
ae3761c
Remove certificates and add comment
sw-tt-kirtanvaghela Aug 2, 2024
30c3bc8
Merge pull request #17 from avnet-iotconnect/feature/edgeFaulty_AZNew…
sw-tt-kirtanvaghela Aug 5, 2024
444291e
Merge pull request #18 from avnet-iotconnect/feature/IoTConect_SDK_2.0
sw-tt-rumitkkhakhi Aug 12, 2024
afc4662
Update README.md
sw-tt-kirtanvaghela Sep 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file modified .DS_Store
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>IoTConnect.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
<integer>3</integer>
</dict>
</dict>
</dict>
Expand Down
Binary file added IoTConnect2.zip
Binary file not shown.
1 change: 1 addition & 0 deletions IoTConnect2/IoTConnect2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
"DYLIB_CURRENT_VERSION[arch=*]" = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>IoTConnect2.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
<integer>2</integer>
</dict>
<key>IoTConnect2_AWS.xcscheme_^#shared#^_</key>
<dict>
Expand Down
Binary file not shown.
Binary file modified IoTConnect2/IoTConnect2/IoTConnect_2.0/.DS_Store
Binary file not shown.
28 changes: 15 additions & 13 deletions IoTConnect2/IoTConnect2/IoTConnect_2.0/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public enum CommandType:Int{
}

struct SDKURL {
static let discoveryHost = "https://discovery.iotconnect.io"
static let discoveryHostAZ = "https://discovery.iotconnect.io"
static let discoveryHostAZEMEA = "https://eudiscovery.iotconnect.io"
static let discoveryHostAWS = "https://jzbybwq654.execute-api.us-east-1.amazonaws.com/Prod"
static let discoveryHostAWSPOC = "https://awsdiscovery.iotconnect.io"//"https://awspoc.iotconnect.io"
static let discoveryHostAWSPROD = "https://discoveryconsole.iotconnect.io"
Expand All @@ -60,18 +61,18 @@ struct SDKURL {

static func discovery(_ strDiscoveryURL:String, _ cpId:String, _ lang:String, _ ver:String, _ env:String, _ pf:String) -> String {
//kirtan

#if IOTAWS
if env == IOTCEnvironment.PREQA.rawValue{
return String(format: "\(SDKURL.discoveryHostAWS)/api/v\(ver)/dsdk/cpid/\(cpId)/env/\(env)/\(endPointAWS)\(pf)")
}else if env == IOTCEnvironment.POC.rawValue{
return String(format: "\(SDKURL.discoveryHostAWSPOC)/api/v\(ver)/dsdk/cpid/\(cpId)/env/\(env)/\(endPointAWS)\(pf)")
}else{
return String(format: "\(SDKURL.discoveryHostAWSPROD)/api/v\(ver)/dsdk/cpid/\(cpId)/env/\(env)/\(endPointAWS)\(pf)")
}
#else
return String(format: "\(strDiscoveryURL)/api/v\(ver)/dsdk/cpid/\(cpId)/env/\(env)")
#endif
return String(format: "\(strDiscoveryURL)/api/v\(ver)/dsdk/cpid/\(cpId)/env/\(env)/\(endPointAWS)\(pf)")
// #if IOTAWS
// if env == IOTCEnvironment.PREQA.rawValue{
// return String(format: "\(SDKURL.discoveryHostAWS)/api/v\(ver)/dsdk/cpid/\(cpId)/env/\(env)/\(endPointAWS)\(pf)")
// }else if env == IOTCEnvironment.POC.rawValue{
// return String(format: "\(SDKURL.discoveryHostAWSPOC)/api/v\(ver)/dsdk/cpid/\(cpId)/env/\(env)/\(endPointAWS)\(pf)")
// }else{
// return String(format: "\(SDKURL.discoveryHostAWSPROD)/api/v\(ver)/dsdk/cpid/\(cpId)/env/\(env)/\(endPointAWS)\(pf)")
// }
// #else
// return String(format: "\(strDiscoveryURL)/api/v\(ver)/dsdk/cpid/\(cpId)/env/\(env)")
// #endif
}
}

Expand Down Expand Up @@ -232,5 +233,6 @@ struct Dictkeys{
static let medsageTypekey = "mt"
static let displayNamekey = "dn"
static let protocolkey = "p"
static let message = "message"

}
2 changes: 2 additions & 0 deletions IoTConnect2/IoTConnect2/IoTConnect_2.0/ErrosLog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ struct Log {//class
case ERR_IN13 = "Please give uniqueID value"
case ERR_IN14 = "Client connection closed"
case ERR_IN15 = "Please give env value"
case ERR_IN16 = "Please enter valid CPID"
case ERR_IN17 = "Please enter valid UniqueID"
case ERR_SD02 = "It does not matched with payload's 'uniqueId'"
case ERR_SD06 = "Missing required parameter 'data'"
case ERR_SD10 = "Publish data failed : MQTT connection not found"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class IoTConnectManager {
var strCPId: String!
var strUniqueId: String!
var strEnv: IOTCEnvironment = .PROD
var strDiscoveryURL: String = SDKURL.discoveryHost
var strDiscoveryURL: String = SDKURL.discoveryHostAZ
var strDiscoveryURLAWS: String = SDKURL.discoveryHostAWS
var dictReference: [String:Any]!
var dictSyncResponse: [String:Any]!
Expand Down Expand Up @@ -69,6 +69,9 @@ class IoTConnectManager {
var twinResponsePubTopic = "$iothub/twin/GET/?$rid=0"
var twinResponseSubTopic = "$iothub/twin/res/#"


var arrAttForValidation:AttributesData?

init() {}

//MARK: - Method - SDK-Initialiase
Expand Down Expand Up @@ -238,11 +241,14 @@ class IoTConnectManager {
print("df \(df) diff\(diff) \(time) \(Date())")
if diff >= df{
validateData(data: data, skipValidation: dataSDKOptions.skipValidation)
}else{
print("Please try to send data after DF value.")
}
}else{
validateData(data: data, skipValidation: dataSDKOptions.skipValidation)
}
}else {
print("sync count is 0")
self.objCommon.manageDebugLog(code: Log.Errors.ERR_SD06.rawValue, uniqueId: strUniqueId, cpId: strCPId, message: "", logFlag: false, isDebugEnabled: boolDebugYN)
}
}
Expand Down Expand Up @@ -372,7 +378,9 @@ class IoTConnectManager {
dictD?.append(anotherDict: ["\(key)":["\(value)","\(value)","\(value)","\(value)",totalCount,"\(value)"]])
}
dataDevice[Dictkeys.dKey] = dictD

arrCalcDictEdgeDevice[firstIndex] = dataDevice
arrCalcDictEdgeDevice[firstIndex][Dictkeys.datekey] = dt
}else{
if let val = dictD?[key], let firstIndexData = arrData.firstIndex(where: {$0[key] != nil}){
if let valDict = val as? [String:Any]{
Expand All @@ -387,19 +395,25 @@ class IoTConnectManager {
var val = dictD?[key] as? [String:Any]
val?[dictValueKey] = arrValues
dictD?[key] = val

arrCalcDictEdgeDevice[firstIndex]["d"] = dictD ?? [:]
arrCalcDictEdgeDevice[firstIndex][Dictkeys.datekey] = dt
}else{
var val = dictD?[key] as? [String:Any]
val?.append(anotherDict: [dictValueKey:arrValues ?? []])
dictD?[key] = val

arrCalcDictEdgeDevice[firstIndex]["d"] = dictD ?? [:]
arrCalcDictEdgeDevice[firstIndex][Dictkeys.datekey] = dt
}
}
}
}else{
let arr = arrData[firstIndexData][key] as? [String]
dictD?[key] = calcEdgeData(arrValues: arr ?? [], latestVal: "\(value)")

arrCalcDictEdgeDevice[firstIndex][Dictkeys.dKey] = dictD ?? [:]
arrCalcDictEdgeDevice[firstIndex][Dictkeys.datekey] = dt
}
}else{
if let valDict = value as? [String:Any]{
Expand All @@ -410,7 +424,9 @@ class IoTConnectManager {
}else{
dictD?.append(anotherDict: ["\(key)":["\(value)","\(value)","\(value)","\(value)",totalCount,"\(value)"]])
}

arrCalcDictEdgeDevice[firstIndex][Dictkeys.dKey] = dictD ?? [:]
arrCalcDictEdgeDevice[firstIndex][Dictkeys.datekey] = dt
}
}
}else{
Expand Down
Loading