SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Newsstand
  Kaz Yoshikawa
Why Newsstand?

•   Contents can be delivered to devices while sleeping
    •   background downloading
•   Good for subscription type business model
    •   Magazines, Newspaper, Free papers ...
How Newsstand Work?
④ Launch with                                                    Your Server
Background mode                                     ① Launch Time
                                                    Device Token, etc.
                                           ⑤ Download Contents

                                                 Contents
                                                                         SSL
                                     ② When New Issue is Ready           Certificate
                                                       Device Token
                ⑥ Enjoy Reading Contents

       ③ Push Notification
                                                             Apple’s APNS
Requirements (Vender)
•   Server facility
    •   Hosting contents for downloading:
        •   Capable of simultaneous download requests
    •   Push Notifications
        •   Server side programming: i.e. Apache+MySQL+PHP
        •   SSL Certificate *
Provisioning Portal
       Paper Work
New App ID
Enable Push Notification
Register SSL Certificate
Provisioning Profiles
•   Push Notification won’t work on Wildcard provisioning
iTunes Connect
   Another Paper Work
Add New App from ITC


•   In-App-Purchase can only be
    configured from iTunesConnect
•
In-App Purchases
In-App Purchases




               Auto-Renewable

               Free Subscription
Add Duration and Pricing


                    Duration

                    Sale or not
                    Price Tier
Adding a Language
In-App Purchases
Shared Secret
Enabling Newsstand
Issues
Issue Added
ATOM Feed
•   Apple’s server checks your new issues time to time to
    update iTunesConnect.
Xcode
Info plist
Register Remote Notification
  - (BOOL)application:(UIApplication *)application
  didFinishLaunchingWithOptions:(NSDictionary *)options
{
! // ...
! UIRemoteNotificationType type =
           UIRemoteNotificationTypeBadge |
! ! ! ! UIRemoteNotificationTypeSound |
! ! ! ! UIRemoteNotificationTypeAlert |
           UIRemoteNotificationTypeNewsstandContentAvailability;
! [[UIApplication sharedApplication]
          registerForRemoteNotificationTypes:type];
}
Newsstand Notification
•   Receive remote notification only once a day
    •   You cannot push two contents a day
•   You can push regular push notifications multiple time
•   For debuging:
    [[NSUserDefaults standardUserDefaults] setValue:@YES
        forKey:@"NKDontThrottleNewsstandContentNotifications"];
Send Token To Your Server
        with APS Environment
- (void)application:(UIApplication *)application
   didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)token
{
#if DEBUG
! NSString *aps_environment = @"development";      Why?
#else
! NSString *aps_environment = @"production";
#endif
! // send token to your server with other properties aps_environment
}
Different Token:
             Development/Production

       Debug                            Release

                                                                 APNS
                                                  production
                                                                  Sandbox
                     development


    app_id           token       environment

com.electricwoo
                  0x123...af30   development    Your
ds.yourmagazine
com.electricwoo
                  0x5c6...78c1    production   Server            APNS
ds.yourmagazine                                                Production
Downloading New Issue
                                                       Your Server
APNS     ① Push Notification      ② Query Issues

{                              Issue name, Published date, Download URL
  "aps":{
! "content-available":1,
        },                      ③ Download new Issue
  ...
}
          Payload
                                            ④ Unzip* and move
    ⑤ Replace Newsstand Icon


                                                               * optional
Downloading New Issue
- (void)downloadContentName:(NSString *)name
        URL:(NSURL *)URL date:(NSDate *)date
{
    NKLibrary *lib = [NKLibrary sharedLibrary];
    NKIssue *issue = [lib issueWithName:name];
    if (!issue) {
        issue = [lib addIssueWithName:name date:date];
        NKAssetDownload *download = [issue addAssetWithRequest:
            [NSURLRequest requestWithURL:URL]];
        [download downloadWithDelegate:self];
    }
}

- (void)connectionDidFinishDownloading:(NSURLConnection *)connection
    destinationURL:(NSURL *)destinationURL
{
!   NSIssue *issue = connection.newsstandAssetDownload.issue;
    NSString *contentPath = issue.contentURL.path;
    // unzip destinationURL to contentPath
}
Restore Downloads
                at Launch Time
!
                                                       Don’t forget


  NKLibrary *library = [NKLibrary sharedLibrary];
! for (NKAssetDownload *download in library.downloadingAssets) {
! ! [download downloadWithDelegate:self];
! }
Making a list of Issues
NKLibrary *lib = [NKLibrary sharedLibrary];
NSArray *issues = [lib issues];




                                    Build a Great
                                     Bookshelf
In App Purchase
Auto-renewable Subscription
•   Newsstand App requires at least one Auto-renewable
    subscription or free subscription
•   Auto-renewable durations are: 7d, 1m, 2m, 3m, 6m, 1y
•   StoreKit won’t let app know duration from product
    identifier
    •   Need to query to your server or hard-coded
Restore Problem
•   What if Someone purchased auto-renewable
    subscriptions in-and-out few times
•   Purchased records can be retrieved by restore operation
•   But it can be cancelled, and StoreKit wouldn’t tell me...
•   Needs to ask to Apple’s server to verify those purchases



Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Verifying Receipt
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue
*)queue
! for (SKPaymentTransaction *transaction in queue.transactions) {
! ! NSString *identifier = transaction.payment.productIdentifier;
! ! switch (transaction.transactionState) {
! ! case SKPaymentTransactionStatePurchasing: // ...
! ! case SKPaymentTransactionStateFailed: // ...

!   !   case SKPaymentTransactionStatePurchased:
!   !   case SKPaymentTransactionStateRestored:
!   !   ! [self verifyTransactionReceipt:transaction];
!   !   ! break;
!   !   }
!   }
}

- (void)verifyTransactionReceipt:(SKPaymentTransaction *)transaction
{
   ... do your stuff ...
   [queue finishTransaction:transaction];
}
DEBUG
                   Verifying Receipts
                                                                               App Store
                                                                                 Production
         {
              "receipt-data" : "(receipt bytes here)",
              "sandbox"      : 1
         }




         {
           "status" : 0,
           "receipt" : ,
           "latest_receipt" : ...      {
   0       "latest_receipt_info" : ...   "receipt-data" : "(receipt bytes here)",
         }                               "password"     : "(shared secret bytes here)"
  OK                                   }

                                                                                          Sandbox
                                             {
                                                 "status" : 0,
                                                                                   App Store
Your Server                                      "receipt" : { (receipt here) },
                                                 "latest_receipt" : "(base-64 encoded receipt here
                                                 "latest_receipt_info" : { (latest receipt info here
                                             }
PRODUCTION
                   Verifying Receipts
                                                                                App Store
                                                                                  Production
                                                         {
          {
                                                             "receipt-data" : "(receipt bytes here)",
              "receipt-data" : "(receipt bytes here)",
                                                             "password"     : "(shared secret bytes he
          }
                                                         }


                                                         {
                                                             "status" : 21006,
          {                                                  "receipt" : { (receipt here) },
              "status" : 21006,                              "latest_receipt" : "(base-64 encoded re
              "receipt" : ,                                  "latest_receipt_info" : { (latest receip
              "latest_receipt" : ...                     }
21006         "latest_receipt_info" : ...
          }
expired
                                                                                            Sandbox
                                                                                     App Store
Your Server
Auto renewable subscription
     recurring duration
           Production         Sandbox
             1 week           3 minutes
            1 month           5 minutes
            2 months         10 minutes
            3 months         15 minutes
            6 months         30 minutes
             1 year            1 hour

    Automatically expires in 6th time recurring
"receipt" :{
                        Not Expired                             "receipt":{
                                                                                         Expired
      "unique_identifier":"44f9ec48b952a....34e12c61c9c4f",            "unique_identifier":"44f9ec48b952a....34e12c61c9c4f",
      "original_transaction_id":"1000000055744550",                   "original_transaction_id":"1000000055744550",
      "expires_date":"1348131173000",                                 "expires_date":"1347344399000",
      "transaction_id":"1000000056135747",                            "transaction_id":"1000000055932398",
      "quantity":"1",                                                 "quantity":"1",
      "product_id":"yourmagazine.1mo",                                "product_id":"yourmagazine.1mo",
      "original_purchase_date_ms":"1347343199000",                    "original_purchase_date_ms":"1347343199000",
      "bid":"com.electricwoods.newsstand",                            "bid":"com.electricwoods.newsstand",
      "bvrs":"1.0",                                                   "bvrs":"1.0",
      "expires_date_formatted":"2012-09-20 08:52:53 Etc/GMT",         "expires_date_formatted":"2012-09-11 06:19:59 Etc/GMT",
      "purchase_date":"2012-09-20 08:47:53 Etc/GMT",                  "purchase_date":"2012-09-11 06:14:59 Etc/GMT",
      "purchase_date_ms":"1348130873000",                             "purchase_date_ms":"1347344099000",
      "original_purchase_date":"2012-09-11 05:59:59 Etc/GMT",         "original_purchase_date":"2012-09-11 05:59:59 Etc/GMT",
      "item_id":"558725164",                                          "item_id":"558725164"
};                                                              },
“status”: 0                                                     "status":21006
Wrap Up
These are what you get

           Newsstand



                       Push Notification

 In App
Purchase
                                          UIKit
This is what you gonna build
kyoshikawa@electricwoods.com




              Thank you
                    Electricwoods LLC

Weitere ähnliche Inhalte

Andere mochten auch

Programming Complex Algorithm in Swift
Programming Complex Algorithm in SwiftProgramming Complex Algorithm in Swift
Programming Complex Algorithm in SwiftKaz Yoshikawa
 
Idioms in swift 2016 05c
Idioms in swift 2016 05cIdioms in swift 2016 05c
Idioms in swift 2016 05cKaz Yoshikawa
 
Programming Language Swift Overview
Programming Language Swift OverviewProgramming Language Swift Overview
Programming Language Swift OverviewKaz Yoshikawa
 
Extracting text from PDF (iOS)
Extracting text from PDF (iOS)Extracting text from PDF (iOS)
Extracting text from PDF (iOS)Kaz Yoshikawa
 
TizenLog.pl: In App Purchase
TizenLog.pl: In App PurchaseTizenLog.pl: In App Purchase
TizenLog.pl: In App PurchaseoMatej
 
The Power Of In-App Purchases
The Power Of In-App PurchasesThe Power Of In-App Purchases
The Power Of In-App PurchasesNoel Llopis
 
IAP introduce@myBook
IAP introduce@myBook IAP introduce@myBook
IAP introduce@myBook Jason Huang
 
Basic shooting schedule
Basic shooting scheduleBasic shooting schedule
Basic shooting schedule11187AJ
 
Serious Games + Learning Science = Win: How to Teach Product Knowledge, Polic...
Serious Games + Learning Science = Win: How to Teach Product Knowledge, Polic...Serious Games + Learning Science = Win: How to Teach Product Knowledge, Polic...
Serious Games + Learning Science = Win: How to Teach Product Knowledge, Polic...Bottom-Line Performance
 
Treball religió
Treball religióTreball religió
Treball religióBuscarons
 
нескучная презентация
нескучная презентациянескучная презентация
нескучная презентацияTatyanaSannikova
 
365Hangers_Lifestyle
365Hangers_Lifestyle365Hangers_Lifestyle
365Hangers_Lifestyle365Hangers
 
Presentació
PresentacióPresentació
PresentacióESO1
 
Основная позиция пальцев на клавиатуре
Основная позиция пальцев на клавиатуреОсновная позиция пальцев на клавиатуре
Основная позиция пальцев на клавиатуремарина маслова
 
Aplazamiento de sanción en casos de it si la empresa
Aplazamiento de sanción en casos de it si la empresaAplazamiento de sanción en casos de it si la empresa
Aplazamiento de sanción en casos de it si la empresaR R.
 
Music questionaire
Music questionaireMusic questionaire
Music questionairecat663
 

Andere mochten auch (20)

Programming Complex Algorithm in Swift
Programming Complex Algorithm in SwiftProgramming Complex Algorithm in Swift
Programming Complex Algorithm in Swift
 
Idioms in swift 2016 05c
Idioms in swift 2016 05cIdioms in swift 2016 05c
Idioms in swift 2016 05c
 
Programming Language Swift Overview
Programming Language Swift OverviewProgramming Language Swift Overview
Programming Language Swift Overview
 
Extracting text from PDF (iOS)
Extracting text from PDF (iOS)Extracting text from PDF (iOS)
Extracting text from PDF (iOS)
 
TizenLog.pl: In App Purchase
TizenLog.pl: In App PurchaseTizenLog.pl: In App Purchase
TizenLog.pl: In App Purchase
 
The Power Of In-App Purchases
The Power Of In-App PurchasesThe Power Of In-App Purchases
The Power Of In-App Purchases
 
In-App Purchase
In-App PurchaseIn-App Purchase
In-App Purchase
 
IAP introduce@myBook
IAP introduce@myBook IAP introduce@myBook
IAP introduce@myBook
 
O universo
O universoO universo
O universo
 
Basic shooting schedule
Basic shooting scheduleBasic shooting schedule
Basic shooting schedule
 
Serious Games + Learning Science = Win: How to Teach Product Knowledge, Polic...
Serious Games + Learning Science = Win: How to Teach Product Knowledge, Polic...Serious Games + Learning Science = Win: How to Teach Product Knowledge, Polic...
Serious Games + Learning Science = Win: How to Teach Product Knowledge, Polic...
 
Treball religió
Treball religióTreball religió
Treball religió
 
Trabajo taller
Trabajo tallerTrabajo taller
Trabajo taller
 
профи звук
профи звукпрофи звук
профи звук
 
нескучная презентация
нескучная презентациянескучная презентация
нескучная презентация
 
365Hangers_Lifestyle
365Hangers_Lifestyle365Hangers_Lifestyle
365Hangers_Lifestyle
 
Presentació
PresentacióPresentació
Presentació
 
Основная позиция пальцев на клавиатуре
Основная позиция пальцев на клавиатуреОсновная позиция пальцев на клавиатуре
Основная позиция пальцев на клавиатуре
 
Aplazamiento de sanción en casos de it si la empresa
Aplazamiento de sanción en casos de it si la empresaAplazamiento de sanción en casos de it si la empresa
Aplazamiento de sanción en casos de it si la empresa
 
Music questionaire
Music questionaireMusic questionaire
Music questionaire
 

Ähnlich wie Newsstand

(ARC401) Cloud First: New Architecture for New Infrastructure
(ARC401) Cloud First: New Architecture for New Infrastructure(ARC401) Cloud First: New Architecture for New Infrastructure
(ARC401) Cloud First: New Architecture for New InfrastructureAmazon Web Services
 
How to build a server and a iPhone client application using the Apple Push No...
How to build a server and a iPhone client application using the Apple Push No...How to build a server and a iPhone client application using the Apple Push No...
How to build a server and a iPhone client application using the Apple Push No...Shu Masuda
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursAmazon Web Services
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleService Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleIsaac Christoffersen
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivAmazon Web Services
 
Scale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App FabricScale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App FabricChris Dufour
 
Cloud Native Identity with SPIFFE
Cloud Native Identity with SPIFFECloud Native Identity with SPIFFE
Cloud Native Identity with SPIFFEPrabath Siriwardena
 
Orion Context Broker
Orion Context Broker Orion Context Broker
Orion Context Broker TIDChile
 
System insight without Interference
System insight without InterferenceSystem insight without Interference
System insight without InterferenceTony Tam
 
vpn router Mikrotik
vpn router Mikrotikvpn router Mikrotik
vpn router Mikrotiktodangkhoa
 
Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)Vendic Magento, PWA & Marketing
 
Istio Playground
Istio PlaygroundIstio Playground
Istio PlaygroundQAware GmbH
 
Automating Security in your IaC Pipeline
Automating Security in your IaC PipelineAutomating Security in your IaC Pipeline
Automating Security in your IaC PipelineAmazon Web Services
 
Introduction to aop
Introduction to aopIntroduction to aop
Introduction to aopDror Helper
 
Packer, where DevOps begins
Packer, where DevOps beginsPacker, where DevOps begins
Packer, where DevOps beginsJeff Hung
 
Parse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & TricksParse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & TricksHector Ramos
 
Windows Azure: Connecting the Dots for a Mobile Workforce
Windows Azure: Connecting the Dots for a Mobile WorkforceWindows Azure: Connecting the Dots for a Mobile Workforce
Windows Azure: Connecting the Dots for a Mobile WorkforceTechWell
 
Small Python Tools for Software Release Engineering
Small Python Tools for Software Release EngineeringSmall Python Tools for Software Release Engineering
Small Python Tools for Software Release Engineeringpycontw
 
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28Frédéric Harper
 

Ähnlich wie Newsstand (20)

(ARC401) Cloud First: New Architecture for New Infrastructure
(ARC401) Cloud First: New Architecture for New Infrastructure(ARC401) Cloud First: New Architecture for New Infrastructure
(ARC401) Cloud First: New Architecture for New Infrastructure
 
How to build a server and a iPhone client application using the Apple Push No...
How to build a server and a iPhone client application using the Apple Push No...How to build a server and a iPhone client application using the Apple Push No...
How to build a server and a iPhone client application using the Apple Push No...
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office Hours
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleService Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
 
Scale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App FabricScale Your Data Tier With Windows Server App Fabric
Scale Your Data Tier With Windows Server App Fabric
 
Cloud Native Identity with SPIFFE
Cloud Native Identity with SPIFFECloud Native Identity with SPIFFE
Cloud Native Identity with SPIFFE
 
Getting Started with AWS IoT
Getting Started with AWS IoTGetting Started with AWS IoT
Getting Started with AWS IoT
 
Orion Context Broker
Orion Context Broker Orion Context Broker
Orion Context Broker
 
System insight without Interference
System insight without InterferenceSystem insight without Interference
System insight without Interference
 
vpn router Mikrotik
vpn router Mikrotikvpn router Mikrotik
vpn router Mikrotik
 
Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)
 
Istio Playground
Istio PlaygroundIstio Playground
Istio Playground
 
Automating Security in your IaC Pipeline
Automating Security in your IaC PipelineAutomating Security in your IaC Pipeline
Automating Security in your IaC Pipeline
 
Introduction to aop
Introduction to aopIntroduction to aop
Introduction to aop
 
Packer, where DevOps begins
Packer, where DevOps beginsPacker, where DevOps begins
Packer, where DevOps begins
 
Parse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & TricksParse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & Tricks
 
Windows Azure: Connecting the Dots for a Mobile Workforce
Windows Azure: Connecting the Dots for a Mobile WorkforceWindows Azure: Connecting the Dots for a Mobile Workforce
Windows Azure: Connecting the Dots for a Mobile Workforce
 
Small Python Tools for Software Release Engineering
Small Python Tools for Software Release EngineeringSmall Python Tools for Software Release Engineering
Small Python Tools for Software Release Engineering
 
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28
 

Kürzlich hochgeladen

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Kürzlich hochgeladen (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Newsstand

  • 1. Newsstand Kaz Yoshikawa
  • 2. Why Newsstand? • Contents can be delivered to devices while sleeping • background downloading • Good for subscription type business model • Magazines, Newspaper, Free papers ...
  • 3. How Newsstand Work? ④ Launch with Your Server Background mode ① Launch Time Device Token, etc. ⑤ Download Contents Contents SSL ② When New Issue is Ready Certificate Device Token ⑥ Enjoy Reading Contents ③ Push Notification Apple’s APNS
  • 4. Requirements (Vender) • Server facility • Hosting contents for downloading: • Capable of simultaneous download requests • Push Notifications • Server side programming: i.e. Apache+MySQL+PHP • SSL Certificate *
  • 5. Provisioning Portal Paper Work
  • 9. Provisioning Profiles • Push Notification won’t work on Wildcard provisioning
  • 10. iTunes Connect Another Paper Work
  • 11. Add New App from ITC • In-App-Purchase can only be configured from iTunesConnect •
  • 12.
  • 14. In-App Purchases Auto-Renewable Free Subscription
  • 15.
  • 16. Add Duration and Pricing Duration Sale or not Price Tier
  • 22.
  • 24. ATOM Feed • Apple’s server checks your new issues time to time to update iTunesConnect.
  • 25. Xcode
  • 27. Register Remote Notification - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)options { ! // ... ! UIRemoteNotificationType type = UIRemoteNotificationTypeBadge | ! ! ! ! UIRemoteNotificationTypeSound | ! ! ! ! UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeNewsstandContentAvailability; ! [[UIApplication sharedApplication] registerForRemoteNotificationTypes:type]; }
  • 28. Newsstand Notification • Receive remote notification only once a day • You cannot push two contents a day • You can push regular push notifications multiple time • For debuging: [[NSUserDefaults standardUserDefaults] setValue:@YES forKey:@"NKDontThrottleNewsstandContentNotifications"];
  • 29. Send Token To Your Server with APS Environment - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)token { #if DEBUG ! NSString *aps_environment = @"development"; Why? #else ! NSString *aps_environment = @"production"; #endif ! // send token to your server with other properties aps_environment }
  • 30. Different Token: Development/Production Debug Release APNS production Sandbox development app_id token environment com.electricwoo 0x123...af30 development Your ds.yourmagazine com.electricwoo 0x5c6...78c1 production Server APNS ds.yourmagazine Production
  • 31. Downloading New Issue Your Server APNS ① Push Notification ② Query Issues { Issue name, Published date, Download URL "aps":{ ! "content-available":1, }, ③ Download new Issue ... } Payload ④ Unzip* and move ⑤ Replace Newsstand Icon * optional
  • 32. Downloading New Issue - (void)downloadContentName:(NSString *)name URL:(NSURL *)URL date:(NSDate *)date { NKLibrary *lib = [NKLibrary sharedLibrary]; NKIssue *issue = [lib issueWithName:name]; if (!issue) { issue = [lib addIssueWithName:name date:date]; NKAssetDownload *download = [issue addAssetWithRequest: [NSURLRequest requestWithURL:URL]]; [download downloadWithDelegate:self]; } } - (void)connectionDidFinishDownloading:(NSURLConnection *)connection destinationURL:(NSURL *)destinationURL { ! NSIssue *issue = connection.newsstandAssetDownload.issue; NSString *contentPath = issue.contentURL.path; // unzip destinationURL to contentPath }
  • 33. Restore Downloads at Launch Time ! Don’t forget NKLibrary *library = [NKLibrary sharedLibrary]; ! for (NKAssetDownload *download in library.downloadingAssets) { ! ! [download downloadWithDelegate:self]; ! }
  • 34. Making a list of Issues NKLibrary *lib = [NKLibrary sharedLibrary]; NSArray *issues = [lib issues]; Build a Great Bookshelf
  • 36. Auto-renewable Subscription • Newsstand App requires at least one Auto-renewable subscription or free subscription • Auto-renewable durations are: 7d, 1m, 2m, 3m, 6m, 1y • StoreKit won’t let app know duration from product identifier • Need to query to your server or hard-coded
  • 37. Restore Problem • What if Someone purchased auto-renewable subscriptions in-and-out few times • Purchased records can be retrieved by restore operation • But it can be cancelled, and StoreKit wouldn’t tell me... • Needs to ask to Apple’s server to verify those purchases Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
  • 38. Verifying Receipt - (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue ! for (SKPaymentTransaction *transaction in queue.transactions) { ! ! NSString *identifier = transaction.payment.productIdentifier; ! ! switch (transaction.transactionState) { ! ! case SKPaymentTransactionStatePurchasing: // ... ! ! case SKPaymentTransactionStateFailed: // ... ! ! case SKPaymentTransactionStatePurchased: ! ! case SKPaymentTransactionStateRestored: ! ! ! [self verifyTransactionReceipt:transaction]; ! ! ! break; ! ! } ! } } - (void)verifyTransactionReceipt:(SKPaymentTransaction *)transaction { ... do your stuff ... [queue finishTransaction:transaction]; }
  • 39. DEBUG Verifying Receipts App Store Production { "receipt-data" : "(receipt bytes here)", "sandbox" : 1 } { "status" : 0, "receipt" : , "latest_receipt" : ... { 0 "latest_receipt_info" : ... "receipt-data" : "(receipt bytes here)", } "password" : "(shared secret bytes here)" OK } Sandbox { "status" : 0, App Store Your Server "receipt" : { (receipt here) }, "latest_receipt" : "(base-64 encoded receipt here "latest_receipt_info" : { (latest receipt info here }
  • 40. PRODUCTION Verifying Receipts App Store Production { { "receipt-data" : "(receipt bytes here)", "receipt-data" : "(receipt bytes here)", "password" : "(shared secret bytes he } } { "status" : 21006, { "receipt" : { (receipt here) }, "status" : 21006, "latest_receipt" : "(base-64 encoded re "receipt" : , "latest_receipt_info" : { (latest receip "latest_receipt" : ... } 21006 "latest_receipt_info" : ... } expired Sandbox App Store Your Server
  • 41. Auto renewable subscription recurring duration Production Sandbox 1 week 3 minutes 1 month 5 minutes 2 months 10 minutes 3 months 15 minutes 6 months 30 minutes 1 year 1 hour Automatically expires in 6th time recurring
  • 42. "receipt" :{ Not Expired "receipt":{ Expired "unique_identifier":"44f9ec48b952a....34e12c61c9c4f", "unique_identifier":"44f9ec48b952a....34e12c61c9c4f", "original_transaction_id":"1000000055744550", "original_transaction_id":"1000000055744550", "expires_date":"1348131173000", "expires_date":"1347344399000", "transaction_id":"1000000056135747", "transaction_id":"1000000055932398", "quantity":"1", "quantity":"1", "product_id":"yourmagazine.1mo", "product_id":"yourmagazine.1mo", "original_purchase_date_ms":"1347343199000", "original_purchase_date_ms":"1347343199000", "bid":"com.electricwoods.newsstand", "bid":"com.electricwoods.newsstand", "bvrs":"1.0", "bvrs":"1.0", "expires_date_formatted":"2012-09-20 08:52:53 Etc/GMT", "expires_date_formatted":"2012-09-11 06:19:59 Etc/GMT", "purchase_date":"2012-09-20 08:47:53 Etc/GMT", "purchase_date":"2012-09-11 06:14:59 Etc/GMT", "purchase_date_ms":"1348130873000", "purchase_date_ms":"1347344099000", "original_purchase_date":"2012-09-11 05:59:59 Etc/GMT", "original_purchase_date":"2012-09-11 05:59:59 Etc/GMT", "item_id":"558725164", "item_id":"558725164" }; }, “status”: 0 "status":21006
  • 44. These are what you get Newsstand Push Notification In App Purchase UIKit
  • 45. This is what you gonna build
  • 46. kyoshikawa@electricwoods.com Thank you Electricwoods LLC