I am trying build a Preview
for a project that is built on SwiftUI
. At first, I created the project with the name 'VOIP'. After some development and time, I connected it to the AppStore Connect
and the name of the project was created differently, Let's say VoipApp
. I can build the project into simulator or a device without any problem, however when I try to preview a SwiftUI
View
, it says No such module VOIP
at project navigator. But as I said it just happens when I try to preview.
Here is the diagnostics;
no such module \'VOIP\'
----------------------------------------
SchemeBuildError: Failed to build the scheme "VOIP"
no such module 'VOIP'
Compile /Users/myuser/Projects/VOIP/VOIPTests/VOIPTests.swift:
/Users/myuser/Projects/VOIP/VOIPTests/VOIPTests.swift:10:18: error: no such module 'VOIP'
@testable import VOIP
^
I tried some answers from the network, but neither of them have been worked.
The comment about recreating the scheme did not work for me. However, I found that I was able to change the module name to the value expected by SwiftUI by editing the "Product Module Name" setting:
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