Apple Shortens App Review : 2 days


Apple has cut the amount of time it takes to approve new submissions for the App Store down to just one day, claims a new report.

The initiative — which is part of Apple’s efforts to focus on improving its services at a time when iPhone sales are decreasing — means that, in the past year alone, the mean number of days it takes an app to be approved has fallen from 8.8 down to only 24 hours.

“A lot of the way that we build software for iOS is controlled around the fact that you have a one-week release cycle,” a developer who has done work for Uber and Foursquare told Bloomberg. “It can now happen within hours of submitting them, which is really awesome because it speeds up the development cycle.”

Slicing the approval time is one more way Apple can compete with Android, which doesn’t carry out extensive security or content checks on submitted apps before making them available on the Google Play store.

Phil Schiller took over running the App Store for Eddy Cue back in December. Since then, Apple has reduced its iAd advertising platforms, while moving over 100 employees to work on improving App Store search.

Advertisements

How to create .pem for apple push notification


cropped-mobile.jpg

To enable Push Notification for your iOS app, we will need you to create and upload the Apple Push Notification Certificate (.pem file) to us so we will be able to connect to Apple Push Server on your behalf.

Step 1: Login to iOS Provisioning Portal, click “Certificates” on the left navigation bar. Then, click “+” button.

enter image description here

Step 2: Select Apple Push Notification service SSL (Production) option under Distribution section, then click “Continue” button.

enter image description here

Step 3: Select the App ID you want to use for your BYO app (How to Create An App ID), then click “Continue” to go to next step.

enter image description here

Step 4: Follow the steps “About Creating a Certificate Signing Request (CSR)” to create a Certificate Signing Request.

enter image description here

To supplement the instruction provided by Apple. Here are some of the additional screenshots to assist you to complete the required steps:

Step 4 Supplementary Screenshot 1: Navigate to Certificate Assistant of Keychain Access on your Mac.

enter image description here

Step 4 Supplementary Screenshot 2: Fill in the Certificate Information. Click Continue.

enter image description here

Step 5: Upload the “.certSigningRequest” file which is generated in Step 4, then click “Generate” button.

enter image description here

Step 6: Click “Done” to finish the registration, the iOS Provisioning Portal Page will be refreshed that looks like the following screen:

enter image description here

Then Click “Download” button to download the certificate (.cer file) you’ve created just now. – Double click the downloaded file to install the certificate into Keychain Access on your Mac.

Step 7: On your Mac, go to “Keychain”, look for the certificate you have just installed. If unsure which certificate is the correct one, it should start with “Apple Production IOS Push Services:” followed by your app’s bundle ID.

enter image description here

Step 8: Expand the certificate, you should see the private key with either your name or your company name. Select both items by using the “Select” key on your keyboard, right click (or cmd-click if you use a single button mouse), choose “Export 2 items”, like Below:

enter image description here

Then save the p12 file with name “pushcert.p12” to your Desktop – now you will be prompted to enter a password to protect it, you can either click Enter to skip the password or enter a password you desire.

Step 9: Now the most difficult part – open “Terminal” on your Mac, and run the following commands:

cd
cd Desktop
openssl pkcs12 -in pushcert.p12 -out pushcert.pem -nodes -clcerts

Step 10: Remove pushcert.p12 from Desktop to avoid mis-uploading it to Build Your Own area. Open “Terminal” on your Mac, and run the following commands:

cd
cd Desktop
rm pushcert.p12

Now you have successfully created an Apple Push Notification Certificate (.pem file)! You will need to upload this file to our Build Your Own area later on. 🙂

Oops concept in objective C


Apple has documented a best illustration on Opps concept which is  base of Objective C  .

You can checkout and learn how Opps concept is using in Objective C

https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/OOP_ObjC/Articles/ooObjectModel.html#//apple_ref/doc/uid/TP40005149-CH5-SW6

Continue reading

A soft touch of Apple HealthKit :: HealthKit Tutorial


Screen Shot 2014-10-14 at 6.54.20 PM

HealthKit :: The HealthKit framework provides a structure that apps can use to share health and fitness data. HealthKit is designed to manage data from a wide range of sources, automatically merging the data from all the different sources based on users’ preferences. Apps can also access the raw data for each source and let the app perform its own merging.

Some Key feature related to HealthKit is following

  • To use Healthkit in your application , First you have to enable it . To  enable HeakthKit you have to perform following step .

         Project setting—>Capability pane —> make enable Healthkit

         This requires that you sign in to your Apple developer account, and   

          then acquires the  appropriate entitlements for your app.

  • The HealthKit data is not saved to iCloud or synced across multiple devices. The data is only kept locally on the user’s device. For security, the HealthKit store is encrypted when the device is not unlocked.
  • HealthKit can be used only in iPhone and iPod  , Not in iPad. Developer can check for HealthKit availability using  isHealthDataAvailable().it return a Boolean value that indicates whether HealthKit is available on this device.
  • HKHealthStore is used to managed all types of data in HealthKit.
         if let massNumber = numberString("50") {

      let weightType =   HKObjectType.quantityTypeForIdentifier(HKQuantityTypeIdentifierBodyMass)

            let weightValue = HKQuantity(unit: HKUnit(fromString: "kg"), doubleValue: massNumber)

            let metadata = [ HKMetadataKeyWasUserEntered : true ]

            let now = NSDate()

            let sample=HKQuantitySample(type: weightType, quantity: weightValue, startDate: now, endDate: now, metadata: metadata)
  • All access to the data is performed through a HKHealthStore object, and it is this that you request permissions from. access request of data from Store is done as following
private func requestAuthorisationForHealthStore() {

  let dataTypesToWrite = [

    HKQuantityType.quantityTypeForIdentifier(HKQuantityTypeIdentifierBodyMass)

  ]

  let dataTypesToRead = [

    HKQuantityType.quantityTypeForIdentifier(HKQuantityTypeIdentifierBodyMass),

    HKQuantityType.quantityTypeForIdentifier(HKQuantityTypeIdentifierHeight),

    HKQuantityType.quantityTypeForIdentifier(HKQuantityTypeIdentifierBodyMassIndex),

    HKCharacteristicType.characteristicTypeForIdentifier(HKCharacteristicTypeIdentifierDateOfBirth)

  ]

  self.healthStore?.requestAuthorizationToShareTypes(NSSet(array: dataTypesToWrite),

    readTypes: NSSet(array: dataTypesToRead), completion: {

    (success, error) in

      if success {

        println("User completed authorisation request.")

      } else {

        println("The user cancelled the authorisation request. \(error)")

      }

    })

}
  • Samples are saved in store using HKHealthStore object . sample code for this is following

          

        func saveSampleToHealthStore(sample: HKObject) {

  println(“Saving weight”)

  self.healthStore?.saveObject(sample, withCompletion: {

    (success, error) in

    if success {

      println(“Weight saved successfully “)

    } else {

      println(“Error: \(error))

    }

    })

}

  • Data from Store can be retrieved from HKQuery . sample code to retrieve is following

            

          func perfromQueryForWeightSamples() {

  let endDate = NSDate()

  let startDate = NSCalendar.currentCalendar().dateByAddingUnit(.CalendarUnitMonth,

    value: –2, toDate: endDate, options: nil)

  let weightSampleType = HKSampleType.quantityTypeForIdentifier(HKQuantityTypeIdentifierBodyMass)

  let predicate = HKQuery.predicateForSamplesWithStartDate(startDate,

    endDate: endDate, options: .None)

  let query = HKSampleQuery(sampleType: weightSampleType, predicate: predicate,

    limit: 0, sortDescriptors: nil, resultsHandler: {

    (query, results, error) in

      if !results {

        println(“There was an error running the query: \(error))

      }

      var data=results as [HKQuantitySample]

    })

  self.healthStore?.executeQuery(query)

}

HealthKit Support 50 type of exercise including

     • Archery

  • Yoga
  • Swimming
  • StairClimbing
  • SnowSports
  • SkatingSports
  • Hocket
  • Fishing
  • Dance
  • CrossTraining

Type of values that can be stored in store is following

  •          1. Body Mass
  •          2. Height
  •          3.Step Count
  •          4.Blood glucose
  •          5.Blood alcohol content
  •          6.Dietary energy consumed
  •          7.Body Temperature
  •          8.Inhaler usage

         these are known as HKTypeIdentifiers.

For detail check on https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HealthKit_Framework/index.html#//apple_ref/doc/uid/TP40014707

Continue reading