Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
react-native-device-info
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
放牛的园子
react-native-device-info
Commits
a9517557
Commit
a9517557
authored
Jul 30, 2016
by
Ryan Leckey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove IFA from uniqueID generation for iOS; it's not neccessary and it raises flags with Apple
parent
79590887
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
+0
-14
DeviceUID.m
RNDeviceInfo/DeviceUID.m
+0
-14
No files found.
RNDeviceInfo/DeviceUID.m
View file @
a9517557
...
...
@@ -45,7 +45,6 @@
-
(
NSString
*
)
uid
{
if
(
!
_uid
)
_uid
=
[[
self
class
]
valueForKeychainKey
:
_uidKey
service
:
_uidKey
];
if
(
!
_uid
)
_uid
=
[[
self
class
]
valueForUserDefaultsKey
:
_uidKey
];
if
(
!
_uid
)
_uid
=
[[
self
class
]
appleIFA
];
if
(
!
_uid
)
_uid
=
[[
self
class
]
appleIFV
];
if
(
!
_uid
)
_uid
=
[[
self
class
]
randomUUID
];
[
self
save
];
...
...
@@ -119,19 +118,6 @@
#pragma mark - UID Generation methods
+
(
NSString
*
)
appleIFA
{
NSString
*
ifa
=
nil
;
Class
ASIdentifierManagerClass
=
NSClassFromString
(
@"ASIdentifierManager"
);
if
(
ASIdentifierManagerClass
)
{
// a dynamic way of checking if AdSupport.framework is available
SEL
sharedManagerSelector
=
NSSelectorFromString
(
@"sharedManager"
);
id
sharedManager
=
((
id
(
*
)(
id
,
SEL
))[
ASIdentifierManagerClass
methodForSelector
:
sharedManagerSelector
])(
ASIdentifierManagerClass
,
sharedManagerSelector
);
SEL
advertisingIdentifierSelector
=
NSSelectorFromString
(
@"advertisingIdentifier"
);
NSUUID
*
advertisingIdentifier
=
((
NSUUID
*
(
*
)(
id
,
SEL
))[
sharedManager
methodForSelector
:
advertisingIdentifierSelector
])(
sharedManager
,
advertisingIdentifierSelector
);
ifa
=
[
advertisingIdentifier
UUIDString
];
}
return
ifa
;
}
+
(
NSString
*
)
appleIFV
{
if
(
NSClassFromString
(
@"UIDevice"
)
&&
[
UIDevice
instancesRespondToSelector
:
@selector
(
identifierForVendor
)])
{
// only available in iOS >= 6.0
...
...
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