How to get IMEI number of iPhone programmatically?
You can get the UDID, but can not get the IMEI.Apple does not allow this.
How to get IMEI number programmatically in iphone?
It have some difficult get the IMEI number programatically. However, if you're looking for a way to identify a particular phone, you can use the UDID (Unique Device Identifier) to do so.
NSString *UDID = [[UIDevice currentDevice] uniqueIdentifier];
and also try this for IMEI
NSString *imei = [[NetworkController sharedInstance] IMEI];
How to get IMEI on iPhone?
You can't get IMEI on iPhone anymore. You may have to use UDID instead. See other answers.
In the past, you could use the header file "Message/NetworkController.h" posted on ericasadun.com.
http://ericasadun.com/iPhoneDocs300/_network_controller_8h-source.html (It's been removed now)
You would add the NetworkController.h file and the private framework "Message.framework" to your project, then import that header file to use the original method I found to get the imei number:
NetworkController *ntc = [NetworkController sharedInstance];
NSString *imeistring = [ntc IMEI];
That hack doesn't work anymore. App will be rejected by Apple.
How to generate a IMEI?
I think you are looking for a UDID as @Larme suggested. Have a look at OpenUDID
Related Topics
How to Pass Values from a Pop Up View Controller to the Previous View Controller
Swift iOS Record Video and Audio with Avfoundation
How to Convert a Persian Date into a Gregorian in Swift
Programmatically Auto-Connect to Wifi iOS
How to Remove Single Object in Array from Multiple Matching Object
Swiftui - Scrollviewreader's Scrollto Does Not Scroll
Swift Save Viewcontroller State Using Coder Beyond App Close
Spritekit, Swift 2.0 - Scrollview in Reverse
Swift Difference Between Var Arr:[String] = [] and Var Arr = [String]()
Change Duration (Speed) on a Running Animation
Transfer Gestures on a Uiview to a Uitableview in Swift - iOS
Convert Nsdate to String with a Specific Timezone in Swift
Scrolling in Uicollectionview Selects Wrongs Cells - Swift
Swift: Triggering Tableviewcell to Lead to a Link in a Uiwebview in Another Viewcontroller