How to add provision certificate in Xcode


To develop and deploy the provider side of a client/server app, you must get SSL certificates from Member Center. Each certificate is limited to a single app, identified by its bundle ID. Each certificate is also limited to one of two development environments, each with its own assigned hostname:

  • Development: Use the development environment for initial development and testing of the provider app. It provides the same set of services as the production environment, although with a smaller number of server units. The development environment also acts as a virtual device, enabling simulated end-to-end testing.You access the development environment at gateway.sandbox.push.apple.com, outbound TCP port 2195.
  • Production: Use the production environment when building the production version of the provider app. Apps using the production environment must meet Apple’s reliability requirements.You access the production environment at gateway.push.apple.com, outbound TCP port 2195.

Step to add profile in Your app is following

1. Double Tap on provision certificates . it will be added in xcode.

2. Open Your app in Xcode and click at project name , top in project navigator.

Screen Shot 2015-03-30 at 5.50.19 PM

2.  Select Target and then click on Build setting.

Screen Shot 2015-03-30 at 5.50.49 PM

3. Search “Code Sign” in build setting. and select your provisional certificate from list of provisional certificates in Provisional profile . and select your Distribution or development certificate in “Code signing identity”.

Screen Shot 2015-03-30 at 5.53.28 PM

4. Now select Project in left side and repeat same process again for Project.

Screen Shot 2015-03-30 at 5.51.41 PM

Best of Luck………

Enjoy coding…….

Advertisements

Happy Holi


Let the colors of Holi spread the message of peace and happiness.

This Holi Make A Wish, Take A Chance To Do Something Good Because

Holi Is All About Good Things And Good Things Are Supposed

To Be Start on An Auspicious Have an Auspicious Holi!!

110254-1

Sunny singh

CEO & Business developer

Lineage Technology

@Email:: lineagetechnology@gmail.com

@Facebook:: https://www.facebook.com/Lineagetechnology

@Skype:: lineagetechnology

Making a class singleton in Swift


Making a class singleton  in Swift

Create a singleton class

import UIKit

import AVFoundation

class TextToSpeech: NSObject {

   

    let speechSyn=AVSpeechSynthesizer()

    var speechUlt=AVSpeechUtterance(string: “”)

    

    

    class var shareInstance:TextToSpeech{

      struct Static{

        static var onceToken:dispatch_once_t=0

        static var instance:TextToSpeech?=nil

        }

        

        dispatch_once(&Static.onceToken){

            Static.instance=TextToSpeech()

        }

        

        return Static.instance!

    }

    

    

    func pleaseSpeechThisText(text:NSString){

        speechUlt=AVSpeechUtterance(string: text)

        speechUlt.voice = AVSpeechSynthesisVoice(language: “en-au”)

        speechUlt.rate=0.3

        speechSyn.speakUtterance(speechUlt)

        

    }

    

}

Call this class as

TextToSpeech.shareInstance.pleaseSpeechThisText(“Hi I am an iOS Developer”)

2014 in review


The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 16,000 times in 2014. If it were a concert at Sydney Opera House, it would take about 6 sold-out performances for that many people to see it.

Click here to see the complete report.

Get Rs.10 cashback on recharges of Rs.50 & above.


PayTm on Android:: https://play.google.com/store/apps/details?id=net.one97.paytm&hl=en

Get Rs.10 cashback on recharges of Rs.50 & above. Use Code: APPCB50. Valid for 5 orders on Paytm App

Note:This code is applicable on Paytm Android,iOS & Windows Apps only

Common method in Swift


1. Check for any field empty in NSDictionary

class func checkforEmptyValueinDictioanty(dic:NSDictionary)-> Bool{

for (keyVal, dataVal) in dic {

  if (dataVal.length()==0){

                println(\(keyVal): \(dataVal.length()))

                return false

            }

            

        }

        return true

    }

2.Email validation

class func isValidEmail(testStr:String) -> Bool {

let fullNameArr = testStr.componentsSeparatedByString(“@”)

        var firstPart: String = fullNameArr[0]

        if let range = firstPart.rangeOfCharacterFromSet(NSCharacterSet.letterCharacterSet()){

 }else{

            return false

        }

      let emailRegEx = “[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}”

 var emailTest = NSPredicate(format:“SELF MATCHES %@”, emailRegEx)

        let result = emailTest.evaluateWithObject(testStr)

        return result

    }

3. Alert in Swift

class func commonAlert(title:String,msg:String,curView:UIViewController){

        var device : UIDevice = UIDevice.currentDevice();

        var systemVersion = device.systemVersion;

        var iosVerion : Float = (systemVersion as NSString).floatValue

        if(iosVerion >= 8.0) {

    

        var alert = UIAlertController(title: title, message: msg, preferredStyle: UIAlertControllerStyle.Alert)

            alert.addAction(UIAlertAction(title: “Ok”, style: UIAlertActionStyle.Default, handler: nil))

                  // return alert

            curView.presentViewController(alert, animated: true, completion: nil)

        }else{

            let alert=UIAlertView(title: title, message: msg, delegate: self, cancelButtonTitle: “ok”)

            alert.show()

           

        }

    }

4. NSUserDefaults in swift as common function

class func saveToUserDefault(value:AnyObject, key:String)

    {

        NSUserDefaults.standardUserDefaults().setObject(value, forKey:key)

        NSUserDefaults.standardUserDefaults().synchronize()

    }

    

    class func userDefaultForKey(key:String) -> String

    {

        return NSUserDefaults.standardUserDefaults().objectForKey(key) as NSString

        

    }

    class func userDefaultForAny(key:String) -> AnyObject

    {

        return NSUserDefaults.standardUserDefaults().objectForKey(key) as AnyObject!

    }

    

    class func userdefaultForArray(key:String) -> Array<AnyObject>

    {

        return NSUserDefaults.standardUserDefaults().objectForKey(key) as Array

    }

    

    class func removeFromUserDefaultForKey(key:String)

    {

        NSUserDefaults.standardUserDefaults().removeObjectForKey(key)

        NSUserDefaults.standardUserDefaults().synchronize()

        

    }

5.Get screen height and width

let _screenWidth=UIScreen.mainScreen().bounds.size.width

let _screenHeight=UIScreen.mainScreen().bounds.size.height

Average Income per Programming Language


Learn Hottest programming language and earn more………

Ben Podgursky

Update 8/21:  I’ve gotten a lot of feedback about issues with these rankings from comments, and have tried to address some of them here The data there has been updated to include confidence intervals.

———————————————————————————————————

A few weeks ago I described how I used Git commit metadata plus the Rapleaf API to build aggregate demographic profiles for popular GitHub organizations (blog post here, per-organization data available here).

I was also interested in slicing the data somewhat differently, breaking down demographics per programming language instead of per organization.  Stereotypes about developers of various languages abound, but I was curious how these lined up with reality.  The easiest place to start was age, income, and gender breakdowns per language. Given the data I’d already collected, this wasn’t too challenging:

  • For each repository I used GitHub’s estimate of a repostory’s language composition.  For example, GitHub estimates this project…

View original post 380 more words

Use different font text in a Label in swift


let secondLabel=UILabel(frame: CGRectMake(0, 16, _screenWidth2, 20))

        secondLabel.textColor=UIColor.whiteColor()

        secondLabel.textAlignment=NSTextAlignment.Center

        secondLabel.font=UIFont(name: “Arial”, size: 12)

        bottomView.addSubview(secondLabel)

        

        let attrSting=NSMutableAttributedString(string: “I agree to the Terms of Service and Privacy Policy.”)

        

        NSLog(“text length is %d”, attrSting.length)

        

        attrSting.addAttribute(NSFontAttributeName, value: UIFont(name: “Helvetica-bold”, size: 14), range: NSMakeRange(15, 16))

        

        attrSting.addAttribute(NSFontAttributeName, value: UIFont(name: “Helvetica”, size: 12), range: NSMakeRange(31,4 ))

        

        attrSting.addAttribute(NSFontAttributeName, value: UIFont(name: “Helvetica-bold”, size: 14), range: NSMakeRange(35, 15))

        

        secondLabel.attributedText=attrSting