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
2023-01-19 17:06:46 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1d23145ac7dbe563311cf0e1e27dedacda771f58
1d23145a
1 parent
76507238
fix texts, add accessToken logs at logout
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.h
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
1d23145
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
View file @
1d23145
...
...
@@ -113,6 +113,7 @@
-
(
void
)
getSingleCampaignAsync
:(
NSString
*
)
sessionUuid
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
sendEvent
:
(
NSString
*
)
eventName
priority
:
(
BOOL
)
priority
;
-
(
void
)
updateRefreshTokenMA
:(
NSString
*
)
access_token
:
(
NSString
*
)
refresh_token
;
-
(
NSString
*
)
getAccessTokenM
;
@end
#endif
/* MyApi_h */
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
View file @
1d23145
...
...
@@ -1794,4 +1794,11 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
[[
Warply
sharedService
]
updateRefreshTokenW
:
access_token
:
refresh_token
];
}
///////////////////////////////////////////////////////////////////////////////////////////////////
-
(
NSString
*
)
getAccessTokenM
{
return
[[
Warply
sharedService
]
getAccessToken2
];
}
@end
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.h
View file @
1d23145
...
...
@@ -293,6 +293,8 @@ WL_VERSION_INTERFACE()
*/
-
(
NSString
*
)
getAccessToken
;
-
(
NSString
*
)
getAccessToken2
;
-
(
NSString
*
)
getRefreshToken
;
-
(
NSString
*
)
getClientId
;
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
View file @
1d23145
...
...
@@ -755,6 +755,47 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
return
@""
;
};
-
(
NSString
*
)
getAccessToken2
{
BOOL
tableExist
=
NO
;
@try
{
@synchronized
(
_DatabaseLock
)
{
tableExist
=
[
_db
tableExists
:
@"requestVariables"
];
}
}
@catch
(
NSException
*
exception
)
{
NSLog
(
@"tableExists error: %@"
,
exception
.
reason
);
}
@finally
{
// NSLog(@"Finally condition");
}
// NSString *accessToken = [NSString alloc];
NSString
*
accessToken
=
@""
;
if
(
tableExist
==
YES
)
{
@try
{
@synchronized
(
_DatabaseLock
)
{
FMResultSet
*
accessTokenSet
=
[
_db
executeQuery
:
@"SELECT access_token FROM requestVariables WHERE id = 1;"
];
while
([
accessTokenSet
next
])
{
accessToken
=
[[
accessTokenSet
resultDictionary
][
@"access_token"
]
stringValue
];
}
}
}
@catch
(
NSException
*
exception
)
{
NSLog
(
@"SELECT accessToken error: %@"
,
exception
.
reason
);
accessToken
=
@""
;
}
@finally
{
// NSLog(@"Finally condition");
}
// FMResultSet *accessTokenSet = [_db executeQuery:@"SELECT access_token FROM requestVariables WHERE id = 1;"];
// while ([accessTokenSet next]) {
// accessToken = [[accessTokenSet resultDictionary][@"access_token"] stringValue];
// }
return
accessToken
;
}
return
@""
;
};
-
(
NSString
*
)
getRefreshToken
{
BOOL
tableExist
=
NO
;
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
1d23145
...
...
@@ -6354,6 +6354,11 @@ public class swiftApi {
swiftApi
()
.
setUserTag
(
""
)
swiftApi
()
.
setUserNonTelco
(
false
)
swiftApi
()
.
setCCMSLoyaltyCampaigns
(
campaigns
:
[])
let
accessToken
=
instanceOfMyApi
.
getAccessTokenM
()
print
(
"=================== TOKEN DELETED ========================="
)
print
(
"Bearer: "
,
accessToken
)
print
(
"=================== TOKEN DELETED ========================="
)
}
else
{
let
dynatraceEvent
=
swiftApi
.
LoyaltySDKDynatraceEventModel
()
...
...
Please
register
or
login
to post a comment