#swift Multi-Threading using GCD For Beginners.
▻https://hackernoon.com/swift-multi-threading-using-gcd-for-beginners-2581b7aa21cb?source=rss---
Introduction: What is Grand Central Dispatch (GCD)According to Apple:“GCD provides and manages FIFO queues to which your application can submit tasks in the form of block objects. Work submitted to dispatch queues are executed on a pool of threads fully managed by the system. No guarantee is made as to the thread on which a task executes.”In other words, GCD is an API provided by apple to allow you to manage concurrent operations in a smooth way, in order to avoid freezing of your application and keep it always responsive for users.Types of Queues:When dealing with GCD, there are 3 types of queues:1- The Main Queue:This Queue has the highest priority of all , and it runs on the main thread.All UI updates should be done on this thread or otherwise lagging and weird crashes will occur in your (...)
]]>#swift: Avoiding Memory Leaks by Examples
▻https://hackernoon.com/swift-avoiding-memory-leaks-by-examples-f901883d96e5?source=rss----3a814
▻https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/MemoryMgmt/Art/memory_management_2x.pngIn Swift Automatic Reference Counting (ARC) is used to manage memory usage in an #ios application.Each time you create a new instance of a class #arc allocates a chunk of memory to store information about it, and automatically frees this memory when that instance is no longer in need.You as a developer don’t need to do anything for that management , except for 3 cases were you need to tell ARC more information about relations between instances to avoid “Retain Cycles”.In this article we will walk together in the process of managing these 3 cases , and see real examples of retain cycles and how to get rid of them. But first, what are retain cycles and why we need to avoid (...)
]]>Using Multiple UIStoryboards in #xcode
▻https://hackernoon.com/using-multiple-uistoryboards-in-xcode-798e993afafd?source=rss----3a8144e
iOS Developers, this tutorial has the intention to make you forget building #ios apps that rely on a single storyboard.In the past few years, iOS projects (and mobile projects in general) contained no more than 10–15 screens in total. A single storyboard was definitely a good option since it could fit all screens and still have a clean wireframe that was understandable for future and current developers.But, these days a 10–15 screens project is counted as a small sized project. What happens is that most of the projects currently are containing 40+ screens. And this is where it becomes a real issue. You are working with a single storyboard, you add all the screens inside of it, and suddenly you start facing many performance issues and getting lost easily in the sea of controllers. Not to (...)
]]>XcodeGhost a profité d’un internet chinois trop lent | MacGeneration
▻http://www.macg.co/aapl/2015/09/xcodeghost-profite-dun-internet-chinois-trop-lent-91085
« Ignorance de la part d’Apple » explique Andy Tian à Reuters et « complaisance » chez ses homologues où les développeurs ont téléchargé des versions d’#Xcode sur des sites situés en dehors du giron d’Apple. Et pour cause, cela revient à prendre l’autoroute au lieu d’un chemin de traverse. C’est la banale et principale explication avancée. Elle figure d’ailleurs dans une FAQ d’Apple sur cette affaire "d’XcodeGhost", publiée à l’entrée de son site en Chine.
D’un côté, il y a Xcode qui pèse pas moins de 3,6 Go. De l’autre, des infrastructures réseau faiblardes, alourdies par le filtrage exercé par le gouvernement, qui rendent ces téléchargement plus fastidieux que partout ailleurs. Selon les mesures d’Akamai (qui assiste des entreprises dans leur distribution de logiciels sur le Net), la vitesse moyenne de connexion en Chine (3,4 Mbps) est trois fois inférieure à celle des États-Unis (la France est entre les deux). Et cela ne va pas en augmentant pour les utilisateurs chinois.
Dès lors, pour couper au plus court, ces développeurs téléchargent leurs outils sur des sites à l’intérieur du pays, puis les partagent parfois sur des supports physiques avec leurs collègues. Si ce n’est qu’il y a le risque de récupérer des logiciels préalablement bidouillés par des malandrins. C’est précisément ce qui s’est passé pour Xcode qui injectait, à l’insu de son utilisateur, un malware dans les logiciels iOS qu’il aidait à fabriquer.
[…]
D’après le dernier décompte effectué par FireEye, ce sont environ 4 000 apps compilées avec ces Xcode non légitimes qui se sont retrouvées sur l’App Store lestées d’un cheval de Troie. Apple s’en tient à son chiffre de 25 apps touchées — dont elle va bientôt publier la liste — mais tout dépend de la manière de compter.
FireEye semble faire un décompte plus exhaustif. Apple de son côté parle des 25 apps les plus populaire en termes de nombre d’utilisateurs. D’autres que celles-ci sont concernées, cependant leur audience n’atteint pas les mêmes proportions « Après les 25 principales apps concernées, le nombre d’utilisateurs touchés baisse de manière significative », explique la FAQ.
]]>BecomeAnXcoder | CocoaLab
►http://www.cocoalab.com/?q=becomeanxcoder
Bert Altenburg, author of AppleScript for Absolute Starters, in co-operation with Alex Clarke and Philippe Mougin, has released a book for newcomers to Cocoa programming using Objective-C and XCode.
#cocoa #objective-c #xcode #mac #apple #développement #dev #type:livre #gratuit #pdf #code #leopard
]]>