Skip to content

Commit

Permalink
Merge pull request #11 from Woosmap/dev/removedefault
Browse files Browse the repository at this point in the history
Remove Empty property
  • Loading branch information
sameerdhulap authored Nov 27, 2024
2 parents af42d05 + a0e5f3f commit e5d473b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
25 changes: 15 additions & 10 deletions ios/GeofencingEventsReceiver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,43 +32,42 @@ class GeofencingEventsReceiver: NSObject {
collectedEvent["longitude"] = POIregion.longitude
collectedEvent["radius"] = POIregion.radius


if let POI = POIs.getPOIbyIdStore(idstore: POIregion.identifier) as POI? {
collectedEvent["name"] = POI.name ?? "-"

let idstore = POI.idstore ?? "-"
collectedEvent["name"] = POI.name ?? "-"
let idstore = POI.idstore ?? ""
if(idstore.trimmingCharacters(in: .whitespacesAndNewlines) != ""){
collectedEvent["id_store"] = idstore
}

let city = POI.city ?? "-"
let city = POI.city ?? ""
if(city.trimmingCharacters(in: .whitespacesAndNewlines) != ""){
collectedEvent["city"] = city
}

let zipCode = POI.zipCode ?? "-"
let zipCode = POI.zipCode ?? ""
if(zipCode.trimmingCharacters(in: .whitespacesAndNewlines) != ""){
collectedEvent["zip_code"] = zipCode
}

collectedEvent["distance"] = POI.distance

let countryCode = POI.countryCode ?? "-"
let countryCode = POI.countryCode ?? ""
if(countryCode.trimmingCharacters(in: .whitespacesAndNewlines) != ""){
collectedEvent["country_code"] = countryCode
}

let address = POI.address ?? "-"
let address = POI.address ?? ""
if(address.trimmingCharacters(in: .whitespacesAndNewlines) != ""){
collectedEvent["address"] = address
}

let tag : String = POI.tags ?? "-"
let tag : String = POI.tags ?? ""
if(tag.trimmingCharacters(in: .whitespacesAndNewlines) != ""){
collectedEvent["tags"] = tag
}

let types : String = POI.types ?? "-"
let types : String = POI.types ?? ""
if(types.trimmingCharacters(in: .whitespacesAndNewlines) != ""){
collectedEvent["types"] = types
}
Expand All @@ -90,6 +89,12 @@ class GeofencingEventsReceiver: NSObject {
else if let val = eventValue as? Int {
eventAttributes.put(val, forKey: eventKey)
}
else if let val = eventValue as? Int64 {
eventAttributes.put(Int(val), forKey: eventKey)
}
else if let val = eventValue as? Int32 {
eventAttributes.put(Int(val), forKey: eventKey)
}
else if let val = eventValue as? Date {
eventAttributes.put(val, forKey: eventKey)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@woosmap/expo-plugin-geofencing-batch",
"version":"1.0.0",
"version":"1.0.1",
"description": "Woosmap geofencing and batch integration",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion whatsnew.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* Enhancement: bug fixes user properties
* Enhancement: bug fixes

0 comments on commit e5d473b

Please sign in to comment.