|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.
Oct. 6, 2015 04:00 PM EDT Reads: 300
Oct. 6, 2015 04:00 PM EDT Reads: 244
Oct. 6, 2015 02:00 PM EDT Reads: 225
Oct. 6, 2015 01:00 PM EDT Reads: 583
Oct. 6, 2015 01:00 PM EDT Reads: 737
Oct. 6, 2015 12:45 PM EDT Reads: 459
Oct. 6, 2015 12:30 PM EDT Reads: 576
Oct. 6, 2015 12:00 PM EDT Reads: 438
Oct. 6, 2015 10:45 AM EDT Reads: 449
Oct. 6, 2015 10:45 AM EDT Reads: 166
Oct. 6, 2015 10:00 AM EDT Reads: 735
Oct. 6, 2015 09:00 AM EDT Reads: 569
Oct. 6, 2015 09:00 AM EDT Reads: 138
Oct. 6, 2015 04:00 AM EDT Reads: 412
Oct. 5, 2015 11:00 PM EDT Reads: 618
Oct. 5, 2015 08:00 AM EDT Reads: 381
Oct. 5, 2015 05:00 AM EDT Reads: 735
Oct. 4, 2015 12:00 PM EDT Reads: 629
Oct. 3, 2015 01:15 PM EDT Reads: 627
Oct. 3, 2015 11:00 AM EDT Reads: 421