Installation of an application cannot be performed in MDM

我的梦境 提交于 2019-12-02 08:14:29

问题


It is MDM using APNs. An addition and deletion of an application are permitted in the composition profile. iPhone of iOS5 is used. It does not succeed, although installation of the "free application" of "iTunesStore" is performed by the following method by MDM of iOS. Has it made a mistake in this method? Please teach me the right method.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
       <?xml version="1.0" encoding="UTF-8"?>
    <plist version="1.0">
       <dict>
          <key>CommandUUID</key>
          <string>995761bc0ac0f311452f050a3e4be157ca2dda75</string>
          <key>Command</key>
          <dict>
             <key>RequestType</key>
             <string>InstallApplication</string>
             <key>iTunesStoreID</key>
             <number>338761996</number>
             <key>ManagementFlags</key>
             <integer>1</integer>
          </dict>
       </dict>
    </plist>

回答1:


Replace the number tag to integer.

i.e.,

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
         <dict>
              <key>CommandUUID</key>
              <string>4424F929-BDD2-4D44-B518-393C0DABD56A</string>
              <key>Command</key>
                   <dict>
                        <key>RequestType</key>
                        <string>InstallApplication</string>
                        <key>iTunesStoreID</key>
                        <integer>464656389</integer>
                        <key>ManagementFlags</key>
                        <integer>4</integer>
                   </dict>
         </dict>
    </plist>

This problem took me a week until I accidentally figure this out.




回答2:


I had the same issue but just found a solution , is the issue , when i looked into man page i see CFNumber is mapped to or , once changed it too real it worked like a charm https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/plist.5.html




回答3:


For installing an enterprise IPA, you can use the below XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST      1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>CommandUUID</key>
        <string>4424F929-BDD2-4D44-B518-393C0DABD56A</string>
        <key>Command</key>
            <dict>
              <key>RequestType</key>
              <string>InstallApplication</string>
              <key>ManifestURL</key>
              <string>https://company.com/manifest.plist</string>
              <key>ManagementFlags</key>
              <integer>4</integer>
             </dict>
     </dict>
</plist>

Below is a sample manifest file:

 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
     <key>items</key>
     <array>
     <dict>
        <key>assets</key>
        <array>
            <dict>
                <key>kind</key>
                <string>software-package</string>
                <key>url</key>
                <string>https://companyName/filename.ipa</string>
            </dict>
        </array>
        <key>metadata</key>
        <dict>
            <key>bundle-identifier</key>
            <string>com.company.appname</string>
            <key>bundle-version</key>
            <string>3</string>
            <key>kind</key>
            <string>software</string>
            <key>title</key>
            <string>appname</string>
        </dict>
      </dict>
   </array>
 </dict>
 </plist>


来源:https://stackoverflow.com/questions/10802357/installation-of-an-application-cannot-be-performed-in-mdm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!