LeGoffMael / video_editor

A flutter package for editing video written in pure Dart with fully customizable UI. Supports crop, trim, rotation and cover selection.
https://pub.dev/packages/video_editor
MIT License
367 stars 218 forks source link

** BUILD FAILED ** for IOS on mac #11

Closed nikage closed 2 years ago

nikage commented 3 years ago

pubspec.yaml

name: flutter_video_editor_mvp
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  image_picker: ^0.7.0
  video_editor: ^1.0.3+1
  gallery_saver: ^0.0.5

dev_dependencies:
  flutter_test:
    sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  # assets:
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

Pod version 1.10.1

Xcode version Version 12.4 (12D4e)

Flutter version

 flutter --version
Flutter 1.27.0-5.0.pre.113 • channel master • https://github.com/flutter/flutter.git
Framework • revision 9ce3f76c53 (21 hours ago) • 2021-02-23 16:41:03 +0000
Engine • revision 07afcf7d0f
Tools • Dart 2.13.0 (build 2.13.0-52.0.dev)

Error log

Launching lib/main.dart on iPhone Nikola in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: JGM96VQ367
Running Xcode build...
Xcode build done.                                           26.4s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    4 warnings generated.
    /Users/nick/projects/mobile-apps/flutter_video_editor_mvp/ios/Pods/libwebp/src/enc/backward_references_enc.c:694:12: warning: variable 'best_offset' may be uninitialized when used here [-Wconditional-uninitialized]
              (best_offset << MAX_LENGTH_BITS) | (uint32_t)best_length;
               ^~~~~~~~~~~
    /Users/nick/projects/mobile-apps/flutter_video_editor_mvp/ios/Pods/libwebp/src/enc/backward_references_enc.c:626:20: note: initialize the variable 'best_offset' to silence this warning
        int best_offset;
                       ^
                        = 0
    1 warning generated.
    In module 'Photos' imported from /Users/nick/Library/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.0/ios/Classes/FLTImagePickerPlugin.m:9:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/Photos.framework/Headers/PHImageManager.h:162:1: note: 'requestImageDataForAsset:options:resultHandler:' has been explicitly marked deprecated here
    - (PHImageRequestID)requestImageDataForAsset:(PHAsset *)asset options:(nullable PHImageRequestOptions *)options resultHandler:(void (^)(NSData *_Nullable imageData, NSString *_Nullable dataUTI, UIImageOrientation orientation, NSDictionary *_Nullable info))resultHandler API_DEPRECATED_WITH_REPLACEMENT("-requestImageDataAndOrientationForAsset:options:resultHandler:", ios(8, 13), tvos(8, 13)) API_UNAVAILABLE(macos);
    ^
    2 warnings generated.
    /Users/nick/Library/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.0/ios/Classes/FLTImagePickerPhotoAssetUtil.m:17:44: warning: 'UIImagePickerControllerReferenceURL' is deprecated: first deprecated in iOS 11.0 - Will be removed in a future release, use PHPicker. [-Wdeprecated-declarations]
      NSURL *referenceURL = [info objectForKey:UIImagePickerControllerReferenceURL];
                                               ^
    In module 'UIKit' imported from /Users/nick/projects/mobile-apps/flutter_video_editor_mvp/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:62:51: note: 'UIImagePickerControllerReferenceURL' has been explicitly marked deprecated here
    UIKIT_EXTERN UIImagePickerControllerInfoKey const UIImagePickerControllerReferenceURL API_DEPRECATED("Will be removed in a future release, use PHPicker.", ios(4.1, 11.0)) API_UNAVAILABLE(tvos); // an NSURL that references an asset in the AssetsLibrary framework
                                                      ^
    /Users/nick/Library/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.0/ios/Classes/FLTImagePickerPhotoAssetUtil.m:21:47: warning: 'fetchAssetsWithALAssetURLs:options:' is deprecated: first deprecated in iOS 11 - Will be removed in a future release [-Wdeprecated-declarations]
      PHFetchResult<PHAsset *> *result = [PHAsset fetchAssetsWithALAssetURLs:@[ referenceURL ]
                                                  ^
    In module 'Photos' imported from /Users/nick/Library/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.0/ios/Classes/FLTImagePickerPhotoAssetUtil.h:6:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/Photos.framework/Headers/PHAsset.h:74:1: note: 'fetchAssetsWithALAssetURLs:options:' has been explicitly marked deprecated here
    + (PHFetchResult<PHAsset *> *)fetchAssetsWithALAssetURLs:(NSArray<NSURL *> *)assetURLs options:(nullable PHFetchOptions *)options API_DEPRECATED("Will be removed in a future release", ios(8, 11), tvos(8, 11)) API_UNAVAILABLE(macos);
    ^
    2 warnings generated.
    /Users/nick/Library/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ffmpeg-0.3.1/ios/Classes/EmptyLogDelegate.m:25:17: warning: class 'EmptyLogDelegate' does not conform to protocol 'LogDelegate' [-Wprotocol]
    @implementation EmptyLogDelegate
                    ^
    /Users/nick/Library/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ffmpeg-0.3.1/ios/Classes/EmptyLogDelegate.m:25:17: note: add stubs for missing protocol requirements
    @implementation EmptyLogDelegate
                    ^
    1 warning generated.
    Plugin `path_provider_linux` doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.

    To set a default implementation, use:
    flutter:
      plugin:
        platforms:
          linux:
            default_package: <plugin-implementation>

    To implement an interface, use:
    flutter:
      plugin:
        implements: <plugin-interface>

    Plugin `path_provider_macos` doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.

    To set a default implementation, use:
    flutter:
      plugin:
        platforms:
          macos:
            default_package: <plugin-implementation>

    To implement an interface, use:
    flutter:
      plugin:
        implements: <plugin-interface>

    Plugin `path_provider_windows` doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.

    To set a default implementation, use:
    flutter:
      plugin:
        platforms:
          windows:
            default_package: <plugin-implementation>

    To implement an interface, use:
    flutter:
      plugin:
        implements: <plugin-interface>

    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1111:7: Error: Struct 'ENUMLOGFONTEX' is empty. Empty structs are undefined behavior.
    class ENUMLOGFONTEX extends Struct {
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2835:7: Error: Struct 'BLUETOOTH_PIN_INFO' is empty. Empty structs are undefined behavior.
    class BLUETOOTH_PIN_INFO extends Struct {
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2960:7: Error: Struct 'EXCEPINFO' is empty. Empty structs are undefined behavior.
    class EXCEPINFO extends Struct {}
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2966:7: Error: Struct 'PROPERTYKEY' is empty. Empty structs are undefined behavior.
    class PROPERTYKEY extends Struct {}
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2973:7: Error: Struct 'PROPVARIANT' is empty. Empty structs are undefined behavior.
    class PROPVARIANT extends Struct {}
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2978:7: Error: Struct 'SAFEARRAY' is empty. Empty structs are undefined behavior.
    class SAFEARRAY extends Struct {}
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2985:7: Error: Struct 'CLSID' is empty. Empty structs are undefined behavior.
    class CLSID extends Struct {}
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2992:7: Error: Struct 'STATSTG' is empty. Empty structs are undefined behavior.
    class STATSTG extends Struct {}
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2999:7: Error: Struct 'NLM_SIMULATED_PROFILE_INFO' is empty. Empty structs are undefined behavior.
    class NLM_SIMULATED_PROFILE_INFO extends Struct {}
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Error: Struct 'Utf8' is empty. Empty structs are undefined behavior.
    class Utf8 extends Struct {
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Error: Struct 'Utf16' is empty. Empty structs are undefined behavior.
    class Utf16 extends Struct {
          ^
    ../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Error: Expected type 'T' to be a valid and instantiated subtype of 'NativeType'.
      final int totalSize = count * sizeOf<T>();
                                    ^

    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the precompiled application for the device.

Error launching application on iPhone Nikola.
seel-channel commented 3 years ago

I don't where is the problem. I can't help you because I never development on Mac :(

nikage commented 3 years ago

In case someone have the same issue https://stackoverflow.com/questions/66338934/share-preference-package-of-flutter-show-error-after-update switch to dev $ flutter channel dev $ flutter upgrade

LeGoffMael commented 2 years ago

There is no problem building on macOs