search

Home  >  Q&A  >  body text

objective-c - ios 的 ipa 包可以二次打包吗

手上只有ipa包,没有源代码,可以修改图标和builder id ,和证书吗。要怎么做?

ringa_leeringa_lee2771 days ago612

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-04-18 09:36:08

    Think too much...It’s not possible for the time being

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 09:36:08

    It is possible to only modify the resource file, replace the resource file and then re-sign.

    Extract the ipa to get the Payload/yourapp.app folder,

    1. Enter the .app目录把 embedded.mobileprovision file and replace it with your packaging certificate file. Be careful not to change the name of this file.

    2. If there is a xxx.entitlements.xcent file, replace the contents with yours.

    3. Add, delete, and replace your resource files, icons, pictures, etc.

    4. Edit Info.plist, modify bundle ID.

    5. Command line cd to the Payload directory, and then execute codesign -fs "iPhone Distribution: your company" yourapp.app

    iPhone Distribution: your company 是打包的证书全名,Keychain 里可以看到,必须是未过期的证书。
    如果是企业证书打包,再加个参数 --resource-rules="ResourceRules.plist"

    ResourceRules.plist is as follows:

    <?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>rules</key>
        <dict>
            <key>.*</key>
            <true/>
            <key>Info.plist</key>
            <dict>
                <key>omit</key>
                <true/>
                <key>weight</key>
                <real>10</real>
            </dict>
            <key>ResourceRules.plist</key>
            <dict>
                <key>omit</key>
                <true/>
                <key>weight</key>
                <real>100</real>
            </dict>
        </dict>
    </dict>
    </plist>

    reply
    0
  • Cancelreply