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

No platform was specified #6

Open
BriscoPeas93 opened this issue Jun 6, 2019 · 5 comments
Open

No platform was specified #6

BriscoPeas93 opened this issue Jun 6, 2019 · 5 comments

Comments

@BriscoPeas93
Copy link

The plugin is working perfectly on android. but when I try to run the app on IOS it fails.

[!] Automatically assigning platform ioswith version9.1on targetRunnerbecause no platform was specified. Please specify a platform for this target in your Podfile. Seehttps://guides.cocoapods.org/syntax/podfile.html#platform`.`

Help please.

@CampbellJCravens
Copy link

I am having the same error for iOS

@lauralarez
Copy link

lauralarez commented Jul 30, 2019

Hi, I had the same issue, I fixed it by adding this to the podfile on iOS/Runner:

use_frameworks! #on top of the file

pre_install do |installer|
  installer.analysis_result.specifications.each do |s|
    s.swift_version = '4.1' unless s.swift_version
  end
end

# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true

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

Code from https://github.com/pichillilorenzo/flutter_inappbrowser/issues/15#issuecomment-454083666

@CampbellJCravens
Copy link

CampbellJCravens commented Jul 30, 2019 via email

@vikasbaru
Copy link

Thanks for your message! Sadly the issue is still happening for me. I tried adding your code in many different spots in the Podfile, but none of them worked. I continue to get these this error: [!] Unable to determine Swift version for the following pods: - ‘flutter_appavailability’ 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. I would have thought your solution to add config.build_settings['SWIFT_VERSION'] = '4.1' # required by simple_permission would have resolved this, however it doesn’t seem to be resolving it for me after all. Again I really appreciate your help!

On Jul 30, 2019, at 8:57 AM, lauralarez @.***> wrote: # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. install! 'cocoapods', :disable_input_output_paths => true

Did you find the solution?

@samlotti
Copy link

I also have this issue. I tried adding the following to the pod file but doesn't help:

use_frameworks!   # At the top of the file


pre_install do |installer|
  installer.analysis_result.specifications.each do |s|
    s.swift_version = '4.2' unless s.swift_version
  end
end

# in post install added this
config.build_settings['SWIFT_VERSION'] = '4.2'

Running xcode 11.1

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

5 participants