# Ch.18 "Cannot find type 'BasicAccount' in scope"

**URL:** <https://forums.kodeco.com/t/ch-18-cannot-find-type-basicaccount-in-scope/136813>\
**Category:** Swift Apprentice\
**Created:** [April 3, 2021, 8:39pm UTC](https://forums.kodeco.com/t/ch-18-cannot-find-type-basicaccount-in-scope/136813 "2021-04-03T20:39:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasper8777](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jasper8777/32/110937_2.png) [@jasper8777](https://forums.kodeco.com/u/jasper8777)\
**Post date:** [April 3, 2021, 8:39pm UTC](https://forums.kodeco.com/t/ch-18-cannot-find-type-basicaccount-in-scope/136813/1 "2021-04-03T20:39:59Z")

</div>

Hi all,

in this chapter, when I organized the code from playground to separate files, Xcode kept showing me this error saying it cannot find BasicAccount in scope, while the BasicAccount class and the Account protocol have been marked open and public (as you can see from pictures below).

The same problem persists even when I use the files provided in the Swift Apprentice Github repo!  
**Also, importantly, the code runs successfully despite the error message.**

I’ve tried to figure it out but I am dumbfounded… is it some kind of bug from Xcode? I’ve tried rebuilding the file, restart Xcode and my computer, all of which did not work, please advise! Thanks a lot.

![image](https://files.chunter.kodeco.com/original/3X/2/6/26daa5f778b5edc6f85be944a7465437fab980d2.png)

![image](https://files.chunter.kodeco.com/original/3X/8/1/81ec08af81720c2c20afb1b1f431e5f9afc68844.png)

![image](https://files.chunter.kodeco.com/original/3X/b/9/b92f04d3384cc47883615b09d55af24924bff6ab.png)

---

<div class="post-metadata">

**Author:** ![sahitya8e7](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sahitya8e7/32/81494_2.png) [@sahitya8e7](https://forums.kodeco.com/u/sahitya8e7)\
**Post date:** [May 23, 2021, 2:57pm UTC](https://forums.kodeco.com/t/ch-18-cannot-find-type-basicaccount-in-scope/136813/2 "2021-05-23T14:57:34Z")

</div>

I was seeing similar errors on my code. What fixed it was to enable “Import App Type”. On the playground, under File Inspector, under Playground Settings, Enable Active Scheme, and Import App Types.  
 ![Example](https://files.chunter.kodeco.com/original/3X/8/4/8432a174b3908185a37d8dfac5d47228bdf1fa36.png)

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [September 17, 2021, 12:40pm UTC](https://forums.kodeco.com/t/ch-18-cannot-find-type-basicaccount-in-scope/136813/3 "2021-09-17T12:40:54Z")

</div>

Closed on September 17, 2021, 12:40pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
