Post

Replies

Boosts

Views

Activity

How to change text in SwiftUI conditional button to systemImage?
This is my modifier for a view, I want to display the SF symbols by using systemImage: "heart.fill" instead of "-" and systemImage: "heart" instead of "+" but XCode myseriously fails to build without any error.         .toolbar {             ToolbarItem(placement: .navigationBarTrailing) {                 Button(favorites.contains(item) ? "-" : "+") {                     if favorites.contains(item) {                         favorites.remove(item)                     } else {                         favorites.add(item)                     }                 }             }         } How do I print the SF symbol instead of a String? Thanks in advance.
2
0
1.2k
Oct ’22
App Transport Security has blocked a cleartext HTTP connection since it is insecure
I have searched up this issue online and there is no clear documentation on how to make an insecure HTTP request on Xcode 13 as the info.plist list does not show unlike previous Xcode versions. I have tried making an exception domain as shown below. Could anyone please guide me further on what I should do? This is the error raised, "App Transport Security has blocked a cleartext HTTP connection since it is insecure. Use HTTPS instead or add Exception Domains to your app's Info.plist."
1
1
2.3k
Jul ’22