Posts

Post not yet marked as solved
0 Replies
105 Views
Condition: We have an existing app that runs on iPhone and iPad. We want to make it compatible with macOS, along with it we want to leverage some of the macOS native components. We achieved this using macCatalyst, but now we want to build common components using swiftUI for both macOS and iOS platforms. Challenge: Using SwiftUI view for mac development Approach 1: We created a Mac bundle that contained Mac specific views (using Appkit views). This approach worked fine for creating and using components that are specific to macOS. Now while developing and using SwiftUI views in mac bundle we face following error -> (NSHostingViewController symbol not found). Approach 2: We tried creating a separate Mac app and make it part of MacCatalyst app. In this approach we were able to show NSStatusBar and add text using SwiftUI view. But the status bar appearance is inconsistent, sometimes NSStatusBar icon appears but other times it just won't appear. Can anyone help with the right approach for this scenarios
Posted Last updated
.
Post not yet marked as solved
0 Replies
128 Views
I am following this code https://developer.apple.com/documentation/corenfc/building_an_nfc_tag-reader_app to implement a simple scanner for NFC. Now whenever I scan I am always getting <NSXPCConnection: 0x3036981e0> connection to service with pid 60 named com.apple.nfcd.service.corenfc: Exception caught during decoding of received selector didDetectExternalReaderWithNotification:, dropping incoming message. Exception: Exception while decoding argument 0 (#2 of invocation): Exception: decodeObjectForKey: class "NFFieldNotificationECP1_0" not loaded or does not exist>. this error. It always calls this function func readerSession(_ session: NFCNDEFReaderSession, didInvalidateWithError error: Error)
Posted Last updated
.