Testing experience of Swift framework on Xcode 6

Testing experience of Swift framework on Xcode 6

[[121714]]

I spent most of the summer figuring out what Swift can do as a functional programming language, and now I have moved on to using Swift to develop libraries. I spent a day and found that the Swift feature exploration I did before was quite enjoyable. I found that I still need to learn how to do some of the most basic chores. Here are some of the problems I encountered under the default framework test settings.

I had some issues when I was creating a new Cocoa framework project in Swift. However, with the default settings, these problems only occur when testing. You may mistakenly think that after completing an app, pressing "Cmd+U" will run the test, but you are wrong. At this time, most of the options in the "Product" menu are unavailable, and when you try to use shortcuts, you will suddenly hear a prompt sound that makes your heart sink like "You can't do this operation".

Because by default, the test package is not added to the test configuration of the framework build scheme. The solution is to name your framework "test" (as I did), then select it and click "Edit Scheme...":

Then go to the "Test" option and click the "+" button in the lower left corner of the detailed interface on the right:

Select your test package (now you know why I named it test):

Now all the test shortcuts are back and you can start working (if the run shortcuts don't work then it's just because your framework itself can't run).

Happy testing!

via: nomothetis.svbtle.com

<<:  iOS programmer interview questions to pay attention to

>>:  APP development management measures will be issued and APP development may require annual filing and review

Recommend

The creature on earth that can "drink" the most is actually the bumblebee!

In a corner of nature Hidden a shocking secret Th...

iOS 9 Human Interface Guidelines: UI Design Basics

1.1 Designing for iOS iOS embodies the following ...

Tik Tok Operation: The content code behind Tik Tok’s popularity!

What’s the secret behind Tik Tok’s popularity? Ti...

Ye Maozhong's Marketing Strategy Notes

1. Tribute to Mr. Ye Maozhong There is one thing ...

Thor 911 Black Phantom Review: The absolute power of gaming notebooks

Intel probably really loves Raytheon, because Ray...

How did the short video app “Tik Tok” become popular?

If I were to say which APP is the most popular in...

Sony follows Samsung and completely abandons OLED TVs to focus on 4K LCD

In order to save itself, Japan's Sony is unde...

How to play short video live streaming? Tips for live streaming operations!

At the end of 2019, short video e-commerce live s...

We may find the secret to preventing cancer from elephants and blue whales

Cancer is essentially a disease caused by gene mu...

Who is the next BAT?

Open Google, set a time range, search for the key...