0

Question
Is there any way that I can retrieve the .ipa file expiration date using ASP.NET? I was thinking that I centralized all the .ipa files (Production) in a file server and allow my website to read them and retrieve the expiration date.

Reason
This is because I have a Production website that allows user to access for data entry and reporting. However, some data entry are built as .ipa file (apps). So in order for me to keep track which files are going to expired soon, I need some tracking method. So I guess it would be nice for me to have my website (ASP.NET) to be able to retrieve the .ipa file's expiration date.

4 Leave Cover
  • 1,248
  • 12
  • 40
  • 83

1 Answers1

1

I assume that your ipa files are results of developer builds or Enterprise Development i.e. they are self-signed. If so, then yes, I think it is possible and if you are OK with dirty hacks, not that complicated.

An ipa file is actually just a ZIP-archive of the application folder. It contains Payload folder and inside there should be embedded.mobileprovision file. Its actual format is a bit complicated and there are some discussion about it on SO (see for example How to determine at run-time if app is for development, app store or ad hoc distribution?)

However if you are OK with dirty hacks, you just can search it for a text section inside binary data that looks like

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

    ... 

    <key>ExpirationDate</key>
    <date>2017-02-08T02:39:06Z</date>

In short, embedded.mobileprovision is a signed plist which itself is a bit weird XML-based format https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/PropertyLists/UnderstandXMLPlist/UnderstandXMLPlist.html

Community
  • 1
  • 1
SergGr
  • 23,570
  • 2
  • 30
  • 51