菜鸟教程小白 发表于 2022-12-11 19:59:36

IOS - 如何退出 ipa 文件?


                                            <p><p>我尝试退出 .ipa 文件,但遇到了一些问题。
我将项目存档并将其导出以进行临时部署,然后我按照本教程进行操作:<a href="https://sholtz9421.wordpress.com/2012/06/08/digitally-resigning-ipa/" rel="noreferrer noopener nofollow">https://sholtz9421.wordpress.com/2012/06/08/digitally-resigning-ipa/</a> .
在安装过程中,我遇到了这个错误:“应用程序缺少应用程序标识符权利。”所以我创建了一个“entitlements.plist”文件并尝试使用参数--entitlements 辞职</p>

<p><code>codesign -f -v -s "MyIdentity"Payload/SampleApp.app --entitlements entitlements.plist</code></p>

<p>现在,当我尝试安装 .ipa 文件时,出现以下错误:“无法验证代码签名..(可执行文件的签名无效)。”</p>

<p>我的 entitlements.plist 文件是这样的:</p>

<pre><code>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;
   &lt;!DOCTYPE plist PUBLIC &#34;-//Apple//DTD PLIST 1.0//EN&#34; &#34;http://www.apple.com/DTDs/PropertyList-1.0.dtd&#34;&gt;
   &lt;plist version=&#34;1.0&#34;&gt;
   &lt;dict&gt;
    &lt;key&gt;application-identifier&lt;/key&gt;
    &lt;string&gt;{team-identifier}.{bundleId}&lt;/string&gt;
    &lt;key&gt;aps-environment&lt;/key&gt;
    &lt;string&gt;production&lt;/string&gt;
    &lt;key&gt;beta-reports-active&lt;/key&gt;
    &lt;true/&gt;
    &lt;key&gt;com.apple.developer.associated-domains&lt;/key&gt;
    &lt;string&gt;*&lt;/string&gt;
    &lt;key&gt;com.apple.developer.team-identifier&lt;/key&gt;
    &lt;string&gt;{team-identifier}&lt;/string&gt;
    &lt;key&gt;get-task-allow&lt;/key&gt;
    &lt;false/&gt;
    &lt;key&gt;keychain-access-groups&lt;/key&gt;
    &lt;array&gt;
       &lt;string&gt;{team-identifier}.*&lt;/string&gt;
    &lt;/array&gt;
    &lt;/dict&gt;
    &lt;/plist&gt;
</code></pre>

<p>你知道这个问题吗?任何帮助表示赞赏。 </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>我找到了解决方案:我使用 IReSign 对 .ipa 文件进行了签名。正确的 entitlements.plist 文件是这样的:</p>

<pre><code>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;

&lt;!DOCTYPE plist PUBLIC &#34;-//Apple//DTD PLIST 1.0//EN&#34; &#34;http://www.apple.com/DTDs/PropertyList-1.0.dtd&#34;&gt;
&lt;plist version=&#34;1.0&#34;&gt;
&lt;dict&gt;
&lt;key&gt;application-identifier&lt;/key&gt;
&lt;string&gt;{team-identifier}.{bundleId}&lt;/string&gt;
&lt;key&gt;aps-environment&lt;/key&gt;
&lt;string&gt;production&lt;/string&gt;
&lt;key&gt;com.apple.developer.team-identifier&lt;/key&gt;
&lt;string&gt;{team-identifier}&lt;/string&gt;
&lt;key&gt;get-task-allow&lt;/key&gt;
&lt;false/&gt;
&lt;key&gt;keychain-access-groups&lt;/key&gt;
&lt;array&gt;
    &lt;string&gt;{team-identifier}.{bundleId}&lt;/string&gt;
&lt;/array&gt;
</code></pre>

<p>
</p></p>
                                   
                                                <p style="font-size: 20px;">关于IOS - 如何退出 ipa 文件?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/44819704/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/44819704/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: IOS - 如何退出 ipa 文件?