Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2025-02-13 14:35:23 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
826799c2f94849cf431940d8685e39624fc503c7
826799c2
1 parent
c4f96a31
method deletion fixes
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
172 deletions
SwiftWarplyFramework.podspec
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework.podspec
View file @
826799c
...
...
@@ -26,7 +26,7 @@ Pod::Spec.new do |spec|
# spec.vendored_frameworks = "SwiftWarplyFramework.framework"
spec
.
exclude_files
=
"Classes/Exclude"
spec
.
dependency
'RSBarcodes_Swift'
,
'~> 5.1.1'
#
spec.dependency 'RSBarcodes_Swift', '~> 5.1.1'
spec
.
dependency
'SwiftEventBus'
# spec.resource_bundles = { 'ResourcesBundle' => ['SwiftWarplyFramework/**/*.{png,jpeg,jpg,storyboard,xib,xcassets,json,ttf,imageset,strings}'] }
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
View file @
826799c
...
...
@@ -41,7 +41,6 @@
-
(
void
)
application
:(
UIApplication
*
)
application
didRegisterForRemoteNotificationsWithDeviceToken
:(
NSData
*
)
deviceToken
;
-
(
void
)
application
:(
UIApplication
*
)
application
didFailToRegisterForRemoteNotificationsWithError
:(
NSError
*
)
error
;
-
(
void
)
application
:(
UIApplication
*
)
application
didReceiveRemoteNotification
:(
NSDictionary
*
)
userInfo
;
-
(
NSMutableArray
*
)
getInbox
;
-
(
NSMutableArray
*
)
getProducts
:(
NSString
*
)
filter
;
-
(
NSMutableArray
*
)
sendContact
:(
NSString
*
)
name
email
:(
NSString
*
)
email
msisdn
:(
NSString
*
)
msisdn
message
:(
NSString
*
)
message
;
-
(
NSMutableArray
*
)
getContentWithCategory
:(
NSString
*
)
category
tags
:(
NSArray
*
)
tags
;
...
...
@@ -56,17 +55,13 @@
-
(
NSDictionary
*
)
registerAutoLogin
:(
NSString
*
)
id
password
:(
NSString
*
)
password
name
:(
NSString
*
)
name
email
:(
NSString
*
)
email
segmentation
:(
NSNumber
*
)
segmentation
newsletter
:(
NSNumber
*
)
newsletter
loginType
:(
NSString
*
)
loginType
;
-
(
NSDictionary
*
)
refreshToken
;
-
(
NSDictionary
*
)
changePassword
:(
NSString
*
)
oldPassword
newPassword
:(
NSString
*
)
newPassword
;
-
(
NSDictionary
*
)
getProfile
;
-
(
NSDictionary
*
)
editProfile
:(
NSString
*
)
firstname
andLastname
:(
NSString
*
)
lastname
andEmail
:(
NSString
*
)
email
andSalutation
:(
NSString
*
)
salutation
andMsisdn
:(
NSString
*
)
msisdn
andNickname
:(
NSString
*
)
nickname
andGender
:(
NSString
*
)
gender
andBirthday
:(
NSString
*
)
birthday
andNameDay
:(
NSString
*
)
nameday
andTaxID
:(
NSString
*
)
taxid
andProfileMetadata
:(
NSDictionary
*
)
profileMetadata
optin
:(
NSNumber
*
)
optin
newsLetter
:(
NSNumber
*
)
newsletter
andSMS
:(
NSNumber
*
)
sms
andSegmentation
:(
NSNumber
*
)
segmentation
andSMSSegmentation
:(
NSNumber
*
)
smsSegmentation
;
-
(
NSDictionary
*
)
changeProfileImage
:(
NSString
*
)
image
andUserId
:(
NSString
*
)
userId
;
-
(
NSDictionary
*
)
addCard
:(
NSString
*
)
number
andCardIssuer
:(
NSString
*
)
cardIssuer
andCardHolder
:(
NSString
*
)
cardHolder
andExpirationMonth
:(
NSString
*
)
expirationMonth
andExpirationYear
:(
NSString
*
)
expirationYear
;
-
(
NSDictionary
*
)
getCards
;
-
(
NSDictionary
*
)
deleteCard
:(
NSString
*
)
token
;
-
(
NSDictionary
*
)
verifyTicket
:(
NSString
*
)
guid
ticket
:(
NSString
*
)
ticket
;
-
(
NSDictionary
*
)
getCoupons
;
-
(
NSDictionary
*
)
getTransactionHistory
;
-
(
NSDictionary
*
)
getPointsHistory
;
-
(
NSDictionary
*
)
getSharingHistory
;
-
(
NSDictionary
*
)
addAddress
:(
NSString
*
)
friendlyName
andAddressName
:(
NSString
*
)
addressName
andAddressNumber
:(
NSString
*
)
addressNumber
andPostalCode
:(
NSString
*
)
postalCode
andFloorNumber
:(
NSNumber
*
)
floorNumber
andDoorbell
:(
NSString
*
)
doorbel
andRegion
:(
NSString
*
)
region
andLatitude
:(
NSString
*
)
latitude
andLongitude
:(
NSString
*
)
longitude
andNotes
:(
NSString
*
)
notes
;
-
(
NSDictionary
*
)
getAddress
;
-
(
NSDictionary
*
)
editAddress
:(
NSString
*
)
friendlyName
andAddressName
:(
NSString
*
)
addressName
andAddressNumber
:(
NSString
*
)
addressNumber
andPostalCode
:(
NSString
*
)
postalCode
andFloorNumber
:(
NSNumber
*
)
floorNumber
andDoorbell
:(
NSString
*
)
doorbel
andRegion
:(
NSString
*
)
region
andLatitude
:(
NSString
*
)
latitude
andLongitude
:(
NSString
*
)
longitude
andNotes
:(
NSString
*
)
notes
andUuid
:(
NSString
*
)
uuid
;
...
...
@@ -77,7 +72,6 @@
-
(
NSDictionary
*
)
requestOtpWithMsisdn
:(
NSString
*
)
msisdn
andScope
:(
NSString
*
)
scope
;
-
(
NSDictionary
*
)
retrieveMultilingualMerchantsWithCategories
:(
NSArray
*
)
categories
andDefaultShown
:(
NSNumber
*
)
defaultShown
andCenter
:(
NSNumber
*
)
center
andTags
:(
NSArray
*
)
tags
andUuid
:(
NSString
*
)
uuid
andDistance
:(
NSNumber
*
)
distance
;
-
(
NSDictionary
*
)
getCouponSetsWithActive
:(
NSNumber
*
)
active
andVisible
:(
NSNumber
*
)
visible
andUuids
:(
NSArray
*
)
uuids
;
-
(
NSDictionary
*
)
redeemCouponWithCoupon
:(
NSString
*
)
coupon
:
(
NSString
*
)
communication_uuid
;
-
(
NSDictionary
*
)
validateCouponWithCoupon
:(
NSString
*
)
coupon
;
-
(
NSDictionary
*
)
loginCosmoteWithGuid
:(
NSString
*
)
guid
andAppUuid
:(
NSString
*
)
appUuid
andTicket
:(
NSString
*
)
ticket
;
-
(
void
)
getCouponsUniversalAsync
:(
NSString
*
)
language
:
(
NSString
*
)
couponsetType
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
View file @
826799c
...
...
@@ -365,33 +365,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
[[
Warply
sharedService
].
pushManager
resetBadge
];
}
-
(
NSMutableArray
*
)
getInbox
{
__block
NSArray
*
in
=
[
NSMutableArray
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
__block
BOOL
isOperationCompleted
=
NO
;
[[
Warply
sharedService
]
getInbox2WithSuccessBlock
:
^
(
NSArray
*
inbox
)
{
in
=
inbox
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}
failureBlock
:
^
(
NSError
*
error
)
{
NSLog
(
@"%@"
,
error
);
in
=
nil
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}];
if
(
!
isOperationCompleted
)
{
isRunLoopNested
=
YES
;
NSLog
(
@"Waiting..."
);
CFRunLoopRun
();
// Magic!
isRunLoopNested
=
NO
;
}
return
in
;
}
-
(
NSMutableArray
*
)
getProducts
:
(
NSString
*
)
filter
{
__block
NSMutableArray
*
prods
=
[
NSMutableArray
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
...
...
@@ -799,60 +772,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
return
resp
;
}
-
(
NSDictionary
*
)
getProfile
{
__block
NSDictionary
*
resp
=
[
NSDictionary
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
__block
BOOL
isOperationCompleted
=
NO
;
[[
Warply
sharedService
]
getProfileWithSuccessBlock
:
^
(
NSDictionary
*
response
)
{
resp
=
response
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}
failureBlock
:
^
(
NSError
*
error
)
{
NSLog
(
@"%@"
,
error
);
resp
=
nil
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}];
if
(
!
isOperationCompleted
)
{
isRunLoopNested
=
YES
;
NSLog
(
@"Waiting..."
);
CFRunLoopRun
();
// Magic!
isRunLoopNested
=
NO
;
}
return
resp
;
}
-
(
NSDictionary
*
)
editProfile
:
(
NSString
*
)
firstname
andLastname
:
(
NSString
*
)
lastname
andEmail
:
(
NSString
*
)
email
andSalutation
:
(
NSString
*
)
salutation
andMsisdn
:
(
NSString
*
)
msisdn
andNickname
:
(
NSString
*
)
nickname
andGender
:
(
NSString
*
)
gender
andBirthday
:
(
NSString
*
)
birthday
andNameDay
:
(
NSString
*
)
nameday
andTaxID
:
(
NSString
*
)
taxid
andProfileMetadata
:
(
NSDictionary
*
)
profileMetadata
optin
:
(
NSNumber
*
)
optin
newsLetter
:
(
NSNumber
*
)
newsletter
andSMS
:
(
NSNumber
*
)
sms
andSegmentation
:
(
NSNumber
*
)
segmentation
andSMSSegmentation
:
(
NSNumber
*
)
smsSegmentation
{
__block
NSDictionary
*
resp
=
[
NSDictionary
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
__block
BOOL
isOperationCompleted
=
NO
;
[[
Warply
sharedService
]
editProfileWithSuccessBlock
:
firstname
andLastName
:
lastname
andEmail
:
email
andSalutation
:
salutation
andMsisdn
:
msisdn
andNickname
:
nickname
andGender
:
gender
andBirthday
:
birthday
andNameDay
:
nameday
andTaxID
:
taxid
andProfileMetadata
:
profileMetadata
optin
:
optin
newsLetter
:
newsletter
andSMS
:
sms
andSegmentation
:
segmentation
andSMSSegmentation
:
smsSegmentation
:^
(
NSDictionary
*
response
)
{
resp
=
response
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}
failureBlock
:^
(
NSError
*
error
)
{
NSLog
(
@"%@"
,
error
);
resp
=
nil
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}];
if
(
!
isOperationCompleted
)
{
isRunLoopNested
=
YES
;
NSLog
(
@"Waiting..."
);
CFRunLoopRun
();
// Magic!
isRunLoopNested
=
NO
;
}
return
resp
;
}
-
(
NSDictionary
*
)
changeProfileImage
:
(
NSString
*
)
image
andUserId
:
(
NSString
*
)
userId
{
__block
NSDictionary
*
resp
=
[
NSDictionary
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
...
...
@@ -988,33 +907,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
return
resp
;
}
-
(
NSDictionary
*
)
getCoupons
{
__block
NSDictionary
*
resp
=
[
NSDictionary
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
__block
BOOL
isOperationCompleted
=
NO
;
[[
Warply
sharedService
]
getCouponsWithSuccessBlock
:
^
(
NSDictionary
*
response
)
{
resp
=
response
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}
failureBlock
:
^
(
NSError
*
error
)
{
NSLog
(
@"%@"
,
error
);
resp
=
nil
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}];
if
(
!
isOperationCompleted
)
{
isRunLoopNested
=
YES
;
NSLog
(
@"Waiting..."
);
CFRunLoopRun
();
// Magic!
isRunLoopNested
=
NO
;
}
return
resp
;
}
-
(
NSDictionary
*
)
getTransactionHistory
{
__block
NSDictionary
*
resp
=
[
NSDictionary
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
...
...
@@ -1069,35 +961,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
return
resp
;
}
-
(
NSDictionary
*
)
getSharingHistory
{
__block
NSDictionary
*
resp
=
[
NSDictionary
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
__block
BOOL
isOperationCompleted
=
NO
;
[[
Warply
sharedService
]
getSharingHistoryWithSuccessBlock
:
^
(
NSDictionary
*
response
)
{
resp
=
response
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}
failureBlock
:
^
(
NSError
*
error
)
{
NSLog
(
@"%@"
,
error
);
resp
=
nil
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}];
if
(
!
isOperationCompleted
)
{
isRunLoopNested
=
YES
;
NSLog
(
@"Waiting..."
);
CFRunLoopRun
();
// Magic!
isRunLoopNested
=
NO
;
}
return
resp
;
}
-
(
NSDictionary
*
)
addAddress
:
(
NSString
*
)
friendlyName
andAddressName
:
(
NSString
*
)
addressName
andAddressNumber
:
(
NSString
*
)
addressNumber
andPostalCode
:
(
NSString
*
)
postalCode
andFloorNumber
:
(
NSNumber
*
)
floorNumber
andDoorbell
:
(
NSString
*
)
doorbel
andRegion
:
(
NSString
*
)
region
andLatitude
:
(
NSString
*
)
latitude
andLongitude
:
(
NSString
*
)
longitude
andNotes
:
(
NSString
*
)
notes
{
__block
NSDictionary
*
resp
=
[
NSDictionary
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
...
...
@@ -1368,33 +1231,6 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
return
resp
;
}
-
(
NSDictionary
*
)
redeemCouponWithCoupon
:
(
NSString
*
)
coupon
:
(
NSString
*
)
communication_uuid
{
__block
NSDictionary
*
resp
=
[
NSDictionary
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
__block
BOOL
isOperationCompleted
=
NO
;
[[
Warply
sharedService
]
redeemCouponSetsWithSuccessBlock
:
coupon
:
communication_uuid
:^
(
NSDictionary
*
response
)
{
resp
=
response
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}
failureBlock
:^
(
NSError
*
error
)
{
NSLog
(
@"%@"
,
error
);
resp
=
nil
;
isOperationCompleted
=
YES
;
if
(
isRunLoopNested
)
{
CFRunLoopStop
(
CFRunLoopGetCurrent
());
// CFRunLoopRun() returns
}
}];
if
(
!
isOperationCompleted
)
{
isRunLoopNested
=
YES
;
NSLog
(
@"Waiting..."
);
CFRunLoopRun
();
// Magic!
isRunLoopNested
=
NO
;
}
return
resp
;
}
-
(
NSDictionary
*
)
validateCouponWithCoupon
:
(
NSString
*
)
coupon
{
__block
NSDictionary
*
resp
=
[
NSDictionary
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
826799c
...
...
@@ -2604,6 +2604,11 @@ public class swiftApi {
}
public
func
getCouponList
()
->
Array
<
CouponItemModel
>
{
return
GlobalVariables
.
couponList
}
public
func
setOldCouponList
(
_
coupons
:
Array
<
CouponItemModel
>
)
{
// let filteredCoupons = coupons.filter { CharacterSet.decimalDigits.isSuperset(of: CharacterSet(charactersIn: $0.discount ?? "")) }
var
oldCoupons
=
coupons
.
filter
({
return
$0
.
status
==
0
})
...
...
@@ -3996,7 +4001,7 @@ public class swiftApi {
}
}
public
func
openSupermarketMap
(
_
controller
:
UIViewController
)
->
Void
{
public
func
openSupermarket
s
Map
(
_
controller
:
UIViewController
)
->
Void
{
let
status
=
swiftApi
()
.
getNetworkStatus
()
if
(
status
==
-
1
||
status
==
0
)
{
swiftApi
()
.
showDialog
(
controller
,
"Δεν υπάρχει σύνδεση"
,
"Αυτή τη στιγμή βρίσκεσαι εκτός σύνδεσης. Παρακαλούμε βεβαιώσου ότι είσαι συνδεδεμένος στο διαδίκτυο και προσπάθησε ξανά."
)
...
...
Please
register
or
login
to post a comment