I have been implementing the home kit app in objective-c . I have converted all the swift code but stoped at one line called
guard let metadata = metadata else { return false }
Could any one please guide me to write the objective-c code equivalent to the above line of code. Thank you so much for reading my post.
From a compiler perspective there is no exact equivalent, because the guard statement else block is guaranteed to return control (i.e., the guard statement must be true for the code to continue past the guard). You can read more about it here.
The closest you can get is:
if(metadata == nil) { return NO; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With