This commit is contained in:
Developer
2026-06-07 18:43:43 +08:00
parent e933f2160d
commit 4410052707
2 changed files with 16 additions and 0 deletions

View File

@@ -256,6 +256,7 @@
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
A1FE00430000000000000043 /* Embed App Extensions */,
AA0000010000000000000001 /* Fix Simulator Platform */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
08ABBB9E0B8EF5217E7AB276 /* [CP] Embed Pods Frameworks */,
FDD230797F38EC2827606A1E /* [CP] Copy Pods Resources */,
@@ -362,6 +363,20 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
AA0000010000000000000001 /* Fix Simulator Platform */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Fix Simulator Platform";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"=== Fix Simulator Platform in Frameworks ===\"\nFRAMEWORKS_DIR=\"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\nfor FRAMEWORK in \"${FRAMEWORKS_DIR}\"/*.framework; do\n [ -d \"$FRAMEWORK\" ] || continue\n EXECUTABLE_NAME=$(defaults read \"${FRAMEWORK}/Info.plist\" CFBundleExecutable 2>/dev/null)\n EXECUTABLE=\"${FRAMEWORK}/${EXECUTABLE_NAME}\"\n [ -f \"$EXECUTABLE\" ] || continue\n PLATFORM=$(vtool -show \"$EXECUTABLE\" 2>/dev/null | grep -m1 \"platform\" | awk '{print $2}')\n if [ \"$PLATFORM\" = \"IOSSIMULATOR\" ]; then\n echo \" Fixing ${EXECUTABLE_NAME}: IOSSIMULATOR -> IOS\"\n python3 -c \"\nimport struct, sys\nf = sys.argv[1]\nwith open(f, 'rb') as fh: data = bytearray(fh.read())\nmagic = struct.unpack_from('>I', data, 0)[0]\nso = 0\nif magic == 0xCAFEBABE:\n so = struct.unpack_from('>I', data, 16)[0]\nncmds = struct.unpack_from('<I', data, so + 16)[0]\nco = so + 32\nfor i in range(ncmds):\n cmd = struct.unpack_from('<I', data, co)[0]\n cs = struct.unpack_from('<I', data, co + 4)[0]\n if cmd in (0x32, 0x80000032):\n p = struct.unpack_from('<I', data, co + 8)[0]\n if p == 7:\n struct.pack_into('<I', data, co + 8, 2)\n with open(f, 'wb') as fw: fw.write(data)\n print(' Patched successfully')\n sys.exit(0)\n if cs == 0: break\n co += cs\n\" \"$EXECUTABLE\"\n NEW_PLATFORM=$(vtool -show \"$EXECUTABLE\" 2>/dev/null | grep -m1 \"platform\" | awk '{print $2}')\n echo \" Result: $NEW_PLATFORM\"\n fi\ndone\necho \"=== Done ===\"";
};
06D3187A82150ADA5C89EC6C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;

View File

@@ -124,6 +124,7 @@ class _HomeSentenceListSectionState extends ConsumerState<HomeSentenceListSectio
_autoRefreshTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
if (!mounted) {
timer.cancel();
_autoRefreshTimer = null;
return;
}
setState(() {