I don’t know when I have always wanted to develop an ios app. I have been using UniApp before, but I always felt that the experience of UniApp was not very good, and there were many pitfalls for development, especially for ios development, so I gave up UniApp decisively.

But what’s good about giving up Uniapp and choosing…..

Weex, RN, NC, or Flutter?

Since I only know Vue, I refer to the recommendation of mobile terminal on the official website of Vue

Originally, I wanted to choose NC, but our project manager said that there were a lot of holes and compatibility problems, so I gave up. RN was not good, Weex was cool, and finally I had to choose Flutter (mainly because the name of Flutter was also very good).

After completing the first ancestral Hello World, I couldn’t wait to put it on my mobile phone, but I found it was not as simple as I thought…. Later Baidu for a long time all cannot solve, precipitate after a few days, tried again…. This time it worked, but on this attempt I know why it didn’t work before, for the record.

Specific steps

  1. Terminal operationflutter dectorCheck to see if any necessary plugins are missing, mainly look at the ios part, if not, as long as all of them are checked, if any of them are not checked, need to deal with separately.

2. Connect your phone to your computer. When you open Android Studio, you will see your phone in the Run Devices option.

3. Configure the project developer information in Xcode

  • First, we need to open Runner. Xcodeproj in the project with Xcode. When we first open it, the right content area will show No Editor, and then we need to click Runner in the left navigation bar

  • Step 2: Click on Runner, Signing & Capabilities, and you’ll see the following page (the old XcodeSigning will be in General).

  • Step 3: Add an Apple account. , add after the completion of the problem is like this, pay attention to the red box selected that part, most of the documents on the Internet do not say this point, here is the need to choose their own machine, otherwise it will fail to verify.

  1. So far, Xcode has been configured, so let’s go back to Android Studio, select your phone, hit Run, and if all goes well, you’ll see your project running in no time.
  2. The first time you run it, it usually fails, and you need to go to Settings – general – Device Management on your phone to verify your application
  3. There is also an issue that may arise. When we restart the project after verifying the application, we will have a popup message that ‘flutter does not open “iProxy” because we cannot verify the developer. If this problem occurs, you can solve it in the following two ways.
  • First, open the terminal and execute inside (note to change the path inside)sudo xattr -d com.apple.quarantine [your_flutter_path]/bin/cache/artifacts/usbmuxd/iproxy
  • Second, go to the project root directory and execute the following commands in turn:
    rm -rf build
    flutter clean
    flutter build ios --debug
    Copy the code