rurico / flutter_video_compress

Generate a new file by compressed video, and provide metadata. Get video thumbnail from a video path, supports JPEG/GIF. To reduce app size not using FFmpeg in IOS.
MIT License
188 stars 73 forks source link

[Bug] Cannot run example on iOS with swift version 4.2.1 #39

Closed VictorUvarov closed 5 years ago

VictorUvarov commented 5 years ago

Description

My Swift version:

Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)
Target: x86_64-apple-darwin18.6.0

Unable to run the example. The error says:

Launching lib/main.dart on iPhone XR in debug mode...
Xcode build done.                                            1.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    === BUILD TARGET video_player OF PROJECT Pods WITH CONFIGURATION Debug ===
    The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 3.0, 4.0, 4.2. This setting can be set in the build settings editor.
Could not build the application for the simulator.
Error launching application on iPhone XR.
Exited (sigterm)

Platform

iOS

Backtracking step

  1. clone this repo https://github.com/rurico/flutter_video_compress.git
  2. cd flutter_video_compress/example/
  3. flutter packages get
  4. flutter run

Expected solution

Does the plugin support swift 4.2?

rurico commented 5 years ago

My Swift version is 5.0.1. I performed the same operation and did not encounter this problem.

git clone https://github.com/rurico/flutter_video_compress.git testPlugin
cd testPlugin
flutter packages get
flutter emulators --launch Apple
flutter run
Launching lib/main.dart on iPhone Xʀ in debug mode...
Running pod install...                                              4.0s
Running Xcode build...                                                  

 ├─Assembling Flutter resources...                           3.0s
 └─Compiling, linking and signing...                        21.6s
Xcode build done.                                           49.3s
Syncing files to device iPhone Xʀ...                                    
 2,548ms (!)                                       

🔥  To hot reload changes while running, press "r". To hot restart (and rebuild state),
press "R".

Environment

Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.5.0
CocoaPods version 1.7.3
Flutter version 1.5.4-hotfix.2

Maybe you need to cd the example/ios folder and run pod update.

VictorUvarov commented 5 years ago

I tried to cd into example/ios and running pod update. I also tried opening Runner.xcworkspace/ and changing the swift version to 4.0 and 4.2. The same error occurs. Any other advice?

rurico commented 5 years ago

Would you mind posting pod install --verbose

VictorUvarov commented 5 years ago

Preparing

Analyzing dependencies

Inspecting targets to integrate Using ARCHS setting to build architectures of target Pods-Runner: (``)

Finding Podfile changes

Fetching external sources -> Fetching podspec for Flutter from .symlinks/flutter/ios -> Fetching podspec for flutter_video_compress from .symlinks/plugins/flutter_video_compress/ios -> Fetching podspec for image_picker from .symlinks/plugins/image_picker/ios -> Fetching podspec for video_player from .symlinks/plugins/video_player/ios

Resolving dependencies of Podfile

Comparing resolved specification to the sandbox manifest

Downloading dependencies

-> Using Flutter (1.0.0)

-> Using Regift (1.5.0)

-> Using flutter_video_compress (0.3.0)

-> Using image_picker (0.0.1)

-> Using video_player (0.0.1)

Generating Pods project

Integrating client project

Integrating target Pods-Runner (Runner.xcodeproj project)

-> Pod installation complete! There are 5 dependencies from the Podfile and 5 total pods installed.

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig).

VictorUvarov commented 5 years ago

I updated Xcode to use Swift 5.0 on another computer and it builds. But crashes after it starts compressing.

rurico commented 5 years ago

I want to know which platform has crashed. Will help me to locate the problem.

rurico commented 5 years ago

I really want to help you, but you haven't provided me with enough information.

VictorUvarov commented 5 years ago

iOS is the platform that crashed. What additional information do you require?

VictorUvarov commented 5 years ago

I fixed the issue by updating Xcode to the newest version.

lifenautjoe commented 5 years ago

I'm getting the error

↳
    fatal error: module map file '/Users/lifenautjoe/Documents/code/okuna/okuna-app/build/ios/Debug-iphoneos/Regift/Regift.modulemap' not found
    fatal error: module map file '/Users/lifenautjoe/Documents/code/okuna/okuna-app/build/ios/Debug-iphoneos/Regift/Regift.modulemap' not found
    1 error generated.
    2 errors generated.