Cannot find 'ScreenshotFeature' in scope
edvinass opened this issue · 2 comments
edvinass commented
Describe the bug
Cannot find 'ScreenshotFeature' in scope
SDK 1.5.0 version, using swift package manager in Xcode 14.0
Tried regular troubleshooting steps:
- to clean the build
- remove derived data
Still no luck.
To Reproduce
Steps to reproduce the behavior:
- Add crowding SDK swift package into project
- import SwiftUI
- try to access ScreenshotFeature.shared
- Cannot find 'ScreenshotFeature' in scope
Expected behavior
if imported CrowdinSDK it should be in scope.
Can access all other CrowdinSDK classes in the same swift file.
serhii-londar commented
@edvinass Unfortunately ScreenshotFeature is SDK internal class. you don't have to use it. Instead, you should use static methods of CrowdinSDK class:
CrowdinSDK.captureScreenshot(name: String(Date().timeIntervalSince1970)) {
print("Success")
} errorHandler: { error in
print(error?.localizedDescription)
}
I see that we have added an incorrect guide to our readme file :( Sorry for the inconvenience!
edvinass commented
I see, no worries. Thank you for the help and quick response!