Post

Replies

Boosts

Views

Activity

Having problems accessing data out of dictionary.
I have successfully received some JSON. Ran it through JSONSerialization and created a dictionary from. I can access any key: value pair but I can't seem to access a key with what I want to call nested properties/objects. I am new to Swift so I am unsure of terminology. Anyways here is an example of the key I want to access. "videos": {     mp4 =     {         1080 = "https://videos.kaiserclix.com/AVideo/videos/_YPTuniqid_6061fbc1c89a53.50466226_1080.mp4";         240 = "https://videos.kaiserclix.com/AVideo/videos/_YPTuniqid_6061fbc1c89a53.50466226_240.mp4";         360 = "https://videos.kaiserclix.com/AVideo/videos/_YPTuniqid_6061fbc1c89a53.50466226_360.mp4";         480 = "https://videos.kaiserclix.com/AVideo/videos/_YPTuniqid_6061fbc1c89a53.50466226_480.mp4";     }; Here is the chunk of swift I would have thought found what I want: if let link = movieDict["videos.mp4"]?["480"] as? String? {             print(link)             self.videoLink = link         } Here is the swift file containing the structs: class Movie{          struct Welcome: Codable {         let error: Bool         let message: String         let response: Response     }          struct Response: Codable {         let totalRows: Int         let rows: [Row]     }          struct Row: Codable {         let title, cleanTitle: String         let videos: Videos         let poster, thumbnail: String     }          struct videos: Codable {         let vides: [String: String]     }          enum TypeEnum: String, Codable {         case video = "video"     }          struct Videos: Codable {         let mp4: [String: String]     }          var title : String!     var posterPath : String!     var videoLink : String! Please help! I have been banging my head against the wall! Thanks! Greg
5
0
676
Sep ’22
Trying develop a sign-in screen for a tvOS app. Getting a couple of errors
Trying develop a sign-in screen for a tvOS app. Getting a couple of errors. Using a sample app and it appears a number of things are happening. Here is one of the errors. 2022-10-20 15:30:43.685149-0500 testSignIn[29629:2579088] [siwa] Credential State request returned with error: Error Domain=AKAuthenticationError Code=-7074 "(null)" and then later I see the next one. 2022-10-20 15:39:39.155369-0500 testSignIn[29629:2579082] [siwa] Authorization failed: Error Domain=AKAuthenticationError Code=-7027 "(null)" UserInfo={AKClientBundleID=KaiserClix.testSignIn} I am new to Apple development so I am unsure what exactly I need. Trying to learn via the sample app but I can't get it work. Please help! Been banging my head against the wall. Thanks, Greg
0
0
1.5k
Oct ’22