infitio/flutter_socket_io

Error when running on ios simulator

daniwaxman opened this issue · 14 comments

I am trying to run on ios simulator and during the build process I get the following error:

Unable to determine Swift version for the following pods:
- adhara_socket_io 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.

@daniwaxman can try latest ( 0.3.4 ) and update?

If you face any issues, try and see if this can help!
https://www.youtube.com/watch?v=rc6Kv95FJ4M

Ios meet this error: /Users/air/Desktop/flutter/.pub-cache/hosted/pub.flutter-io.cn/adhara_socket_io-0.3.4/ios/Classes/AdharaSocketIoPlugin.m:2:9: fatal error: 'adhara_socket_io/adhara_socket_io-Swift.h' file not found

I am now getting the same error reported by IChengLiWei

Refer to this Comment, see if that resolves your issue
#25 (comment)

Thanks- Did not resolve.

@daniwaxman Try cleaning Pods and Podfile.lock, build afresh. If that didn't resolve, then share steps to reproduce

  1. deleted Pods and pofile.lock
  2. ran flutter packages get
  3. ran Pod install
  4. opened Runner and set deployment target to 9.0
  5. Open ios Simulator (iphone Xr 12.4)
  6. run "flutter run"

I get the following:
=== BUILD TARGET shared_preferences OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/dw/dev/flutter/.pub-cache/hosted/pub.dartlang.org/adhara_socket_io-0.3.4/ios/Classes/AdharaSocketI
oPlugin.m:2:9: fatal error: 'adhara_socket_io/adhara_socket_io-Swift.h' file not found
#import <adhara_socket_io/adhara_socket_io-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Could not build the application for the simulator.
Error launching application on iPhone Xʀ.

@daniwaxman can you share your source code? rr.16566@gmail.com

@daniwaxman as discussed, please add use_frameworks! to your Podfile as in the example

https://github.com/infitio/flutter_socket_io/blob/master/example/ios/Podfile#L30

I am creating an apk release file and I get this error, Can someone please help me?

  • What went wrong:
    Execution failed for task ':adhara_socket_io:verifyReleaseResources'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
/Users/app/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a843182444d532fb7/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/app/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a843182444d532fb7/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.

@LuongHai-7buon try latest release or check out source branch from #128

When I run pod install, I got these error
What happened?

[!] CocoaPods could not find compatible versions for pod "adhara_socket_io":
In Podfile:
adhara_socket_io (from .symlinks/plugins/adhara_socket_io/ios)

Specs satisfying the adhara_socket_io (from .symlinks/plugins/adhara_socket_io/ios) dependency were found, but they required a higher minimum deployment target.

The argument type 'String' can't be assigned to the parameter type 'SocketOptions'.
WHY i m getting error like this ?

Please try new version 1.0.0 and re-open or create a new issue if it still exists