没有签名的ipa包,打出来,再通过第三方对ipa包进行企业签,达到不需上App Store就可以快速分发供用户下载使用。也可以再次签名,用于App Store上架。 这样不用给对方源码,对方也可以他们的账号进行上架到App Store

1.登录一个没有购买开发者账号的苹果id

2.运行这里,编辑Scheme,选为Releas

3.这里选择运行设备为  Any iOS Device 

4. build

5. Products目录,这里用右键选 show in finder,在finder中打开

6. 

新建一个文件, 文件名为, 你的工程文件名; 然后把 .app 拷贝到文件里面;

压缩这个文件 -> 修改后缀为 .ipa -> 结束.

但是!!!

把这个包给客户,客户用自己的准备上传appstore的证书,来进行签名,报错了:

** Error: Error uploading 'DConnect_0329_release.ipa'.
*** Error: Invalid Bundle Executable. The executable file 'Runner.app/Frameworks/Flutter.framework/Flutter' contains incomplete bitcode. To compile binaries with complete bitcode, open Xcode and choose Archive in the Product menu. With error code STATE_ERROR.VALIDATION_ERROR.90668 for id 4be3e155-3f09-46e1-a5ed-bd573eb87ed0 Asset validation failed (-19208)
 {
    NSLocalizedDescription = "Invalid Bundle Executable. The executable file 'Runner.app/Frameworks/Flutter.framework/Flutter' contains incomplete bitcode. To compile binaries with complete bitcode, open Xcode and choose Archive in the Product menu. With error code STATE_ERROR.VALIDATION_ERROR.90668 for id 4be3e155-3f09-46e1-a5ed-bd573eb87ed0";
    NSLocalizedFailureReason = "Asset validation failed";

最后重新打包,还是用原来99美元的个人账号,然后Archive,选择Appstore,选择下载。最后得到的ipa包。

这个包虽然用的自己的包名和签名,但是用户拿到后,可以重新改包名,重新签名。

签名脚本示例:

#!/bin/bash

rm -rf ./temp2
unzip -d ./temp2 $1
cd ./temp2
cp ../Profiles/Distribution.com.xxx.quickconfig.mobileprovision "Payload/Runner.app/embedded.mobileprovision"
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier com.xxx.quickconfig" Payload/Runner.app/Info.plist
codesign -f -s "iPhone Distribution: Dx International PTE LTD (4xxxYV5U)" Payload/Runner.app/Frameworks/*.framework/
codesign -f -s "iPhone Distribution: Dx International PTE LTD (4xxxYV5U)" --entitlements="../Entitlements/Distribution.com.xxx.quickconfig.entitlements" "Payload/Runner.app/"
zip -qr ../$2 Payload/
codesign --verbose=4 -display /Library/WebServer/Documents/MagicBagel/SignAPP/temp2/Payload/Runner.app/

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐