flutter iOS build failed (ld: library not found fo

2019-03-06 01:54发布

问题:

I am new to flutter. I have created small flutter app and i wanna test it on my real devices but i am unable to generate ios ipa file for testing. Please if anyone could help me with this issues then it would be good for me.thanks in advance!! I getting this error . :

*iMac:test_app snehal$ flutter build ios
Building com.org.testApp for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: 5GC7G69Y22
Starting Xcode build...                                          
Xcode build done.                                            5.1s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:

=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
ld: library not found for -lPods-Runner
clang: error: linker command failed with exit code 1 (use -v to see invocation) Encountered error while building for device.*

回答1:

In new projects, in the iOS part is necessary to adjust a few parameters, such as signing, and that you can only do in Xcode.

So, try to open the iOS project with Xcode and try to build it from there. You'll see better warning and error messages there, specially regarding signing.

You can open Xcode and locate your project ios folder, or:

cd yourproject/ios
open -a Xcode . 

Then select Product > Run in the menu.