File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -779,6 +779,27 @@ public static string getIdfa()
779
779
#endif
780
780
}
781
781
782
+ public static string getIdfv ( )
783
+ {
784
+ if ( IsEditor ( ) )
785
+ {
786
+ return string . Empty ;
787
+ }
788
+
789
+ #if UNITY_IOS
790
+ return AdjustiOS . GetIdfv ( ) ;
791
+ #elif UNITY_ANDROID
792
+ Debug . Log ( "[Adjust]: Error! IDFV is not available on Android platform." ) ;
793
+ return string . Empty ;
794
+ #elif ( UNITY_WSA || UNITY_WP8 )
795
+ Debug . Log ( "[Adjust]: Error! IDFV is not available on Windows platform." ) ;
796
+ return string . Empty ;
797
+ #else
798
+ Debug . Log ( errorMsgPlatform ) ;
799
+ return string . Empty ;
800
+ #endif
801
+ }
802
+
782
803
public static string getSdkVersion ( )
783
804
{
784
805
if ( IsEditor ( ) )
Original file line number Diff line number Diff line change @@ -412,6 +412,21 @@ void _AdjustAppWillOpenUrl(const char* url) {
412
412
return idfaCStringCopy;
413
413
}
414
414
415
+ char * _AdjustGetIdfv () {
416
+ NSString *idfv = [Adjust idfv ];
417
+ if (nil == idfv) {
418
+ return NULL ;
419
+ }
420
+
421
+ const char * idfvCString = [idfv UTF8String ];
422
+ if (NULL == idfvCString) {
423
+ return NULL ;
424
+ }
425
+
426
+ char * idfvCStringCopy = strdup (idfvCString);
427
+ return idfvCStringCopy;
428
+ }
429
+
415
430
char * _AdjustGetAdid () {
416
431
NSString *adid = [Adjust adid ];
417
432
if (nil == adid) {
Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ private static extern void _AdjustTrackEvent(
79
79
[ DllImport ( "__Internal" ) ]
80
80
private static extern string _AdjustGetIdfa ( ) ;
81
81
82
+ [ DllImport ( "__Internal" ) ]
83
+ private static extern string _AdjustGetIdfv ( ) ;
84
+
82
85
[ DllImport ( "__Internal" ) ]
83
86
private static extern string _AdjustGetAdid ( ) ;
84
87
@@ -467,6 +470,11 @@ public static string GetIdfa()
467
470
return _AdjustGetIdfa ( ) ;
468
471
}
469
472
473
+ public static string GetIdfv ( )
474
+ {
475
+ return _AdjustGetIdfv ( ) ;
476
+ }
477
+
470
478
public static string GetAdid ( )
471
479
{
472
480
return _AdjustGetAdid ( ) ;
You can’t perform that action at this time.
0 commit comments