InAppPurchase2 / Capacitor / Ionic: How to sell testperiod products (Offer / Discount) - ionic-framework

I`m using In App Purchase in my Ionic App installed like described in
https://capacitorjs.com/docs/guides/in-app-purchases
With this npm package
https://www.npmjs.com/package/#ionic-native/in-app-purchase-2
This works fine when purchasing products.
Now I want to add a test period for my product. User should be able to test for 7 days. So I created a offer in Play Console:
How to tell InAppPurchase2 to use the offer? store.order() only takes product_id and an additionalData object. How to pass the offer id? Is it possible in additional params?

Ok, found the solution: "cordova-plugin-purchase": "^13.0.0" is needed. And "#awesome-cordova-plugins/in-app-purchase-2" which is kind of an interface for "cordova-plugin-purchase": "^11.0.0" is outdated.
When using version 13 of "cordova-plugin-purchase" with plain javascript (no other library), you get the offers in the product object and can order it with something like store.order(product.offers[0]).

Related

Firebase 9 & Flutter: How to initializeApp?

I am desperately trying to figure out how to initializeApp with Flutter (not React Native).
I know about the functions to use, but I can not find the firebaseConfig I need to pass into the function.
And no matter what I search for, every resources references to React Native, like as if nobody codes with Flutter since Firebase 9 has been released anymore (or I am the only dummy which is not able to resolve this by myself).
Can someone tell me where to get the firebaseConfig object from?
If I add a new app to my project, I only get the google-services.json, which does NOT include the firebaseConfig object I need to pass.
I understand your confusion now, let me explain. When the guy in the video talks about Firebase v9 he is talking about the SDK version which in the case of Javascript (which I suppose is his main topic in his channel) is currently 9.17.1 an the version 9 has been around since 2021 so it is not new. The different SDKs have their own versions for each platform so thinking it will be the same in every SDK is a mistake by itself. You can check the SDKS here. So there is no Firebase v9, there is a Firebase SDK for javascript version 9. They managed in that way in javascript and in flutter it is not the same. Being that the last update in the flutter SDK was literally yesterday I'm pretty sure they have their reasons to not implement the same functions in flutter since 2021.
Now, one of the thinks the guy talks in the video is deconstructing, which is something common in javascript. The way you do this in flutter is by using show.
So you would be doing this for example:
import 'package:cloud_firestore/cloud_firestore.dart' show FirebaseFirestore, QuerySnapshot; //Add everything you would be using
This way only the specific parts of the library will be imported and the amount of code the Dart VM has to load will be reduced.
As of the access to documents, it is still the same but you can easily create a helper class that contents your references to your collections and then just use that class to reduce the boilerplate code created by the firebase SDK.
You have to install the Firebase CLI and run firebase init.
You need to use the package firebase_core that will give you access to the class Firebase so you can use it to initialize your app Firebase.initializeApp() you can pass the default options for the current platform using Firebase.initilizeApp(options: DefaultFirebaseOptions.currentPlatform) usually your IDE will automatically import the corresponding package but in case it does not you would have to import 'firebase/firebase_options.dart';
An useful link to the documentation: Add Firebase to your Flutter App

Manatee.Trello: Simple CRUD App for Updating Cards

I need to develop a simple CRUD console app to update a list of Trello cards from a CSV file. I'll run the app in TaskScheduler every night. I've installed #gregsdennis Manatee.Trello packages (impressive code!) but cannot find a single (complete example) of anything like this anywhere. All I've managed to do is auth in with app key and tokedn.
Is there a resource out there that shows simple (full) examples of how to get started? #gregsdennis—the C# libraries are extensive and obviously well thought out—I just need a jump start to get me going. Thanks to all in advance!
Here's the documentation site: https://gregsdennis.github.io/Manatee.Trello/usage/getting-started.html

How to publish 2 apps using 1 source code to Play store and App store?

I need to publish 2 clients to 1 source code. How do I do it?
I read this article.
How do I build different versions of my Flutter app for qa/dev/prod?
However I could not find the answer from this article.
Is it possible to publish 2 application in same source code and same Key file and same version code and same version name(com.eclipse.side)?
In order publish the same source code into 2 different applications, for example if you have a paid version and a free version of your application you need to use flutter flavors
Basically, it will create 2 different applications that can be uploaded to the stores with the same code, with slight changes in the application Id for example
So, Is it possible to publish 2 application in same source code
Yes. It is irrelevant how you create your app.
and same Key file
Yes, however it's not really recommended
and same version code
Yes, version code is just a version number of your specific app only.
and same version name(com.eclipse.side)
Yes, versionName string used as the version number shown to users. Not sure you meant that one really as noone puts package id there though.
So the only thing that matters globally is application id from your manifest and it must be unique across whole play store submitted apps.
EDIT
my question is, can to publish 2 application with same package name?**
Again, there's no such thing as package name. It's application id that matters only. All the other things are just labels. If you want to release two apps both can show "My App" label. But one mush have different application Id than other (i.e. com.company.app1 and com.company.app2). That's it - so ensure your flavours set different application id and you should be good.

Object ID conflict in extensions in AL (Business Central OnPremises)

I'm a beginner in Dynamics Nav/Dynamics365/Business Central developing extensions in AL and I'm having a problem that I don't know how to solve it 'easily'.
I am working with 2 projects in Visual Studio Code at the same time in one workspace (previously I tried it in multiple workspaces) and there are 2 'pageextension' objects with ID 50100.
I'm having the following error:
The application object of type 'PageExtension' with the ID '50100' is defined in multiple apps. The apps are: Reports by myName 2.1.0.0; Workspace2 by myName2 1.0.0.0.
I know this error could be fixed changing the object ID but I think it should exist another solution.
Does this mean that if someone publishes and install an extension and then try to publish and install mine, will BC OnPrem not allow them to work with the second?
thank you in advance
The range you describe should only be used for customisations.
When publishing for AppSource, you will get a specific number range for your app.
If you intend to use multiple apps for customisations, you should divide the range and make sure you do not use double id's.

How to use omnigroup framework in an iOS project?

I need to be able to write and read from a rtf file in iOS.
The omnigroup framework has the 2 classes i am looking for :
OmniUI/iPad/RTF/OUIRTFReader
OmniUI/iPad/RTF/OUIRTFWriter
I managed to build the frameworks but i cant figure out how to integrate theses classes in my own project.
I had the following frameworks to my project :
OmniAppKit.framework
OmniFoundation.framework
OmniBase.framework
I still get some undefined identifier such as :
RCS_ID("$Id$");
OBINITIALIZE
OMNI_POOL_START
Has anybody been able to use the omnigroup framework in your own project ?
Thanks,
Vincent
We do need some better documentation for this, but the TextEditor example app in OmniUI/iPad/Examples/TextEditor may be a good starting point for seeing how we include the frameworks in our apps.
In this particular case, you may prefer to pull out the OUIRTFReader class and any dependencies it needs from OmniAppKit and OmniFoundation into your project. updating the #imports to be "..." instead of <OmniThis/AndOmniThat.h>.
Perhaps you could try following the instructions given as part of this thread on the Omni Group forums. They appear to have been able to build the framework under the iOS 4.2 SDK.
I don't think you want the OmniAppKit framework, as that is just for the Mac.