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

Problem building in IOS #7

Closed
felpsio opened this issue Mar 6, 2019 · 6 comments
Closed

Problem building in IOS #7

felpsio opened this issue Mar 6, 2019 · 6 comments

Comments

@felpsio
Copy link

felpsio commented Mar 6, 2019

Not sure if is the same problem than the other issue. But, I tried to use and I'm facing this problem when building the project:

Launching lib/main.dart on iPhone XR in debug mode...
CocoaPods' output:

Preparing
Analyzing dependencies
Inspecting targets to integrate
Using ARCHS setting to build architectures of target Pods-Runner: (``)
Finding Podfile changes
A simple_share
- Flutter
- camera
- cloud_firestore
- firebase_auth
- firebase_core
- firebase_storage
- flutter_facebook_login
- google_sign_in
- image_picker
- path_provider
- shared_preferences
Fetching external sources
-> Fetching podspec for Flutter from `.symlinks/flutter/ios`
-> Fetching podspec for `camera` from `.symlinks/plugins/camera/ios`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
-> Fetching podspec for `firebase_storage` from `.symlinks/plugins/firebase_storage/ios`
-> Fetching podspec for `flutter_facebook_login` from `.symlinks/plugins/flutter_facebook_login/ios`
-> Fetching podspec for `google_sign_in` from `.symlinks/plugins/google_sign_in/ios`
-> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`
-> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
-> Fetching podspec for `simple_share` from `.symlinks/plugins/simple_share/ios`
Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "simple_share":
In Podfile:
simple_share (from `.symlinks/plugins/simple_share/ios`)
Specs satisfying the `simple_share (from `.symlinks/plugins/simple_share/ios`)` dependency were found, but they required a higher minimum deployment target.
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/resolver.rb:91:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer/analyzer.rb:909:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer/analyzer.rb:907:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer/analyzer.rb:114:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:266:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:174:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:173:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:136:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command/install.rb:48:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `

'
Error output from CocoaPods:

Ignoring bindex-0.5.0 because its extensions are not built. Try: gem pristine bindex --version 0.5.0
Ignoring bootsnap-1.3.0 because its extensions are not built. Try: gem pristine bootsnap --version 1.3.0
Ignoring byebug-10.0.2 because its extensions are not built. Try: gem pristine byebug --version 10.0.2
WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8

Ignoring duktape-1.6.1.0 because its extensions are not built.  Try: gem pristine duktape --version 1.6.1.0
Ignoring ffi-1.9.23 because its extensions are not built.  Try: gem pristine ffi --version 1.9.23
Ignoring json-2.1.0 because its extensions are not built.  Try: gem pristine json --version 2.1.0
Ignoring msgpack-1.2.4 because its extensions are not built.  Try: gem pristine msgpack --version 1.2.4
Ignoring nio4r-2.3.1 because its extensions are not built.  Try: gem pristine nio4r --version 2.3.1
Ignoring nokogiri-1.8.2 because its extensions are not built.  Try: gem pristine nokogiri --version 1.8.2
Ignoring puma-3.11.4 because its extensions are not built.  Try: gem pristine puma --version 3.11.4
Ignoring unf_ext-0.0.7.5 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.5
Ignoring websocket-driver-0.7.0 because its extensions are not built.  Try: gem pristine websocket-driver --version 0.7.0
[!] 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 XR.
Exited (sigterm)

@lakexyde
Copy link

Hello @felipecesar42
You might need to add the following to your Podfile

platform :ios, '10.0'

And then:

target 'Runner' do
  use_frameworks! #<----- add this
...

And then:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['SWIFT_VERSION'] = '3.2' #<-------  Add this
...

Hope it helps.

@felpsio
Copy link
Author

felpsio commented Mar 15, 2019

thanks @lakexyde . I solved the issue the way you recommended :). It would be great to have this on the documentation :)

@giandifra
Copy link
Owner

add to documentation
thanks

@glennmichaelmejias
Copy link

I followed your way. But still get this error.

[!] Unable to determine Swift version for the following pods:

- `simple_share` 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.

@glennmichaelmejias
Copy link

glennmichaelmejias commented Apr 11, 2019

here is my pod file

platform :ios, '10.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
      plugin = line.split(pattern=separator)
      if plugin.length == 2
        podname = plugin[0].strip()
        path = plugin[1].strip()
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname, :path => podpath});
      else
        puts "Invalid plugin specification: #{line}"
      end
  }
  return pods_ary
end

target 'Runner' do
  use_frameworks!
  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')

  # Flutter Pods
  generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
  if generated_xcode_build_settings.empty?
    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
  end
  generated_xcode_build_settings.map { |p|
    if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
      symlink = File.join('.symlinks', 'flutter')
      File.symlink(File.dirname(p[:path]), symlink)
      pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
    end
  }

  # Plugin Pods
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.map { |p|
    symlink = File.join('.symlinks', 'plugins', p[:name])
    File.symlink(p[:path], symlink)
    pod p[:name], :path => File.join(symlink, 'ios')
  }
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      # config.build_settings['SWIFT_VERSION'] = '4.1'
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['SWIFT_VERSION'] = '3.2'
    end
  end
end```

@felpsio
Copy link
Author

felpsio commented Apr 11, 2019

your podfile looks good to me. Have you tried flutter clean?

Anyway... I'm using https://pub.dartlang.org/packages/share_extend now

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

4 participants