Skip to content

Commit 8d030d2

Browse files
committed
修复图片没了的问题
1 parent 0519a7f commit 8d030d2

File tree

9 files changed

+70
-49
lines changed

9 files changed

+70
-49
lines changed

docs/新手教程/Unity project confuse.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,38 @@ sort: 7
5050

5151
4. 回到主页面找到点【配置】按钮,把`~/Desktop/TEST-U3D/COSDK` 目录里3个文件添加到依赖配置的`COSDK`分组下 (COSDK.framework名字可能跟截图不一致)
5252
>
53-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-5.png" width="90%">
53+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-5.png" width="90%">
5454
5555
3. 配置编译设置,添加一个`Debug`签名,Target选择`Unity-iPhone`(如果下拉列表是空的,先进一下工程,等待工程分析结束,再返回配置界面),bundle id输入您新应用的bundle id
5656
>
57-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-11.png" width="90%">
57+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-11.png" width="90%">
5858
>
5959
```warning
60-
1.使用了 `Xcode`中 `Signing & Capabilities` 里的`Automatically manage signing` 使用账号自动签名的记得关闭,不然会引起编译错误。
61-
2.使用了 `Xcode`中 `Signing & Capabilities` 里的 `xcode sign in with Apple`,但是你的mobileprofile里面没有打开支持的,在编译阶段会报错,请删除掉。
62-
3.混淆程序执行后,在编译阶段失败后,可以通过打开Xcode工程,查看签名设置,如果发现不对,可以修改混淆程序中的配置,在点击【开始混淆】(切勿直接修改Xcode工程,避免导致需要点击重置按钮重新开始)
60+
使用了 `Xcode`中 `Signing & Capabilities` 里的`Automatically manage signing` 使用账号自动签名的记得关闭,不然会引起编译错误。
61+
```
62+
```warning
63+
使用了 `Xcode`中 `Signing & Capabilities` 里的 `xcode sign in with Apple`,但是你的mobileprofile里面没有打开支持的,在编译阶段会报错,请删除掉。
64+
```
65+
```warning
66+
混淆程序执行后,在编译阶段失败后,可以通过打开Xcode工程,查看签名设置,如果发现不对,可以修改混淆程序中的配置,在点击【开始混淆】(切勿直接修改Xcode工程,避免导致需要点击重置按钮重新开始)
67+
```
68+
```warning
69+
确保证书只有一个,有些用户相同名称证书有多个,总是跟`profile`文件对不上,可以通过钥匙串管理(MacOS 15.0以上执行`open /System/Library/CoreServices/Applications/Keychain\ Access.app`)
6370
```
6471

6572
4. 点击【开始混淆】按钮
6673
>
67-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-26.png" width="90%">
74+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-26.png" width="90%">
6875
6976
5. 打开 【调试模式】选项,打开【COSDK使用动态库】和 【COSDK自动初始化】
7077

7178
6. 修改【COSDK自定义名称】为给你的`Products.zip`里面的那个framework的名字(如果给你的是COSDK.framework,可以不填写)
7279
>
73-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-34.png" width="40%">
80+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-34.png" width="40%">
7481
7582
7. 等混淆结束后,点击打开工程按钮,准备运行应用,会发现 `Unity-iPhone` 那个下拉框打开后,会多一个target,它的icon上面有一个阻止的标示,选中它,会自动安装应用到手机,就可以开始调试了(类似下图)
7683
>
77-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-8.png" width="80%">
84+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-8.png" width="80%">
7885
>
7986
```tip
8087
如果你的手机不是arm64架构的,想调试的时候新版本的Xcode是会提示无法安装的,请更换一个arm64架构的手机调试(安装不影响)

docs/新手教程/cocos2d-x project confuse.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ sort: 8
2626
## 配置 cocos-2dx 工程
2727
1. 进入`~/Desktop/cocos2d-x-3.17.2`目录,把我们提供给您的`COSDK.framework``**.dat` 文件拷贝到 `cocos/COSDK` 目录下
2828
>
29-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-16.png" width="90%">
29+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-16.png" width="90%">
3030
3131
2. 打开`~/Desktop/cocos2d-x-3.17.2/build/cocos2d_tests.xcodeproj`
3232

3333
3.`Xcode`的左侧工程视图里面,找到`tests`,右键菜单`Add Files To "cocos2dx-tests"`,选中`cocos/COSDK` 目录
3434
>
35-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-15.png" width="90%">
35+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-15.png" width="90%">
3636
3737
4. 点击`Xcode``cocos2d_tests`这个工程文件 找到 TARGETS 里面的 `cpp-tests IOS`,在`Framework Search Paths`里面添加 `"$(SRCROOT)/../cocos/COSDK"`
3838

3939
5. 更改`cocos2d-x`工程中`cpp-tests`这个Target的`bundle id`,与您新应用的`bundle id`一致
4040
>
41-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-14.png" width="90%">
41+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-14.png" width="90%">
4242
4343
## 混淆器配置
4444
1. 打开`crab-orange.app`
@@ -55,16 +55,23 @@ sort: 8
5555

5656
7. 回到主页面找到配置按钮,把`~/Desktop/cocos2d-x-3.17.2/cocos/COSDK`目录里3个文件添加到依赖配置的`COSDK`分组下
5757
>
58-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-5.png" width="90%">
58+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-5.png" width="90%">
5959
6060
8. 配置【编译设置】,添加一个`Debug`签名,Target选择`cpp-tests-iOS`(如果下拉列表是空的,先进一下工程,等待工程分析结束,再返回配置界面),`bundle id`是您新应用的`bundle id`
6161
>
62-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-11.png" width="90%">
62+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-11.png" width="90%">
6363
>
6464
```warning
65-
1.使用了 `Xcode`中 `Signing & Capabilities` 里的`Automatically manage signing` 使用账号自动签名的记得关闭,不然会引起编译错误。
66-
2.使用了 `Xcode`中 `Signing & Capabilities` 里的 `xcode sign in with Apple`,但是你的mobileprofile里面没有打开支持的,在编译阶段会报错,请删除掉。
67-
3.混淆程序执行后,在编译阶段失败后,可以通过打开Xcode工程,查看签名设置,如果发现不对,可以修改混淆程序中的配置,在点击【开始混淆】(切勿直接修改Xcode工程,避免导致需要点击重置按钮重新开始)
65+
使用了 `Xcode`中 `Signing & Capabilities` 里的`Automatically manage signing` 使用账号自动签名的记得关闭,不然会引起编译错误。
66+
```
67+
```warning
68+
使用了 `Xcode`中 `Signing & Capabilities` 里的 `xcode sign in with Apple`,但是你的mobileprofile里面没有打开支持的,在编译阶段会报错,请删除掉。
69+
```
70+
```warning
71+
混淆程序执行后,在编译阶段失败后,可以通过打开Xcode工程,查看签名设置,如果发现不对,可以修改混淆程序中的配置,在点击【开始混淆】(切勿直接修改Xcode工程,避免导致需要点击重置按钮重新开始)
72+
```
73+
```warning
74+
确保证书只有一个,有些用户相同名称证书有多个,总是跟`profile`文件对不上,可以通过钥匙串管理(MacOS 15.0以上执行`open /System/Library/CoreServices/Applications/Keychain\ Access.app`)
6875
```
6976

7077
9. 如果是`cocos-js/cocos-lua/quick-cocos` 开发的游戏项目,请找工程设置的【外部SDK存档-混淆】,如果是 js开发的应用找到请找到 `cocos2d-x`引擎目录下的 `external/spidermonkey/prebuilt/ios/libjs_static.a` 添加进去(这个操作是为了能拦截`libjs_static.a`里面的一些文件读取操作api让混淆资源脚本能正确解码混淆后的js文件),然后到【资源脚本】里面,添加一个js文件的脚本,这个脚本会对.js文件内容做一次加密。lua开发的应用就需要找到对应的`external/lua/luajit/prebuilt/ios/liblua.a` 或者`external/lua/luajit/prebuilt/ios/libluajit.a`
@@ -75,17 +82,17 @@ sort: 8
7582

7683
5. 点击【开始混淆】按钮
7784
>
78-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-26.png" width="90%">
85+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-26.png" width="90%">
7986
8087
6. 打开 【调试模式】 选项,打开【COSDK自动初始化】
8188

8289
7. 修改【COSDK自定义名称】为给你的`Products.zip`里面的那个framework的名字(如果给你的是COSDK.framework,可以不填写)
8390
>
84-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-34.png" width="40%">
91+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-34.png" width="40%">
8592
8693
8. 等混淆结束后,点击打开工程按钮,准备运行应用,会发现 `build all tests iOS` 那个下拉框打开后,会多一个target,它的icon上面有一个阻止的标示,选中它,会制动安装应用到手机,就可以开始调试了(类似下图)
8794
>
88-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-8.png" width="80%">
95+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-8.png" width="80%">
8996
>
9097
```tip
9198
如果你的手机不是arm64架构的,想调试的时候新版本的Xcode是会提示无法安装的,请更换一个arm64架构的手机调试(安装不影响)

docs/新手教程/iOS App confuse(ObjC).md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ sort: 5
2828

2929
4. xcode打开 `~/Desktop/WNXHuntForCity.xcworkspace` 文件,把`COSDK`目录加入到工程里面 (实际的COSDK.framework名称跟图片可能不一致)
3030
>
31-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-1.png" width="60%">
31+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-1.png" width="60%">
3232
3333
5. 修改一下`WNXHuntForCity.xcproject``bundle id` 改为我们给了您注册文件的那个 `bundle id`
3434
>
35-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-2.png" width="90%">
35+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-2.png" width="90%">
3636
3737
6. 编译一次项目,确保能正确编译
3838

@@ -45,23 +45,23 @@ sort: 5
4545

4646
4. 点击当前项目的最右边一个按钮,进入`WNXHuntForCity` 这个项目,等待完成工程分析(项目结构都能在界面中正确显示了)
4747
>
48-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-3.png" width="60%">
48+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-3.png" width="60%">
4949
>
5050
```warning
5151
如果你的项目使用了cocospod,请先执行 `pod update` 或者 `pod install` 然后再来做工程分析,并且确保你的工程可以正常编译
5252
```
5353

5454
5. 退出当前项目,回到工程列表(关闭当前项目就行了),找到工程设置按钮 点进去
5555
>
56-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-4.png" width="60%">
56+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-4.png" width="60%">
5757
5858
6. 第一个选项卡是“依赖文件”,找到`COSDK`那个分组,点` '+' `按钮,依次把`~/WNXHuntForCity/WNXHuntForCity/COSDK`里面3个文件加入进去
5959
>
60-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-5.png" width="90%">
60+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-5.png" width="90%">
6161
6262
7. 进入【编译设置】选项卡,添加一个`Debug`证书设置,target选择`WNXHuntForCity``bundle id`使用您新应用的`bundle id`(注意一定要正确,不然会影响查找本地 mobile provision file文件错误),`certificate` 选正确的证书,然后点 `mobile provision file` 旁边的搜索按钮,可以从本地识别对应的文件)
6363
>
64-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-11.png" width="60%">
64+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-11.png" width="60%">
6565
>
6666
```warning
6767
使用了 `Xcode`中 `Signing & Capabilities` 里的`Automatically manage signing` 使用账号自动签名的记得关闭,不然会引起编译错误。
@@ -85,7 +85,7 @@ sort: 5
8585

8686
9. 点击【开始混淆】按钮,会弹出运行设置,默认【调试模式】是打开的
8787
>
88-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-26.png" width="90%">
88+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-26.png" width="90%">
8989
9090
10. 确保【swift混编】是关闭的,没有用到混编就不需要了
9191

@@ -95,17 +95,17 @@ sort: 5
9595

9696
13. 修改【COSDK自定义名称】为给你的`Products.zip`里面的那个framework的名字(如果给你的是COSDK.framework,可以不填写)
9797
>
98-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-34.png" width="40%">
98+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-34.png" width="40%">
9999
100100
14. 确保只打开【ARM64】指令,之后出正式版本才需要加上ARMv7,其他几种指令集的也没有太多必要了
101101

102102
15. 在预处理结束后,你应该会看到如下这张截图,点击解决问题,程序会挂起,这是你会发现警告消息里面,多了一堆警告,并且常量识别里面多了一堆常量,这些警告都是预处理阶段【工程配置】-【常量识别】里面配置的一些识别函数调用时引起,检测到了不确定的变量值,目前来说只有keyvalue需要你特别关注一下,常量识别的作用是帮助你识别一些文件名/图片名/ObjC类型名/ObjC协议名/ObjC方法名称,降低执行文件中的常量相似度,当然即使某些地方用了变量拼接这些名词,也无所谓,在应用执行时`COSDK`会修复这些名称错误
103103
>
104-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-7.png" width="60%">
104+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-7.png" width="60%">
105105
106106
16. 点击【开始混淆】混淆,然后一直等到混淆器提示混淆完成,点击【打开工程】按钮,准备运行应用,会发现 `WNXHuntForCity`那个下拉框打开后,会多一个target,它的icon上面有一个阻止的标示,选中它,会自动安装应用到手机,就可以开始调试了
107107
>
108-
<img src="https://outtable.github.io/9live/assets/images/snapshots/snapshot-8.png" width="80%">
108+
<img src="https://outtable.github.io/confuse-9live/assets/images/snapshots/snapshot-8.png" width="80%">
109109
>
110110
```tip
111111
如果你的手机不是arm64架构的,想调试的时候新版本的Xcode是会提示无法安装的,请更换一个arm64架构的手机调试(安装不影响)

0 commit comments

Comments
 (0)