Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error detected in pubspec.yaml when including Flame #3

Closed
andreugrimalt opened this issue Nov 20, 2017 · 5 comments
Closed

Error detected in pubspec.yaml when including Flame #3

andreugrimalt opened this issue Nov 20, 2017 · 5 comments

Comments

@andreugrimalt
Copy link

Hi @luanpotter,

First of all thanks for making this tool, looks amazing and just what I need.

I'm having an issue when I add Flame as a dependency.

This is how my pubspec.yaml looks like:

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^0.1.0
  cloud_firestore: ^0.0.3
  firebase_auth: ^0.3.1
  flame: ^0.6.2

I run flutter packages get which exits with 0.

Then I run flutter run and I get the output below:

Launching lib/main.dart on iPhone X in debug mode...
Error detected in pubspec.yaml:
#/properties/flutter: type: wanted [object] got null
Running pod install...                                2.8s
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

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

    Finding Podfile changes
      A audioplayers
      A path_provider
      M cloud_firestore
      - Flutter
      - firebase_auth

    Fetching external sources
    -> Fetching podspec for `Flutter` from `/Users/andreu/flutter/bin/cache/artifacts/engine/ios`
    -> Fetching podspec for `audioplayers` from `/Users/andreu/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.3.0/ios`
    -> Fetching podspec for `cloud_firestore` from `/Users/andreu/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.0.4/ios`
    -> Fetching podspec for `firebase_auth` from `/Users/andreu/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.3.1/ios`
    -> Fetching podspec for `path_provider` from `/Users/andreu/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios`

    Resolving dependencies of `Podfile`

    Comparing resolved specification to the sandbox manifest
      A audioplayers
      A path_provider
      - BoringSSL
      - Firebase
      - FirebaseAnalytics
      - FirebaseAuth
      - FirebaseCore
      - FirebaseDatabase
      - FirebaseFirestore
      - FirebaseInstanceID
      - Flutter
      - GTMSessionFetcher
      - GoogleToolboxForMac
      - Protobuf
      - cloud_firestore
      - firebase_auth
      - gRPC
      - gRPC-Core
      - gRPC-ProtoRPC
      - gRPC-RxLibrary
      - leveldb-library
      - nanopb

    Downloading dependencies

    -> Using BoringSSL (9.0)

    -> Using Firebase (4.5.0)

    -> Using FirebaseAnalytics (4.0.4)

    -> Using FirebaseAuth (4.3.1)

    -> Using FirebaseCore (4.0.10)

    -> Using FirebaseDatabase (4.1.0)

    -> Using FirebaseFirestore (0.9.1)

    -> Using FirebaseInstanceID (2.0.5)

    -> Using Flutter (1.0.0)

    -> Using GTMSessionFetcher (1.1.12)

    -> Using GoogleToolboxForMac (2.1.3)

    -> Using Protobuf (3.4.0)

    -> Installing audioplayers (0.0.1)

    -> Using cloud_firestore (0.0.1)

    -> Using firebase_auth (0.0.1)

    -> Using gRPC (1.6.5)

    -> Using gRPC-Core (1.6.5)

    -> Using gRPC-ProtoRPC (1.6.5)

    -> Using gRPC-RxLibrary (1.6.5)

    -> Using leveldb-library (1.20)

    -> Using nanopb (0.3.8)

    -> Installing path_provider (0.0.1)
      - Running pre install hooks
    [!] Pods written in Swift can only be integrated as frameworks; add `use_frameworks!` to your Podfile or target to opt into using it. The Swift Pod being used is: audioplayers

    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:115:in `block (2 levels) in verify_framework_usage'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:110:in `each'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:110:in `block in verify_framework_usage'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:107:in `each'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:107:in `verify_framework_usage'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:38:in `validate!'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:405:in `validate_targets'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:118:in `install!'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/command/install.rb:41:in `run'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/bin/pod:23:in `load'
    /usr/local/Cellar/cocoapods/1.3.1/libexec/bin/pod:23: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.

flutter --version gives me this output:

Flutter • channel master • https://github.com/flutter/flutter.git
Framework • revision 3914214641 (3 weeks ago) • 2017-11-01 22:31:29 -0700
Engine • revision 88cf09ffe6
Tools • Dart 1.25.0-dev.11.0

Am I missing anything?

@feroult
Copy link
Contributor

feroult commented Nov 20, 2017

Hi @andreugrimalt

Check the file ios/Podfile. It should have use_frameworks! as the first command of the target 'Runner' do block.

Like this:

target 'Runner' do
  use_frameworks!

  # Pods for Runner
  /// ...

@luanpotter
Copy link
Member

Let's add that instruction to the README in a visible place.

@feroult
Copy link
Contributor

feroult commented Nov 20, 2017

@luanpotter I think I've found a better solution.

Look this commit on audioplayers.

There was a unnecessary swift file forcing the calling of use_frameworks!.

I did some tests and it is not necessary anymore. The problem will be solved in the next release of both libs.

Regards

@andreugrimalt
Copy link
Author

Thanks @feroult !

@luanpotter
Copy link
Member

Nice, @feroult ! I'm closing this and the related audioplayers issue, if anything else arises, please let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants