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
2022-10-18 16:48:23 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d28ee9a627721c8995e6b76e921f55641fa7cc23
d28ee9a6
1 parent
9860335a
fix alertview at push manager
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
6 deletions
SwiftWarplyFramework/SwiftWarplyFramework/Warply/managers/WLPushManager.m
SwiftWarplyFramework/SwiftWarplyFramework/Warply/managers/WLPushManager.m
View file @
d28ee9a
...
...
@@ -256,12 +256,37 @@ static const char* jailbreak_apps[] =
switch
(
state
)
{
case
WLApplicationStateActive
:
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
init
];
[
alert
setTitle
:[[
userInfo
objectForKey
:
@"aps"
]
objectForKey
:
@"alert"
]];
[
alert
addButtonWithTitle
:
NSLocalizedString
(
@"Close"
,
@"Warply"
)];
[
alert
addButtonWithTitle
:
NSLocalizedString
(
@"View"
,
@"Warply"
)];
[
alert
setDelegate
:
self
];
[
alert
show
];
// UIAlertView *alert = [[UIAlertView alloc] init];
// [alert setTitle:[[userInfo objectForKey:@"aps"] objectForKey:@"alert"]];
// [alert addButtonWithTitle:NSLocalizedString(@"Close", @"Warply")];
// [alert addButtonWithTitle:NSLocalizedString(@"View", @"Warply")];
// [alert setDelegate:self];
// [alert show];
UIAlertController
*
alert
=
[
UIAlertController
alertControllerWithTitle
:[[
userInfo
objectForKey
:
@"aps"
]
objectForKey
:
@"alert"
]
message
:
@""
preferredStyle
:
UIAlertControllerStyleAlert
];
UIAlertAction
*
yesButton
=
[
UIAlertAction
actionWithTitle
:
NSLocalizedString
(
@"Close"
,
@"Warply"
)
style
:
UIAlertActionStyleDefault
handler
:^
(
UIAlertAction
*
action
)
{
//Handle your yes please button action here
}];
UIAlertAction
*
noButton
=
[
UIAlertAction
actionWithTitle
:
NSLocalizedString
(
@"View"
,
@"Warply"
)
style
:
UIAlertActionStyleDefault
handler
:^
(
UIAlertAction
*
action
)
{
//Handle no, thanks button
}];
[
alert
addAction
:
yesButton
];
[
alert
addAction
:
noButton
];
UIWindow
*
alertWindow
=
[[
UIWindow
alloc
]
initWithFrame
:[
UIScreen
mainScreen
].
bounds
];
alertWindow
.
rootViewController
=
[[
UIViewController
alloc
]
init
];
alertWindow
.
windowLevel
=
UIWindowLevelAlert
+
1
;
[
alertWindow
makeKeyAndVisible
];
[
alertWindow
.
rootViewController
presentViewController
:
alert
animated
:
YES
completion
:
nil
];
self
.
pendingItem
=
inboxItem
;
break
;
...
...
Please
register
or
login
to post a comment