1

How to access a data class which is in the iOS folder from the watchOS extension folder. If i want to access the class normally by calling my DataService i get this error:

enter image description here

This file I want to access:

enter image description here

SwiftiSwift
  • 7,528
  • 9
  • 56
  • 96
  • At the past I wanted use the same way, but class dose not update it`s Published variables in the way that be usable for watchOS project. or the class does update but watchOS cannot use it. Have you faced the issue? – ios coder Mar 16 '21 at 23:48

1 Answers1

1
  • Select DataService.swift file.
  • Then click on the top right navigation button to show inspectors.
  • Under "Show the file inspector," tick the target name for your watchOS extension.
  • This will share that particular file with the watchOS extension.
Rudrank Riyam
  • 588
  • 5
  • 13