Post

Replies

Boosts

Views

Activity

View not update when published variable in class changes within the class
I have a struct that need to present some view when variable in class changes. Example: struct Example: View { @StateObject var isText = ProviderDelegate()   var body: some View { Text("here some text") if(isText.show) {        Bar()     } } the providerDelegate: class Adapter: ObservableObject {   @Published public var show: Bool = false; func changeShow() {     show.toggle() } ... } when function from other class to changeShow the View is not updation, thus the bar() is not shown. Why is that?
2
1
551
Sep ’22
NFC iso18092 Missing required entitlement
Hey, I don't know why i can not make scan function work. I have written in the entitlement file: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.nfc.readersession.formats</key> <array> <string>NDEF</string> <string>TAG</string> </array> </dict> </plist> also in the info.plist: <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key> <array> <string>A0000002471001</string> <string>D2760000850101</string> <!-- Add more AIDs as needed --> </array> still get the error Error Domain=NFCError Code=2 "Missing required entitlement" of course when i remove the iso18092 enum everything is working. Help? thanks
0
0
734
Aug ’23