# Calling framework function in app delegate

**URL:** <https://forums.kodeco.com/t/calling-framework-function-in-app-delegate/18326>\
**Category:** iOS\
**Created:** [August 10, 2016, 12:22pm UTC](https://forums.kodeco.com/t/calling-framework-function-in-app-delegate/18326 "2016-08-10T12:22:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![archana](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/archana/32/38642_2.png) [@archana](https://forums.kodeco.com/u/archana)\
**Post date:** [August 10, 2016, 12:22pm UTC](https://forums.kodeco.com/t/calling-framework-function-in-app-delegate/18326/1 "2016-08-10T12:22:03Z")

</div>

i have created a function in framework please let me know how to access it in app delegate.

below is the framework function

public func deviceregistration()

{  
let post: String = “appid=(appid)=&deviceid(deviceid)&ApiID=(ApiID)&ApiKey=(ApiKey)&ApiSecret=(ApiSecret)&os=(“ios”)®Id=(oNSUUID.UUIDString)”

}

below is the app delegate where i want call this function

func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData)

{

// call post for append post value in below

let postData:NSData = post.dataUsingEncoding(NSASCIIStringEncoding)!  
let postLength:NSString = String(postData.length)

}
