|By Klaus Enzenhofer||
|June 30, 2014 08:00 AM EDT||
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.
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.
Sep. 3, 2015 10:00 PM EDT Reads: 179
Sep. 3, 2015 10:00 PM EDT Reads: 485
Sep. 3, 2015 08:30 PM EDT Reads: 151
Sep. 3, 2015 04:30 PM EDT Reads: 429
Sep. 3, 2015 03:00 PM EDT Reads: 1,605
Sep. 3, 2015 02:45 PM EDT Reads: 387
Sep. 3, 2015 02:30 PM EDT Reads: 514
Sep. 3, 2015 02:30 PM EDT Reads: 963
Sep. 3, 2015 02:15 PM EDT Reads: 415
Sep. 3, 2015 01:30 PM EDT
Sep. 3, 2015 01:15 PM EDT Reads: 110
Sep. 3, 2015 01:00 PM EDT Reads: 369
Sep. 3, 2015 12:30 PM EDT Reads: 287
Sep. 3, 2015 12:00 PM EDT Reads: 255
Sep. 3, 2015 10:45 AM EDT
Sep. 3, 2015 10:00 AM EDT Reads: 285
Sep. 3, 2015 10:00 AM EDT Reads: 1,603
Sep. 3, 2015 09:30 AM EDT Reads: 204
Sep. 3, 2015 09:30 AM EDT Reads: 213
Sep. 3, 2015 09:30 AM EDT Reads: 651