Swift How to use SwiftLint with Xcode to enforce Swift style and conventions? SwiftLint [https://github.com/realm/SwiftLint] is a tool to enforce Swift style and conventions. Keeping a codebase consistent and maintainable in a project with a team of developers sometimes may be very hard, different conventions and styles, plus different levels of experience with the language across developers may result...
Xcode What's new in Xcode 10? [Updated for 10.1, 10.2 and 10.3] Xcode is the complete developer toolset used to create apps for Apple TV, Apple Watch, iPad, iPhone, and Mac. The Xcode development environment bundles the Instruments analysis tool, Simulator, and the OS frameworks in the form of tvOS SDKs, watchOS SDKs, iOS SDKs, and macOS SDK. * Jump to "What&...
iOS [Xcode Pro Tips] How to use Asset Catalogs to support Named Colors? As you know, you are able to use Xcode Asset Catalogs to manage your images and other file-based resources since iOS 7. But from iOS 11 (with Xcode 9), Asset catalogs support named colors that can be used in source files and Interface Builder. You can create a color that...
iOS How to create a verified iOS Mobile Device Management(MDM) profile? The Mobile Device Management (MDM) protocol provides a way for system administrators to send device management commands to managed iOS devices running iOS 4 and later, macOS devices running macOS v10.7 and later, and Apple TV devices running iOS 7 (Apple TV software 6.0) and later. MDM allows...
Swift Extensions by Example - Swift Programming Language 1. Introduction * Extensions add new functionality to an existing class, structure [https://developerinsider.co/classes-and-structures-by-example-swift-programming-language/] , enumeration [https://developerinsider.co/enum-enumerations-by-example-swift-programming-language/], or protocol type. * This includes the ability to extend types for which you do not have access to the original source code. * Declare extensions with the extension keyword * Format of...
Swift Initializers and Deinitializers - Swift Programming Language 1.Initializers * Initialization is the process of preparing an instance of a class, structure [https://developerinsider.co/classes-and-structures-by-example-swift-programming-language/] , or enumeration [https://developerinsider.co/enum-enumerations-by-example-swift-programming-language/] for use. * This process involves setting an initial value for each stored property on that instance and performing any other setup or initialization that is required...
iOS How to change an iOS application icon programmatically? In iOS 10.3, Apple launches a cool function so that developers are able to programmatically change the app icon. In Apple's UIApplication API document, there are 3 things worth a glance: //A Boolean value indicating whether the app is allowed to change its icon. To make it...
iOS Best iOS Development Tips and Tricks 1. Track build time in Xcode If you don't know the exact build time of your project, enable the following option in Xcode. defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES 2. Improve your Swift project build time The Xcode 9.2 release notes mentioned an experimental...
Swift Control Flow by Example - Swift Programming Language * In Swift, there are three kinds of statements: simple statements, compiler control statements, and control flow statements. * Simple statements are the most common and consist of either an expression or a declaration. * Compiler control statements allow the program to change aspects of the compiler’s behavior and include a conditional...
Swift Tips to become a better Swift (iOS) Developer Swift is friendly to new programmers. It's an industrial-quality programming language that's as expressive and enjoyable as a scripting language. Here the some tips to become a better Swift Developer. You can copy and paste the code snippets into Playground, to make it easier for you...
Swift Methods by Example - Swift Programming Language * Methods are functions that are associated with a particular type. * Classes, structures [https://developerinsider.co/classes-and-structures-by-example-swift-programming-language/] , and enumerations [https://developerinsider.co/enum-enumerations-by-example-swift-programming-language/] can all define instance methods, which encapsulate specific tasks and functionality for working with an instance of a given type. * Classes, structures, and enumerations can also define type...
AppStore How to make your new apps available for pre-order on the App Store on all Apple Platforms Apple has announced that all developers can now offer their applications for pre-order via the App Store. Before releasing your app on the App Store for the first time, you can choose to offer it as a pre-order. Customers can see your product page and order your app before it&...
Swift Properties by Example - Swift Programming Language * Properties associate values with a particular class, structure, or enumeration. * Suppose if we need to change or access an iVar in your class using an object of your class, then there should be getter and setter methods assigned to the iVar. * A property is used mainly when other objects need...
Swift Classes and Structures by Example - Swift Programming Language 1. Introduction * Classes and structures are general-purpose, flexible constructs that become the building blocks of your program’s code. * You define properties and methods to add functionality to your classes and structures by using exactly the same syntax as for constants, variables, and functions. * In Swift, you define a class...
Swift Access Control by Example - Swift Programming Language * Access control restricts access to parts of your code from code in other source files and modules. * This feature enables you to hide the implementation details of your code, and to specify a preferred interface through which that code can be accessed and used. * You can assign specific access levels...