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
2aac98e8
Commit
2aac98e8
authored
Sep 22, 2020
by
jz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
4a8352ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
OldPhobos.m
GMPhobos/Classes/OldPhobos.m
+0
-2
PhobosDevice.m
GMPhobos/Classes/PhobosDevice.m
+4
-1
No files found.
GMPhobos/Classes/OldPhobos.m
View file @
2aac98e8
...
@@ -110,8 +110,6 @@ static OldPhobos *sharedClient = nil;
...
@@ -110,8 +110,6 @@ static OldPhobos *sharedClient = nil;
@"run_time"
:
PhobosSafeString
([
PhobosUtil
deviceRunTime
]),
@"run_time"
:
PhobosSafeString
([
PhobosUtil
deviceRunTime
]),
@"uuid"
:
PhobosSafeString
([
PhobosDevice
getDEVICEID
]),
@"uuid"
:
PhobosSafeString
([
PhobosDevice
getDEVICEID
]),
@"uqid"
:
PhobosSafeString
([
PhobosDevice
getUQID
]),
@"uqid"
:
PhobosSafeString
([
PhobosDevice
getUQID
]),
@"idfa"
:
PhobosSafeString
([
PhobosDevice
getIDFA
]),
@"idfv"
:
PhobosSafeString
([
PhobosDevice
getIDFV
]),
@"build_version_release"
:
PhobosSafeString
([[
UIDevice
currentDevice
]
systemVersion
]),
@"build_version_release"
:
PhobosSafeString
([[
UIDevice
currentDevice
]
systemVersion
]),
};
};
[
OldPhobos
track
:
@"device_opened"
attributes
:
dict
sendNow
:
YES
];
[
OldPhobos
track
:
@"device_opened"
attributes
:
dict
sendNow
:
YES
];
...
...
GMPhobos/Classes/PhobosDevice.m
View file @
2aac98e8
...
@@ -28,6 +28,7 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
...
@@ -28,6 +28,7 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
//直接从钥匙串中获取
//直接从钥匙串中获取
NSString
*
keyChainIDFA
=
[[
ASIdentifierManager
sharedManager
]
advertisingIdentifier
].
UUIDString
;
NSString
*
keyChainIDFA
=
[[
ASIdentifierManager
sharedManager
]
advertisingIdentifier
].
UUIDString
;
if
([
self
checkIdfaIsNull
:
keyChainIDFA
])
{
if
([
self
checkIdfaIsNull
:
keyChainIDFA
])
{
//如果为空从钥匙串中取获取
keyChainIDFA
=
[
self
getKeyChainService
:
IDFA
account
:
keyChainAccount
];
keyChainIDFA
=
[
self
getKeyChainService
:
IDFA
account
:
keyChainAccount
];
}
else
{
}
else
{
//如果获取到存储到钥匙串中
//如果获取到存储到钥匙串中
...
@@ -99,10 +100,11 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
...
@@ -99,10 +100,11 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
return
[[[
UIDevice
currentDevice
]
identifierForVendor
]
UUIDString
];
return
[[[
UIDevice
currentDevice
]
identifierForVendor
]
UUIDString
];
}
}
#pragma mark - getDEVICEID
#pragma mark - getDEVICEID
+
(
NSString
*
)
getDEVICEID
{
+
(
NSString
*
)
getDEVICEID
{
NSString
*
idfa
=
[
self
getIDFA
];
NSString
*
idfa
=
[
self
getIDFA
];
if
(
!
[
self
checkIdfaIsNull
:
idfa
])
{
if
([
self
checkIdfaIsNull
:
idfa
])
{
idfa
=
[
self
getUQID
];
idfa
=
[
self
getUQID
];
}
}
return
idfa
;
return
idfa
;
...
@@ -117,6 +119,7 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
...
@@ -117,6 +119,7 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
return
deviceId
;
return
deviceId
;
}
}
#pragma mark - 钥匙串封装
#pragma mark - 钥匙串封装
+
(
void
)
saveKeyChainWithValue
:
(
NSString
*
)
value
service
:
(
NSString
*
)
service
account
:
(
NSString
*
)
account
{
+
(
void
)
saveKeyChainWithValue
:
(
NSString
*
)
value
service
:
(
NSString
*
)
service
account
:
(
NSString
*
)
account
{
[
SAMKeychain
setPassword
:
value
forService
:
service
account
:
account
];
[
SAMKeychain
setPassword
:
value
forService
:
service
account
:
account
];
...
...
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