Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 23: Code not working #6

Closed
versluis opened this issue Dec 20, 2012 · 2 comments
Closed

Chapter 23: Code not working #6

versluis opened this issue Dec 20, 2012 · 2 comments

Comments

@versluis
Copy link

I've encountered a slight glitch in trying to implement your In App Purchase code. It doesn't seem to work anymore in Xcode 4.5 (even when deployed to an iOS 5 device).

First there's a problem with the keyboard. When I touch a key on my "real" keyboard I get the following log message. I can type on the on-screen keyboard though:

2012-12-20 17:07:44.073 HelloWorld[812:1b07] Unable to load persistent store at URL 'file://localhost/Users/versluis/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
    metadata =     {
        NSPersistenceFrameworkVersion = 419;
        NSStoreModelVersionHashes =         {
            UserDictionaryEntry = ;
        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =         (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "720C82C2-781C-4371-8952-3980B42FF342";
        "_NSAutoVacuumLevel" = 2;
    };
    reason = "The model used to open the store is incompatible with the one used to create the store";
})
2012-12-20 17:07:44.076 HelloWorld[812:1b07] Unable to load persistent store at URL 'file://localhost/Users/versluis/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
    metadata =     {
        NSPersistenceFrameworkVersion = 419;
        NSStoreModelVersionHashes =         {
            UserDictionaryEntry = ;
        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =         (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "720C82C2-781C-4371-8952-3980B42FF342";
        "_NSAutoVacuumLevel" = 2;
    };
    reason = "The model used to open the store is incompatible with the one used to create the store";
})
2012-12-20 17:07:44.078 HelloWorld[812:1b07] Unable to load persistent store at URL 'file://localhost/Users/versluis/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
    metadata =     {
        NSPersistenceFrameworkVersion = 419;
        NSStoreModelVersionHashes =         {
            UserDictionaryEntry = ;
        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =         (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "720C82C2-781C-4371-8952-3980B42FF342";
        "_NSAutoVacuumLevel" = 2;
    };
    reason = "The model used to open the store is incompatible with the one used to create the store";
})
2012-12-20 17:07:44.080 HelloWorld[812:1b07] Unable to load persistent store at URL 'file://localhost/Users/versluis/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
    metadata =     {
        NSPersistenceFrameworkVersion = 419;
        NSStoreModelVersionHashes =         {
            UserDictionaryEntry = ;
        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =         (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "720C82C2-781C-4371-8952-3980B42FF342";
        "_NSAutoVacuumLevel" = 2;
    };
    reason = "The model used to open the store is incompatible with the one used to create the store";
})
2012-12-20 17:07:44.081 HelloWorld[812:1b07] Unable to load persistent store at URL 'file://localhost/Users/versluis/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
    metadata =     {
        NSPersistenceFrameworkVersion = 419;
        NSStoreModelVersionHashes =         {
            UserDictionaryEntry = ;
        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =         (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "720C82C2-781C-4371-8952-3980B42FF342";
        "_NSAutoVacuumLevel" = 2;
    };
    reason = "The model used to open the store is incompatible with the one used to create the store";
})

Next, long-pressing the cow (which is very cute) brings up the Buy a Baa button, but no purchase is performed. It only ever brings up the "adults" audio sample, accompanied by this log entry:

2012-12-20 17:08:31.233 HelloWorld[812:c07] Error: Could not find matching products
2012-12-20 17:08:31.233 HelloWorld[812:c07] Request finished

Just thought I'd let you know for future releases.

@erica
Copy link
Owner

erica commented Dec 20, 2012

You probably want to use the code with your own app and in-app purchase rather than relying on things from my personal account. The baa was re-created as part of the iOS 6 update:
#define PRODUCT_ID @"com.sadun.moo.baaa"

As for items stored in your personal user dictionary, I have no control over that. (Perhaps you're confusing Core Data store with App Store?)

-- Erica

On Dec 20, 2012, at 3:15 PM, Jay Versluis notifications@github.com wrote:

I've encountered a slight glitch in trying to implement your In App Purchase code. It doesn't seem to work anymore in Xcode 4.5 (even when deployed to an iOS 5 device).

First there's a problem with the keyboard. When I touch a key on my "real" keyboard I get the following log message. I can type on the on-screen keyboard though:

2012-12-20 17:07:44.073 HelloWorld[812:1b07] Unable to load persistent store at URL 'file://localhost/Users/versluis/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
metadata = {
NSPersistenceFrameworkVersion = 419;
NSStoreModelVersionHashes = {
UserDictionaryEntry = ;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = SQLite;
NSStoreUUID = "720C82C2-781C-4371-8952-3980B42FF342";
"_NSAutoVacuumLevel" = 2;
};
reason = "The model used to open the store is incompatible with the one used to create the store";
})
2012-12-20 17:07:44.076 HelloWorld[812:1b07] Unable to load persistent store at URL 'file://localhost/Users/versluis/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
metadata = {
NSPersistenceFrameworkVersion = 419;
NSStoreModelVersionHashes = {
UserDictionaryEntry = ;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = SQLite;
NSStoreUUID = "720C82C2-781C-4371-8952-3980B42FF342";
"_NSAutoVacuumLevel" = 2;
};
reason = "The model used to open the store is incompatible with the one used to create the store";
})
2012-12-20 17:07:44.078 HelloWorld[812:1b07] Unable to load persistent store at URL 'file://localhost/Users/versluis/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
metadata = {
NSPersistenceFrameworkVersion = 419;
NSStoreModelVersionHashes = {
UserDictionaryEntry = ;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = SQLite;
NSStoreUUID = "720C82C2-781C-4371-8952-3980B42FF342";
"_NSAutoVacuumLevel" = 2;
};
reason = "The model used to open the store is incompatible with the one used to create the store";
})
2012-12-20 17:07:44.080 HelloWorld[812:1b07] Unable to load persistent store at URL 'file://localhost/Users/versluis/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
metadata = {
NSPersistenceFrameworkVersion = 419;
NSStoreModelVersionHashes = {
UserDictionaryEntry = ;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = SQLite;
NSStoreUUID = "720C82C2-781C-4371-8952-3980B42FF342";
"_NSAutoVacuumLevel" = 2;
};
reason = "The model used to open the store is incompatible with the one used to create the store";
})
2012-12-20 17:07:44.081 HelloWorld[812:1b07] Unable to load persistent store at URL 'file://localhost/Users/versluis/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
metadata = {
NSPersistenceFrameworkVersion = 419;
NSStoreModelVersionHashes = {
UserDictionaryEntry = ;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = SQLite;
NSStoreUUID = "720C82C2-781C-4371-8952-3980B42FF342";
"_NSAutoVacuumLevel" = 2;
};
reason = "The model used to open the store is incompatible with the one used to create the store";
})
Next, long-pressing the cow (which is very cute) brings up the Buy a Baa button, but no purchase is performed. It only ever brings up the "adults" audio sample, accompanied by this log entry:

2012-12-20 17:08:31.233 HelloWorld[812:c07] Error: Could not find matching products
2012-12-20 17:08:31.233 HelloWorld[812:c07] Request finished
Just thought I'd let you know for future releases.


Reply to this email directly or view it on GitHub.

@versluis
Copy link
Author

Thanks for getting back so quickly, baaa indeed brings up the purchase window. I still get a "transaction not completed" error at the end on the simulator. On a real device (iPod Touch 4) the app hangs after the purchase window appears (i.e. I can't press either button).

The keyboard is a weird one, I'm as confused as you are about the reference to Core Data in the log entry. If I run the app in the simulator it does not accept keyboard entries from my real Mac keyboard (like apps usually do). As soon as I touch a "real" key on my keyboard, that log entry comes up. If I just use the virtual keyboard it doesn't happen. Crazy!

@erica erica closed this as completed Mar 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants