# How to access Device Token (iOS)

**URL:** <https://forums.unrealengine.com/t/how-to-access-device-token-ios/349526>\
**Category:** Mobile\
**Tags:** notification, unreal-engine, iOS, UE4, CPP, question\
**Created:** [March 4, 2016, 10:43am UTC](https://forums.unrealengine.com/t/how-to-access-device-token-ios/349526 "2016-03-04T10:43:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sangpan\_On](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sangpan\_On](https://forums.unrealengine.com/u/sangpan_On)\
**Post date:** [March 4, 2016, 10:43am UTC](https://forums.unrealengine.com/t/how-to-access-device-token-ios/349526/1 "2016-03-04T10:43:44Z")

</div>

in basic iOS project’s appdelegate.m, there is below code.

```
-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
}

```

I want know that deviceToken Value.

Is there way to get the deviceToken?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_890dc646](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_890dc646](https://forums.unrealengine.com/u/anonymous_user_890dc646)\
**Post date:** [March 4, 2016, 12:05pm UTC](https://forums.unrealengine.com/t/how-to-access-device-token-ios/349526/2 "2016-03-04T12:05:29Z")

</div>

Do you wanna access it in C++?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_890dc646](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_890dc646](https://forums.unrealengine.com/u/anonymous_user_890dc646)\
**Post date:** [March 4, 2016, 12:43pm UTC](https://forums.unrealengine.com/t/how-to-access-device-token-ios/349526/3 "2016-03-04T12:43:41Z")

</div>

If your app uses the push notification function. you will received this message when push notification has been successfully registered. you can get the deviceToken in UE4 with listen FCoreDelegates::ApplicationRegisteredForRemoteNotificationsDelegate events.

---

<div class="post-metadata">

**Author:** ![sangpan\_On](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sangpan\_On](https://forums.unrealengine.com/u/sangpan_On)\
**Post date:** [March 21, 2016, 6:43am UTC](https://forums.unrealengine.com/t/how-to-access-device-token-ios/349526/4 "2016-03-21T06:43:18Z")

</div>

thx I did this.

FCoreDelegates::ApplicationRegisteredForRemoteNotificationsDelegate.AddUObject( INSTANCE , &FUNCTION );

```
void FUNCTION(TArray Token)
{
...
}
```
