Push Notification (PushBot) step 1) Create A new Application Project step 2) Generate Push Notifications certificate for Pushbots: If You've already created the AppID, Follow Step 3 and enable Push Notifications in app settings. Log in to the Apple developer center and click App IDs , then Click on Add App ID icon [+].

Fill AppID Form: • Enter your App ID Description (Name). • Check Explicit App ID. • Enter your Bundle ID. • Check Push Notifications. • Click Continue:

Page 26 of 51

3. Confirm App ID settings. Click Submit:

Page 27 of 51

Step 3: Create Appid with Push notifications: Open App IDs page Click on App IDs. Click on the App ID you've just created. Click on Edit.

Page 28 of 51

step 4: Scroll to Push Notifications section and click on Create Certificate , A wizard will appear guiding you through the steps to generate a signing authority and then upload it to the portal, then download the newly generated certificate. This step is also covered in the Apple documentation. You’ll notice that there are two certificates listed – one for development and the other for production. The APNS has test servers and live production servers. Each uses and requires a different client SSL certificate. The test servers can be used to send pushes to apps built with development provisioning profiles; the production servers can be used to send pushes to apps built with distribution provisioning profiles.

Page 29 of 51

step 5: We’ll create Certificate Signing Request (CSR) file now. In the Applications folder on your Mac, open the Utilities folder and launch Keychain Access.

Page 30 of 51

Within the Keychain Access drop down menu, select Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.

step 6: In the Certificate Information window, enter the following information: In the User Email Address field, enter your email address
 In the Common Name field, create a name for your private key
 (eg. John Doe Dev Key)
 Select the 'Saved to disk' option Click Continue within Keychain Access to complete the CSR generating process .

Page 31 of 51

step 7 : Let’s go back to Apple developer portal, click on Continue and Select the Certificate Signing request (CSR) file you've just created, then click on Generate and finally click on Done.

step 8 : Scroll down to Push Notifications section and click on Download besides the certificate you've just created.

Page 32 of 51

step 10: Double Click on downloaded file to import into Keychain access step 11: Launch Keychain again. You will see an expandable option called “Apple Development/Production IOS Push Services : com.**.** ”.

step 12: Expand this option then right click on “Apple (Development iOS Push Services/Push Services) : com.**.**” > Export “Apple (Development iOS Push Services/Push Services) : com.**.**”.

Page 33 of 51

step 13: Save file as apns-dev-cert.p12 somewhere you can access it, leave password field empty, as pushbots won't accept certificates with password.

Enter your admin password to confirm and click on Allow finalize the export process:

apns-dev-cert.p12 is the certificate file you're going to upload on PushBots. The same process above applies when generating the production certificate (step 7 to step 13). Page 34 of 51

step 14: Create Provisioing Profile: Open iOS Provisioning Profile page, and click on Add Profile icon [+]. A wizard will appear to guide you through creating iOS provisioing profile Choose provisioning Profile Type [Development or Distribution]. Click Continue.

Page 35 of 51

Select App ID you have just created , then Click Continue.

Check your iOS certificate, then Click Continue.

Page 36 of 51

Check Devices , then Click Continue.

Name the profile [Your app name - (production/development)], then Click Generate.

Page 37 of 51

Finally, Download the Profile. by open Xcode preference and download

Page 38 of 51

Step 15: Update Xcode project build settings:

Page 39 of 51

step 16: pushbots.com then register new account. then create new app

step 17: Upload p12 file that was generated by p12

Note: When you publish the app in app store. you just need to redo step 7 to step 13 by generate .p12 again then upload p12 certificate to pushbots. Certificate Signing Request file you should keep that file so where the certificate is expired you can generate the certificate again with that file.

Page 40 of 51

step 18: Download Frame work then extract and import into the project from this https://pushbots.com/developer/docs/ios-sdk-integration

step 19: The library requires your application to link against the following Frameworks: CoreLocation.framework SystemConfiguration.framework MobileCoreServices.framework CoreTelephony.framework step 20: Right click on project title and choose New File…

Page 41 of 51

Under iOS > Source > Objective-C file, then click on Next.

Page 42 of 51

Type any name, then click on Next.

Choose Yes, to create the bridging header.

Right click on the created file then delete it.

Page 43 of 51

Open {ProjectTitle}-Bridging-Header.h file and import pushbots framework: #import step 21: AppDelegate func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { Pushbots.sharedInstanceWithAppId("568fef8217795948448b4567"); Pushbots.sharedInstance().receivedPush(launchOptions); return true } func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) { Pushbots.sharedInstance().registerOnPushbots(deviceToken);

let characterSet: NSCharacterSet = NSCharacterSet( charactersInString: "<>" ) let deviceTokenString: String = ( deviceToken.description as NSString ) .stringByTrimmingCharactersInSet( characterSet ) .stringByReplacingOccurrencesOfString( " ", withString: "" ) as String print(deviceTokenString) } func application(application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: NSError) { print("Notification Registration Error."); } func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) { Pushbots.sharedInstance().receivedPush(userInfo); }

step 22: how to clear badge Pushbots.sharedInstance().clearBadgeCount()

Page 44 of 51

step 23: download php class from below link https://pushbots.com/developer/docs/php step 24: send to specific device from php App($appID, $appSecret); $pb->AlertOne($message); $pb->BadgeOne("+1"); $pb->PlatformOne("0"); $pb->TokenOne($device); $pb->PushOne(); } ?>



Page 45 of 51

step 25: send to all device from php App($appID, $appSecret); $pb->Alert($message); $pb->Sound("ping.aiff"); $pb->Badge("+1"); $pb->Platform("0"); $pb->Push(); } ?>



Page 46 of 51

step 26: create Login screen and Register screen

download source code https://drive.google.com/folderview?id=0B850FIVAQVZSQUpqTktsOFRobTA&usp=sharing file name - connection.php - login-user.php - Reg-user.php - RegViewController.swift - ViewController.swift - Global.swift

Page 47 of 51

RMPicker Framework - RMNonRotatingPickerViewController.h - RMPickerViewController.h - RMPickerViewController.m (source code: https://github.com/CooperRS/RMPickerViewController)

step 27: Update AppDelegate.swift func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) by adding: device_token = deviceTokenString

Page 48 of 51

Step 28: Create Admin-Push App to push notification from iOS Application

Page 49 of 51

- Import Alamofire and swiftyJson to the project - download from source code files: Push All - PushAllViewController.swift - mobile-push-all.php Push Single - mobile-json-arr.php - mobile-single-push.php - PushSingleViewController.swift - UserTableViewController.swift Push Group - mobile-json-dept.php - mobile-push-group.php - GroupTableViewController.swift - PushGroupViewController.swift

Page 50 of 51

Push Notification.pdf

If You've already created the AppID, Follow Step 3 and enable Push Notifications in app settings. Log in to the Apple developer center and click App IDs , then ...

2MB Sizes 12 Downloads 343 Views

Recommend Documents

Soft push Hard push Soft pull Hard pull
Page 1. Soft push. Hard push. Soft pull. Hard pull.

Push Card - Greenacres.pdf
Page 1 of 1. Page 1 of 1. Push Card - Greenacres.pdf. Push Card - Greenacres.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Push Card - Greenacres.pdf. Page 1 of 1.Missing:

Push Card - Stockwell.pdf
Page 1 of 1. Page 1 of 1. Push Card - Stockwell.pdf. Push Card - Stockwell.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Push Card - Stockwell.pdf. Page 1 of 1.

Push Card - Waller.pdf
Page 1 of 1. Page 1 of 1. Push Card - Waller.pdf. Push Card - Waller.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Push Card - Waller.pdf. Page 1 of 1.

Push Card - Airline.pdf
Page 1 of 1. Page 1 of 1. Push Card - Airline.pdf. Push Card - Airline.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Push Card - Airline.pdf. Page 1 of 1.Missing:

Push Card - BPSTIL.pdf
Page 1 of 1. Page 1 of 1. Push Card - BPSTIL.pdf. Push Card - BPSTIL.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Push Card - BPSTIL.pdf. Page 1 of 1.

Push Card - Legacy.pdf
Sign in. Page. 1. /. 1. Loading… Page 1 of 1. Page 1 of 1. Push Card - Legacy.pdf. Push Card - Legacy.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Push Card - Legacy.pdf.

Push Card - EGMS.pdf
Loading… Whoops! There was a problem loading more pages. Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Push Card - EGMS.pdf. Push Card - EGMS.pd

Tender Push Back.pdf
mothers for daughters is that which forevermoreshall bethe United States needs to limit theamount ofimmigrants it lets in every day, week,. month,and year. In trap wetrust.HighHeelsand LowLifes 2001.Whitecollar s01e07.65730397309. Symantecendpoint pr

Tender Push Back.pdf
Tender Push Back.pdf. Tender Push Back.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Tender Push Back.pdf. Page 1 of 1.

Push: An Experimental Facility for Implementing Distributed ...
Distributed database systems need special operating system support. Support rou- ... supplement or modify kernel facilities for database transaction processing.

Push Card - Princeton.pdf
Page 1 of 1. Page 1 of 1. Push Card - Princeton.pdf. Push Card - Princeton.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Push Card - Princeton.pdf. Page 1 of 1.

Push Bike Cycle Clubs.pdf
Clubs in Worcestershire. Beacon Roads Cycle Club. beaconrcc.org.uk. H-Bug (Honeybourne Bicycle. Users Group). sporthoneybourne.org.uk. Malvern Cycle ...

Push Card - Central Park.pdf
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Push Card - Central Park.pdf. Push Card - Central Park.pdf. Open.

Push Card - Bossier Elem.pdf
Page 1 of 1. Page 1 of 1. Push Card - Bossier Elem.pdf. Push Card - Bossier Elem.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Push Card - Bossier Elem.pdf. Page 1 of 1.

Push Card - W.T. Lewis.pdf
Page 1 of 1. Page 1 of 1. Push Card - W.T. Lewis.pdf. Push Card - W.T. Lewis.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Push Card - W.T. Lewis.pdf. Page 1 of 1.Missing: