adel_kasno
(Adel Kanso)
January 27, 2021, 4:56pm
1
I’m working with flutter, and I want to install pod, so I’ve run the command pod install in the ios folder of flutter project, and this error occurred:
backendless_sdk
does not specify a Swift version and none of the targets (Runner
) integrating it have the SWIFT_VERSION
attribute set. Please contact the author or set the SWIFT_VERSION
attribute in at least one of the targets that integrate this pod.
Any help?
Hi @adel_kasno
Please specify what version of backendless_sdk
flutter plugin do you use.
Best Regards,
Maksym
adel_kasno
(Adel Kanso)
January 28, 2021, 12:15pm
3
Hi @Maksym_Khobotin2
backendless_sdk: ^6.1.0
I cannot reproduce this issue but I found out that this is a common problem for all Flutter plugins:
opened 08:23PM - 21 Dec 18 UTC
closed 02:00AM - 09 Nov 19 UTC
platform-ios
tool
p: tooling
package
Hi,
I’m struggling since the last few days to understand how I can build or u… se Flutter Platform channel plugins that are written in Swift for the iOS part.
To my understanding plugins should not force you to set « use_frameworks! » in your PodFile, because, well, that’s make for example firebase_messaging not working (because this plugin force to comment use_frameworks).
So I try to create a plug-in by my own with the Flutter CLI :
`flutter create —template=plugins -ios-language swift sample`
The project is generated with the use_frameworks! In PodFile who makes it functionnal but incompatible with most from the start.
I’m not an CocoaPods expert but is it still required for Swift Library to use this flag ? I thought that starting at [Cocoapod 1.5](http://blog.cocoapods.org/CocoaPods-1.5.0/) you could remove the flag. But that’s not working at all.
So is it possible to make Flutter Swift plugins who works with firebase plugins ?
If so, can you point me to this direction ? Should the cli create command need to be updated to provide from the start the "good" example project ?
If making swift plugins working with "first party" plugins is not possible, is it not wiser to remove the ability to create swift plugins since this is not "future proof" and can produce some awkward ecosystem of plugins.
Sorry in advance if what I said is not really relevant, I'm trying to understand "the right way" to make iOS plugins...in Swift (Objective-C is not my cup of tea)
## Steps to Reproduce
Create a new Flutter plugin project :
1. `flutter create --template=plugin -i swift sample`
2. In sample/example/ios/Podfile, Comment `use_frameworks!`
3. In sample/example run `flutter run` on iOS emulator
4.
```
fatal error: 'sample/sample-Swift.h' file not found
#import <sample/sample-Swift.h>
```
## Logs
```
flutter doctor -v
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.2 18C54, locale fr-FR)
• Flutter version 1.0.0 at /Users/romainpardon/Development/SDK/flutter
• Framework revision 5391447fae (3 weeks ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/romainpardon/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.4
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.3.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] VS Code (version 1.30.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.21.1
[✓] Connected device (1 available)
• iPhone XR • DDB601C1-5AEC-47B3-999A-2D6E72FAF466 • ios • iOS 12.1 (simulator)
• No issues found!
```
Can you please check the solution provided here:
opened 05:53AM - 04 May 19 UTC
closed 09:14AM - 30 Jul 19 UTC
I am using ```esys_flutter_share 1.0.1``` and when I was building for iOS, the e… rror was thrown.
Console shows
``` Launching lib/main.dart on iPhone Xʀ in debug mode...
Running pod install...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
A esys_flutter_share
R share
- Firebase
- Flutter
- cloud_firestore
- connectivity
- firebase_admob
- firebase_core
- google_sign_in
- package_info
- path_provider
- qrcode_reader
- shared_preferences
- sqflite
- url_launcher
Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
-> Fetching podspec for `connectivity` from `.symlinks/plugins/connectivity/ios`
-> Fetching podspec for `esys_flutter_share` from `.symlinks/plugins/esys_flutter_share/ios`
-> Fetching podspec for `firebase_admob` from `.symlinks/plugins/firebase_admob/ios`
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
-> Fetching podspec for `google_sign_in` from `.symlinks/plugins/google_sign_in/ios`
-> Fetching podspec for `package_info` from `.symlinks/plugins/package_info/ios`
-> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `qrcode_reader` from `.symlinks/plugins/qrcode_reader/ios`
-> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
-> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`
-> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios`
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
A BoringSSL-GRPC
A FMDB
A Firebase
A FirebaseAnalytics
A FirebaseAuth
A FirebaseAuthInterop
A FirebaseCore
A FirebaseDatabase
A FirebaseFirestore
A FirebaseInstanceID
A Flutter
A GTMSessionFetcher
A Google-Mobile-Ads-SDK
A GoogleAppMeasurement
A GoogleSignIn
A GoogleToolboxForMac
A GoogleUtilities
A Protobuf
A Reachability
A cloud_firestore
A connectivity
A esys_flutter_share
A firebase_admob
A firebase_core
A gRPC-C++
A gRPC-Core
A google_sign_in
A leveldb-library
A nanopb
A package_info
A path_provider
A qrcode_reader
A shared_preferences
A sqflite
A url_launcher
Downloading dependencies
-> Installing BoringSSL-GRPC (0.0.2)
> Copying BoringSSL-GRPC from `/Users/george/Library/Caches/CocoaPods/Pods/Release/BoringSSL-GRPC/0.0.2-2a230` to `Pods/BoringSSL-GRPC`
-> Installing FMDB (2.7.5)
> Copying FMDB from `/Users/george/Library/Caches/CocoaPods/Pods/Release/FMDB/2.7.5-2ce00` to `Pods/FMDB`
-> Installing Firebase (5.17.0)
> Copying Firebase from `/Users/george/Library/Caches/CocoaPods/Pods/Release/Firebase/5.17.0-59d55` to `Pods/Firebase`
-> Installing FirebaseAnalytics (5.6.0)
> Copying FirebaseAnalytics from `/Users/george/Library/Caches/CocoaPods/Pods/Release/FirebaseAnalytics/5.6.0-75e4b` to `Pods/FirebaseAnalytics`
-> Installing FirebaseAuth (5.3.1)
> Copying FirebaseAuth from `/Users/george/Library/Caches/CocoaPods/Pods/Release/FirebaseAuth/5.3.1-0f61e` to `Pods/FirebaseAuth`
-> Installing FirebaseAuthInterop (1.0.0)
> Copying FirebaseAuthInterop from `/Users/george/Library/Caches/CocoaPods/Pods/Release/FirebaseAuthInterop/1.0.0-0ffa5` to `Pods/FirebaseAuthInterop`
-> Installing FirebaseCore (5.3.0)
> Copying FirebaseCore from `/Users/george/Library/Caches/CocoaPods/Pods/Release/FirebaseCore/5.3.0-c0c4b` to `Pods/FirebaseCore`
-> Installing FirebaseDatabase (5.1.0)
> Copying FirebaseDatabase from `/Users/george/Library/Caches/CocoaPods/Pods/Release/FirebaseDatabase/5.1.0-23acb` to `Pods/FirebaseDatabase`
-> Installing FirebaseFirestore (1.0.1)
> Copying FirebaseFirestore from `/Users/george/Library/Caches/CocoaPods/Pods/Release/FirebaseFirestore/1.0.1-e95af` to `Pods/FirebaseFirestore`
-> Installing FirebaseInstanceID (3.5.0)
> Copying FirebaseInstanceID from `/Users/george/Library/Caches/CocoaPods/Pods/Release/FirebaseInstanceID/3.5.0-4522a` to `Pods/FirebaseInstanceID`
-> Installing Flutter (1.0.0)
-> Installing GTMSessionFetcher (1.2.1)
> Copying GTMSessionFetcher from `/Users/george/Library/Caches/CocoaPods/Pods/Release/GTMSessionFetcher/1.2.1-32aec` to `Pods/GTMSessionFetcher`
-> Installing Google-Mobile-Ads-SDK (7.40.0)
> Copying Google-Mobile-Ads-SDK from `/Users/george/Library/Caches/CocoaPods/Pods/Release/Google-Mobile-Ads-SDK/7.40.0-9d1c3` to `Pods/Google-Mobile-Ads-SDK`
-> Installing GoogleAppMeasurement (5.6.0)
> Copying GoogleAppMeasurement from `/Users/george/Library/Caches/CocoaPods/Pods/Release/GoogleAppMeasurement/5.6.0-008e0` to `Pods/GoogleAppMeasurement`
-> Installing GoogleSignIn (4.4.0)
> Copying GoogleSignIn from `/Users/george/Library/Caches/CocoaPods/Pods/Release/GoogleSignIn/4.4.0-7ff24` to `Pods/GoogleSignIn`
-> Installing GoogleToolboxForMac (2.2.0)
> Copying GoogleToolboxForMac from `/Users/george/Library/Caches/CocoaPods/Pods/Release/GoogleToolboxForMac/2.2.0-ff316` to `Pods/GoogleToolboxForMac`
-> Installing GoogleUtilities (5.3.7)
> Copying GoogleUtilities from `/Users/george/Library/Caches/CocoaPods/Pods/Release/GoogleUtilities/5.3.7-111a0` to `Pods/GoogleUtilities`
-> Installing Protobuf (3.6.1)
> Copying Protobuf from `/Users/george/Library/Caches/CocoaPods/Pods/Release/Protobuf/3.6.1-1eb97` to `Pods/Protobuf`
-> Installing Reachability (3.2)
> Copying Reachability from `/Users/george/Library/Caches/CocoaPods/Pods/Release/Reachability/3.2-33e18` to `Pods/Reachability`
-> Installing cloud_firestore (0.0.1)
-> Installing connectivity (0.0.1)
-> Installing esys_flutter_share (0.0.1)
-> Installing firebase_admob (0.0.1)
-> Installing firebase_core (0.0.1)
-> Installing gRPC-C++ (0.0.6)
> Copying gRPC-C++ from `/Users/george/Library/Caches/CocoaPods/Pods/Release/gRPC-C++/0.0.6-e7644` to `Pods/gRPC-C++`
-> Installing gRPC-Core (1.17.0)
> Copying gRPC-Core from `/Users/george/Library/Caches/CocoaPods/Pods/Release/gRPC-Core/1.17.0-40280` to `Pods/gRPC-Core`
-> Installing google_sign_in (0.0.1)
-> Installing leveldb-library (1.20)
> Copying leveldb-library from `/Users/george/Library/Caches/CocoaPods/Pods/Release/leveldb-library/1.20-08cba` to `Pods/leveldb-library`
-> Installing nanopb (0.3.901)
> Copying nanopb from `/Users/george/Library/Caches/CocoaPods/Pods/Release/nanopb/0.3.901-2901f` to `Pods/nanopb`
-> Installing package_info (0.0.1)
-> Installing path_provider (0.0.1)
-> Installing qrcode_reader (0.0.1)
-> Installing shared_preferences (0.0.1)
-> Installing sqflite (0.0.1)
-> Installing url_launcher (0.0.1)
- Running pre install hooks
[!] Unable to determine Swift version for the following pods:
- `esys_flutter_share` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer/xcode/target_validator.rb:115:in `verify_swift_pods_swift_version'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:459:in `validate_targets'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:138:in `install!'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `load'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `<main>'
Error output from CocoaPods:
↳
[!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone Xʀ.```
And share the results?
Glad to here it!
Happy coding with Backendless!
1 Like