With time technology is moving fast too. This article will provide information about Xcode 10 tool and what is new in Xcode 10 compared to its earlier version. It is beneficial for the developers who like to add new features to their apps. Our experts use the latest tools & technologies to deliver the best to our clients. Xcode 10 is one of the tools we used after thorough testing. 9series always ensures to test all the tools before they use it for your solutions. Below is the synopsis of the blog in case you just want an overview of the same ~ Xcode 10 was announced at WWDC 2018 on 4 June 2018. ~ Xcode 10 includes Swift 4.2 and SDKs for iOS 12, watchOS 5, tvOS 12, and macOS 10.14. ~ Xcode 10 requires a Mac running macOS 10.13.4 or later. ~ It is capable of running multiple simultaneous versions of the Xcode App and any associated tools. The interesting thing about Xcode 10 is that it can coexist with the previous version. Here are the detailed of the new features. Dark Mode ~ Xcode now supports the Dark Mode. You can adopt a dark mode instead of wide light as the appearance. It is a system-wide appearance that is already implemented and adopted by many apps. ~ Dark mode is now available in the Xcode 10. Xcode 10 also enables you to create your own dark apps for macOS. You can also move between the light and dark mode. You can also move your app in and out of Dark mode while debugging. Better Editor Xcode 10 supports multi-line editing by selecting multiple lines. If we want to change all functions to private functions, then we can select all lines of func and replace them with private functions. New Build System ~ The new build system has been activated by default in Xcode 10. We can go to Xcode-Files-Project/Workspace settings options. You will see that there is a Build System option that allows you to select a new build system. Directly Upload App to AppStore ~ Through Xcode 10, we can directly upload an iOS app to the App Store from the Xcodebuild tool using the following command: ~ “ $ Xcodebuild -exportArchive -archivePath <xcarchivepath> [-exportPath <destinationpath>] -exportOptionsPlist <plistpath> “ ~ We need to pass the ExportOptions.plist file containing the key destination and value upload. Furthermore, we have to ensure that Xcode is configured with the right membership details to be able to connect to the Apple developer portal. Parallel Testing Xcode 10 supports running tests in parallel, which reduces the time for takes to run the test. Test parallelization is supported for macOS, iOS and tvOS unit test in simulators. Version Control Integration Xcode now supports working directly with a few source code collaboration platforms such as GitHub and GitHub Enterprise, Bitbucket Cloud and Bitbucket server and also GitLab.com and Gitlab self –hosted. Asset Catalog Xcode 10 supports the CarPlay assets and ARKit 3D ARReferenceObject asset. It also supports unit varying image and color assets with light, dark and high contrast appearances on macOS 10.14 and above. Code Snippets ~ We can also create snippets for other languages likes Ruby, php, Python, C++, Obj C, etc. ~ We have to define the shortcut keys for the snippets. Closing Note There are new great features included in this version of Xcode that we have discussed in the article above. So you can also go for it and experience the difference. 9series provides you with the best iOS App Development Services where they use the latest tools and technologies like Xcode 10 to develop the most dynamic and user-friendly apps for your business.
Dedicating 6 years in improving & using the Objective-C, Apple finally decided to snap another challenge to developers. Again, iOS developers will have to learn this new programming language - Swift. In this article, we are going to look at some points of Swift compared to Objective-C. If you know Objective-C (at least the basics) then this tutorial is best suited to you and want to see what the equivalents are in Swift. So let’s get into it! Swift Language is Easier than the Objective-C: ~ Objective-C has been created using two languages: C and Smalltalk. hence, Objective-C has such a complex, Verbus Syntax. ~ Objective-C obtains its object syntax from Smalltalk while Syntax for the non-objective operations is similarly as C. ~ While the Swift Language is an option to the Objective-C language, the Swift Language is defined as “Objective-C without the C”. ~ Swift is a comparatively a new programming language. Apple started to work on Swift in 2010 and published it to the public in 2014. In 2015, Swift graced open source. It rejects the Smalltalk and C heritage and has all the features that modern programming languages have: generics, high-ordered functions, type interfaces, Optionals. Swift Support Modern Programming Language Features Swift rejects the Smalltalk and C Heritages and has all the Features that Modern Programming languages have: Generics Generics code allows you to write adaptable, reusable functions and types that can work with any type, subject to requirements that you specify. Optionals Optionals are dominant features in Swift Language which come to resolve the intricacy of non-existing value. Type Interface Type interface refers to the automatic detection of the data type of an expression in a Programming Languages. High-Order Functions High Order Functions is a function that you can pass arguments of other functions. The Following Some High-order functions is: ✓Map ✓Filter ✓Reduce ✓FlatMap ✓Chaining Swift is Faster than the Objective-C ~ iOS development with Swift is much faster than in Objective-C. ~ The Swift usage of generics and higher_order functions results in cleaner, more reusable code. ~ Optionals and type interface resulted in the responsibility for the code safety being transferred from the programmer to the compilation. ~ Let programmers write some lines of code with the similar effect as in Objective-C. ~ This helps to make the development process faster. Swift is Safer ~ Because of its Features - generics, optionals, and type interference - all the apps being developed in Swift are less likely to have bugs or crash than other apps developed in Objective-C. ~ To present an anticipated behaviour Swift triggers a runtime crease if a nil optional variable is used. This crash provides consistent behaviour, which eases the bug-fixing method because it limits the programmers in fixing those issue right away. ~ The Swift runtime crash will halt on the line of code where a nil optional variable is used. ~ This indicates the bug will be fixed sooner or bypassed completely in Swift code. Apple is focused on Swift ~ Apple continually develops these languages and providing continuous support to the Community. In every WWDC there are a bunch of amazing technical talks about Swift; the time indicating that Swift should be taken seriously. Swift is easier to read ~ Objective-C suffers all moles you expect from a language built on C. ~ But in the Swift falls the legacy conversations. Therefore, you no longer need semicolons to end lines or punctuation to encircle conditional expressions inside if/else statements. ~ The Result is Cleaner and a more expressive language with a simplified syntax and grammar. Easy to Maintain Codes ~ Swift code almost follows natural English, in addition to other modern programming languages. ~ And then it also very easy to understand the code and then make the necessary changes simple in Swift. Swift requires less Code ~ Swift decreases the amount of code required for repeated statements and string manipulation. In Objective-C, working with text strings is very tedious and demands many steps to combine two pieces of information. Swift embraces modern programming language features like adding two strings together with a “+” operator, that is missing in Objective-C. ~ The type system in Swift decreases the intricacy of code statements — as the compiler can understand the types. As an example, Objective-C needs programmers to remember special string tokens (%s, %d, %@) and implement a comma-separated list of variables to replace each token. Version History of Swift ✓ Swift 1.1 ✓ Swift 1.2 ✓ Swift 2.0 ✓ Swift 3.0 ✓ Swift 4.0 ✓ Swift 4.1 ✓ Swift 4.2 ~ In a short span of time, Apple has invented many versions of Swift. It has features that are an easier language and provides good features for developing an iOS app. ~ The Apple is regularly updating the Swift Language and making it more easy for us to use each day. Third Party Library ~ In day-to-day many third-party libraries are converting in Swift rather than the Objective-C. Your popularity will increase with your developer’s team ~ According to a 2017 Stack OverFlow Developers Survey, Swift is at the forefront of the most favoured programming language, while the Objective-C is the most dreaded one. ~ Swift syntax is easier to understand for the developer’s team, they can easily understand each other’s codes. Swift Support Dynamic Libraries ~ Powerful libraries had never been supported on iOS until the launch of Swift and iOS 8, despite powerful libraries were supported on Mac for a long time. These dynamic libraries are external to the app are executable but have been included within the app bundle downloaded from the App Store. It decreases the original size of an app as it is loaded into memory since the external code is linked only when used. ~ As a result, the executable is smaller and, because the code is loaded only when it is needed, the startup time is usually faster. Conclusion If you are looking for iOS development with Swift then you can get in touch with us and we will provide you with the best. You can also hire iOS developers from us for your projects. If you any queries you can also write back to us on [email protected].
Every year, Apple announces the new functionalities for the users & developers through WWDC. In 2018, WWDC they introduced iOS 12 with new and enhanced features. Here, we will see what is new in iOS 12. Introduction Apple announced iOS 12 at WWDC 2018 on 4 June 2018. In iOS 12 Apple’s prime focus is on the performance improvement and enhancements in all new and old devices. With this, the device performance will be 70% faster in iOS 12. Now, let’s see all the new features coming to your iOS soon. Screen Time Screen Time will show you every little detail of your apps like how much time you spent on it, when you used it, etc. It also keeps a record of the number times you used your phone and number of notifications you received from the apps on your phone. It will also provide you with a weekly summary of how and when you used the phone and the apps in it. App Limits App limits is a sub-feature of Screen time, it allows you to set a limit on app usage based on the app or its categories. It works for app categories including Games, Social Networking, Entertainment, Education, Reading, Health etc. So you can set a limit of your app. Also, you can sync across your other iOS devices, so you can’t cheat that way. Updated Photos App The Photos app has a new “For You” tab. It shows all the new albums, photos and effect suggestions in case you want to add them to the photos. Also, you can share selected photos or albums with your friends from the Photos app. Siri & ShortCut App ~ It has assigned custom shortcuts to Siri for activating specific actions, which not only works for System apps but also with third-party apps. So now if you want to send a specific message to someone on Chat app (i.e WhatsApp), you can assign a command for that to Siri and you can activate that action just from Siri using that command. ~ Apple adds a new app in iOS 12 called Shortcuts. Shortcuts app lets you group actions and runs those actions quickly. Enhanced Do Not Disturb Do Not Disturb has a new enhanced feature "Bedtime mode". Enabling it will enclose all your notifications at bedtime and will dim the display. When you wake up, it will greet you with a welcome back message and show you the weather details on the lock screen. Notification Notifications can now be grouped. Hence, all your notifications from the same app are grouped together allowing you to control how often you want to get notifications from the apps. Messages ~ The Messages app gets new Emoji characters and Memoji are like personalized emoji. They look more like three-dimensional than the custom Bitmoji you make in other apps like Snapchat. ~ Users can customize their Memoji with hundreds of options for skin color, hairstyle, facial features, and accessories like hats and glasses. You can save multiple Memoji and use them in Messages to send reactions to your friends. ~ The Message app gets new filters for sending photo and video responses, and you can add stickers. Measure ~ Apple is bringing ARKit functionality to their app without any third party in iOS 12 called “Measure”. ~ You can now send AR objects through Messages and Mail, which can be viewed in the real world. You can measure the object in real-world by pointing your camera on the specific object. Conclusion ~ The Apple iOS 12 comes with a new and has enhanced its features too. This is currently available in the beta version. ~ The app developers can leverage with the new features by adding more creativity and experimenting with these features. ~ iPhone/iPad users will get more personalization, improved connectivity and enhanced security with these features. Above are few points on iOS 12. Though we have tried to cover the important points, yet, feel free to post any missing points or share your thoughts about these new features in iOS app development. Want to share something innovative about the new release? Feel free to write to us at [email protected].
1. Introduction: MVVM is an abbreviation of Model View ViewModel. A Model-View-ViewModel is software architectural pattern that was created way back in 2005 by John Gossman. MVVM is quite similar to MVC, but it provides better connect of the UI and business sense than that of MVC. In MVVM pattern, each view on the screen will be backed by a view model and it represents the data for the view. 2. MVVM flow Layout & Theoretical Background: In an MVC-based project, View is Connecting with its ViewController. ViewController is easily overloaded and increases its size when the application becomes bigger. So ViewController is affected in MVC. This drawback Solution in MVVM pattern. MVVM Data flow shown in Below Fig 1. As per above figure, the three core components of MVVM model respectively are, 1. As per above figure, the three core components of MVVM model respectively are, 2. Model: it is class that holds our App Data. 3. View/ViewController: it presents our View and ViewController Class. 4. ViewModel: ViewModel binds the Model and ViewController, it’s the heart of MVVM design pattern. It provides the connection between the model class and the view/view controller. View Model is capable of observing changes in Model and synchronize itself with the events. Example: Let’s start Understanding MVVM Design pattern with a simple example. First, create a project in Xcode. Also, create Model and ViewModel Class. In this project, we have taken tableView and shown employee name and its department using MVVM design pattern. Model: Shown model class in below Fig 2. In model class, we have defined variable and function, as per our requirement. Fig. 2 View-Model: - In View-Model Class we have taken a Model object, so we have used - Model class property in View- Model Class. In our project model Employee is a model object. - Here Model and View-Model class are connecting to each other. - Shown View-Model Class in Fig. 3 Fig. 3 View (Controller): - First, take View-Model object in ViewController Class. myViewModel is View-Model object. In our project, we have taken table view. - In this class, View-Model and View-Controller are connecting to each other. View-model object through, we get all data of View-Model class as per requirement. - View (Controller) class shown in Fig. 4. Fig. 4 Also shown Output in fig. 5 Fig. 5 Advantages: - Code reuse: In View-Model class we implement init, setup and view presentation method, so we use this functionality in each new view controller. - Improved Testability: In MVVM we can make all classes separate so we can easily find an error. - Reduce code size Disadvantages: - MVVM pattern not useful for single View application, when we work on Multiple views then it is useful. Conclusion: MVC and MVVM both patterns are useful for iOS app development. MVVM is new Concept for the design pattern. MVVM is more useful when app size is bigger because the separation of Model, View and View-Model class can reduce complexity.
As we all know that Apple has introduced an API for natural language processing from iOS 5, which allows us to tokenize text, detect the language and determine parts of speech.
Basically Natural Language Processing (NLP) is used to either predict your next word or suggest a correction while typing a word. NLP is likely used in Siri.
The main API is NSLinguisticTagger which is used in analyzing and tagging text, segmenting content into paragraphs, sentences, and words. In iOS 11, NSLinguisticTagger becomes more powerful. It is used for following schemes,
Let’s take experiment with the new NLP API. At first, we need to do is create a tagger. In NLP, a tagger can read the text and give different information to it such as part of speech, recognize names and languages, perform lemmatization etc.
When you initialize NSLinguisticTagger, you have to pass in the tagSchemes in which you want to perform. Let’s do it:
1. Language Identification
You can retrieve this language by accessing the dominantLanguage property of the NSLinguisticTagger. NSLinguisticTagger analyzes the text to get the dominant language.
The punctuations and whitespaces are omitted with NSLinguisticTagger Options. Tokenization is the process of classifying the text into paragraphs, sentences, and words. We call them tagger.enumerateTags function to tokenize.
It will be splitting the above string into words and then we get the list of each word that is there in the sentence.
Deriving the dictionary form of the word is called Lemmatization. For example, a user wants the result for word ‘run’. if you were able to consider base forms of the word, you would be able to also get results for ‘running’, ‘ran’, ‘will run’, etc.
Here the raw value of the tag is lemma of a particular word. So In output we got is stem form of each word token.
4. Parts of Speech
This is used to get each token’s lexical class. It will return each word and its part of speech. You can see the noun, preposition, verb, adjective, or determiner.
In the output, You can see the verbs, nouns, prepositions, adjectives, etc.
5. Named Entity Recognition
Named Entity Recognition is allowing you to recognize any names, organizations, or places. You would have seen certain keywords highlighted like numbers, names when you use some iPhone application.
In the following example we identify whether the token is named entity like personal name and place name.
Here we have used tag variable which is used by tagger to look for particular tags in sentence.
Natural Language Processing is already a powerful tool, growing exponentially and that can be widely used in the Applications. Apple’s Siri and Facebook’s messenger bots are the best examples of NLP.
In this article, we, 9series, have covered about NLP, its terms and how it works. If you have more experience with it or find more features then feel free to share your own experience with us.
Stay tuned for upcoming articles.
As we all know following a procedure can be very boring, hectic and time-consuming in the development process. Most of the developers working in an iPhone app development company in India have the tendency to jump directly into the coding because of all the effects and fun there.
According to our experience in application development, it is very helpful to follow some practices before jumping into the coding part. It always helps in reducing complexity, increasing the readability, easier to maintain, avoiding redundancy, etc. Also, it is helpful to other team members to understand the concept and the flow of the application if working in a team.
So, let us check and dig the topics one-by-one which will be helpful to create a proper architecture of the application and also be helpful for the entire team in the future.
1. Define Coding Style
Coding Style is the most important aspect that should be defined before you start writing any application, especially while working in a team.
It includes the below points:
2. Define Architecture for The Application
It is necessary to decide the architecture for the app before diving into the code. Choice of suitable architecture will make the app more testable, easier to understand and reduce its maintenance cost. You can choose any architecture from traditional MVC to recent or fancier MVVM. There are so many resources available on the web from which you can understand and decide architecture for the application. Below is some reference for the design pattern. https://www.raywenderlich.com/132662/mvc-in-ios-a-modern-approach
3. Setup Folder Structure
Instead of keeping all the files in a single directory, it is a good idea to follow some folder structure for the project. It will make the files well organized and easily findable, you can use the following:
Although this may look negligible at the first sight but for the big projects, it is certainly more helpful, well structured and easier to understand for every team member working in the project.
4. Manage Your Dependencies
It is very certain that everyone is using some third party libraries in their application. So for that, you should use one of the dependency managers from the ones that are already available. We usually prefer CocoaPods which has the vast collection of libraries and easy integration facilities, you can use any of below depending on the requirements.
5. Setup Certificates and Profiles for Code Signing
Most annoying and painful task of the application development is creating certificates and provisioning profile. This process includes creating application id (Unique identifier for the device), adding devices to developer account, creating certificates (development certificate for debug the application and distribution certificate for releasing the application.), creating provisioning profiles (same as certificates), also creating APNS certificates if your application is willing to get the push notifications from the server, providing .pem file to PHP developers or .p12 file to .NET developers.
6. Continuous Integration
This is very much advisable either working in a team or individual. This will keep track of your development process and at any point of time, you can check the updates for the particular date or time period. You can use either git or SVN whichever is suitable for you for the continuous integration. This will help all the team members to pull the latest updates done by the other member as well as push the new changes to the other team members. The main benefit of this is you will have all your code on the server and you will be able to access it from anywhere.
7. Setting Application Icon and Splash Screen
Though this is not a mandatory task and not that much important for the initial stage but setting it initially make your application first impression good. Application icon carries a variety of sizes of the single image so instead of forcing designer for all size images you can just ask of 1024*1024 size icon with some background and you will be able to get all the required size images from some online or online tools. Splash screen set up is also carry 2 ways either you set the launch images or you can use the launch screen for setting up the splash screen.
In this article, we have covered the major points about defining the iOS Application development Architecture. Though list can be expanded more with more topics like how code style should be applied, commenting guide, etc. You can also add your own topics, thoughts, etc. and feel free to share with us.
We hope that these tips will be helpful for you to define and start the application with the best style.
Happy Coding! and feel free to share your own experience on “[email protected]”.
Hello everyone, as we all know that Share Extension is appeared from iOS 8, then the capability to share content with other entities, such as social sharing websites or upload services can be done in an easy and convenient way.
We, 9series, an iOS application development company has started doing all the development using Advanced Programming Language Swift.
So today, we are going to build a Shared Extension app in iOS10 with Swift 3.0, an ability to show an icon on the common share-sheet that associates with our main app, which handles the sharing of the content that the user has requested. So the user can easily switch from one app to another, for example, we are sharing a photo from the album with some content that switches our app where we want to upload data to the server.
This is mainly a programming article, so you are required to have Xcode 8 on Mac. Let’s get started !!!
1. Make a new Xcode Project
First Create a cocoa touch Single View Application in Xcode 8 with some basic UI. Like it is shown below
Design the screen with UILabel, UIImageView, UITextView and with UIButton. When user comes with some sharable content from parent app, we can upload or we can use anywhere in our app.
For Eg, let’s create the Share Extension.
Give some proper name of that extension and it will show you popup view for activating your extension scheme. Choose Activate to use this scheme for building and debugging.
Note: Schemes can be chosen from the toolbar or Product menu.
3. Make an App Group
We want to communicate two app for sharing some content, but Apple doesn't want a complete free flow of data between the two. Apple recommends a shared NSUserDefaults as a meeting ground where the two app can exchange their data.
Now, we need to make an app group.
Click on your project in the Navigator Pane of Xcode, click on capabilities and your app under the target list turns on App Groups. Give it a name like “group.BUNDLE IDENTIFIER”.
Now click on your extension and do the same.
4. Implementing Share Extensions in Swift
First open your viewController, we won’t go into much detail, because it's a destination viewController. So we can read content data from User Defaults which is shared by user from Share ViewController.
We have also created an IBAction of Upload button, so that content and photo which is shared by user can be used anywhere in our app.
Here, “sharedIdentifier” is the UserDefaults suiteName that we have used for the app group name. An extensionContext where we get a list of NSExtensionItems. This is a fixed array of data sent to our extension from a parent app. We are getting photo and content from our photos app that are already set to our main app.
Let's look at the “ShareViewController” from our Shared Extension Folder which is subclass of SLComposeServiceViewController. SLComposeServiceViewController has some methods and properties associated with the lifecycle of a share-sheet composition view.
isContentValid() :- It is called every time when the content in the compose view changes. Here, we can check the input data is valid or not. It is called first, and will disable the post button when it evaluates to false.
didSelectPost() :- As the name suggests, it is called when the user presses the post button. Here we can do something with the user input. Once the upload is scheduled, you must call completeRequestReturningItems(, completionHandler:) so that the host app can un-block its UI. When the upload request is done, it calls the completion handler that was passed into the previous mentioned function call.
configurationItems() :- Here, we can add more things for the user to select when they are sharing. In our case we are sharing a photo with contentText. You can also make it more dynamic with some other controls.
contentText :- A string which represents what the user has typed into the composer.
charactersRemaining :- Is a number which appears on the compose sheet. When negative number shows, its appearance becomes red.
Here is the code of “ShareViewController”
Here, we are selecting one image from photo album and then clicking on share button, it will open share sheet with our Share Extension app Icon.
Select that app and it will open composition view.
We have mentioned maximum characters of contentText as 100, so if you enter more than 100 characters, than it will generate alert message and post button will be disabled. You can also check number of characters at the end of compose sheet.
Configuration! items is where we can add more things for the user selection, when they are sharing. Like, Open UITableViewController as subview Controller and selecting User Input it will display as item value at the bottom of compose sheet.
Configuration! items has title, value, and a tapHandler. So you can add extra functionality for selection from User.
ExtensionContext has list of attachment as NSExtensionItem. We’ll loop through the attachments, and look for one typed as an image. It will have the type identifier kUTTypeImage. NSItemProvider items are lazily loaded images, videos, URLs and so on. We’ll load it using “loadItemForTypeIdentifier”. This has a completion handler, where we’ll read the image from the URL, and then we’ll save it to defaults.
After pressing Post Button, It will save Image in UserDefaults with “Image” key, and contentText with “Name” key.
We have created two utility methods for saving data to user defaults and for alert message.
Till now, Apple wouldn’t accept this in their app store. We need to tell iOS when to show our share extension, and what can be selected. Otherwise when we compile we’ll get a warning.
“Warning: Embedded binary’s NSExtensionActivationRule is TRUE PREDICATE”
So for that, open the “info.plist” as source code by right clicking on it. We’re going to change the NSExtensionAttributes section. This means our extension is activated only for images, and only when it’s a single image. If you select more than one image, the extension app automatically hides from share-sheet.
You can change your display name of your app in share sheet by replacing the code in the “info.plist” of your Extension.
5. Test Your Share Extension
1. First you have to simply run your app.
2. Then run your Share Extension.
3. When suggested to choose an app to run, choose Photos.
4. Once the extension starts running, select a photo and tap on the Share button.
5. On the first run, you will need to add your extension to the share sheet.
6. Click on the More button to the right of the other share icons and turn on the switch for your extension & then select Done.
7. Now you will be able to see your extension icon in share - sheet.
8. Select an individual photo and click on share. By selecting your app, add some content and press post button.
The image will be saved to your main app. To confirm this, redirect to your app. You can check the content you entered in the textview and the image above the content.
In this article, our best iOS application developers in India, have only covered some basic UI. You can also make it more dynamic with other controls.
Hopefully, all of this will help you share data with your parent app.
Happy Coding! and feel free to share your own experience on “[email protected]”.
Hey, welcome back!!! Let’s move one step ahead with the open source development language from Swift 3 to Swift 4. We, at 9series, have filtered out points of our next strides in developing mobile apps using Swift 4.
Swift 4 is the latest major release for iOS App Developer that is intended to be completed in the fall of 2017. Its main focus is to provide source compatibility with Swift 3 code while implementing essential feature work that needs to achieve binary stability in the language. It will contain valuable enhancements to the core language and Standard Library, particularly in the generics system and an overhaul of the String type.
Source Compatibility Modes
The Swift 4 compiler will provide two language modes: Swift version 3 and Swift version 4. Swift 3 established the language for source-level stability and now Swift 4 releases source compatibility as a feature moving ahead.
New Features in Swift 4
Swift has many other features to make your code more expressive:
Multi-Line String Literals
To start a string literal, you need to write three double quotation marks: """ then press return. After pressing return key, start writing strings with any variables, line breaks and double quotes. To end multi line string literal again write ””” in new line. Ex:-
Strings are Collections
Just like in earlier version of Swift, Strings can be handled as a collection. No need to write string.characters.something to perform string manipulation.
Dictionary Functionality has Improved
Swift 4 combines some additional functionality to dictionaries to make them more strong, and also to make them work more like you would expect. Let's start with a simple example: Modifying dictionaries in Swift 3 does not return a new dictionary. Instead, it returns an array of tuples with key/value labels.
After that code runs you can't read distinction["Maths"] because it is no longer a dictionary. Instead, you need to use distinction.value, which is not good for us because we apply filter on dictionary and we got an array.
As of Swift 4, this acts more like you would expect: you get back a latest dictionary. Obviously this will break any existing code that relies on the array return type.
Similarly, the map() method on dictionaries got a key-value tuple passed in, and could return a single value to be added to an array.
That has not changed in Swift 4, but there is a new method called mapValues(). It allows you to modify the values and place them back into a dictionary using the original keys.
Here we try to form different buckets where each bucket will contain values having same first character in their name. For Example:-.
It's now likely to obtain a dictionary key and provide a default value to use if the key is missing. In following statement if there is no value for key “Bio” found then it will print default value.
Built in Encoding and Decoding
Swift 4 appears with built-in encoders and decoders for JSON. JSON to Model conversion comes in built in.
One Sided Range
Swift 4 introduces Python-like one-sided collection slicing, where the missing side is automatically assumed to be the start or end of the collection.
Like with other Swift releases, 4.0 was announced at WWDC '17 and released in beta form for developers alongside Xcode 9. This release of Swift added quite a few refinements and features to the programming language. First release of Swift 4.0 will bring overall stability to the source and binary interface, or ABI.
Stay tuned for other technical and development articles.
Eagerly waiting for the features of Xcode 9? Here it is. Apple has released Xcode 9, the newest version of its free integrated development environment (IDE) for building iOS application, macOS, watchOS, and tvOS apps.
With everything you need to create amazing apps for Apple platforms, Xcode 9 is unbelievably quick and consistently smooth while editing even the largest files. It also understands your code better than ever. Powerful new refactoring tasks happen in place, renaming symbols across Swift, Objective-C, and even user interface files without skipping a beat. And with source compatibility in Swift 4, Xcode 9 uses the same compiler to build existing Swift 3 code and updated Swift 4 code, so you can migrate at your own pace.
Brief About Xcode 9
All New Editor
Xcode 9 has a brand new Source Editor, entirely written in Swift. In the new editor you can use the Fix interface to fix multiple issues at once. Also, when mousing around your projects, you can hold the Command key and visually see how structures in your code are organized.
The source code editor has been completely rebuilt for amazing speed. It scrolls at a constantly smooth rate, no matter the files size. And it looks better, too, with preferences that give you greater control over line spacing, multiple font styles, and even the type of cursor. Issues have been redesigned to flow nicely with your code with Fix-its that are grouped together so you can commit multiple changes in a single click.
You can now increase and decrease the source editor font using ⌘ with + and ⌘ with -. When text is selected, typing an opening delimiter adds a matching closing delimiter at the end of the selection.
Refactor and Transform
The new editor goes beyond text entry with a new built-in refactoring and transformation engine. When you select a symbol or block of code, the editor will offer powerful operations such as ‘Extract’ or ‘Rename.’
One of the most basic refactorings is to rename a class, and all references to that class in the project are renamed as well, including references in the Storyboard and the filename itself.
Xcode 9 supports the following transformations and refactorings:
Groups in the Project Navigator are now more closely associated with directories in the file system.
Source Control and GitHub
Xcode 9 now connects easily with your GitHub account making it very easy to see a list of your existing projects, clone projects, manage branches, use tags, and work with remotes.
With your GitHub account built into Xcode, the clone window shows all of your personal GitHub repositories, as well as all the repositories where you added a star. From this window, you can search all of GitHub and check out a project with just a click.
A new indexing engine runs as part of the build process, so Xcode understands your code automatically.
Searching large projects feels quick – up to 50 times faster. And a new build system dramatically lowers the overhead of tasks that coordinates compiler, linker, and other tools.
With Xcode 9 and Xcode Server, we have almost everything in single place used to create apps for Apple TV, Apple Watch, iPad, iPhone, and Mac. As we know and experienced that no softwares can be complete or can be in a finished version, there are many new great features included in this version of Xcode. So we should definitely go for it and experience it.
We, as a mobile app developer believe that using Xcode 9, development can be done faster and can be pushed ahead with the next strides.
In this article, we, 9series, have covered about what is new in Xcode 9. If you find any new features or might have experienced with existing one then feel free to share your own experience with us.
The 2017 Worldwide Developers Conference keynote was Apple's biggest event in years, with the company introducing both new software platforms and a range of new hardware products.
As usual, the event began with the message for developers “Keep making apps, the world is depending on you”.
And as always, the event started with a keynote during which Apple announced dates (June 5–9, 2017 in San Jose) of updates for their iOS, OS X, watchOS, and tvOS platforms.
A Giant step for iPhone, A Monumental leap for iPad
Messages App Syncs Across Multiple Devices
The first new iOS 11 feature: synchronized conversations across iCloud, iOS, and macOS. Messages are moving to iCloud.
If you erase a message on your iPhone or iPad, then it will also delete from the iPad and the Mac and vice-versa. Our conversations will be stored on iCloud, which will make them easier to retrieve your future Apple devices.
There is also an update related to Apple Pay, which will now be able to pay people. Person-to-person payments let people pay directly from Messages as an iMessage app.
It uses the TouchID fingerprint sensor. And the money which received will go into your Apple Pay Cash Card, which you can use for further Apple Pay payments, or to transfer money back into your account.
It might be helpful to make payment through application and person can directly transfer money to his friends or family members or use as general. Hence, we can enhance our application to the next level in terms of eCommerce market.
Aha, Apple has made improvements to Siri that makes assistant’s voice sound more natural when responding to users. Siri will now be able to perform translations from English to Chinese, French, German, Italian, or Spanish. Wow…
As a ios developers, we can definitely use this feature into multi-language application and give better user-interface as well as performance to our app users.
Siri is also getting smarter about suggestions. On-device, learning is synced across other Apple devices but kept completely private, readable only for you. Siri gives suggestions based on personal usage of Safari, News, Mail, Messages and more. For example, as Siri learns topics or places, a user is interested in while browsing Safari.
The camera also has lots of improvements, including improved image quality. Portrait Mode in the iPhone 7 Plus can be taken with Optical Image Stabilisation, True Tone flash and HDR.
Apple has also added a new technology called High Efficiency Image File Format (HEIF) that reduces the file size of your iPhone 7 or 7 Plus photos.
This can be helpful into the application where Image and its quality is considered as the core concept.
In iOS 11, Apple has redesigned Control Center, which is the thing that users can swipe up to access frequent and important settings or change songs when listening to music.
Drag And Drop For IPAD
Apple is specially focusing on productivity for the iPad with iOS 11.
A new drag-and-drop feature lets you quickly move info or media from one split-screen app into the other besides it. Drag and drop can also be used with apps on your dock or home screen.
Lock Screen Improvement
The Lock Screen in iOS 11 has been improved so that you can see all of your Notifications in one place.
You can see all of your Notifications, simply pull it down from the top of the screen. Then you will be able to see both your recent and missed notifications in one place.
Here, we should take care about sending an extra unnecessary notifications, as our users can’t get bored from such things. And only useful notifications should be seen to attract the user of our application.
Apple announced that the Maps app in iOS 11 will support indoor mall and airport maps. The indoor maps will allow you to see which restaurants are past security at the airport. And you can also see which stores are on what levels in the malls.
Lane Guidance in Maps now encourages you to dodge missing a turn or an exit by showing which lane you should be in when you’re navigating. You can also check the speed limit of the road.
As a mobile app developer, we should think that whether this feature can put our application into an advanced level in terms of event organization kind of feature where our users can easily find the place/stall where he needs to go.
Do Not Disturb While Driving
Apple iOS 11 has a very useful safety called Do Not Disturb while Driving. This feature helps drivers stay focused on the road by automatically silencing notifications. And you can send auto-replies to your contacts in your favorites so that they know you are driving.
App Store App Improvements: A whole new design, A whole new perspective
The App Store has been redesigned from the ground to help you discover new apps and games you can’t live without. You’ll see daily stories by experts, a dedicated Games tab, lists for all kinds of apps, and much more. It’s the biggest thing to come to the App Store since apps. And now apps that are submitted to the Apple App Store are generally reviewed within 24 hours.
Apple is building augmented reality directly into the core of iOS, giving developers the tools they need to convincingly blend digital entertainment with the real world. So with help of this new framework, we can effectively introduce augmented reality into our application.
Now, it’s like behind-the-scenes stuff for iOS. It’s getting Metal 2, of course, and a new set of machine learning APIs letting developers use Apple’s natural language comprehension and facial recognition tools.
macOS High Sierra
Your Mac. Elevated
macOS High Sierra introduces new core technologies that improve the most important functions of your Mac. From re-architecting, it shows how it stores your data & how you watch videos to unleash the full power of the graphics processors.
Apple File System
To your Mac, everything you care about is data. And a file system is what organizes all that data into files and folders you can access with a click. Apple’s current file system was designed in the early days of Mac, and it has performed beautifully ever since. But today’s flash‑based Mac opens up new possibilities for innovation, so it’s time to lay a new foundation. With macOS High Sierra, Apple is introducing the Apple File System to Mac, with an advanced architecture that brings a new level of security and responsiveness.
Below are some bullet points about updates in macOS High Sierra:
More intuitive, More intelligent, More you
Apple announced a new version of watchOS. One of the most noticeable changes in watchOS 4 is the option of using a Siri watch face. This automatically displays contextual information on the Apple Watch, such as approaching appointments, and traffic reports if the wearer is going to work.
New fitness feature includes in controls, more prompts to set goals, and two-way workout data exchange with certain gym equipment. The Apple Watch will also be able to better connect with other hardware gadgets, such as continuous glucose monitors and smart tennis rackets, via NFC. This can be a useful feature where our application also interact with Watch OS.
watchOS 4 also includes a new Music app meant to improve the AirPods experience. Multiple playlists can now be synced including Apple Music-recommended playlists.
The Dock on watchOS 4 has a new look with a vertically scrolling interface with can lead to the UI Interface of the watch application. watchOS 4 can also automatically start when workouts are started, and music playback controls are integrated with the Workout app.
Control Center gains a new flashlight function using the display which also works during outdoor, night workouts as a safety feature.
In WWDC 2017, one thing to say from apple about tvOS, The Apple TV is getting a big new content, as Amazon Prime Video is coming to Apple TV and Apple’s new TV app.
New Macs and the iMac Pro
Now faster across the line
Apple also upgraded its MacBook and MacBook Pro lineup with faster processors and SSDs. It also refreshed the MacBooks.
Apple’s 13-inch MacBook Pro without the Touch Bar on top now comes with Intel core i5 processor clocked at 2.3GHz, 128GB Storage and 8GB RAM. This also has two Thunderbolts 3.0 ports.
iMac Pro: The most powerful Mac ever
The all-new iMac Pro, with its gorgeous 27-inch Retina 5K display, up to 18-core Xeon processors and up to 22 Teraflops of graphics computation, is the most powerful Mac ever made. iMac Pro packs incredible performance for advanced graphics editing, virtual reality content creation and real-time 3D rendering.
Any you can do, you can do better
The new version of the iPad Pro has a 10.5-inch display, 20 percent larger than the previous 9.7-inch model. Apple said that It features a better display with richer color and a new feature called ProMotion, which updates its content up to 120 times per second making it feel smoother and more responsive.
HomePod: Apple’s new Siri speaker
The HomePod has seven tweeters and four-inch woofer; it has an A8 chip living inside it. That’s a feature Sonos has too, letting the speakers adjust their output to, say, push the vocals down the centre of the room while bouncing the bass off the wall.
A feature will respond to “Hey, Siri,” play from your Apple Music account, and answer questions about the music it’s playing. It will also handle other Siri queries, such as weather, news, messages, podcasts, stocks, controlling smart home devices via HomeKit, etc.
Above are the announced points of Apple during WWDC 2017. Though we haven’t had a chance to look through everything yet, feel free to post any missing points or share your thoughts about these new features in iOS app development.
Want to share something innovative about the new release? Feel free to write us at [email protected].