crowdin/mobile-sdk-ios

Cannot find 'ScreenshotFeature' in scope

edvinass opened this issue · 2 comments

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:

  1. Add crowding SDK swift package into project
  2. import SwiftUI
  3. try to access ScreenshotFeature.shared
  4. 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.

Screenshots
Screenshot 2022-11-03 at 09 06 36

Additional info
Screenshot 2022-11-03 at 09 10 39

Screenshot 2022-11-03 at 09 07 54

@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!

I see, no worries. Thank you for the help and quick response!