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-12-14 12:55:30 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
701cca14151acc0e99f8ef69c7640874132304f0
701cca14
1 parent
32543ab2
Possible fix for push crash
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
9 deletions
SwiftWarplyFramework/SwiftWarplyFramework/Warply/managers/WLPushManager.m
SwiftWarplyFramework/SwiftWarplyFramework/Warply/managers/WLPushManager.m
View file @
701cca1
...
...
@@ -263,9 +263,21 @@ static const char* jailbreak_apps[] =
return
;
}
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
userInfo
options
:
NSJSONWritingPrettyPrinted
error
:
nil
];
NSString
*
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
WLLOG
(
@"Did receive push: %@"
,
jsonString
);
@try
{
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
userInfo
options
:
NSJSONWritingPrettyPrinted
error
:
nil
];
NSString
*
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
WLLOG
(
@"Did receive push: %@"
,
jsonString
);
}
@catch
(
NSException
*
exception
)
{
// NSLog(@"Print userInfo error: %@", exception.reason);
}
@finally
{
// NSLog(@"Finally condition");
}
// NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
// NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// WLLOG(@"Did receive push: %@", jsonString);
WLInboxItem
*
inboxItem
=
[[
WLInboxItem
alloc
]
initWithAttributes
:
userInfo
]
;
// [WLAnalyticsManager logUserReceivedPush:inboxItem];
...
...
@@ -346,9 +358,20 @@ static const char* jailbreak_apps[] =
state
=
WLApplicationStateBackground
;
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
userInfo
options
:
NSJSONWritingPrettyPrinted
error
:
nil
];
NSString
*
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
WLLOG
(
@"Did receive push: %@"
,
jsonString
);
@try
{
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
userInfo
options
:
NSJSONWritingPrettyPrinted
error
:
nil
];
NSString
*
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
WLLOG
(
@"Did receive push: %@"
,
jsonString
);
}
@catch
(
NSException
*
exception
)
{
// NSLog(@"Print userInfo error: %@", exception.reason);
}
@finally
{
// NSLog(@"Finally condition");
}
// NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
// NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// WLLOG(@"Did receive push: %@", jsonString);
WLInboxItem
*
inboxItem
=
[[
WLInboxItem
alloc
]
initWithAttributes
:
userInfo
]
;
// [WLAnalyticsManager logUserReceivedPush:inboxItem];
...
...
@@ -430,9 +453,20 @@ static const char* jailbreak_apps[] =
state
=
WLApplicationStateBackground
;
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
userInfo
options
:
NSJSONWritingPrettyPrinted
error
:
nil
];
NSString
*
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
WLLOG
(
@"Did receive push: %@"
,
jsonString
);
@try
{
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
userInfo
options
:
NSJSONWritingPrettyPrinted
error
:
nil
];
NSString
*
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
WLLOG
(
@"Did receive push: %@"
,
jsonString
);
}
@catch
(
NSException
*
exception
)
{
// NSLog(@"Print userInfo error: %@", exception.reason);
}
@finally
{
// NSLog(@"Finally condition");
}
// NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:NSJSONWritingPrettyPrinted error:nil];
// NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
// WLLOG(@"Did receive push: %@", jsonString);
WLInboxItem
*
inboxItem
=
[[
WLInboxItem
alloc
]
initWithAttributes
:
userInfo
]
;
// [WLAnalyticsManager logUserReceivedPush:inboxItem];
...
...
Please
register
or
login
to post a comment