ionic-team / ionic-team/CapacitorWatch

Cannot find 'CapWatchContentView' in scope

Open
#35 21 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
49
Forks
11
PR merge metrics
No merged PRs in 30d

Description

I've followed the documentation up to step 7, my watchOS.swift file currently looks like this:

```
import SwiftUI
import WatchConnectivity

@main
struct watchOS_Watch_AppApp: App {
var body: some Scene {
WindowGroup {
CapWatchContentView()
.onAppear {
assert(WCSession.isSupported(), "This sample requires Watch Connectivity support!")
WCSession.default.delegate = WatchViewModel.shared
WCSession.default.activate()
}
}
}
}
```

I'm receiving the error:
`Cannot find 'CapWatchContentView' in scope`

I can confirm the `capacitor/watch` plugin exists in my `package.json` file. The only other thing I can think of that may (or may not) be relevant is that after I added the Capacitor Watch Swift Package from node modules, its name reads as `iOS-capWatch-watch` instead of `CapWatch-Watch-SPM`.

I have tried adding `import CapacitorWatch` above the `@main` statement, but this also throws the `No such module 'CapacitorWatch'` error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.