LecleVietnam/LeclePackageIssue

compilation errors

Opened this issue · 5 comments

Could not build the precompiled application for the device.
Swift Compiler Error (Xcode): Cannot find type 'TikTokOpenSDKShareFormatType' in scope
/.pub-cache/hosted/pub.dev/lecle_social_share-0.5.0+1/ios/Classes/SwiftLecleSocialSharePlugin.swift:1540:24

This error message often occurs when there is an issue with the import statement, or when the required framework is not linked correctly.

Here are a few things you can try to resolve this issue:

  1. Make sure that the TikTok SDK is properly installed and linked in your project.

  2. Check if the import statement for TikTokOpenSDKShareFormatType is correct and that there are no typos or spelling mistakes.

  3. Check if the version of the lecle_social_share library you are using is compatible with the version of the TikTok SDK you have installed. If not, try updating the library to a compatible version.

  4. Clean your project and rebuild it.

If none of the above solutions work, try deleting the derived data folder for your project and then rebuild it.

please how do I check that TikTokOpenSDKShareFormatType is well imported. And where do I find the derived data folder ?

First, to check if it well imported, look for the import statement in your code. It should look like this "import TikTokOpenSDKShareExtension".Make sure that the import statement is present and that there are no typos in the module name or import statement.

Second,To find the location of the derived data folder in Xcode, you can follow either of the ways below:

First way:

  1. Open Xcode and go to the "Xcode" menu in the menu bar.
  2. Select "Preferences" from the drop-down menu.
  3. In the Preferences window, select the "Locations" tab.
  4. Look for the "Derived Data" section, and you should see the location of your derived data folder listed there.

Second Way:

  1. Open your project in Xcode.
  2. Go to the "Product" menu in the menu bar.
  3. Select "Clean Build Folder" from the drop-down menu. This will delete the contents of the derived data folder.
  4. Go to the "Product" menu again and select "Build". Xcode will rebuild your project and recreate the derived data folder.
  5. After the build is complete, you can navigate to the derived data folder by going to the "Window" menu in the menu bar, selecting "Organizer", and then selecting the "Projects" tab. From there, you can select your project and click the "Derived Data" button to open the folder in Finder.

Hi @richCode-Ama,

Our team has tested the package to check this issue and we found that everything is fine. Have you followed all the steps in the package's config instructions on pub.dev? If not, could you please check our package's config instruction for iOS again? Thank you.

I followed the instruction as it is but am getting the same errors.