How To Get Rid Of Boringss Logs | Apple Developer Forums
Maybe your like
- Global Nav Open Menu Global Nav Close Menu
- Apple Developer
- Apple Developer
- News
- Discover
- Design
- Develop
- Distribute
- Support
- Account
Quick Links
5 Quick Links Developer Forums Search for a topic, subtopic, or tag Clear search query Local Nav Open Menu Local Nav Close Menu Post Profile- Sign in
- Create account
So I make this function to fetch data from the url
class Api : ObservableObject{ @Published var movies = [MovieEntry]() func loadData() async { guard let url = URL(string: "https://imdb-api.com/en/API/MostPopularMovies/[apikey]") else { print("Invalid URL") return } do { let (data, _) = try await URLSession.shared.data(from: url) if let decodedResponse = try? JSONDecoder().decode(Movies.self, from: data) { movies = decodedResponse.items } } catch { print("Invalid data") } } }Then, I try to show the data in a list
struct ContentView: View { @State private var movies = [MovieEntry]() var body: some View { List(movies, id: \.id) { movie in Text("\(movie.fullTitle)") } .task { await Api().loadData() } } }But I got the following error and the data didn't show
Is there something wrong with my code? I have tested the url and it works just fine
Boost Copy to clipboard Share this post Copied to Clipboard Replies 0 Boosts 0 Views 287 Participants 1 How to get rid of boringss logs First post date Last post date QTag » How To Get Rid Of Logs
-
How To Get Rid Of Logarithms - Sciencing
-
Solving Logarithmic Equations 2 - Cool Math
-
Removing Logs From Equation - Mathematics Stack Exchange
-
How To Get Rid Of (dispose Of) Big Logs On You Property Or ... - YouTube
-
Solve Log Equation With A Log On One Side And A ... - YouTube
-
Solving A Logarithmic Equation By Using Inverse Properties - YouTube
-
8 Efficient Ways To Get Rid Of Cut-Down Trees
-
What Is The Cheapest Way To Get Rid Of The Wood From A Large Tree That ...
-
Algebra II : Log-Base-10 - Varsity Tutors
-
Is There Any Way To Remove Sawn Logs That I've Bought? I Don't Like ...
-
How To Get Rid Of Logs Along With Output On Terminal When Using ...
-
Getting Rid Of Dead Logs In The Forest? : R/TheForest - Reddit
-
Empty Or Delete A Log Files In Linux Or UNIX - NixCraft