Flutter Project Template fails with unresolved identifier 'EmailBodyparts'

I’ve downloaded the Flutter template from my first app, but when I tried to run, I received a lot of warnings and a Error:

Launching lib/main.dart on iPhone 11 Pro Max in debug mode…
Xcode build done. 18.8s
Failed to build iOS app
Error output from Xcode build:

** BUILD FAILED **
Xcode’s output:

/Users/dcastaneda/Desktop/demo/ios/Pods/Starscream/Sources/Starscream/Compression.swift:59:25: warning: ‘withUnsafeBytes’ is deprecated: use withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R instead
return try data.withUnsafeBytes { (bytes:UnsafePointer) -> Data in
^
/Users/dcastaneda/Desktop/demo/ios/Pods/Starscream/Sources/Starscream/Compression.swift:83:29: warning: initialization of ‘UnsafeMutablePointer’ results in a dangling pointer
strm.next_out = UnsafeMutablePointer(&buffer)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/dcastaneda/development/flutter/.pub-cache/hosted/pub.dartlang.org/backendless_sdk-0.1.1/ios/Classes/CallHandlers/GeoCallHandler.swift:400:31: warning: ‘GeoPoint’ is deprecated: The GeoPoint class is deprecated and will be removed from SDK in the nearest future
let newGeoPoint = GeoPoint()
^
/Users/dcastaneda/development/flutter/.pub-cache/hosted/pub.dartlang.org/backendless_sdk-0.1.1/ios/Classes/Helpers/FlutterGeofenceCallback.swift:13:32: warning: ‘IGeofenceCallback’ is deprecated: The IGeofenceCallback protocol is deprecated and will be removed from SDK in the nearest future
class FlutterGeofenceCallback: IGeofenceCallback {
^
/Users/dcastaneda/development/flutter/.pub-cache/hosted/pub.dartlang.org/backendless_sdk-0.1.1/ios/Classes/CallHandlers/GeoCallHandler.swift:471:29: warning: ‘GeoPoint’ is deprecated: The GeoPoint class is deprecated and will be removed from SDK in the nearest future
guard let geoPoint: GeoPoint = arguments[Args.geoPoint].flatMap(cast) else {
^
/Users/dcastaneda/development/flutter/.pub-cache/hosted/pub.dartlang.org/backendless_sdk-0.1.1/ios/Classes/CallHandlers/MessagingCallHandler.swift:365:25: error: use of unresolved identifier 'EmailBodyparts’
** let bodyParts = EmailBodyparts()**
** ^~**
** /Users/dcastaneda/development/flutter/.pub-cache/hosted/pub.dartlang.org/backendless_sdk-0.1.1/ios/Classes/CallHandlers/MessagingCallHandler.swift:393:25: error: use of unresolved identifier ‘EmailBodyparts’**
** let bodyParts = EmailBodyparts()**
** ^
~**
** /Users/dcastaneda/development/flutter/.pub-cache/hosted/pub.dartlang.org/backendless_sdk-0.1.1/ios/Classes/CallHandlers/MessagingCallHandler.swift:418:25: error: use of unresolved identifier ‘EmailBodyparts’**
** let bodyParts = EmailBodyparts()**
** ^~~~~~~~~~~~~~**
warning: Could not read serialized diagnostics file: Invalid File: Invalid diagnostics signature (in target ‘backendless_sdk’ from project ‘Pods’)
warning: Could not read serialized diagnostics file: Invalid File: Invalid diagnostics signature (in target ‘backendless_sdk’ from project ‘Pods’)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the “Swift 3 @objc Inference” build setting to “Default” for the “Runner” target. (in target ‘Runner’ from project ‘Runner’)
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Exited (sigterm)

What I’m doing wrong ?

Hi @Dario_Castaneda

I reproduced your issue and created the internal ticket BKNDLSS-21321. We will fix this problem and release a new version soon.

Best Regards,
Maksym

Hi @Dario_Castaneda

We have uploaded a new Flutter SDK version 1.1.6. Please update the version of backendless_sdk package to 1.1.6 in your pub spec.yaml:

backendless_sdk: ^1.1.6

and let us know if it works for you.

Best Regards,
Maksym

Hi,
With the new version:

/Users/dcastaneda/development/flutter/.pub-cache/hosted/pub.dartlang.org/backendless_sdk-1.1.6/ios/Classes/CustomArgumentsCoding/BackendlessReader.swift:72:16: error: value of optional type ‘BLPoint??’ not unwrapped; did you mean to use ‘try!’ or chain with ‘?’?
return try? BLPoint.fromWkt(wkt)
^~~~
try!
/Users/dcastaneda/development/flutter/.pub-cache/hosted/pub.dartlang.org/backendless_sdk-1.1.6/ios/Classes/CustomArgumentsCoding/BackendlessReader.swift:79:16: error: value of optional type ‘BLLineString??’ not unwrapped; did you mean to use ‘try!’ or chain with ‘?’?
return try? BLLineString.fromWkt(wkt)
^~~~
try!
/Users/dcastaneda/development/flutter/.pub-cache/hosted/pub.dartlang.org/backendless_sdk-1.1.6/ios/Classes/CustomArgumentsCoding/BackendlessReader.swift:86:16: error: value of optional type ‘BLPolygon??’ not unwrapped; did you mean to use ‘try!’ or chain with ‘?’?
return try? BLPolygon.fromWkt(wkt)

We cannot reproduce this issue. Can you please attach the project so we could check it?

Best Regards,
Maksym

sure, demo.zip (168.1 KB)

It’s the template downloaded, without changes (only backendless_sdk version upgrade)

Thank you. We will check it out and give you a feedback as soon as possible.

Regards,
Maksym

Hi @Dario_Castaneda

Sorry for the inconvenience. There was another issue due to Swift SDK update. We’ve fixed it and released new version 1.1.7.
Please update the Flutter SDK version in your pubspec.yaml

backendless_sdk: ^1.1.7

and run the following commands:

cd ios
pod update

Please let us know if it works for you.

Best Regards,
Maksym

Hi,

I’ve downloaded again the generated demo from my Serverless Project (Download Project template option in the top page of my App), later, modified the serverless_sdk version to ^1.1.7 and update the ios pods, but I receive several errors, attached you will find the log generated

Thank you for following up

demo.log (13.2 KB)

Seems like the pods are cached and not updated properly. Can you please update it again with the following commands:

cd ios
pod deintegrate
pod update

Regards,
Maksym

Thank you,

I found that update pods still using backendless_sdk (0.0.1)

so, what I did was delete the ios folder and recreate ios folder (flutter create -i swift .)

Now works and the demo save the information in TestTable.

I appreciate your help and support

I am glad you resolved the issue. Happy coding with Backendless!

Best Regards,
Maksym