Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Cannot find 'CapWatchContentView' in scope

Open
#35 21 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
swift
Domain
mobile

Research direction

Start with the documentation through step 7, watchOS.swift, and the package entry added from node_modules. Compare the expected CapWatchContentView and package names with the project's integration setup; done means the watchOS app resolves CapWatchContentView and builds without the missing-module error.

Written by the indexing model from the issue text.

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.

Dominant language
Swift
Stars
49
Forks
11
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ionic-team/CapacitorWatch

All issues in ionic-team/CapacitorWatch

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.