Sorry for the misunderstanding. The widgets I mentioned in the question does not refer to iOS widgets. Here it just means any UI element that can be added to UIWindow like UIView, UILabel, UIButton etc. I wanted to know how to handle error for their initialiser failure.
Apple documentation on the Cpp-Swift interoperability only mentions about using the clang module to make Cpp Code available in Swift, it does not mention about using bridging header. If we can expose the Cpp code using the 'clang module' as well using the 'bridging header' then which approach should be preferred and why? Can someone please elaborate on this?
@donnywdavis Both the structures are valid. I have tried this same with the structure you shared but the results are still the same. only app1 is getting invoked.
Sorry for the misunderstanding. The widgets I mentioned in the question does not refer to iOS widgets. Here it just means any UI element that can be added to UIWindow like UIView, UILabel, UIButton etc. I wanted to know how to handle error for their initialiser failure.
Apple documentation on the Cpp-Swift interoperability only mentions about using the clang module to make Cpp Code available in Swift, it does not mention about using bridging header. If we can expose the Cpp code using the 'clang module' as well using the 'bridging header' then which approach should be preferred and why? Can someone please elaborate on this?
@donnywdavis Both the structures are valid. I have tried this same with the structure you shared but the results are still the same. only app1 is getting invoked.