0

ダウンロードしてインストールするipaファイルをC#のiphone / ipadに自動的に機能させたいのですが、どうすればよいかわかりません。コマンドを使用してファイルをダウンロードするだけですが、iphone/ipadに自動的にインストールされません。 ?それはC#で可能ですか?

それはそれにとって理想的な間違ったコードです:

    protected void Page_Load(object sender, EventArgs e)
    {
        string filePath = string.Empty;
        string appType = string.Empty;


        //ios
        filePath = "appFile/Apps.ipa";
        appType = "application/octet-stream";

      Response.ClearContent();
      Response.ContentType = MimeType(Path.GetExtension(fName),appType);
      Response.AddHeader("Content-Disposition", string.Format("attachment; filename = {0}",System.IO.Path.GetFileName(fName)));
      Response.AddHeader("Content-Length", sz.ToString("F0"));
      Response.TransmitFile(fName);
      Response.End();


    }
    public static string MimeType(string Extension,string appMineType)
    {
        string mime = appMineType;
        if (string.IsNullOrEmpty(Extension))
            return mime;
        string ext = Extension.ToLower();
        Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(ext);
        if (rk != null && rk.GetValue("Content Type") != null)
            mime = rk.GetValue("Content Type").ToString();
        return mime;
    }  
4

0 に答える 0