Follow

How To Upgrade from SDK to PPfM

Some customers chose to migrate from a Pugpig SDK application onto Pugpig for Magazines. To do this on iOS, we strongly advice you follow the steps below to ensure existing users with the old SDK app installed on their device get a seamless experience when updating to the new app version. 

Note: The following is applicable to iOS applications only. Android SDK to Pugpig for Magazines migration requires no additional checks but we advise testing the upgrade path with correctly signed apk files before submission.

  1. Does the SDK app use Newsstand? If so, make sure that you setup up Pugpig Products to match the Newsstand configuration of the SDK app. You must match to exactly what was configured in SDK for:
    • The “app presents in Newsstand” key in the app’s Info.plist
    • The “Newsstand background mode” entitlement
    • You must include the NewsstandKit.framework if and only if it was included in the SDK app build.

  2. Does the SDK app use the KGPugpigURLCache? If so, you must add the following to the top of your product’s app main function:
    [KGDocumentManager setCacheClass:[KGPugpigURLCache class]];
  3. Does the SDK app have a scrapbook feature? If so and the path used to initialise the scrapbook was not exactly `scrapbook`, you may wish to add the following to your main function before the call to Pugpig*ApplicationMain():
    NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0];
        libraryPath = [libraryPath stringByAppendingPathComponent:@"KGScrapbooks"];
        NSString *oldVersionScrapbookPath = [libraryPath stringByAppendingPathComponent:@"defaultScrapbook"];
        BOOL isDir = NO;
        BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:oldVersionScrapbookPath isDirectory:&isDir];
        if (exists && isDir) {
          NSString *newVersionScrapbookPath = [libraryPath stringByAppendingPathComponent:@"scrapbook"];
          [[NSFileManager defaultManager] moveItemAtPath:oldVersionScrapbookPath toPath:newVersionScrapbookPath error:nil];
        } 
  4. Have you tested? In order to test this, you must ensure that iOS team IDs of the provisioning profiles used to sign the old build and the new build match, otherwise the system may wipe the sandbox before the upgrade on the basis of the change of team ID. We advise testing the upgrade path on a device with the live SDK app installed and some content downloaded. Install the new correctly signed Ad-Hoc Pugpig for Magazines iOS build over the live app and confirm the edition content remained on device and if applicable the subscriber state and scrapbook content was also retained across apps.

    Some other points to note for testing:
    • We recommend using a tool like HockeyApp to mimic the update install over side-loading the app via xcode onto a device

    • On iOS 8 devices you should see a related log output if there was a certificate or profile conflict

    • If your tests aren't successful we suggest looking at the appdata and cache directories when both apps are installed and compare them.

       

Following the above steps will ensure your SDK app users with content already downloaded content will keep it on their device when they upgrade to the new Pugpig for Magazines application. We also recommend using appropriate help screens to guide your users through the new app update and changes.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk