> For the complete documentation index, see [llms.txt](https://uxper.gitbook.io/app-flutter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://uxper.gitbook.io/app-flutter/faq-1/can-not-run-on-device-but-simulator-can-work-well.md).

# Can not run on device, but simulator can work well

```
Xcode's output: 
↳ 
note: Using new build system 
note: Building targets in parallel 
note: Planning build 
note: Constructing build description
error: Building for iOS Simulator, but the linked and embedded framework 'App.framework' was built for iOS. (in target 'Runner' from project 'Runner')

Could not build the application for the simulator.
Error launching application on iPhone 11.
```

#### **Condition**&#x20;

Xcode >= 11.4

#### Quick Solved

`rm -rf ios/Flutter/App.framework`

Run this command and run project again.

#### Official Solved

<https://flutter.dev/docs/development/ios-project-migration>

1. From the Flutter app directory, open ios/Runner.xcworkspace in Xcode.
2. In the Navigator pane, locate the Flutter group and remove App.framework and Flutter.framework. [![enter image description here](https://i.stack.imgur.com/WphmT.png)](https://i.stack.imgur.com/WphmT.png)
3. In the Runner target build settings Build Phases > Link Binary With Libraries confirm App.framework and Flutter.framework are no longer present. Also confirm in Build Phases > Embed Frameworks.

[![enter image description here](https://i.stack.imgur.com/e7gVy.png)](https://i.stack.imgur.com/e7gVy.png)

4\. Change the Runner target build settings Build Phases > Thin Binary script as follows:

> /bin/sh "$FLUTTER\_ROOT/packages/flutter\_tools/bin/xcode\_backend.sh" embed
>
> /bin/sh "$FLUTTER\_ROOT/packages/flutter\_tools/bin/xcode\_backend.sh" thin

[![enter image description here](https://i.stack.imgur.com/UVrtm.png)](https://i.stack.imgur.com/UVrtm.png)

5\. In the Runner target **Build Settings > Other Linker Flags**

(OTHER\_LDFLAGS) add $(inherited) -framework Flutter

[![enter image description here](https://i.stack.imgur.com/bVOva.png)](https://i.stack.imgur.com/bVOva.png)

Hope it helps!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://uxper.gitbook.io/app-flutter/faq-1/can-not-run-on-device-but-simulator-can-work-well.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
