flutter create foobar
cd foobar
ios/Runner.xcworkspace
and set up signingflutter run --local-engine ios_debug_unopt -d mydevice
-vOutput:
[ +592 ms
] Launching lib/main.dart on the Doom Melon in debug mode...
[ +1 ms] /Users/cbracken/.homebrew/bin/idevicesyslog
[ +2 ms] Building Runner.app for 956919950000126a7f5aaf03cbd5fbc18ac75e65
[ +7 ms] xcodebuild -version
[ +101 ms
] Exit code 0 from: xcodebuild -version
[ ] Xcode 8.3
Build version 8E162
[ +1 ms] python -c import six
[ +33 ms] Trying to resolve native pub services.
[ +1 ms] Looking for YAML at 'pubspec.yaml'
[ +37 ms] No services specified in the manifest
[ ] Found 0 service definition(s).
[ ] Copying service frameworks to '/Users/cbracken/src/text_input/ios/Frameworks'.
[ ] Creating service definitions manifest at 'ios/ServiceDefinitions.json'
[ +39 ms] pod --version
[ +362 ms
] pod --version
[ +360 ms
] Exit code 0 from: pod --version
[ ] 1.2.0
[ +1 ms] Running pod install...
[ +1 ms] [ios/] pod install
[ +663 ms
] Analyzing dependencies
Fetching podspec for `Flutter` from `/Users/cbracken/src/flutter/engine/src/out/ios_debug_unopt`
[!] No podspec found for `Flutter` in `/Users/cbracken/src/flutter/engine/src/out/ios_debug_unopt`
[ +2 ms] 'flutter run' took 4061ms.
Error running pod install: Exit code 1 from: pod install
#0 throwToolExit (package:flutter_tools/src/base/common.dart:29)
#1 _runPodInstall (package:flutter_tools/src/ios/mac.dart:365)
<asynchronous suspension>
#2 buildXcodeProject (package:flutter_tools/src/ios/mac.dart:156)
<asynchronous suspension>
#3 IOSDevice.startApp (package:flutter_tools/src/ios/devices.dart:205)
<asynchronous suspension>
#4 HotRunner.run (package:flutter_tools/src/run_hot.dart:200)
<asynchronous suspension>
#5 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:281)
<asynchronous suspension>
#6 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:151)
<asynchronous suspension>
#7 RunCommand.verifyThenRunCommand (package:flutter_tools/src/commands/run.dart:196)
<asynchronous suspension>
#8 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:121)
#9 CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:261)
<asynchronous suspension>
#11 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#12 Future.Future.sync (dart:async/future.dart:208)
#13 CommandRunner.run (package:args/command_runner.dart:109)
#14 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:157)
#15 run.<anonymous closure> (package:flutter_tools/executable.dart:140)
<asynchronous suspension>
#16 AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#17 AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#18 _rootRun (dart:async/zone.dart:1120)
#19 _CustomZone.run (dart:async/zone.dart:1001)
#20 runZoned (dart:async/zone.dart:1465)
#21 AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#22 run (package:flutter_tools/executable.dart:113)
<asynchronous suspension>
#23 main (package:flutter_tools/executable.dart:66)
<asynchronous suspension>
#24 main (file:///Users/cbracken/src/flutter/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#25 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
[ +46 ms] ensureAnalyticsSent: 38ms
[ +1 ms] exiting with code 1
/cc @jakobr-google is there something I need to do here on the engine side?
Based on ios/Podfile
, it looks like we're looking for a podspec for Flutter in $FLUTTER_FRAMEWORK_DIR
. When I run without --local-engine
, that env var appears to point at the cached engine location (bin/cache/artifacts/engine/ios
), where I see a Flutter.podspec
. When running with a local engine, it's pointing at the engine's build dir (in my case, /Users/cbracken/src/flutter/engine/src/out/ios_debug_unopt
), where I don't see that file.
I was able to hack around this by adding a symlink'ed Flutter.podspec in my local engine dir, but it'd be nice for this to work automatically. (Unless I'm missing a step somewhere?)
Yes, we should copy shell/platform/darwin/ios/framework/Flutter.podspec
to the engine's build dir when we build. I missed that when I added the file. The buildbot recipe uploads the file, which is why you see it in the cache.
Hi,
I had the same issue recently, however, I used a different approach.
I needed to update pods with pod update
Which got to to this error:
Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework
[!] Invalid 'Podfile' file: Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework.
# from /path-to/flutter/examples/platform_view/ios/Podfile:5
# -------------------------------------------
# if ENV['FLUTTER_FRAMEWORK_DIR'] == nil
> abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework')
# end
# -------------------------------------------
After a bit of search on DuckDuckGo I tried this for a solution
export FLUTTER_FRAMEWORK_DIR=/path-to/flutter/bin/cache/artifacts/engine/ios
and reran pod update
and flutter run
This seemed to work!
Is there a better method to solve this ?
Thanks
Most helpful comment
Hi,
I had the same issue recently, however, I used a different approach.
I needed to update pods with
pod update
Which got to to this error:
After a bit of search on DuckDuckGo I tried this for a solution
export FLUTTER_FRAMEWORK_DIR=/path-to/flutter/bin/cache/artifacts/engine/ios
and reran
pod update
andflutter run
This seemed to work!
Is there a better method to solve this ?
Thanks