Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

InAppPayment Tutorial In Progress - 'Slight' challenge

I'm creating an inAppPayment tutorial for use in Appery. (See the other thread).

I've run into a small 'challenge'. Here's what I've done:

  1. I am working on the IOS side as my first point of tackling. For my app - the Apple store presents the greatest upside.

  2. I'm using this plugin - it's notably the best, and it has support for Android devices - once I get past the IOS hurdle - apps here can then use the same code base for both Apple Store and Google plan.

    Here's the plug-in link - and most notably - the instructions for installing in an IOS project (don't worry - I am tempering the instructions with a grain of salt).

    Manual install instructions - which basically match those from the tutorial - are here (Scroll down)
    https://github.com/j3k0/cordova-plugi...

  3. I'm following the Max Katz tutorial on how to install a plugin - on the IOS side - from here: (It's the 'toast' plugin):

    (of course I've scrolled down and used the IOS instructions :-) )

    https://devcenter.appery.io/documenta...

  4. I've downloaded and unzipped the plugin locally - so I can upload files from the plugin directories - to Appery - as required.

    So - Here are the steps I have taken - in order:(before)

    I've created a new folder in the IOS plugins folder for the Plugin and named it according to the convention used in the plugin docs.
    Image

    After:

    Image

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

InAppPayment Tutorial In Progress - 'Slight' challenge

Step 2 -I've created a folder in the www folder of the IOS resources - and - named it according to convention - step shown below.

Image

Step 3 - I upl;oaded the inApppurchases.h and .m files into the folder created previously

Image

Step 4 -

I uploaded the INApppurchases.js file to the appropraite (hopefully) destination in the folder structure as shown below:

Image

Step 5 and 6 - I created the Cordova define statements in the .js file that I just uploaded as shown in image (a) and (b) below (top and bottom of the file as suggested in the tutorial...

Image

Image

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

InAppPayment Tutorial In Progress - 'Slight' challenge

Step 7 - at line 495 of the Cordova_plugins.js file - I told it about the InAppPurchase plugin - repeating the structures both above and below it - for syntax sake...(Somewhat different than the instructions in the plugin instructions from the Cordova site - but aligned with Max's tutorial ) as shown here:

Image

Step 8 - Exported my project for import into xCode - and then opened it in xCode and required - and then clicked the Open link shown below (per the tutorial on doing this)

Image

I then created my new folder for inAppPurchases and added the .h and .m files :

Image

Step 9 - Used these two steps to find the new contents of my {Project Name] . .pbx file -- and saved that file to disk - so I could in the next step - Re-Import it..

Image

Image

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

InAppPayment Tutorial In Progress - 'Slight' challenge

Steps 10 and 11- yes we are almost done - getting to my 'slight' problem -

10 - I reviewed the content of the new .pbx file - and

Image

11 - I made sure the content in the new .pbx file that I loaded as shown - was indeed from the newly manufactured file from my xcode project.

Image

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

InAppPayment Tutorial In Progress - 'Slight' challenge

and now of course - for the moment of truth - I built my new IOS app in the builder - and - much to my surprise (it really wasn't a surprise - I expected something to break) ... I got an error.

I received the generic Oops error shown here:

Image

I then went to xCode thinking it would give me a better error message - and here it is:

Image

It looks like I'm missing a file - I've gone to the github site looking for this file to no-avail. I presume it would contain some sort of key - for the app to do lookups into my store account??

Any help you can provide would be awesome...(as I think I'm about 85% of the way there)

Best,

Bruce

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

InAppPayment Tutorial In Progress - 'Slight' challenge

Update - found the files.... adding them. Onto the next error-challenge.

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

InAppPayment Tutorial In Progress - 'Slight' challenge

Next challenge that I really do need help understanding how to fix. The Appery project failed to build again after fixing the missing files issue above - and - so I resorted to trying to compiling in xCode - here's the error.

Can someone from Appery please help? I'm not an xCode expert by any means and I don't know what to do with this set of build issues:

Image

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

InAppPayment Tutorial In Progress - 'Slight' challenge

Bruce,

One issue is that iOS "StoreKit.framework" wasn't added for this Cordova plugin to the project. This needs to be done between steps 8 and 9 (please see screen shot).

a href="https://d2r1vs3d9006ap.cloudfront.net/s ... 1429120895[/img] /a

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

InAppPayment Tutorial In Progress - 'Slight' challenge

Evgene,

Thanks - I'll get to work on add ing the StoreKit,framework !!! and let you know how it goes.....

Appreciate the super quick turnaround....

Bruce

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

InAppPayment Tutorial In Progress - 'Slight' challenge

Ok - stellar - I'm adding a few visuals - the project now complies in xCode - I'm going to export it to Appery (the new pbx file) - and then begin the Appery build.

Here are a couple of images of steps 8c and 8d that will later become a part of the tutorial (Expansion of what you provided above....)

Image

Image

Return to “Issues”