Onion, beetroot, old tie, colored threads - how many ways to paint eggs do you know? Today we will talk about one more, invented by us.
Fill the face peacock
Paint eggs - do not fry potatoes. For each palette there is a suitable material, and when it comes to the product, which is then also eaten up, I don’t want to do it at random. ')
Can!
All you need is an iPhone , although at first you can do without it. The main thing - store eggs.
Having drawn the first prototypes of the interface, we figured out how much we will have layouts, ornaments, what they will look like and, finally, we set off to prepare content for the application. A few days later we got a little-a lot of 350 different ornaments for 5 colors and 5 markings.
“Motor, camera ... action!”
Here the first prototypes were drawn, on which the main application screens were distributed, the available functionality and the basic mechanics of the coloring. Naturally, everything was tested on eggs.
It seemed that with such a simple task there should be many ways to shape the idea in the interface, however, there remained a contradictory opinion on various trifles, such as “do I need to switch to the next editing stage when choosing a zone, or not?” And so on
Each egg was carefully rendered by hand - it took a lot of time. “Why not render it in the application itself according to the model?” - you ask. The answer is: each ornament was stretched on an egg in its own way - such work cannot be trusted to robots.
Underwater eggs
We did the first version on Cocos , and the main difficulties were only with crossing the scene objects with the UIView heirs, but this can be solved by breaking the objects into different scenes.
The task that appeared on the horizon : too many pictures, you need to keep within 50 megabytes (2013 was in the yard, the limit was doubled in iOS 7 ), otherwise the application will not be able to download via the cellular network. They shook everything in jeeppeg, for each zone they drew a mask, by which they filtered the layer with each zone. Fulfilled!
In blue - squeeze the door
Double check everything before sending the app with an in-app purchase inside. Especially - do not forget the restore button for non-consumable purchases. We received our well-deserved reject and went to work by the next year.
Great attention is paid to testing in-app purchase . Testing with test iTunes accounts is very peculiar - it is better to try once . And yes, if you publish a new version, and certain In-App 's are available only in it - do not forget that you need to specify this before sending the application for review.
The same eggs - side view
Quickly transferred the project to SpriteKit - the logic remained the same , but it became much easier to work with the internal structure of objects for drawing, for this, CoreGraphics did not even have to go:
You can simulate the behavior of a UIScrollView for a SKNode successor by putting it in one container with a UIScrollView , and putting the container on top of SKView which renders SKScene , and implementing the UIScrollViewDelegate protocol for such a container and further changing the position of SKNode inside the container depending on the contentOffset parameter:
As a counter, Google Analytics was connected, it took a minimum amount of time to integrate, and provided a bunch of leverage right out of the box. Screens, events, user behavior patterns - everything is added to a couple of lines.
Creating an “app” for Facebook is a bunch of banners of various sizes. You still have to do them. Here, too, it will take some time to wait (they talk about three working days, usually they do it a day) before the Facebook app appears in the App Center .
Also, a login using the Facebook SDK is very sensitive to different conditions: depending on whether the Facebook application is installed on your phone or not, whether you are logged in to social networks in iOS settings or not, the result will be different. For SSO authorization, do not forget to set URL types correctly in the application settings in Xcode (replacing the nines with the identifier of your application on Facebook):
Fill the photo with FBRequestConnection and indicate who we are in this photo:
It is a bit more difficult to fill in VKontakte pictures, you must first request the server address to upload the picture, and only after that post it to a friend on the wall (unlike Facebook , where we add a photo to the album and mark someone on it:
// 1. Get upload server NSDictionary *result = [self sendVkRequestForMethod:@"photos.getWallUploadServer" params:[NSDictionary dictionaryWithObjectsAndKeys: friendId, @"uid", K_ACCESS_TOKEN, @"access_token", nil] error:&error]; // 2. Upload image if (!error) { result = [self sendPOSTRequest:[[result objectForKey:@"response"] objectForKey:@"upload_url"] withImageData:UIImageJPEGRepresentation(_image, 75)]; } // 3. Save image if (!error) { result = [self sendVkRequestForMethod:@"photos.saveWallPhoto" params:[NSDictionary dictionaryWithObjectsAndKeys: friendId, @"uid", K_ACCESS_TOKEN, @"access_token", [result objectForKey:@"hash"], @"hash", [result objectForKey:@"photo"], @"photo", [result objectForKey:@"server"], @"server", nil] error:&error]; } // 4. Post on wall if (!error) { result = [self sendVkRequestForMethod:@"wall.post" params:[NSDictionary dictionaryWithObjectsAndKeys: friendId, @"owner_id", K_ACCESS_TOKEN, @"access_token", K_APP_PROMO_TEXT, @"message", [[[result objectForKey:@"response"] lastObject]objectForKey:@"id"], @"attachment", nil] error:&error]; }
With Instagram it's easier , first save the image with the extension * .igo , then open the link via UIDocumentInteractionController .
// 1. Save file with *.igo extension NSString *path = [[self applicationDocumentsDirectory].path stringByAppendingPathComponent:@"EggMaker.igo"]; NSError *error = nil; [UIImagePNGRepresentation(postcardImage) writeToFile:path options:0 // 2. Open with UIDocumentInteractionController if (!error) { NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"]; if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) { self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL: [NSURL fileURLWithPath:path]]; self.documentInteractionController.UTI = @"com.instagram.exclusivegram"; self.documentInteractionController.annotation = [NSDictionary dictionaryWithObject:K_SHARE_TEXT forKey:@"InstagramCaption"]; [self.documentInteractionController presentOpenInMenuFromRect:self.view.frame inView:self.view animated:YES]; } }
Interactive eggs
Always lacked the ability to make an interactive re-presentation of your application, especially if the application is paid, and the rules of the App Store demo version is prohibited ? App.io coped with this task:
You can add an application by registering a free account; many settings for displaying and embedding such an interactive demo are available through link options for free. Recently, such a demo of your application can be embedded in the form of full-screen interactive advertising.
Download Yajtsedel in the App Store: http://appstore.com/Izedel ( who asked about short links?) Thank you for being with us, be sure to try Super Eggs - there are cats and penguins there! Our pages on Facebook and VKontakte
And for the future: take care of the eggs! Christ is Risen!