You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let apicalypse = APICalypse()
.fields(fields: "id,name,category") // Specify the fields you want to retrieve
.where(query: "name = \"w\"") // Use the "where" clause to search by name
.limit(value: 50)
// Make the API request to search for the game by name.
wrapper.games(apiCalypse: apicalypse, result: { games in
// Handle the retrieved games here
for game in games {
if game.name.lowercased() == name.lowercased() {
print(game)
}
}
}) { error in
// Handle any errors that occur during the request
print("Error searching for the game: \(error)")
}
whenever a lowercase 'w' is queried the following error is printed:
Error searching for the game: RequestException(statusCode: 400, url: "https://api.igdb.com/v4/games.pb", msg: "[\n {\n \"title\": \"Syntax Error\",\n \"status\": 400\n }\n]")
IGDB_SWIFT_API/ProtoRequest.swift:107: Fatal error: 'try!' expression unexpectedly raised an error: SwiftProtobuf.BinaryDecodingError.truncated
seems to me like the force unwrap being used in that function is the issue
this is my code:
whenever a lowercase 'w' is queried the following error is printed:
seems to me like the force unwrap being used in that function is the issue
similar to #10
maybe fixed in moritzscholz's fork where he fixes the force unwrap, still crashes for me though
The text was updated successfully, but these errors were encountered: