Get MSISDN number through code - ios

Is there any way to get MSISDN(Mobile Subscriber Integrated Services Digital Network-Number) number through code.
I have navigated to other questions as well but none of them are answered.
Any help towards the path will really be appreciated.
Note: I require MSISDN number(number uniquely identifying a subscription in a GSM) and not iPhone's UDID. Purpose is to fetch the voicemails for that MSISDN
Additional Information : I just found out that MSISDN number is the combination of your country code and your Phone number.
MSISDN = CC + NPA + SN
CC - Country Code
NPA - Number Planning Area
SN - Phone Number

Sorry, but you cannot retrieve the users MSISDN with public methods in the iOS SDK (I'm not sure about private methods). I'd be very surprised if Apple ever sanctioned this.
You used to be able to get the number with
[[NSUserDefaults standardUserDefaults] objectForKey:#"SBFormattedPhoneNumber"]
but I think that was removed in iOS 4.0.

Related

ios - best guess at phone number with country code

I'm trying to retrieve contacts phone numbers to be able to send SMS on behalf of a user. When the number includes the country code (ie starts with +, or 00) I'm fine. However when this is not the case, I'm trying to guess what the country code should be.
// contact is a CNContact with at least one phone number
contact.phoneNumbers[0].value.value(forKey: "countryCode") as? String
returns a country code like us or fr (even if it's not recommended to do so) but I've found it to sometime be inaccurate. My guess is that Apple uses the user's local. It even misclassify numbers with explicit country code. For instance a number 00 54 ... is classified as us while it's from Argentina.
I can also use the user's current local (NSLocale.currentLocale().objectForKey(NSLocaleCountryCode) as? String) and use that to fill missing country codes. But it will obviously misclassify some numbers.
Is there's a better less error prone way?

CXCallDirectoryPhoneNumber not support 0 at beginning

CXCallDirectoryPhoneNumber not support 0 at beginning
eg.
Add 0 in front of the number becomes 8-binary number,
But my phone number has 0 in front of it.
If my phone number is 010-12345678,
8612345678 is not matched,
8601012345678 is not matched,
01012345678 is not matched.
Some tips for someone who might still struggle on this... In short, if you number is 010-12345678, then 8612345678 should be the choice. Formats like "+8612345678" as a string worked for me too.
Just ran into the similar issue, and found out the reason why Call Directory extension sometimes "does not work" is simply not because of your phone number format. iOS will actually cache your phone numbers which are set when the extension is ran previously, i.e. it will not update your blocking or the identification phone numbers each time you change your source code and restart you app extension as you expected.
One way to invalidate the iOS cache is to toggle your app's option in Settings -> Phone -> Call Blocking & Identification (and maybe restart your app as well).

How do you I register for Electronic Data Interchange (EDI) ISA number?

I will receive 850 purchase order. In return, I need to generate and send 997 response, which include ISA/GS number. Where and who do I register with for this ISA id?
Thanks in advance
EDI systems are typically limited in scope to be between a few or even just 2 different organizations. These organizations need to decide beforehand on how much of the full EDI specification they're going to use, and how they're going to specify IDs. See here.
Also, see here. From this it looks like DUNS numbers or variants on them are common choices for IDs.
So your organization and the others need to just figure out if you're going to use DUNS number or ad-hoc made up numbers or what.
Your 850 will have an ISA (interchange) and GS (group) identifier where you will be designated as the receiver. When you generate the 997, the IDs will be reversed so that you are the sender of the acknowledgement.
Back in the day, it was important to uniquely identify yourself. X12 handles this via a qualifier/ID pair. Let's say you want to use your phone number. Your ID would be 12 (qualifier) and then 5555551212 (your ID / phone number). You could make up something arbitrary like ZZ (qualifier: mutally defined) and ACMEWIDGETSCO. Again, it should be something unique and not already found on a VAN. This is probably less probable these days than it was 10 years ago when everyone was using VANs predominantly.
Look at the below example. The IDs in this example are made up, but could be DUNS, HIN, Industry identifier, phone number, mutually defined, etc. Just for frame of reference, I used SENDER and RECEIVER.
ISA*00* *00* *ZZ*SENDER *ZZ*RECEIVER *150622*2131*U*00401*000000006*0*T*>~
GS*PO*SENDER*RECEIVER*20150622*2131*4*X*004010~
In other words, you don't need to register it with anyone, you just need to make sure it is unique on the networks you are trading on with - that's really the important part. If you're using direct connections (AS2, FTP) to your partners, it won't matter as much, but the best practice is to give your company an ID that is somewhat unique (DUNS, phone numbers, arbitrary name). If you don't understand EDI, download EDI Notepad from Liaison and that should give you a better picture of how the data is described.

iOS App Development with SEC Edgar/Xbrl Integration

I am working on building an iOS app in Objective-C that requires data to be pulled from the SEC's Edgar Filings database. How can I integrate a search field into my code that would call on a specific company's financial statement information to display in the app? Any helpful advise or resources would be greatly appreciated. Thanks.
Using CIK is probably the best way to search for specific company filings.
One way is to have your app screen scrape the results using some of the functions available in WebKit like evaluateJavaScript. Pulling information from income statements and identifying the individual income statement line items would be very difficult because the labels would be inconsistent among companies.
In your code, you could format the http web string for an Edgar 10-K filing which contains the income statement like so
let CIK="1652044"
let SECFormName = "Form10K"
let URLStr = "https://www.sec.gov/cgi-bin/browse-edgar?company=&CIK=" + CIK + "&type=" + SECFormName + "&owner=include&count=40&action=getcurrent"
The above is in Swift syntax and conversion to Objective C is minor.

Credit Card Swiper Format

I have a magnetic card reader and I'm trying to parse the information in my ColdFusion site to send off to PayPal. However, I can't seem to get the 3 digit CV code on the back.
Here's the format I get:
%B4444555566667777^DOE/JOHN G^10051010101010106000000?;4444555566667777=10051010101010106000000?
So, from this I can get:
Name: John
Middle Name: G
Last Name: Doe
Card Number: 4444555566667777
Expiration: 05/10
Where can I get that three digit number that's on the back? Or do I need it? Is it a different number when you swipe the card?
Any insight would be appreciated. Thank you in advance!
The CV/CVV code on the back is not encoded in any way on the magnetic strip, it's printed on the card just to verify that the person using it has the actual physical card.
Since a magnetic strip is easily created if someone hacks a card database and gets the card numbers, the CVV code was added to add an extra, non electronic security measure. Since the CVV is not allowed to be stored, that will never be in the database.
The CVV code is not included in the magnetic data - it cannot be read by the reading device. If you need the CVV number, include a place for your users to enter it.

Resources