decrypt IPA data like, app name, version, icon etc [MVC C#]

714 views Asked by At

Updated Question

I have managed to read the info.plist file and I got the below response. I don't know how to decrypt into XML.

screenshot

I am not sure, how can I read this?


Actual Question

I want to create an application like, Diawi.

For that, I have completed the Android application upload part and now I want to read the IPA information like application name, application version, package name etc in C#.

I have searched a lot but could not found any documentation for that.

Can anyone please guide me the right way to do it?

1

There are 1 answers

3
Vinay Rathod On

An IPA file is a ZIP file, so the first thing you need to do is extract this file.

After unzip IPA file, we will get a folder named Payload, and a file with extension app will be stored in folder Payload, maybe this app named is xxxx.app, and info.plist we can located in this app xxxx.app, the path related to folder Payload should be Payload/xxxx.app/info.plist.

    // parse info.plist
    File plistFile = new File(plistFilePath);
    NSDictionary rootDict = null;
    try {
        rootDict = (NSDictionary) PropertyListParser.parse(plistFile);

        // get bundle id
        NSString parameter = (NSString) rootDict.objectForKey("CFBundleIdentifier");
        ipaInfo.put("CFBundleIdentifier", parameter.toString());

        // get application name
        parameter = (NSString) rootDict.objectForKey("CFBundleName");
        ipaInfo.put("CFBundleName", parameter.toString());

        // get version
        parameter = (NSString) rootDict.objectForKey("CFBundleVersion");
        ipaInfo.put("CFBundleVersion", parameter.toString());

        // get bundle display name
        parameter = (NSString) rootDict.objectForKey("CFBundleDisplayName");
        ipaInfo.put("CFBundleDisplayName", parameter.toString());

        // get ios mini. version
        parameter = (NSString) rootDict.objectForKey("MinimumOSVersion");
        ipaInfo.put("MinimumOSVersion", parameter.toString());
    } catch (Exception e) {
        e.printStackTrace();
    }