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 16:45:29 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eb1db265c0a8b0df00b38f13b6edc1b06889a9ef
eb1db265
1 parent
84e25c3c
handle db open
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
View file @
eb1db26
...
...
@@ -4991,6 +4991,20 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
// [self initDBIfNeeded];
// [self restore];
BOOL
dbOpened
=
NO
;
@try
{
@synchronized
(
_DatabaseLock
)
{
dbOpened
=
[
_db
open
];
}
}
@catch
(
NSException
*
exception
)
{
NSLog
(
@"Open db error: %@"
,
exception
.
reason
);
}
@finally
{
// NSLog(@"Finally condition");
}
BOOL
tableExist
=
NO
;
@try
{
@synchronized
(
_DatabaseLock
)
{
...
...
@@ -5007,7 +5021,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
time_t
timestamp
=
(
time_t
)
[[
NSDate
date
]
timeIntervalSince1970
];
// NSString *accessToken = [NSString alloc];
NSString
*
accessToken
=
@""
;
if
((
[
_db
open
]
==
YES
)
&&
(
tableExist
==
YES
))
{
if
((
dbOpened
==
YES
)
&&
(
tableExist
==
YES
))
{
// FMResultSet *accessTokenSet = [_db executeQuery:@"SELECT access_token FROM requestVariables WHERE id = 1;"];
// while ([accessTokenSet next]) {
// accessToken = [[accessTokenSet resultDictionary][@"access_token"] stringValue];
...
...
@@ -5165,6 +5179,19 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
// [self initDBIfNeeded];
// [self restore];
BOOL
dbOpened
=
NO
;
@try
{
@synchronized
(
_DatabaseLock
)
{
dbOpened
=
[
_db
open
];
}
}
@catch
(
NSException
*
exception
)
{
NSLog
(
@"Open db error: %@"
,
exception
.
reason
);
}
@finally
{
// NSLog(@"Finally condition");
}
BOOL
tableExist
=
NO
;
@try
{
@synchronized
(
_DatabaseLock
)
{
...
...
@@ -5181,7 +5208,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
time_t
timestamp
=
(
time_t
)
[[
NSDate
date
]
timeIntervalSince1970
];
// NSString *accessToken = [NSString alloc];
NSString
*
accessToken
=
@""
;
if
((
[
_db
open
]
==
YES
)
&&
(
tableExist
==
YES
))
{
if
((
dbOpened
==
YES
)
&&
(
tableExist
==
YES
))
{
@try
{
@synchronized
(
_DatabaseLock
)
{
FMResultSet
*
accessTokenSet
=
[
_db
executeQuery
:
@"SELECT access_token FROM requestVariables WHERE id = 1;"
];
...
...
Please
register
or
login
to post a comment