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
Vasilis
2022-02-01 16:49:28 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
92f7ba716e1ce06d9c7bc5a3e098ea2660e33bbf
92f7ba71
1 parent
3e96958c
addition of inbox call exposure
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/billskouras.xcuserdatad/UserInterfaceState.xcuserstate
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/MyApi.h
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/MyApi.m
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/billskouras.xcuserdatad/UserInterfaceState.xcuserstate
View file @
92f7ba7
No preview for this file type
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/MyApi.h
View file @
92f7ba7
...
...
@@ -21,6 +21,7 @@
-
(
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
;
...
...
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/MyApi.m
View file @
92f7ba7
...
...
@@ -92,6 +92,33 @@ NSString *LANG;
[[
Warply
sharedService
].
pushManager
resetBadge
];
}
-
(
NSMutableArray
*
)
getInbox
{
__block
NSArray
*
in
=
[
NSMutableArray
alloc
];
__block
BOOL
isRunLoopNested
=
NO
;
__block
BOOL
isOperationCompleted
=
NO
;
[[
Warply
sharedService
]
getInboxWithSuccessBlock
:
^
(
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
;
...
...
Please
register
or
login
to post a comment