Hello Blurt Community Members,
With this post, I'll explain about the in-app-purchase integration journey for MyBlurtApp.
In-App-Purchase
- In-app-purchase is slightly complex than a regular app development.
- One is supposed to add products under AppStoreConnect
- One needs to specify pricing for each country.
- One is also required to provide screenshots from App which indicates where to locate in-app-purchase in the app & this can be useful for AppReviewers
- Provide all possible details for AppReviewers to test & validate in-app-purchase.
- Above all are just actions required on the AppStoreConnect admin side.
- Development activities are different.
- Developer is required to handle if iOS Device is Jailbroken or not.
- Developer is required to check if internet connectivity is available or not.
- Developer is required to handle if payment methods are invalid.
- Developer is required to check if in-app-purchase is available in such country or not.
- Handle If user cancels the payment in between.
- Handle if purchase is completed.
- What if user tries to restore the purchase?
- And the list goes on.
Hunt for Libraries
- By looking at complexity, My first thought was to go with a third-party service.
- I must not invest time & energy in re-inventing the wheel.
- There should be some service which I can use & avoid all the hassle.
- With simpler & easier solution, I can complete IAP at earliest.
RevenueCat
- RevenueCat is leading service provider.
- It only charges 1% ONLY if your business goes above $2500
- So, I was happy with their pricing.
- I went ahead & integrated RevenueCat SDK.
- After integrating, I realised that I missed something.
- I wish, I read that line carefully on the their homepage.
- RevenueCat is for SUBSCRIPTIONS
- Subscriptions are for e.g. upgrading user to PRO / ULTIMATE memberships.
- We don't want subscriptions in MyBlurtApp.
- We want user to paid-sign-up.
- So, I realised, I took a wrong turn here.
SwiftyStoreKit
- I have now implemented Swift Code with library called
SwiftyStoreKit
- MyBlurtApp is written in FlutterSDK with Dart Programming language.
- So, I am calling a bridge with which I can execute Swift programming language code from Dart Code. (Native Code from Flutter App)
Wrong Product type selected
- I first created a non-consumable product.
- "Non-Consumable Product" = you purchase once in life time.
- I was wrong here.
- User can use the app to create more accounts / multiple sign-ups.
- So, I had to delete "Non-Consumable Product" & create a "Consumable Product"
- One Consumable product = One Sign up.
In-App-Purchase issue
- I filled entire form correctly but in-app-purchase stayed in draft mode.
- Due to this, I couldn't trigger in-app-purchase from the app.
- I tried hard to find the root cause but found none.
- I even attempted submitting app with in-app-purchase but it didn't help.
- Once of my guess is - it is due to unaccepted iOS Paid Applications contract. I've asked Nalexadre to look into it.
What to do now?
- I'm waiting for Nalexadre to take an action & give confirmation on it.
- Once In-app-purchase is moved to a different state (other than Draft mode), I'll be able to implement it.
- I've started looking into account creation script.
ChatGPT.
- At first, I asked ChatGPT to give me account creation script.
- Here is the piece of code which it gave it to me.
const blurtjs = require('blurt-js');
const blurtApi = 'https://api.blurt.blog';
blurtjs.api.setOptions({ url: blurtApi });
const { PrivateKey, PublicKey, key_utils } = blurtjs;
const privateKey = PrivateKey.generate();
const publicKey = privateKey.toPublicKey();
const newAccountUsername = 'your_new_account_name';
const creatorUsername = 'existing_account_name';
const creatorPrivateKey = 'your_existing_account_private_key';
const createAccountOp = blurtjs.operations.createAccount(
creatorUsername,
newAccountUsername,
publicKey,
publicKey,
creatorPrivateKey
);
blurtjs.broadcast.send(
{ operations: [createAccountOp] },
{ posting: creatorPrivateKey },
(err, result) => {
if (err) {
console.error('Error creating account:', err);
} else {
console.log('Account created successfully!', result);
}
}
);
- I must say, not bad for the ChatGPT but it's not entirely correct.
SelfHelp
- I remember that I have a bookmark for account creation.
- https://selfhelp.blurtwallet.com/
- I opened that page & started inspecting the web-page.
- Later I realised, it's open source project by @megadrive
- So, I'll be using some piece of code from this open-source-code - https://github.com/thecryptodrive/AccountCreation/blob/master/js/app.js
What's next?
- Resolve AppStoreConnect IAP issues
- Integrate Account Creation Script
- Get a solution to unpublish all the posts & comments from an account
- Get a solution for deleting an account (just the state - like a mute button)
Support me back
- Do you like the work I am doing?
- If yes, support me back by voting me as Blurt witness
- Please download the apps using the details provided below & share your feedback
Vote me as witness
2023-09-29 - @sagarkothari88's Curation ❤️ Report
- My curation bot (or I've) decided to ❤️ love the posts of following users.
- Don't forget to motivate below mentioned users by clicking the links provided.
Support me back
- Do you like the work I am doing?
- If yes, support me back by voting me as Blurt witness
- Please download the apps using the details provided below & share your feedback
Vote me as witness
Download Android App from Google Play Store.
https://play.google.com/store/apps/details?id=app.blurt.my
Download PWA App on iOS or Android
- Just OPEN any of following url
- https://pwa.blurt.blog/#/
- https://blurt.sagarkothari88.one/
- https://blurt-blog.web.app/
- https://blurt-blog.firebaseapp.com/#/
- Add the bookmark on your home screen & you're set to use app.
Cheers
Have a good one
I hope that you can be able to create a mobile app soon by solving these complications that Apple is requiring you to do despite of the conflict on how Blurt blockchain works which is different from the sister chains. @sagarkothari88 plus the fact that almost all devs doesn't want to involve themselves in this platform due to the pressure of their peers, being coerced, and all that but at least we are in a peaceful platform with more potential to grow and we might see it soon.
Can't agree more. Let's just hope that Apple resolve all these issues & we make it on the AppStore.
Already supported your witness.
Thank you
Thanks for mention and for your support!
Hi @sagarkothari88, great news! Your content was selected by curators @nalexadre, @oneray to receive a special curation from BeBlurt 🎉 Don't hesitate to upvote this comment as the curators will receive 80% of the rewards for their involvement.
You can support us by voting for our witness, our decentralized funding proposal, or through delegation. You're also welcome to join our Discord server 👉 https://discord.beblurt.com
Thank you for your support 🙏🙏🙏
Waah bhai sahi h .. Badhiya kr rahe ho
kya badhiya. kuchh ho nai raha. attempt pe attempt. attempt pe attempt.
Apple ko chahiye Full account deletion - bolo kaha se lau?
Apple ko chahiye - yaa to free, yaa to paid sign-up, bolo kaha se lau?
Akele ho ni sakta - sirf app dev hun :(
Congratulations! 🏆
You have recieved a coconutty upvote! 🥥
Thank you for contributing to the Blurt Blockchain!
Keep up the great work!
Curated by @outofthematrix!