Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
GMPhobos
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMPhobos
Commits
0323d362
Commit
0323d362
authored
Mar 05, 2020
by
井庆林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改Entity
parent
e938dd72
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
Podfile.lock
Example/Podfile.lock
+3
-3
NewPhobos.m
GMPhobos/Classes/NewPhobos.m
+2
-2
PhobosDataManager.m
GMPhobos/Classes/PhobosDataManager.m
+3
-3
No files found.
Example/Podfile.lock
View file @
0323d362
PODS:
- GMCache (1.0.1):
- TMCache (= 2.1.0)
- GMPhobos (1.
3.5
):
- GMPhobos (1.
4.0
):
- GMCache
- MagicalRecord
- MJExtension
...
...
@@ -28,11 +28,11 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
GMCache: b78d8e46db864405e91d226ce640cc80d966c611
GMPhobos:
81a3a1171bab1499b1147eca51a5359dcfb660d0
GMPhobos:
3934127a7ec536932be9a5e64562093d68f98edb
MagicalRecord: 53bed74b4323b930992a725be713e53b37d19755
MJExtension: 635f2c663dcb1bf76fa4b715b2570a5710aec545
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
PODFILE CHECKSUM:
ea0fac2144ac80baf8f21576cde49526c19991a
d
PODFILE CHECKSUM:
4db0de045b595396507d6bad04e4823b02c3061
d
COCOAPODS: 1.8.4
GMPhobos/Classes/NewPhobos.m
View file @
0323d362
...
...
@@ -426,7 +426,7 @@ static NSString *sdkVersion = @"1.4.0";
/** 获取所有非立即发送埋点数量 */
+
(
NSInteger
)
normalPhobosCount
{
NSPredicate
*
predicate
=
[
NSPredicate
predicateWithFormat
:
@"s
endS
tatus = %d"
,
PhobosDataSendStatusNormal
];
NSPredicate
*
predicate
=
[
NSPredicate
predicateWithFormat
:
@"status = %d"
,
PhobosDataSendStatusNormal
];
return
[
PhobosDataManager
fetchCountOfEntitiesWithPredicate
:
predicate
];
}
...
...
@@ -437,7 +437,7 @@ static NSString *sdkVersion = @"1.4.0";
/** 获取所有立即发送埋点数量 */
+
(
NSUInteger
)
immediatelyPhobosCount
{
NSPredicate
*
predicate
=
[
NSPredicate
predicateWithFormat
:
@"s
endStatus = %d or sendS
tatus = %d"
,
PhobosDataSendStatusToBeSend
,
PhobosDataSendStatusError
];
NSPredicate
*
predicate
=
[
NSPredicate
predicateWithFormat
:
@"s
tatus = %d or s
tatus = %d"
,
PhobosDataSendStatusToBeSend
,
PhobosDataSendStatusError
];
return
[
PhobosDataManager
fetchCountOfEntitiesWithPredicate
:
predicate
];
}
...
...
GMPhobos/Classes/PhobosDataManager.m
View file @
0323d362
...
...
@@ -21,7 +21,7 @@ static NSManagedObjectContext *Phobos_defaultContext;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
NSBundle
*
bundle
=
[
NSBundle
bundleForClass
:[
self
class
]];
NSURL
*
modelURL
=
[
bundle
URLForResource
:
@"
PhobosDatas
"
withExtension
:
@"momd"
];
//NewCodeDataModel.xcdatamodeld
NSURL
*
modelURL
=
[
bundle
URLForResource
:
@"
GMCoreData
"
withExtension
:
@"momd"
];
//NewCodeDataModel.xcdatamodeld
NSManagedObjectModel
*
model
=
[[
NSManagedObjectModel
alloc
]
initWithContentsOfURL
:
modelURL
];
[
NSManagedObjectModel
MR_setDefaultManagedObjectModel
:
model
];
[
MagicalRecord
setupAutoMigratingCoreDataStack
];
...
...
@@ -31,9 +31,9 @@ static NSManagedObjectContext *Phobos_defaultContext;
+
(
NSArray
<
SendDataEntity
*>
*
)
fetchDataEntitiesWithImmediately
:
(
BOOL
)
immediately
{
NSPredicate
*
predicate
;
if
(
immediately
)
{
predicate
=
[
NSPredicate
predicateWithFormat
:
@"s
endStatus = %d or sendS
tatus = %d"
,
PhobosDataSendStatusToBeSend
,
PhobosDataSendStatusError
];
predicate
=
[
NSPredicate
predicateWithFormat
:
@"s
tatus = %d or s
tatus = %d"
,
PhobosDataSendStatusToBeSend
,
PhobosDataSendStatusError
];
}
else
{
predicate
=
[
NSPredicate
predicateWithFormat
:
@"s
endS
tatus = %d"
,
PhobosDataSendStatusNormal
];
predicate
=
[
NSPredicate
predicateWithFormat
:
@"status = %d"
,
PhobosDataSendStatusNormal
];
}
return
[
self
fetchDataEntitiesWithPredicate
:
predicate
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment