Welcome!

Java Authors: Yeshim Deniz, Jim Kaskade, Liz McMillan, Elizabeth White, Pat Romanski

Related Topics: Wireless, Java, Linux, AJAX & REA, Web 2.0, Security, Big Data Journal

Wireless: Article

How to Monitor Swift/iOS8 Applications for Crashes and Performance Issues

Add proper tracking to your app in just four steps

Apple just came out with the new programming language Swift. According to Apple, Swift will make it a lot easier and more fun to develop apps for both iOS and OS X. That's in contrast to the current language, Objective-C, which is somewhat antiquated and considered by many to be difficult to use. Although Swift is easier to use, we're sure that there will be issues like crashes, slow request, errors and so on as we already know it from Objective-C and other languages. We also know that business will ask for usage statistics. This is the reason why we immediately investigated Swift and can now show you how easy it is to add proper tracking to your app in just four steps.

Step 1: Add Lib to your Swift Project
Once you have a Swift application, including the Mobile iOS Agent into the application project is very simple. First you add the iOS Agent static library and header files to your project. Just a drag and drop exercise.

Adding dynaTrace agent libraries to SWIFT project

Step 2: Add Bridging Header
The next step required to use the agent in your Swift project is to add a bridging header to your project. Create a new header file in your Swift project, and add imports to all of the Agent header files that you will be using.

Adding bridging header file to SWIFT project

Step 3: Change the Build Settings
Define in the Build Settings of the Swift Compiler where this bridging header lives on your hard drive:

Configure "Objective-C Bridiging Header" in the project settings

Finally, set the Defines Module property to "Yes".

Set "Defines Module" in the project settings

Step 4: Run the App and Investigate the Data
As the latest version of the agent does automatic instrumentation we get the following data without doing anything else.

Swift App Visits

Crash Reports from the Swift App

Requests Slowing Down the iOS 8 App

Thanks to our iOS development team especially, Allen Schuerholz, for making Swift monitoring that easy and available a week after the official announcement of the new language.

Conclusion
Swift is a new language which is easier to read and this will hopefully help people to create more robust apps for iOS. In case the issues still happen to be in the app, with dynaTrace you have a monitoring solution that can help you gathering the right information.

For more from Klaus check out some of his other articles here.

More Stories By Klaus Enzenhofer

Klaus Enzenhofer has several years of experience and expertise in the field of Web Performance Optimization and User Experience Management. He works as Technical Strategist in the Center of Excellence Team at dynaTrace Software. In this role he influences the development of the dynaTrace Application Performance Management Solution and the Web Performance Optimization Tool dynaTrace AJAX Edition. He mainly gathered his experience in web and performance by developing and running large-scale web portals at Tiscover GmbH.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.