Monday, 25 July 2016

Introduction & Use of Cocoa Pods

Introduction & Use of Cocoa Pods




Instead of downloading code from GitHub and copying it into your project (and thus making future updates difficult), you can let CocoaPods do it for you.
You will retrieve show information from a JSON feed provided by trakt. To simplify downloading, parsing, and showing results, you will use AFNetworking and a few other open-source libraries along the way.
To get started, you first need to install CocoaPods. CocoaPods runs on Ruby, yet that’s the only dependency it has. Fortunately, all recent versions of Mac OS X (since OS X 10.7 Lion) ship with Ruby already installed. So all you need to do is update RubyGems (just to make sure you have a recent version).
To do so, open Terminal and type the following command:
sudo gem update --system
Enter your password when requested. The Terminal output should look something like this:
Terminal Output
This update may take a little while, so be patient and give it a few minutes to complete. You can also expect some documentation in the Terminal window about the latest version; you can ignore this for now.
Next, you need to install CocoaPods. Type this command in Terminal to do so:
sudo gem install cocoapods
You may get this prompt during the install process:
rake's executable "rake" conflicts with /usr/bin/rake
Overwrite the executable? [yN]
If so, just enter y to continue. (This warning is raised because the rake gem is updated as part of the install process. You can safely ignore it.)
Lastly, enter this command in Terminal to complete the setup of CocoaPods:
pod setup
This process will likely take a while as this command clones the CocoaPods Specs repository into~/.cocoapods/ on your computer.
Great, you’re now setup to use CocoaPods!

Open Project that you created

Open Main.storyboard, and you will see just one view controller:

View Controller
Yeah, you read that right! It’s time to create your pod file.

Installing Your First Dependency

Open Terminal and navigate to the directory containing your ShowTracker project by using the cd command:
cd ~/Path/To/Folder/Containing/Demo
Next enter this command:
pod init
This will create a default Podfile for your project. The Podfile is where you define the dependencies your project relies on.
Type this command to open Podfile using Xcode for editing:
open -a Xcode Podfile
# Uncomment this line to define a global platform for your project
# platform :ios, "6.0"
 
target "ShowTracker" do
 
end
Replace # platform :ios, "6.0" with the following:
platform :ios, "7.0"
This tells CocoaPods that your project is targeting iOS 7.
Many libraries – AFNetworking included – have a minimum iOS version requirement. If you omit this line, CocoaPods assumes a default target version .
If you’ve only ever programmed in Objective-C, this may look a bit strange to you – that’s because the pod file is actually written in Ruby. You don’t need to know Ruby to use CocoaPods, but you should be aware that even minor text errors will typically cause CocoaPods to throw an error.
It’s finally time to add your first dependency using CocoaPods! Copy and paste the following into your pod file, right after target "ShowTracker" do:
pod 'AFNetworking', '2.2.1'
This tells CocoaPods that you want to include AFNetworking version 2.2.1 (the latest as of the writing of this tutorial) as a dependency for your project.
Save and close the pod file.
You now need to tell CocoaPods to “install” the dependencies for your project. Enter the following command in Terminal to do so (making sure that you’re still in the directory containing the ShowTracker project and Podfile):
pod install
You should see output similar to the following:
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.2.1)
Generating Pods project
Integrating client project
It might also tell you something like this:
[!] From now on use `ShowTracker.xcworkspace`.
If you type ls now (or browse to the project folder using Finder), you’ll see that CocoaPods created a Pods folder – where it stores all dependencies – and ShowTracker.xcworkspace.



Monday, 11 July 2016

Json GET & POST (AFNetworking)

Json GET & POST  Using AFNetworking



Here Below AFNetworking Folder Given Below Which Have All File Of Json  ....


Click Here To Download :-   Download


This Folder Must Be Import in Your Bundle ....


Write Below Code In Info.plist :-


<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>



Write Coding in ViewController.m File ...

#import "ViewController.h"
#import "AFNetworking.h"

@interface ViewController ()
{
    NSDictionary *ResponceDict ;
}
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

-(IBAction)GET_Click:(id)sender
{
    

    
    //-----------------------------
    
    // send request for schools
    
    NSString *strURL = [NSString stringWithFormat:@"YOUR URL"] ;
    NSURL *url = [NSURL URLWithString:strURL] ;
    
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    // 2
    AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
    operation.responseSerializer = [AFJSONResponseSerializer serializer];
    //operation.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
    
    [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
        
        // 3
        ResponceDict = (NSDictionary *)responseObject;
        
        NSLog(@"%@",ResponceDict) ;
        
       
        
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        
        // 4
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error Retrieving Weather"
                                                            message:[error localizedDescription]
                                                           delegate:nil
                                                  cancelButtonTitle:@"Ok"
                                                  otherButtonTitles:nil];
        [alertView show];
        
       
        
    }];

    
    // 5
    [operation start];
    
    
}


-(IBAction)POST_Click:(id)sender
{
    //---- send request for get profile [POST]
    
    NSDictionary *params = @{@"user_id" : @"7"
                             };
    
    NSString* HOST_URL = @"YOUR URL";
    
    AFHTTPRequestOperationManager *operationManager = [AFHTTPRequestOperationManager manager];
    operationManager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
    
    [operationManager POST:HOST_URL parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject){
        
        // Enter what happens here if successsful.
        
        ResponceDict = (NSDictionary *)responseObject;
        
        NSLog(@"%@",ResponceDict) ;
            
    }failure:^(AFHTTPRequestOperation *operation, NSError *error){
        
        // Enter what happens here if failure happens
        
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error Retrieving Weather"
                                                            message:[error localizedDescription]
                                                           delegate:nil
                                                  cancelButtonTitle:@"Ok"
                                                  otherButtonTitles:nil];
        [alertView show];
        
        
    }];

}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

Monday, 4 July 2016

Create Apple Account & Submit App

Create Apple Account & Submit Application on iTunes




The first step on the path to the App Store is to register as an Apple developer. Note that becoming an Apple developer is free, but this is not the same as being able to submit an app to the app store — to do that you must pay the aforementioned US$99 fee.
You may already have a developer account with Apple. If so, feel free to skip this section.
If you don’t yet have an Apple developer account, go to the Apple Developer Site and in the upper right click the Account link:
submit an app
On the next page, you can choose to create a completely new Apple ID or use an existing one. If you want, you can save time and use the Apple ID you already use for your iTunes purchases, but it’s better to have a different ID to keep your personal and professional lives separate.
So, click Create Apple ID:
submit an app
Fill in your email, password and security information. Use an email address that you check often, because Apple sends frequent updates on the program and on the status of apps you’ve submitted for approval.
submit an app
Scroll down and complete the remaining security questions and a captcha prompt, then click Continue:
submit an app
Check the email account you specified when registering. You should receive an email just like this:
submit an app
The next page will prompt you to enter the code emailed to you, enter the code and click Verify:
submit an app
You now have a developer account Apple ID. Great work! :] Log in to the developer site using your new ID:
submit an app
The next page is the “oh, so fun” legal agreement. Call your lawyer and read the whole thing to him/her on the phone. As soon as you get your lawyer’s approval, click the checkbox. You may want marketing emails too, so click that checkbox if you wish. Now click Submit:
submit an app
Cool, you’re an Apple developer! That’s great, but can you start developing and submit an app to the App Store? Well, not quite… You have access to the libraries and tools, but you need to give Apple some money to submit an app to the app store.
submit an app

Joining the Developer Program before you submit an app

Being a registered Apple developer gives you access to a lot of information, but to be able to send apps to the App Store (and to have access to certain associated portals) you need to enroll in Apple’s Developer Program. In the past, there was the iOS program, OSX program, and Safari program. Now there is one program and the same fee covers all platforms. This is the part that will cost you US$99 per year.
If you followed along with the previous section and clicked Continue, you should be in the right place. If you skipped the previous section because you already have an Apple developer account, then go to theDeveloper Member Center, log in, and you’ll be in sync.
Once logged in, click the Join the Apple Developer Program link on the lower center of the page:
submit an app
Now click Enroll:
submit an app
This next page describes enrollment as an Individual or as a Company. For this tutorial, you’ll see how to enroll as an individual. If you choose to enroll as a company the process won’t be as easy — you will need to submit a lot more paperwork to prove your involvement in the company.
Take a deep breath, make sure you have half an hour to spend, and click Start Your Enrolment:
submit an app
The next page asks if you want to enroll as an individual, as a company, or as a government organization. If you do choose to enroll as a company, read the requirements on the right to make sure you have everything you’ll need.
Select Individual / Sole Proprietor / Single Person Business, and click Continue:
submit an app
Enter your billing/business information to verify your identity. Apple will attempt to confirm this information with your credit card company, so make sure you enter it correctly:
submit an app
Fill in the remaining fields and at the bottom you’ll see yet another “oh so fun” license agreement. So call your lawyer again, get the OK to check the box and click Continue:
submit an app
Review your information and when you’re ready to submit, click Continue:
submit an app
You will now be prompted with the cost and and a summary for the purchase. You have the option for automatic renewal every year, which saves having to remember to renew, preventing any chance that your apps become unavailable if you’re on holiday!
Check Automatic Renewal if you want this option, then click Purchase:
submit an app
You’ll now have to log in yet again. Use your newly created Apple ID.
submit an app
Note: The following steps only apply to the US and other countries with online Apple Stores. For countries without online Apple Stores, the process will be slightly different, requiring you to fax your credit card information to Apple. Unfortunately, if you’re in one of those countries, you’ll be on your own for the remainder of this section. So, follow Apple’s instructions and skip to the next section.
For everyone still following along, fill out the payment screen (the values below are fake — use the right values for yourself), again verify your billing information for the purchase:
submit an app
Once again, you will be asked to agree to the Terms & Conditions. Call your lawyer again to get the important go-ahead, tick the box and then click Continue:
submit an app
Confirm your intent to purchase the membership:
submit an app
Shortly afterwards you will be greeted by a thank you screen:
submit an app
You’re welcome!

Now, Let Me In!

After submitting and paying for your iOS Developer registration, you’ll need to wait a short while for Apple to process your order.
If you had to fax your information to Apple because you’re in a country without an online Apple Store, you’ll need a little more patience.
In either case, eventually you should get an email from Apple like this one:
submit an app
At the same time, you should receive this email:
submit an app
At this point you should download Xcode by proceeding to the Apple App Store using the App Store icon on your application dock. Apple places the latest non-beta release in the App Store. Search for Xcode or clickhere. While you will only be using Xcode very briefly in this tutorial, there are many other excellent tutorialson RayWenderlich.com to teach you how to use it!
Now go to the Developer Center and sign in:
submit an app
After providing your credentials, you’ll be in! Finally!
submit an app
The Developer Center has a LOT of information. There are programming guides, downloadable code, documentation, videos, the very helpful developer forum and a support center.
Spend some time exploring to familiarize yourself with what’s available. Be aware that some of this information might be confidential, especially if it involves beta versions of any SDKs or Tools.
In this tutorial that demonstrates how to submit an app, you’re going to focus on two areas that you’ll use a lot when developing your apps: the Certificates, IDs & Profiles area and iTunes Connect:
submit an app
But first, a brief introduction to each is in order.
Certificates, IDs & Profiles
As you may already know, a non-jailbroken iOS device is only able to run apps approved by Apple and installed through the App Store.
Apple achieves this by requiring that every app run by iOS has a signed Apple Certificate. Apps installed from the App Store come bundled with a certificate, which the system verifies before it allows the app to run. If there’s no signature or if the signature is invalid, the app won’t run.
As a developer, you need to be able to run your apps on your own devices on a regular basis as you’re developing them. For this you need a way to create and sign your own certificates.
That’s where the Certificates, IDs & Profiles area comes in. This section allows you to generate what Apple calls “profiles”. Profiles, sometimes called “code signing identities”, are files generated by the Developer Center that allow Xcode to sign your apps in a way that allows iOS on your devices to identify as valid.
There are two types of profiles:
  • Development profiles. These are tied to specific devices, so the app can only run on those.
  • Distribution profiles. These are used to sign your app before you submit it to Apple for approval. They contain no device-specific information, but you can’t use them to install apps on any device yourself, because Apple still has to sign the app after the approval process.
The Certificates, IDs & Profiles area can also generate push certificates in case your app wants to send push notifications.
iTunes Connect
iTunes Connect is the portal you’ll use to submit an app. This is where you’ll register a new app, enter the app’s description and screenshots, choose the price, and configure game center and in-app purchases.
This is also the portal you’ll use to agree to new contracts, set your financial data (so you can bank that profit) and check your sales.
You’ll spend the rest of this tutorial working in the Certificates, IDs & Profiles area. Next time, in Part Two, you’ll look at iTunes Connect.

Certificates, IDs and Profiles

In this next part of the tutorial, you’re going to use the Certificates, IDs and Profiles area to set up the information you need in order to deploy your app to your device (and later the App Store).
Note that there is a simpler way to do this in Xcode called Automatic Device Provisioning, that you will cover in part two of the series. But for now, you’re going to go through the process step-by-step. You’ll understand how things work better this way, and it’s very useful to know when submitting to the App Store.
If you still have your Developer Center page in front of you (if not log in again), just click the Certificates, IDs & Profiles link on the left side or click on the gear icon in the middle of the page:
submit an app
There are a lot of things you’ll need to do from this area. Some of them you’ll only have to do once, like generating your certificates and registering your devices. Other things you’ll have to repeat for every app you make, like generating development and distribution profiles.

Generating Certificates

First you’ll need to generate two certificates, one for your development profiles and another for your distribution profiles. As the text on the page explains, you can request a certificate via Xcode, or manually. But it’s really useful for you to understand the manual process so you’ll be uploading a Certificate Signing Request (or CSR) from your Mac.
Make sure the drop down in the upper left says iOS, tvOS, watchOS, then click on the + in the upper right:
submit an app
On the next page, select iOS App Development as the certificate type and click Continue at the bottom:
submit an app
submit an app
An explanation of how to generate a CSR using Keychain Access is then shown. To follow the instructions, you need to open the Keychain Access app on your Mac. If you don’t know where it is, search for it using Spotlight:
submit an app
Once the program is open, choose Keychain Access\Certificate Assistant\Request a Certificate From a Certificate Authority…:
submit an app
In the Certificate Assistant window, fill in your email address and name, choose Save to disk and clickContinue:
submit an app
Save the file somewhere on your Mac. That’s your CSR created, now to generate that certificate.
Go back to the Developer Centre in your browser — you should now click Continue
submit an app
Click Choose File…, locate the CSR file you just created and select it, then click Continue
submit an app
You will now see a screen that says your certificate is ready. Click Download, and double click the development certificate file to install it in the keychain:
submit an app
Click Add in in the Keychain Access dialog to complete the installation:
submit an app
Now you have your certificate for your development profiles, you need to create a certificate for your production or distribution profiles. Click the Add Another button. Under Production select the App Store and Ad Hoc button, and click Continue at the bottom as before:
submit an app
Go through the same process as before to submit the same certificate signing request as you did for the development certificate.
When it is ready, click Download, and double click the distribution certificate file to install it in the keychain:
submit an app
Note: The distribution certificate is called ios_distribution.cer, whereas the development certificate you downloaded before is called ios_development.cer.
Note: You may have seen some text at the bottom of the screens before you clicked “Continue” talking about Intermediate Certificates. When you launch Xcode, or if you have already launched Xcode, it will install these automatically for you. Should you ever need to install them for some reason in the future just can click the + as if creating a new certificate and scroll down to the link to download the file:
submit an app
This will download a file called AppleWWDRCA.cer. Double-click this file to install it. It will open Keychain Access again in case you closed it.
Now look in Keychain Access and you will see your two installed certificates as follows:
submit an app
Note: If you do not see the message This certificate is valid with a green check-mark, then you have either not launched Xcode yet, or you need to install the Intermediate Certificates, as noted above. The easiest step is to launch Xcode and let it update the intermediate certificate for you.
Now you can close Keychain Access.

Registering Devices

Let’s continue. The next step is to register your devices. On the left-side menu, click Devices\All and then on the right, +:
submit an app
You need to get the UDID of the device(s) you want to use to run your apps. There are many ways to get a device’s UDID: there are free apps available that will do it for you, or you can use Xcode’s organizer. Here, you’ll get a UDID using iTunes.
Open iTunes and plug the device into your computer. Select the device from the menu bar under the player controls. iTunes will display your device name, capacity, version, serial number and phone number. Click on the serial number and it will change to your device’s UDID:
submit an app
Now just right click on the number and select Copy to copy the UDID to your clipboard.
Go back to your browser, enter a device name (which can be anything you want) and paste the UDID into the appropriate field. When you’re done, click Continue
submit an app
You will now be prompted to confirm the registration. Click Register:
submit an app
Your device is now registered, and will appear in your list of devices:
submit an app
You can always go back later to register more devices, such a those belonging to friends and beta-testers.
Note: Apple allows you to register up to 100 devices per year to your account. If you register a device and later remove it, it still counts towards your total for the year.

Creating App IDs

Now that your device is registered, you need to create an App ID. Every app you build will need its own App ID. On the side menu, click Identifiers\App IDs:
submit an app
You’ll see a brief explanation of the App ID concept. In a nutshell, an App ID is a combination of a 10-character “seed” prefix generated by Apple, and a suffix created by you, defined as a Bundle ID search string. Together they create a unique identifier for your app.
Here are some important things to know about App IDs:
  • You can elect to have all of your apps share the same seed prefix, if you want to share keychain information between them. Say you have a suite of apps that all make use of the same website via a login. If the apps share the same seed prefix, and one app saves the user’s login information to the iOS keychain, any other app in the suite can get this login information from the keychain.
  • You can create two different types of App ID: an Explicit App ID, or a Wildcard App ID. Explicit App IDs must be used when you wish to incorporate services such as in-app purchases or iCloud. Wildcard App IDs should be used when you want to use the same App ID for multiple apps.
  • In an Explicit App ID, the Bundle ID search string has to be unique for each of your apps. It will be used by Apple’s push notifications service, for in-app purchases and for other services such as iCloud storage.
  • Apple recommends that you use “a reverse-domain name style string” for the Bundle ID. For an Explicit App ID, the suggested format is “com.domainname.appname”; for a Wildcard App ID, the suggested format is “com.domainname.*”.
  • Remember, if you use a Wildcard App ID, you won’t be able to use any of the neat services normally available, such as push notifications or in-app purchases. You might not plan to use these services now, but if you change your mind, you won’t be able to change your App ID without creating a new app.
Now that you know all about App IDs, it’s time to create one. On the right side of the screen click +:
submit an app
Fill out the description (usually just your app’s name). The seed ID will usually always be your Team ID. Now, make sure Explicit app ID is selected, and enter the Bundle ID – remembering to use a reverse-domain name style string for this, including the name of the app at the end. Click Continue when done:
submit an app
You will be prompted to confirm your values, click Register at the bottom. You will then see a Registration Complete message:
submit an app
Now you’re ready to create the provisioning and distribution profiles.

Provisioning Profiles

On the side menu, click Provisioning Profiles\All:
submit an app
You’ll see a brief explanation describing getting started with iOS provisioning profiles. A provisioning profile joins together all the pieces you have done so far, including certificates, device identifiers, and the App ID.
Development provisioning profiles are used to build and install versions of your app during your development process and Distribution provisioning profiles are used for submitting your apps to the App Store and beta testers.
On the right side of the screen click on the +:
submit an app
Choose iOS App Development, then click Continue:
submit an app
The next screen asks you to select an App ID for this new profile. Since you’ve only generated one so far, the drop down menu contains just this one. Click Continue:
submit an app
The following screen asks you to select the certificates for the profile. If you have multiple members on a team they can be selected from here. Select your certificate checkbox and click Continue:
submit an app
This screen asks for the devices this profile is valid for, select your device and click Continue:
submit an app
Now, enter a name for this profile. The name you specify is used to identify it among other profiles, so try to make it as descriptive as possible. Click Continue:
diagram
The final page shows your generated profile and has a download button that allows you to download it. Go ahead and click Download:
submit an app
Since you are already here, go ahead and generate the distribution profile. You won’t actually need this profile until you’re ready to submit the app for approval, but since you’re here, it’s worth doing it now. Click the Add Another button at the bottom:
submit an app
Under Distribution, click the App Store button, then click Continue:
submit an app
The next few steps are the same as for the development profile. Follow the screens along, name the distribution profile something descriptive and unique and download it as you did the development profile.
Now find the files you just downloaded on your computer, and double-click each of them in turn causing Xcode to launch. Verify the profiles are there by opening a project or starting a new one for this test. Click on the Project in the left pane. Select Build Settings, select All, scroll down to Code Signing and click on the word Automatic next to the entry for Provisioning Profile. Your profiles should be listed:
submit an app

Open Xcode if you haven’t already. Note that for this tutorial, the screenshots and instructions are applicable for version 7.3 (but it should work for future Xcode versions as well).
Once in Xcode, open the Devices window (⇧⌘2), plug in your iOS device and select it from the menu on the left. If this is the first time you’ve connected your device whilst Xcode is running, Xcode may take some time to sort itself out — and you’ll see a message saying that it’s “processing symbol files”. Eventually, this will be complete and your screen should look something like below:
submit an app
Now select Xcode\Preferences… (or ⌘,) and choose the Accounts icon:
submit an app
Click the + in the lower left and select Add Apple ID…:
submit an app
Enter your developer account credentials and click Sign In:
submit an app
Entering your credentials in this way allows Xcode to connect automatically to the Provisioning Portal on your behalf. It will also detect any connected device and automatically register it with the Provisioning Portal if it isn’t there already.
Next you will see a screen that shows your information, note that your role is Agent (this is the super user account and has the most permissions of any role). If your account was set up as a company or business (not an individual developer) you would have the ability to add other folks to your account. Roles can be of type “Member” or “Admin” for these folks.
Click View Details…:
submit an app
At the bottom, you will see a list of the provisioning profiles created so far in the Portal, and a download button next to each one that hasn’t yet been downloaded or installed in Xcode. If you created the two profiles described in part 1, those will be listed here. Click Download All in the lower left corner to install the profiles in Xcode:
submit an app
At this point, your profiles can now be used with any app that has the same Bundle ID you specified in the App ID you included in the profile. Pretty easy, eh? :]
Click Done and close out the preferences pane.
BUT: as mentioned before, there will be times you’ll still need to know how to do this using the Provisioning Portal, so it’s a good thing you’ve seen how to do it the hard way first. Some situations in which you’ll need to know the old-school way:
  • You’re working for a person or company that has their own account, and you need to use their account instead of your own.
  • You’re building a beta version of an app for someone’s device and you don’t have access to the device itself, just the UDID.
  • You need to test app services such as Game Center, In-App Purchase, Data Protection, or iCloud. For these you need a provisioning profile with a bundle ID that does not use a Wildcard App ID. As you might remember from the first part of this tutorial, these work with every app, but do not allow you to test these services, so in this case you need a provisioning profile with a Explicit App ID.
  • You want to be the cool kid that does not use these “generic” profiles and has a profile for every app.
Well, now you’ve seen this easier way, let’s get started with your first real task for this tutorial: preparing your app to run on your device.

Running Your App on Your Device

For this section of the tutorial, you need an app to test on your device. 
Open the project you chose (mine, your own, or one from our site) in Xcode. Open the project navigator and click on the project node of the tree (1), then click on the target (2), then click General (3), setDeployment Target (4) to 9.0 at the top:
submit an app
Note that deployment target is a fancy way of saying “the minimum version of iOS that your code supports”. Be careful though, because if, for example, you set this to iOS 8.0 but use an API that is only available on iOS 9 without checking first, your app will crash! The safest thing to do is to test your code on a device running the oldest version of iOS you want to support.
Next, change the Bundle Identifier. This should be the same bundle identifier you used for the App ID you registered in the Provisioning Portal:
submit an app
Now you need to assign the team — select your account from the drop down:
submit an app
Next step is to point Xcode to the correct provisioning profiles. Click on the Build Settings tab and search for the word “signing”. In the search results list under the Code Signing Identity section, click on the drop downs for the Debug and Release entries and choose the correct provisioning profiles from those presented by Xcode.
You should select your developer profile for the Debug build, and your distribution profile for the Release build:
submit an app
You’re almost ready to build, but before you do, make sure the device you want to build on is connected to your Mac. Then choose to build for that device using the scheme chooser:
submit an app
Press ⌘B to build the project. You may see a prompt saying “codesign wants to sign using key ‘privateKey’ in your keychain”. The Mac is letting you know Xcode wants to access your credentials. Click Always Allow.
If there are any problems with your profiles, you’ll see something like this popup in Xcode:
submit an app
In this example, the Bundle ID had been accidentally mis-typed. Xcode will gladly go make you a new profile for you — but you do not want that so don’t hit Fix Issue — select Cancel instead and go back and correct the Bundle ID manually.
Hit ⌘B to build again. Now everything should be OK:
submit an app
Hit ⌘R to run the app. In a few moments you should see your app running on your device! Yay! Finally! :]
Next, you need to know how to submit an app to Apple for approval. For this, you’ll have to use iTunes Connect.

Last Stop: iTunes Connect

Now it’s time to get to know iTunes Connect. Go to: https://developer.apple.com/membercenter and log in with your iOS Developer credentials.
Click iTunes Connect:
submit an app
Note: You can also connect directly to iTunes Connect via the url: https://itunesconnect.apple.com
The first time you connect, you’ll see a brief introduction panel. You may wish to skip this in future:
submit an app
Also, if it’s your first time, you’ll have to accept the Terms of Service. By now you know the drill: lawyer, clickcheckbox, click Accept. It might be a good idea to keep that lawyer on a retainer…:
submit an app
You will now be greeted with the main iTunes Connect dashboard. There are a lot of things to do here — this tutorial will show you the basic steps to get your app submitted, but if you want the gritty details you can check out the complete iTunes Connect Developer Guide.
First things first: If you want to get paid for your apps, there’s some “paperwork” you must fill out. It’s better to get this stuff out of the way right now. It’s pretty boring and it will vary a lot from country to country but, seriously, if you want to get money from your apps you’ll have to endure it.
If all of your apps (or at least the first) will be free, you can skip this section and go right to Submitting Your App below.
Hey, you’re still here? OK then, click Agreements, Tax and Banking:
submit an app
First time in, you’ll have to electronically sign one contract for paid applications that covers all terms of payment.
Click Request:
submit an app
Phone lawyer (told you you should get a retainer), yada, yada, yada. If you want to, you can click View Pricing Matrix. Now click checkbox then, click Submit:
submit an app

Contact Information

It’s time to set up your contact information. Click the first Set Up button, under Contact Info:
submit an app
Click Add New Contact:
submit an app
Add yourself as a new contact. Since no one is looking, give yourself a nice title, like CEO or President. ClickSave when done:
submit an app
Assuming, as in part 1, that you are an individual developer and have no employees, you can give yourself all the roles. Change every drop down menu and click Done:
submit an app

Bank Information

Now under Bank Info click Set Up:
submit an app
Again, since this is your first time here, you’ll have to first click Add Bank Account:
submit an app
Choose the appropriate Bank Country. If you choose anything other than United States, be aware that the steps from now on may be different. Click Next:
submit an app
Your bank’s ABA Routing number is located on your checks or statements, as indicated below in the orange box. Enter the correct ABA Routing Number, click Next:
submit an app
Now you have to look for your bank’s branch. Look for one in your city but don’t expect to find an exact match for your branch. Don’t worry, it doesn’t have to be exact. Click Next:
submit an app
Check the information (again, don’t worry if the address is not exact) and click “Next”:
submit an app
Now comes the important piece: your account number. This is also found on your checks or statements, as indicated in the blue box below. Fill out all the details for your account and click Next:
submit an app
Confirm all the information, check the box indicating that it is correct, and click Save:
submit an app
Now you can select this new back account and click Save:
submit an app

Tax Information

We’re almost done. You’ll at least have to fill out the US tax forms. Under Tax Info click Set Up:
submit an app
You must complete the US form no matter whatever other forms you may also need to complete. Click Set Up under U.S. Tax Forms:
submit an app
Fill out all the required information. Though the process should be straightforward for US citizens, you may have questions. Before coughing up money to speak to an accountant, make sure that your question can’t be answered in the W-9 instructions available for download from the upper-left corner of the page.
submit an app
Scroll down, fill everything out, and refer back to the W-9 instructions if you need to. Make sure everything is correct and click Submit:
submit an app
Notice that the Status field in the Contracts In Process panel now says “Processing” – Apple is verifying the information you provided. This may take an hour or so to be become active — you may even see a deposit in your account followed by a withdrawal of the same amount.
submit an app
Once all your contracts have been verified, the Contracts in Process panel will disappear, and you’re just left with the Contracts In Effect:
submit an app
Click Done to go back to the main iTunes Connect Dashboard.
Phew, thank goodness that’s done! The boring part is over. Better still, if you did all that correctly, you can now get paid!

Submitting Your App

If you really want to submit an app of your own instead of just following along, there are certain items you’ll need to get in order, before you can go any further. Make sure you have the following ready before you even get started:
  • Your app’s name.
  • Your app’s description.
  • Your app’s icon, sized 1024 by 1024 pixels.
  • 3.5 inch retina: Sized: 640 x 920 (no status); 640 x 960 (full screen); or, for landscape, 960 x 600 (no status bar); or 960 x 640 (full screen).
  • 4 inch retina: Sized: 640 x 1096 (no status); 640 x 1136 (full screen); or, for landscape, 1136 x 600 (no status); 1136 x 640 (full screen).
  • 4.7 inch retina: Sized: 750 x 1334 (portrait); 1334 x 750 (landscape).
  • 5.5 inch retina: Sized: 1242 x 2208 (portrait); 2208 x 1242 (landscape).
  • iPad: These should be sized 1024 x 748 (landscape, no status); 1024 x 768 (landscape, full screen); 2048 x 1496 (landscape hi-res, no status); 2048 x 1536 (landscape hi-res, full screen); 768 x 1004 (portrait, no status bar); 768 x 1024 (portrait, full screen); 1536 x 2008 (hi-res portrait, no status bar); 1536 x 2048 (hi-res portrait, full screen).
  • iPad Pro: Sized 2048 x 2732 (portrait); 2732 x 2048 (landscape).
Notes: Your images can be in JPEG or PNG format. At least one screenshot is required for each device your app supports (maximum 5 for each). You should not include the status bar in the images.
Thank goodness for Auto-Layout for apps with all these screen sizes from the mix of devices! For most games you will use the full screen options for your screen shots.
Once you’ve got all this assembled, click My Apps in iTunes Connect:
submit an app
Click +, followed by selecting New App:
submit an app
  • Platforms – Choose iOS for your app.
  • Name – enter the name of your app (as it will appear on the App Store).
  • Primary Language – select from the choices.
  • Bundle ID – select the correct id from the drop down of IDs you registered earlier.
  • SKU – a unique ID for your app in the Apple system that is not seen by users. You can use letters, numbers, hyphens, periods, and underscores. The SKU can’t start with a hyphen, period, or underscore.
Click Create:
submit an app
Now the details screen appears. Click App Information. Fill out the Category fields based on your app information. If your app gathers data or your app is “Made for Kids” you must have a privacy policy posted — the Privacy Policy URL should contain the address for this. Scroll through the rest of the settings and set any appropriate for your app. Click Save:
submit an app
Now click Pricing and Availability:
submit an app
Select All Prices and Currencies for more information about the price tiers. Now choose your desired price tier or indicate that your app will be free. You can specify different prices within different date ranges if you wish by selecting Plan a Price Change. But for now, just add one entry — the Start Date will default to today; the End Date will be set to “No End Date”.
Check the radio button if you want your app to be offered at a discount to educational institutions when they purchase multiple copies at once. You can also offer your app to businesses at a discount for multiple purchases.
Once you’re done, click Save:
submit an app
Click 1.0 Prepare for Submission:
submit an app
This section is where you add all the assets for your app to appear in the App Store. First step is to upload your app’s icon and at least one screenshot. If your app is universal, you’ll need to submit screenshots for the iPhone and for the iPad. When you have what you need, just drag and drop the screenshots over for each device type.
Tips: You can make your screenshots with the Simulator by clicking ⌘S when your app is running. Run the simulator in 100% scale mode and use the following simulators for the proper screenshot sizes:
  • 4.7-inch is 6S simulator
  • 5.5-inch is iPhone 6S+
  • 4-inch is iPhone 5
  • 3.5-inch is iPhone 4S
  • iPad is iPad2
  • iPad Pro is iPad Pro
Click Save when you’ve added all the screenshots you need.
submit an app
Scroll down and complete the the description (this is what the users will see in the app store) and keywords.
Consider the keywords — these are very important. Only your app’s name and keywords are indexed in iTunes’ search engine, so brainstorm words that potential users might think of using to find your app or your competitor’s apps. You can only change keywords when submitting updates, so choose wisely.
Enter the URL for your website support page. It can be a simple page that allows users to email you if they want to compliment you on your great work :]
submit an app
Skip the Build section for now and scroll down to General App Information. Add your icon — it must be 1024 by 1024 pixels.
Set the version number (should be the same as in your app’s Xcode project).
Fill out a copyright notice (generally just the release year and your name or your company’s name), a contact email and affiliated websites.
submit an app
Click Edit next to Rating. Enter the categories appropriate for your app. Be honest, as the reviewer can make changes to this section if they disagree. Click Done:
submit an app
Scroll down to App Review Information. This section is designed to help the person who reviews and approves your app. The Notes can be used for details about your app that you want the reviewer to know about. For example, if users need to sign up at a website or even within the app in order to use it, provide some credentials here to make the reviewer’s job easier. Also, if your app requires special hardware, ensure that you explain that here too, and try to have a way for the reviewer to use the app without the hardware. Complete the contact information so that the reviewer can reach you to discuss things if they need to:
submit an app
Finally, use the Version Release section to indicate when you want the app to be released. Since this is the first version, just leave the Automatically release this version option selected.
Now click Save:
submit an app
If there were no issues with what you have entered, you will now see a Submit for Review button in the top right:
submit an app
If you try to click Submit for Review you will get a message saying that there were one or more errors on the page — your app has not been uploaded yet!
submit an app
submit an app
Remember you skipped the Build section? So now you need to upload your app using Xcode.

Submit an app with Xcode

Your application should now be tested and ready to roll. All you need to do is submit to Apple for approval. This is surprisingly easy considering what you’ve been through already.
Go to Xcode and choose Generic iOS Device in the scheme chooser:
submit an app
Then choose Product\Archive:
submit an app
If everything is okay with the build, Xcode will open the Organizer window with your app in the Archives tab. You don’t really need to click “Validate…” here because this will be done when you submit anyway, and Xcode should have already validated against most problems. So save yourself some time and click Upload to App Store…:
submit an app
Select your iOS Developer credentials and click Choose:
submit an app
Next, you will be shown the app to upload. Click Upload:
submit an app
Your app will start uploading to iTunes Connect. Various windows will update with messages as code is compiled, verified and code-signed. When the upload finishes, you should see the following message:
submit an app
Just smile and click Done. :]
You now just have a couple of quick steps to submit the app. Switch back to iTunes Connect and scroll down to the Build area you skipped earlier and click Select a build before you submit your app:
submit an app
Select the build Xcode just uploaded and click Done:
submit an app
Click Save at the top right:
submit an app
Click Submit for Review:
submit an app
Answer these questions honestly, then click Submit:
submit an app
You’re done now. You should receive a couple of emails from iTunes Connect telling you your app has been uploaded and is waiting for review. Your app’s status has also changed:
submit an app
All you have to do now is wait for your app to be approved! You will receive emails about every change in status your app moves through. Usually after about a week the status should change to “In Review,” then to “Approved”. Unless you chose a future release date, a few minutes after approval your app’s status will shift to “Processing for App Store”, then a few minutes later to “Ready for Sale”.
In iTunes Connect click Activity, followed by App Store Versions to see the status of your app throughout the process:
submit an app
If your app is not approved, Apple will email you with more information. They have gotten pretty good at being specific at what the exact problem is and how you can fix it, for the most part. If this happens, it’s no big deal – just fix the problem and re-submit.
Here are the exact dates and times that DropCharge achieved every step of the approval process (all times are EST):
  • Waiting for Review: Sunday April 10, 2016 at 11:57 AM
  • In Review: Wed, Apr 14, 2016 at 2:18 PM
  • Ready for Sale: Wed, Apr 14, 2016 at 5:34 PM
The time for reviews for your apps will vary based on traffic, but in general it takes around 5-10 days for most people.