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
url_launcher won't run on iOS emulator #16864
Comments
Podfile: # 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'
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
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf Pods/.symlinks')
system('mkdir -p Pods/.symlinks/flutter')
system('mkdir -p Pods/.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('Pods', '.symlinks', 'flutter', File.basename(p[:path]))
File.symlink(p[:path], symlink)
pod 'Flutter', :path => symlink
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('Pods', '.symlinks', 'plugins', File.basename(p[:path]))
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['ENABLE_BITCODE'] = 'NO'
end
end
end |
I solved this by downgrading cocoapods to version 1.4, deleting the Pods folder, then building again. |
Any other solution as to downgrade. |
Similar to #17899 |
Update Created #27893 Dears, I am struggling with this issue. Please help. url_launcher: ^5.0.1
Launching
Flutter doctor
|
@Sirrr please try #16049 (comment) |
Thanks again @zoechi. The answer is below: |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Issue
When trying to run my app on the iOS emulator, I get the follow error:
Steps to Reproduce
Add url_launcher to pubspec.yaml
Import the library and call it from code.
Run it on an android emulator:
Try it in the emulator, it works fine.
Run it in the iOS emulator, it won't run:
Logs
Run your application with
flutter run
and attach all the log output:buildlog.txt
Run
flutter analyze
and attach any output of that command also.Flutter Doctor
Paste the output of running
flutter doctor -v
here.Any help would be appreciated.
Note that I have installed the missing components that flutter doctor was complaining about for completeness, and the issue still stands.
The text was updated successfully, but these errors were encountered: