准备敲壳后的 ipa

查看 ipa中的app信息

1
2
3
4
5
6
#1.解压缩
unzip ryanair.ipa -d ryanair

#2. 查看是否解密成功, cryptid 显示 0 表示未被加密,其他表示加密
otool -l RyanairApp | grep 'cryptid'
cryptid 0

xcode 创建一个同名的 app, 也就是 Ryanair

通过查看 RyanairApp 中的 info.plist 可以 grep 一下 bundle id

1
2
3
4
5
6
 cat Info.plist|grep 'com.ryanair'

## 输出
<string>com.ryanair.cheapflights.urlscheme</string>
<string>com.ryanair.cheapflights</string>
<string>merchant.com.ryanair.cheapflights</string>

Sign.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

# 指定你的证书
SIGNING_IDENTITY="xxxxxxxxxxxxxxxxxx"

# 指定文件夹路径
FOLDER_PATH="/Users/zhangxuhui/Desktop/ryanair调试/ryanair/Payload/RyanairApp.app/Frameworks"

# 遍历每个子文件夹并执行 codesign 命令
for subfolder in "$FOLDER_PATH"/*; do
if [ -d "$subfolder" ]; then
# 获取子文件夹名
subfolder_name=$(basename "$subfolder")

# 执行 codesign 命令
codesign -fs "$SIGNING_IDENTITY" "$subfolder"

# 如果你想打印每个子文件夹的签名信息,可以取消下一行的注释
# codesign -dv "$subfolder/$subfolder_name"

echo "Code signing completed for $subfolder_name"
fi
done

App project的地址

1
2
3
/Users/${usename}/Library/Developer/Xcode/DerivedData/HelloWorld-dnyjqrgxcjjobvfzytzhtzpmjlmx/Build/Products/Debug-iphoneos/HelloWorld.app/embedded.mobileprovision
# 或者
~/Library/MobileDevice/Provisioning Profiles/
1
/Users/zhangxuhui/Library/Developer/Xcode/DerivedData/RyanairApp-gawttiwdhuxigycutjvibtetorui/Build/Products/Debug-iphoneos