| 195 | } |
| 196 | |
| 197 | static Ref<Platform> Recognize(BinaryView* view, Metadata* metadata) |
| 198 | { |
| 199 | auto machoPlatform = metadata->Get("machoplatform"); |
| 200 | if (machoPlatform->GetUnsignedInteger() != 2) |
| 201 | return nullptr; |
| 202 | if (!machoPlatform || !machoPlatform->IsUnsignedInteger()) |
| 203 | return nullptr; |
| 204 | if (view->GetFile()->IsBackedByDatabase()) |
| 205 | { |
| 206 | if (auto database = view->GetFile()->GetDatabase()) |
| 207 | { |
| 208 | if (database->HasGlobal("original_version") && database->ReadGlobal("original_version").asInt64() < 6) |
| 209 | { |
| 210 | LogError("%s", "iOS database was saved with mac platform. Unable to upgrade. For iOS typelibs to" |
| 211 | " function properly, this binary must be reopened."); |
| 212 | return nullptr; |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | return g_iosArmv7; |
| 217 | } |
| 218 | }; |
| 219 | |
| 220 | class IOSArm64Platform: public Platform |
nothing calls this directly
no test coverage detected