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-12 11:50:20 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
32543ab2149c46c27fd41e800813684e8cd35a3c
32543ab2
1 parent
e6bbb9c8
possible fix for db crash
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
View file @
32543ab
...
...
@@ -4771,14 +4771,15 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient
.
requestSerializer
=
[
AFJSONRequestSerializer
serializer
];
[
_httpClient
.
requestSerializer
setTimeoutInterval
:
30
];
[
self
createDBIfNeeded
];
[
self
initDBIfNeeded
];
[
self
restore
];
// [self createDBIfNeeded];
// [self initDBIfNeeded];
// [self restore];
//Set HTTP Headers
time_t
timestamp
=
(
time_t
)
[[
NSDate
date
]
timeIntervalSince1970
];
// NSString *accessToken = [NSString alloc];
NSString
*
accessToken
=
@""
;
if
(
[
_db
tableExists
:
@"requestVariables"
]
==
YES
)
{
if
(
([
_db
open
]
==
YES
)
&&
([
_db
tableExists
:
@"requestVariables"
]
==
YES
)
)
{
// FMResultSet *accessTokenSet = [_db executeQuery:@"SELECT access_token FROM requestVariables WHERE id = 1;"];
// while ([accessTokenSet next]) {
// accessToken = [[accessTokenSet resultDictionary][@"access_token"] stringValue];
...
...
@@ -4932,14 +4933,15 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient
.
requestSerializer
=
[
AFJSONRequestSerializer
serializer
];
[
_httpClient
.
requestSerializer
setTimeoutInterval
:
30
];
[
self
createDBIfNeeded
];
[
self
initDBIfNeeded
];
[
self
restore
];
// [self createDBIfNeeded];
// [self initDBIfNeeded];
// [self restore];
//Set HTTP Headers
time_t
timestamp
=
(
time_t
)
[[
NSDate
date
]
timeIntervalSince1970
];
// NSString *accessToken = [NSString alloc];
NSString
*
accessToken
=
@""
;
if
(
[
_db
tableExists
:
@"requestVariables"
]
==
YES
)
{
if
(
([
_db
open
]
==
YES
)
&&
([
_db
tableExists
:
@"requestVariables"
]
==
YES
)
)
{
@try
{
@synchronized
(
_DatabaseLock
)
{
FMResultSet
*
accessTokenSet
=
[
_db
executeQuery
:
@"SELECT access_token FROM requestVariables WHERE id = 1;"
];
...
...
Please
register
or
login
to post a comment