0

I have swift package like this:

package
├── SigningSDK
    ├── Package.swift
    ├── README.md
    ├── Sources
    │   ├── SigningSDK
    │       └── file1.swift
    └── Tests
         └── SigningSDKTests
             └── SigningSDKTests.swift

I moved the content of this view in a folder inside my flutter project.

package/SigningSDK

in my pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  flutter_native_splash: ^2.2.19
  cupertino_icons: ^1.0.2
  intl: ^0.17.0
  flutter_localization: ^0.1.10
  intl_utils: ^2.8.2
  card_swiper: ^2.0.4
  secure_application: ^3.8.0
  remixicon: ^1.0.0
  slide_action: ^0.0.2
  package_info_plus: ^3.0.3
  flag: ^6.0.0
  SigningSDK:
    path: package/SigningSDK

dev_dependencies:
  flutter_test:
    sdk: flutter

the result of error is:

Could not find a file named "pubspec.yaml" in "/Users/joisberg/Documents/GitHub/app-mobile/app/packages/SigningSDK".
pub get failed
command: "/Users/joisberg/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --directory . get --example"
pub env: {
  "FLUTTER_ROOT": "/Users/joisberg/flutter",
  "PUB_ENVIRONMENT": "vscode.dart-code:flutter_cli:get",
  "PUB_CACHE": "/Users/joisberg/.pub-cache",
}
exit code: 66

exit code 66

Someone can help me?

I already try with flutter clean; flutter pub get; but not working. If I run flutter doctor -v it's all normal

timbre timbre
  • 12,648
  • 10
  • 46
  • 77
joisberg
  • 175
  • 2
  • 13
  • As the error points out, that folder isn't a proper package as it doesn't have a pubspec.yaml file. This simply isn't how you include a swift library. It feels like you should be creating a plugin to wrap that SDK. The plugin instructions state how to include various types of native library. Don't forget to then write the plugin implementation with some Dart stubs and Swift implementations - again that's well described in the plugins page. – Richard Heap Mar 31 '23 at 16:51
  • Have a link for help me? – joisberg Mar 31 '23 at 17:18
  • https://docs.flutter.dev/development/packages-and-plugins/developing-packages#step-2c-add-ios-platform-code-swifthm – Richard Heap Mar 31 '23 at 19:32

0 Answers0