title: Flutter audio_service dependancy issue in iOS
body: <p>I'm adding <a href="https://pub.dartlang.org/packages/audio_service" rel="noreferrer"><code>audio_service</code></a> package for run audio in background. in android it works but author hasn't implement in iOS so getting below error when run app in iOS.</p>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>Launching lib/main.dart on iPhone 8 Plus in debug mode...
    Running pod install...
    CocoaPods' output:
    ↳
          Preparing</p>
  </blockquote>
  
  <pre><code>Analyzing dependencies
  
  Inspecting targets to integrate
    Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
  
  Finding Podfile changes
    A audio_service
    A audioplayer
    M Flutter
    - audio_player_service
    - url_launcher
  
  Fetching external sources
  -&gt; Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
  -&gt; Fetching podspec for `audio_player_service` from `.symlinks/plugins/audio_player_service/ios`
  -&gt; Fetching podspec for `audio_service` from `.symlinks/plugins/audio_service/ios`
  [!] No podspec found for `audio_service` in `.symlinks/plugins/audio_service/ios`
  
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/external_sources/path_source.rb:14:in `block in fetch'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:85:in `titled_section'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:697:in `fetch_external_source'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:673:in `block (2 levels) in fetch_external_sources'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:672:in `each'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:672:in `block in fetch_external_sources'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:671:in `fetch_external_sources'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:85:in `analyze'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:243:in `analyze'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:116:in `install!'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/bin/pod:55:in `&lt;top (required)&gt;'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/bin/pod:22:in `load'
  /usr/local/Cellar/cocoapods/1.5.3/libexec/bin/pod:22:in `&lt;main&gt;'
  </code></pre>
  
  <p>Error output from CocoaPods:
  ↳
      [!] The version of CocoaPods used to generate the lockfile (1.6.0) is higher than the version of the current executable (1.5.3). Incompatibility issues may arise.</p>
  
  <pre><code>[!] 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`.
  </code></pre>
  
  <p>Error running pod install
  Error launching application on iPhone 8 Plus.</p>
  
  <p><strong>Below is pod file :</strong></p>
  
  <pre><code># Uncomment this line to define a global platform for your project
  # platform :ios, '9.0'
  
  # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
  ENV['COCOAPODS_DISABLE_STATS'] = 'true'
  
  project 'Runner', {
    'Debug' =&gt; :debug,
    'Profile' =&gt; :release,
    'Release' =&gt; :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 =&gt; podname, :path =&gt; podpath});
        else
          puts "Invalid plugin specification: #{line}"
        end
    }
    return pods_ary
  end
  
  target 'Runner' do
    # 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 =&gt; 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 =&gt; 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['ENABLE_BITCODE'] = 'NO'
      end
    end
  end
  </code></pre>
  
  <p>Here I also change pod file to <code>if p[:name] != 'audio_service'</code></p>
  
  <pre><code># Plugin Pods
    plugin_pods = parse_KV_file('../.flutter-plugins')
    plugin_pods.map { |p|
      if p[:name] != 'audio_service'
        symlink = File.join('.symlinks', 'plugins', p[:name])
        File.symlink(p[:path], symlink)
        pod p[:name], :path =&gt; File.join(symlink, 'ios')
      end
    }
  </code></pre>
  
  <p>But didn't work.</p>
  
  <p>How can I solve this issue? Can we put restrictions in subspace.yaml file? like this dependency only install on android platform? anyways I just looking to fix it.</p>