Dyld ' dyld_fatal_error error occurred in iOS real-computer test

Source: Internet
Author: User
Tags md5 encryption

Recently entered a new company and took over a project previously undertaken by an outsourced company. First spit trough a project quality, alas after all also suppressed for a long time.

1. The start-up project is not open, all the framework static library all floating red, a compile seventy or eighty error. It is unclear whether the end is lazy or what. Eventually, one after another, the static library framework was imported into building phases, and many unexpected errors occurred. If anyone is interested in this, we can talk about these questions next time.

2. Project Code classification encapsulation problem. The project was written in Swift, and I used to use a lot of objective-c,swift, the impression of Swift is: an upgrade Xcode full screen red dot, all kinds of three-party library need to use bridge to connect, and so on and so on. Of course, this is not the main slot, after all, Swift is a big trend, the iOS developers look forward to, Swift is a must understand familiar to proficient. But it seems that there are not many companies that are directly using Swift to write at the moment, most of which are OC slowly switching to Swift. Write the project directly with Swift, it must be the great God. I began to look at the code with such an appreciative eye. Then I wanted to slap myself on my own judgment.

All the code is not categorized, except for the large MVC framework, where the controllers of each of the smaller modules are mixed in one directory. Then the name of the class, the first letter of the size of the word, the direct Hanyu Pinyin kongtiaocontroller all come out. I'm going to have to kill myself for a compulsive disorder. A week of work progress is not much, all to distinguish all kinds of inexplicable class name, method name parameter up.

Encapsulation of the code. Example: Project is to use POST request data, parameters before uploading need MD5 encryption, about 30 lines of code around. Generally this kind of which class inside are likely to use the code, write a tool class to execute on the finished son, the code looked at worry, high reuse rate. No, you can copy and paste each page, change a parameter, the other is not changed to copy and paste. The first time to see a kind of smashing computer impulse, I think we all understand.

That's probably all that's involved. Anyway, take the boss's money, just look at the code. After pitch darkness changed the code for a week, the boss said, "pack and upload." I said do a real machine test, the boss waved, go. I'm just going to come back and prepare for the five-minute real-machine test package, the result is the following problem: In Build Success, the real machine opens the startup page, the program crashes, prompting the following:

Because it is to solve the way to write blog post, there is no problem, now also dare not to change back. My mistake is log in pods.framework replaced with Swifthttp. when I saw it, my heart collapsed. What the hell is this? Swifthttp itself is not so familiar to me as the framework, plus I do not know what the specific causes of this problem. Get it, Google Bar.

These solutions are likely to appear in the end:

1.clean&run, No. Restart your phone Clean&run

I have nothing to do with the sight of some great God's character. To help the old granny more.

Re-importing swifthttp in 2.Build phases

Nothing has happened.

3.SwiftHTTP required for optional optional

This is the most frequently mentioned approach, and many people seem to have solved the problem successfully with this method. Presumably the explanation is that the framework used does not support a low version, so it is set to optional to configure whether it is available.

Ah this is an idea, suddenly I went to see my deployment Target, is 9.0. Is this the problem here?

First, 9.0 replaced with 9.3, install, continue to crash.

Required replaced optional, compile error, the specific problem forget, probably is link not to frame.

9.3 to 9.0, the compilation continues to error. Oh, give up.

4. In a corner found such a humble sentence: Dfulibrary.framework Static library is added under the embedded binaries

The answer, of course, was to move the framework inside the embedded binaries into the build phases, and I was there in embedded binaries in addition to swifthttp the rest of the static libraries. Is that the problem?

Try to import swifthttp, run, crash in embedded binaries. Hey I went to set up required and optional, but unexpectedly found that there are two swifthttp in build phases. Does the embedded binaries automatically import build phases? I tried to delete and run successfully.

A five-minute real-computer test has been around all day. Alas, there is no way of encountering this kind of unintelligible collapse.

Still do not know why this, this is only a solution, the principle of the great God told it.

Dyld ' dyld_fatal_error error occurred in iOS real-computer test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.