the Internet Windows Android

Create your first application for iPhone. How to create an iOS application and blow up AppStore: techniques, instructions, tips

Sphere computer technology Now he is developing rapidly. In order to put the whole condition, now it is not necessary to work around the clock - enough to come up an interesting idea, Collect the developer command, create an iOS application and lay it out on the App Store.

Prospects for creating and publishing applications for iOS

As young developers neither behaved their hopes, a little pleasant in the application market. From a variety of projects, not many are popular. One uncommon American company EPP promo conducted a marketing study and received these results: the majority of the application creators have stated that 60% of games do not bring money at all, and 82% say that they cannot feed themselves. Consequently, they have to work somewhere else.

Apple company declares that their playground - a good place For such a kind of earnings, but in the fact of the case are different. In order to make money (well, or at least do not go into minus), you need to get into the top 100 or top 200. Other developers explain this phenomenon by the fact that people will simply be too lazy to shed far down in order to find the product you offer. If you did not scare the above and you still want to create your application - go further.

How to create an iOS application and lay it out in the app store

Let's figure out what needs to be done to get the application and start earning on it.

How to install Xcode development environment

Create an application in Xcode

  1. How to create a new project. Open the application. Next, select the "File" menu and click on "Create new file." Click on the application (Application) under the "iOS" on the left in the window. Go to the template section. Click on empty application (Empty Application).

    In the program interface, choose "Single New Application"

    2. Creating a storyboard. Storyboard is responsible for displaying application screens in your program. Storotorboards display what is on each separate window and show their interaction. This thing makes it possible to work well your game. Next, we do the following: Select the file, then NEW, then the file. Next, click on "User Interface". Click on the storyboard, choose "Next". In the Device menu, select the device for which your program is intended. In my case - I Phone. We call the Main object.

    In StoryBoard, select the device

    3. We assign a storyboard to your project. Now we assign a storyboard as the main interface of our program. If you do everything correctly, the storyboard will be available immediately when we launch our program. Here, how to act: Select the name of your file in the left tab, click targets and select your project from this header. Go to the "Generals" menu and select "Deployments Info". In Main Interface, we enter main.Storyboard and go to the next step.

    We enter "main.StoryBoard"

    4. Add the first screen. For this we need a type controller. With the help of them, we will be able to generate an approximate view of the application. Initially, you can explore the view controllers and select them from several presets. If suddenly you are a kettle in this business, then it is better to choose from existing ones. So we will see how the application will look like in the hands of an ordinary user. Choose "Mains StoryBoards". We find Object Library. At the bottom of the right part, you can choose this most Object Library. To the right you will see the window that appears, which is called canvas. Drag the "Views Controller" there. When a user launches the application, it will see the boot window. Congratulations!

    Add the first screen in the view controller panel.

    5. Add objects to our screen. After selecting the type controller, you can add objects to your application. They can be found in all the same Object Library. This library can be found inside the type controller.

    Then add to our screen interface objects

    6. Change the added objects. Via simple tools You have the ability to change the interface, which will allow you to give the application of beauty and individuality. In addition, you can add text-tip for the user to help him understand the game. You can also change the size of objects, the font of the text and so on.

    Create an individual interface and change the properties of objects

    7. Adding additional screens. Your application cannot consist of one screen - it simply makes no sense. Therefore, you will need to create them yourself. This is done extremely simple - the view controller on the empty part of the screen.

    Dragging the view controller on the empty part of the canvas

    8. Activate "Navigation Controller". We will use this feature to move between several windows. Achieved using Navigation Controller. Navigation Bar is added at the top of the program. Remember, Navigation Controller is added strictly to the initial screen for monitoring moving throughout the rest of the windows. To do this, select the boot screen. Click on Editor, then on Embed In, then poke on Navigation Controller. After the steps done, the navigation panel appears.

    Adjust the instructions navigation panel

    9. Add Navigation Controller functionality. When the navigation menu was created, you need to add tools to it. With this feature, the user will be able to "move" by application from one place to another. We offer add standard functionality. Add a header (for this you need to open the Navigation Item item, and then attributes inspector, then enter the title), Navigation Button and provide the properties buttons.

    Adding a functional on the panel

    10. We associate the screen with the button. To bind the buttons, press Ctrl, and then drag it to your next screen. Soon the Action Segue item will come out with available options. Select "Push" to move through the windows.

    Binding buttons with screen

    11. With the following steps, you can create a program with a very primitive functionality and interface. If you still want to create a really interesting application with the ability to process data - learn Objective C.

    It's time to start learning the programming language

How to test the created application


How to publish


Possible problems and ways to solve them

In the process of verification, your application may not miss due to the fact that it will not pass the initial tests. In this case, Apple will send you possible solutions to the problems associated with the work of the program. Listen to them and send an application to check again.

Do not forget to follow the sales. You can do this using iTunes Connect Mobile. Apple will periodically send you notifications with sales analytics, but will not be superfluous. Successes to you and big sales!

Well, it's time to write to us your first program for our iPhone. If you have not yet set yourself xcode + iPhone SDK - then you. And so, the Xcode cost us and set up, let's start?

To begin with, learn how simpler. Create a program in which there will be one text field into which we will write to our name and one button, by pressing which our name will be recorded in a greeting. Our first program will look like this:

Create our first and hope not the last project:

Next we will ask what type of application to create. On the left in the panel choose iPhone OS -\u003e Application And in the central window, choose the type of project View-Based Application. Let's call our first program, let's say FirStapp

As a result, we create a project with an already created controller (the first window of our program)

The main window of the project looks like this:

Xcode created for us the first controller, these are two files called FirstappViewController.h and FirstappViewController.m

FIRSTAppViewController.h file acts as a header (from there and extension of the file.h from the word Header) in it we will announce the variables and methods that we will use in the main FIRStappViewController.m file

And so, open the FIRStappViewController.h file and create two pointers:

Iboutlet uilabel * username;

The first USERNAME variable is a text label in which we will record our name. Nikfield is a text field where we will read our name.

Write it is needed in the block @Interface FirstappViewController: uiViewController ()

We will also create a method that will call when you click on the button to introduce yourself. Let's call the SETNIK method:

- (IBACTION) SETNIK;

As a result, our FirStappViewController.h file should look like this:

#Import @Interface FirStappViewController: UIViewController ( Iboutlet uilabel * username; IBOUTLET UITEXTFIELD * NIKFIELD; ) - (ibaction) setnik; @end.

Now, let's go to the file FIRStappViewController.m

Add our SETNIK method here. Need to write after a line @Implementation FirstappViewController.

- (IBACTION) SETNIK ( username.text \u003d nikfield.text; }

Here we prescribe that when performing this method, text from the Nikfield field will be recorded in the UserName textbook.

We also need to free up memory from these pointers after we use them. This is done in the method called dealoc.

- (void) dealloc (;;;)

Just add all the pointers that used, here in this format:;

Now, open the FIRStappViewController.xib interface file, it starts in the Interface Builder interface editor.


From the library of the components, drag the components you need into the window of our program and arrange as convenient. Further in a small window, select File's Owner and press Command + 2 that transfers us to the Connections Inspector menu. We see the list of our pointers, which we have already been prescribed, and on the right of them empty mirrox. Clay on an empty circle near the Nikfield pointer and not releasing the drain to the text field. When we sum up a mouse pointer to the network, it will be burned with a rectangle and let go. Thus, we tied this field to the Nikfield pointer. Now we will do the same with the username pointer and pulls it onto the text where we want to see our nickname (in my picture it is the text% username%). Even below, we see our SETNIK method and associate it with our button. But when you bring to the button and release, it will fall context menu From which you select Touch Up Inside. This means that this method will work when we click and release the button. What we need is :)

Well, we save, go back to Xcode and click Build & Run. Uraaa, our first program started :) Click the text box, the keyboard appears, write the name. But our program still lacks one small stroke. It is to retire the keyboard by pressing the Done button when we finished entering our name.

To do this, you will turn on the interface constructor again, click on our button. Click Command + 1 and find there Text Input Traits. It has several drop-down lists, but we are only interested in the lowest: Return Key. Select from the Done list and at the bottom of the block put a tick near the AUTO-Enable Return Key. Continue in Command + 2 Connections Inspector and see the word there. dELEGATE.. Click on the circles near it and pull to the File's Owner block

Now we return to our FIRStappViewController.m file after our SETNIK method add more such code:

- (BOOL) TextFieldShouldReturn: (UITEXTFIELD *) ThetextField ( ; RETURN YES; )

We save and try to run (you can use Command + R combination) We try to write our name in the text box. When writing, the Done button appears by clicking on which keyboard closes. Now we click on our button and vua, the program with us is greeting :)

It would seem what little things, think they wrote such a little one. And I, when Many years ago, taught Delphi, having learned one such an example so that by clicking on the button something it was written on the screen did different toys. Remember one of the most first browser games Fight Club? So I did myself for myself. Something similar and everything was based on this principle as we just did with you. So play, experiment!

Here you still have a link to the project archive, you can download, include see if someone did not work. Well, if you have questions, then write in the comments.

So, you also came the thought: " And how should I learn to write programs for the iPhone?«, « How do I make my mobile app?«, « How to earn millions without doing anything?". I will try to step by step to answer these questions (except for the last).

What you need to know from the very beginning

To create programs for iOS. Officially, you need a computer Apple (imacor MacBook.). But if you speak very honestly, you need operating system OS X., so many at first chitryat and manage to use Khakintosh (Hackintosh.), that is, launch OS X on ordinary computers - This is an economical option, illegal and rather troublesome in terms of settings. I recommend you, since you firmly decided to become an iOS developer, buy a simple MacBook or Mac Mini., it is possible even used (any, released since 2010).

Next - what to write. Applications for iOS. writes in programming languages SWIFT or Objective-C., and all magical action happens in the program Xcode. (free). SWIFT "This is a very new language that Apple imagined literally recently (mid 2014) and now actively brings the idea that it is necessary to program only on it, behind him the future, it is more modern and fast. And they are right, learn SWIFT. Objective-C.opposite the language with a long time, so it is much more complicated to understand it that does not cancel its power and wealth of existing developments and books on it (which you cannot say at the moment about SWIFT). And nevertheless, I repeat, learn SWIFT.

If you want to make cross-platform applications (at the same time under iOS and Android) - learn C # and use the development environment Xamarin. (Paid). Want to make cross-platform games - Swing the development environment Unity3d. (Conditionally free), learn the above mentioned above C #.

And also to run your applications on the iPhone / iPad (even at the stage of development) and then lay them out in the AppStore, you need to buy status Apple Developer.for $ 100 per year. After buying this once again motivates at least to beat off this money 🙂

When I wondered this question, I thought it was just necessary to just take a good fat "Bible" on Objective-C (remind, SWIFT was not yet) and comprehend the secret knowledge of the programming language chapter for the head. All advised the book of Stephen Kochan " Programming on Objective-C«. WRONG!Do not repeat my mistake. Yes, the basics of the tongue were comprehended, the book is good, but this is a reference book and it is far from the real development of applications from scratch. To learn how to program you need to "blur hands", trying to write the first, let quite simple, but working Applications. You need lessons with examples. From simple to complex. It is still important to put a real target, the first application you want to write and release to the AppStore. Each lesson or book should give you the knowledge that you can apply in your project. Do not make a mistake of the "Eternal Student", which only that makes it studying, is studying, studying, but postponing the moment of the beginning of this work. For example, I put myself a goal to make an application-radio and release it in the AppStore for a month - and I did it.

If you know English, consider you a little lucky, now I will tell you where to draw all the knowledge. In Russian, unfortunately, the information is very little and often it is lagged (and translated from English).

The iOS Apprentice.

The best English-speaking training site - Raywenderlich.com.. It is mega-cool for three reasons: 1) You can read the sea for free of lessons from Azov before trying to repeat the existing successful applications (including SWIFT), while everything is written mentally and with humor; 2) there are video lessons (truth, paid); 3) The most important reason "They have books for beginners who will teach you from scratch on an example of creating applications, very intelligibly, with pictures (well, as we love). Books are paid (they are free only the first part), but they are worth it. I bought them all and they have paid off for a long time, as they build a good foundation bricks behind the brick. It is not to compare just with reading different lessons in the same site. Start with the purchase of The iOS-Apprentice book (the first part of which can be downloaded for free). She will teach you to create the first applications on SWIFT. They also have books on the development of games on Spritekit.(Apple framework for game development).

The second utility resource - APPCODA.. He is easier than Raywenderlich, but the essence is the same - read the lessons on SWIFT, learn from the examples. They also have their own books (paid), except free lessons.

And what if you do not know English - UPS, such Russian Internet resources are simply not. Books in Russian? Of course, you will find some books on Ozon, but all of them are outdated and will not teach you the SWIFT language (at the moment everything is just on Objective-C).

The best that I can offer you is a hub "IOS-Development" in Habré, there are constantly new articles, but very chaotically appear.

Where to find an answer, something does not work

During programming, you will constantly have any questions: you do not know how to do something or you do something, but in response, the program reports an error. You can find answers (or ask a question) on two sites:

Stackoverflow. - The largest storehouse of ready-made answers in English. 80% of answers I find there.

Google - Bentally, just to enter the search question, you can find an answer. If it does not work out immediately, go to the wording of the question.

Toaster - Analog StackOverFlow, but in Russian. It is still difficult to find answers here, since the base of the questions is not very big. But you can ask - there are enough professionals on the resource that you will be answered.

Well, or you can ask me. While free 🙂

Many novice developers or people who are just interested in programming do not know how to easily create an iOS application quickly and quickly.

We will analyze the entire process of step by step so that everyone can read this material and independently perform the development.

Step one. Come up with an idea and name

Of course, from the very beginning it is necessary to come up with a good idea that could enjoy popular. The application must be simple, functional and such users. Here are some tips to help you find a great idea and imagine her to life:

1 Go to the AppStore and see the programs presented there. Perhaps you will come to mind.

2 Also look at the list of your applications (established). It is likely that not all of them like you and I would like to add some kind of function to some. This will be the idea for your creation!

3 Look at the applications of your friends with the same purpose.

Important! At the end of the thinking above the idea, you must have a clear understanding of which function will be performed by your application.

As for the name, it is also worth a very serious question. To begin with, look at the most and their names. Go to apple.com/en/itunes/ for this purpose. Be sure to check the section of free and paid.

Experts allocate several tips on how the name should be, and more specifically:

  • the length of about 10 characters (not much more, it is possible less, but, again, not too);
  • preferably English (in the interface, by the way, it should also be to expand the consumer audience);
  • two words in the title;
  • one word must fully reflect the purpose;
  • the second word should be a description of the first.

Step fourth. Concept development

In the first step, you have already accepted the idea and name of the future application. Now it is worth doing what will allow you to proceed directly to the development. We are talking about the concept. In that the concept is included as follows:

  • The target audience. Be sure to think about who will be your user. It may be young, purposeful and familiar with modern gadgets. Young man. On the other hand, it may be an elderly user who is far from technology. The remaining two components of the concept will depend on this.

  • Functional. Clearly list all the functions that the application will execute.
  • Design. Sketch, even if on a piece of paper, then how the application will look like. Moreover, you should clearly understand what will represent the starting screen, which buttons will be on it, and what will be on additional pages. In addition, add buttons according to the list of functions. Also develop the design of all buttons.

When you have all the sketches, you can proceed to the coding!

Pitch fifth. Coding

Now open the Xcode and perform the following stages of creating software on iOS:

1 on the start screen, on the left menu, press "Application" (Open this section) and choose "Empty Application". Click "Next". On enter your data, and in the developer identifier field (Apple is given) specify "Example", and in the class prefix field, specify "XYZ".

2 Further choose "File" and in the drop-down list "NEW". Further click "User Interface", "Storyboard" and button "Next". In the Device menu, select and enter in the name field. "Main". Save this file to the same folder as the main project. After that, the Main.StoryBoard file will appear in the project tree (left). This, as you could already understand the visual presentation of all the screens of your program. In the future, you will edit it.

3 Now you need to make it so that when you start the application, it was the screen that you create in StoryBoard. To do this, in the folder tree, you will sequentially select your project. "Targets", "GENERAL", "Deployment Info". Then near the inscription Main Interface you are taking "Main"As in Figure 8, - this is how we called our screen at the previous stage.

Fig. 9. Assigning a screen created main in Storyboard

4 Now, in fact, you need to create this most important screen that opens first when starting. To do this in the tree on the left click on "Storyboard" once. Basic window will open empty window. At the bottom right, press the icon in the form of a cube, this is a library of objects that can be entered on the screen. Now find on the right VIEW CONTROLLER And drag it with a mouse cursor on an empty field. A rectangular view appears. Actually, all elements can be added there.

5 Now you can add other objects from the library.. It can be text fields, input fields and other items. If you press them twice, it will be possible to change their attributes and properties. Actually, in the same way, you can write some code to the reaction to the click. However, if you watched video tutorials on Objective-C, you know perfectly well which items you need and how to add them.

6 If you need to add another screen, then do it in the same way as before - move it to an empty place VIEW CONTROLLER. Then you can also move various objects on it.

7 Now you need to make the user could move between these screens using swipe or by clicking on the appropriate link. For this there is an object called "NAVIGATION CONTROLLER". Move it on your main screen. Next click on "EDITOR", then "Embed in" and on the aforementioned object. A gray panel will appear at the top of the main screen. This means that the so-called navigation panel is added to it.

8 To add the displacement button on the screens, there is an object "Bar Button". This is a button if you say easier. Move it into the navigation pane and set the appropriate properties.

In the same way, add other objects, as well as specify the desired properties. To deepen how to perform the encoding application, we will not, as this is a very extensive topic. Especially since if you familiarize yourself with the above material, you will know about it. necessary information. But the above stages of coding are the start of your further developments.

It all started with the fact that I looked around and, without seeing the car of my dream, I decided to construct him myself
Ferdinand Porsche

Hi, hubr. I want to tell how to create my first iOS. The application and what happened.

Idea

The idea for the application has arisen by itself: Create something that would be happy to use himself. I constantly write notes. After all, every employed person has a certain set of the facts that he receives during the day, and which are worth remembering. And since all people forget (and this is normal!), That is not better solutionthan just write. I always felt some inconvenience when working with the apps presented in the AppStore. Excessive complexity in the management, the presence of unnecessary categories, rag for more information - All this prevents the application to perform its basic function. Plus, many of these things look just ugly.

Therefore, putting all the bets on simplicity and convenience, I started creating a concept. An application model with a single list of notes. All in one place, what could be easier? If something has a great value or relevance, it is not necessary to hang a shortcut on it at all, because it is enough to simply move a more important note in the top list. Old and unnecessary records will gradually fall down and will later be deleted by the user.

Functional

After the concept was invented, I wrote the main functionality - those things for which I would like to focus on management:

Pretty standard functionality for such applications, agree. But this is only the top of the iceberg, the devil lies in the details.

Tools

Before writing code in Xcode, I completely recreated appearance Applications B. vector editor Sketch. This program is great for fast creation layout. For this application there is a mass of plugins, among them there is Sketch Preview - view the artboard immediately on the device through the Skala Preview program. Just need to download free programs Skala Preview on a computer and mobile device and install plugin. After that, select the desired artboard, press Command + P combination and already across a second the appearance of the application is broadcast to the device.

In addition, the application is very convenient to create screenshots to publish in the AppStore. For each screen size, a set of artboards was created, along with the use of styles, the time spent on formatting is minimal. But about the publication a little later.

Development

In the application, I used only two controllers - one directly for all-all-all notes, the other - to display a small tutorial when you first start. Working with the database I organized with the Coredata framework.

After creating a basic functionality (creating, deleting, editing notes), I decided to improve each of these functions.

Agree, editing text in iOS is quite uncomfortable. When an error assignments in the word To move the cursor to the desired position, you need to make a touch and not removing your finger from the screen, try to get into the selected area. In addition, after correcting the error, you need to return the cursor back to the end of the line. In my application, I decided to recycle the cursor movement mechanism: to make a change in the word, you only need to make a swipe in the zone between the keyboard and the phrase is not blown up with the text overview.

Animation Removal and movement to the top I decided to realize myself, and visual accompaniment to the maximum approach to real life. Something acquired a higher priority - the swipe right and the note moves to the top list. To delete - swipe left and hub animation will show how else you need to extend the swipe to complete the removal. With accidental removal - you just need to shake the device ("shake"), and the note will return to its former place.

In order to highlight the note, I used the Longtapgesture and the three main colors of the application - white, blue and red, which have formed the main color palette.

The transition between the day and night themes I decided to make automatic - why no one thought about changing the appearance depending on the position of the sun in the sky? Everything is very simple - after the onset of darkness and after sunrise, the topic changes, while the user does not need to be distracted from creating notes, because the application will always automatically adapt to the surrounding conditions.

Neuming

Application of the application - the most an important part When developing, this is the first thing that the user sees in the store. On Habré there is about this. To the selection of name, I decided to approach thorough: I went over the list of 1000 most popular words in english language and discharged all sorts of combinations that would fit for the name mobile application For notes, besides, I wanted to meet in 8-10 characters. But at the same time I did not want to choose the name Supernotes or Notesplus etc, I wanted something new. I liked the combination mad Note.which she accidentally stumbled upon Urban Dictionary:
mad Note - Excellent, Entertaining, Surprising, UNEXPECTED OR AWE-INSPIRING

Immediately appeared and slogan: Madnotes - Note Your Passion. Since I was already ready for the main colors palette (white, blue, red), I decided to immediately come up with a suitable icon. Situation with logos for applications of this kind of deplorable:

Because the note on paper is written with a pencil or handle, I decided to display it on an icon - a pencil turned at an angle of 45 degrees. It turned out like this:

Result

Since the initial project was conceived as a designer, I decided to participate with my application at the Ukrainian Competition UKRAINIAN DESIGN AWARDS: THE VERY BEST OF IN THE DIGITAL DESIGN category. A few weeks left the competition, during which time I managed to publish on Behance, where visually showed all the basic functions of the application, and also recorded video previews.
Since the winners of the competition were not disclosed until the very last moment, it was incredibly nice to see their work at the exhibition of the Winners - the jury saw and appreciated the main concept - minimalist and, at the same time, a functional application for taking notes.


The application is in the AppStore for several months, during this time I made six updates and rewrote the code on SWIFT. IN latest version (1.2) Added synchronization with icloud, so notes have already managed to move to the cloud.

Thank you.
Note Your Passion.