GithubHelp home page GithubHelp logo

isabella232 / vauxs-swift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from newrelic/vauxs-swift

0.0 0.0 0.0 4.56 MB

Sample code showing how to instrument a Swift app

License: Other

C 1.94% Objective-C 86.33% Swift 11.73%

vauxs-swift's Introduction

Archived header

Vaux's Swift

A simple demonstration of healthy async programming practices using Swift that shows how to integrate the New Relic SDK for iOS and trace native Swift methods.

This code is discussed in detail on the New Relic blog: http://blog.newrelic.com/2014/06/12/instrumenting-swift-app/

Getting started

  1. Clone this repo
  2. Open vaux_s_swift.xcodeproj in XCode 6
  3. Open AppDelegate.swift and insert your New Relic App Token
  4. Build and run the app in the iOS 8 simulator

Features of Interest

Initializing New Relic from Swift code

AppDelegate.swift includes an example of calling the New Relic initialization code from a Swift app delegate.

ImageFetcher

Vaux's Swift includes an implementation of an asynchronous image downloader called ImageFetcher. ImageFetcher handles the work of downloading an image from a URL, creating a UIImage from the downloaded data, and updating the content of a UIImageView instance. This example uses NSURLConnection's async API, blocks, and NROperationQueues to load images in parallel without blocking the application's UI thread.

See ImageFetcher.swift for the implementation.

Simplifying interacting with an Objective-C library

Vaux's Swift includes a NRMethodTimer class that makes it easy to instrument methods in your Swift code.

See NRHelpers.swift for the implementation. Examples of using NRMethodTimer are shown in ViewController.swift and ImageFetcher.swift

vauxs-swift's People

Contributors

melissaklein24 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.