Back

Swift crash on `teams.create`

  • 0
  • Apple
DjeBen
12 Apr, 2023, 18:46

After updating to 1.3.1 and swift sdk to 2.0.0 I have a crash on teams.create. I think it's a casting problem, receiving an empty list and expecting a dictionary

TypeScript
Could not cast value of type '__NSArray0' (0x7fd1f98ce158) to 'NSDictionary' (0x7ff863f59f00).
2023-04-12 20:42:54.790689+0200 babybottle[92246:22609523] Could not cast value of type '__NSArray0' (0x7fd1f98ce158) to 'NSDictionary' (0x7ff863f59f00).
Could not cast value of type '__NSArray0' (0x7fd1f98ce158) to 'NSDictionary' (0x7ff863f59f00).
CoreSimulator 857.14 - Device: iPhone 14 Pro Max (3ADF35A1-3B88-4DA6-A4BF-830833E2194F) - Runtime: iOS 16.2 (20C52) - DeviceType: iPhone 14 Pro Max
TL;DR
The user is experiencing a crash on the `teams.create` function after updating to version 1.3.1 and Swift SDK 2.0.0. The crash seems to be caused by a casting problem, where an empty list is received instead of a dictionary. A fix has been merged but not released yet. In the meantime, the user has downgraded the Apple SDK to version 1.2.3 to avoid the crash. Solution: Wait for the new release (1.3.2) to fix the issue. In the meantime, downgrade the Apple SDK to version 1.2.3.
Drake
12 Apr, 2023, 18:58

are you able to share the network response?

Drake
12 Apr, 2023, 19:02

actually, would you be able to create an issue?

DjeBen
12 Apr, 2023, 19:28

Here is the network response (prefsis returned as empty list). Do you want me to create an issue on the swift sdk github or on the main repo?

Drake
12 Apr, 2023, 19:32

main appwrite repo please!

joeyouss
24 Apr, 2023, 07:44

Hi @DjeBen - is this resolved? do you need more help with this?

DjeBen
24 Apr, 2023, 07:48

Hi @joeyouss thanks for jumping here. No it's still not resolved, but the fix has been merged I'm just waiting for the new 1.3.2 release

DjeBen
24 Apr, 2023, 07:49

In the meantime I have downgrade the apple sdk I used (from 2.0.0 to 1.2.3) So I don't have the crash because the pref on team don't exist below 2.0.0

DjeBen
24 Apr, 2023, 07:51
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more