I am trying to find if the users current app install if the first or if its a reinstall. Is there any way to determine this using iOS SDK?
You can make use of the getAppsFlyerUID API and compare the ID's you are getting.
Swift:
let appsflyerId = AppsFlyerTracker.shared().getAppsFlyerUID()
Objective-C:
NSString *appsflyerId = [AppsFlyerTracker sharedTracker].getAppsFlyerUID;
For every new install, you should see a new AppsFlyer ID.
For this to work in between app reinstalls, you'll have to keep the "old" AppsFlyer ID in a persistent data storage like KeyChain or an internal BI system - so you can compare (or check if a previous ID exists).
Related
We are developing an app in ionic3 which use PouchDB and CouchDB. We would like to launch on mid February but we are worry if the database grow too much I make run out of memory in device.
To test we'd like to insert thousands records and check database size.. here we have the problem. We can't find out how get local db size.
I was diving in PouchDB documentation and I only found how to get info about remote database size but not local. I think remote size needs not to be equal than local. Anyone have an idea?
Thanks
I found a partial solution, it is partial because it only works in android, chrome and firefox but not in ios and safari. I get used and available storage with this
calculaEspacio(){
let nav: any = navigator;
nav.storage.estimate().then((obj)=>{
this.usado=Math.round(((obj.usage/1048576)*100))/100;
this.total = Math.round(((obj.quota/1048576)*100))/100;
})}
Anyone know equivalent for webkit?
Example
npm install pouchdb pouchdb-size
//index.js
var PouchDB = require('pouchdb');
PouchDB.plugin(require('pouchdb-size'));
var db = new PouchDB('test');
db.installSizeWrapper();
db.info().then(function (resp) {
//resp will contain disk_size
})
pouchdb-size https://github.com/pouchdb/pouchdb-size
Build Status Dependency Status devDependency Status
Adds disk_size to info()'s output for your *down backed PouchDB's.
Tested with leveldown, sqldown, jsondown, locket and medeadown. When it can't determine the database size, it falls back to the default info() output.
Full informations here
If you're using Ionic 3, I guess you can use the SQLite Plugin to have unlimited data
I am trying to update the commerce catalog from external source. After the incremental update I need to have fresh data in Sitecore tree(data provider should return correct data instead of old(cached) ones). However, if I go to Sitecore right after the data import I can see only the old data till I click on "Refresh Catalog Cache" button in Sitecore Commerce menu.
I found the same info in the documentation for Sitecore Commerce Connect, however I can't find any example how to clean cache via code.
I found several types in "Sitecore.Commerce.Connect.CommerceServer.Caching" namespace. For example, CacheRefresh static class. It has RefreshCatalogCaches method which needs ICommerceServerContextManager contextManager as input parameter. If I create contextManager just using constructor new CommerceServerContextManager() and passing it to the method - it doesn't work(at least I still need to clean cache manually).
I would appreciate any advise/suggestion.
Thank you in advance.
You should do in your code same that happens on "Refresh Catalog Cache" button click:
CacheRefreshEvent eventX = new CacheRefreshEvent("catalogcache", "master", = ID.Null);
EventManager.QueueEvent<CacheRefreshEvent>(eventX, true, true);
For more details, look on Sitecore.Commerce.Connect.CommerceServer.Caching.RefreshCache, Sitecore.Commerce.Connect.CommerceServer implementation via reflector.
I have created a System Note Search which executes successfully. Now I'm trying to access this search results in php. I'm stuck with what type of object I use for implementing this search. Below is the code-
$service = new NetSuiteService();
$search = new needtoIdentify();
$search->savedSearchId = "897"; // SavedSearch ID.
Thanks in advance.
Unfortunately System Notes are not part of Netsuite Web Services Supported Records. You might need to work around this by using suitescript either to passthrough the data through a Suitelet/Restlet or a scheduled script that saves the results of the System Notes in the file cabinet so you can pick it up with WebServices.
I am developing a integration between a desktop application and Amazon MWS and need to be able to offer users a choice of categories to put the product they are listing into. My problem is that I can't find any way of programmatically getting the current categories from MWS using the API.
Additionally once I have a category reference to use I will need a way to the pull in and add the category specific XML child of ProductData (eg Home, Jewelry, Computers, etc) but they don't seem to be linked in any well defined way. For example, I can't say "if the chosen category is reference nnnnn ask them to populate the Computers specific ProductData", unless I write something myself to map them.
Has anyone else come across these problems and found a workable solution?
Any help appreciated...
I am currently exploring the option of limiting users to only selling products already listed on Amazon but still can't figure out how to pull in the correct category specific XML.
There are various product look-ups but they all seem to work from either my SKU (which will not yet be there) or Amazons ASIN (which I don't yet know)
You can use amazon advertizement api for this.
You have to create account on amazon affiliate programme.From that you have to get security credentials also .
After That go to BrowseNode Tree Page and download root categories list and save it to file or database.From there you get categoryname and their browseNodeId.
Then call BrowseNodeApi to get Child Categories for parent Category.
Please Follow This Link
http://docs.aws.amazon.com/AWSECommerceService/latest/DG/ProgrammingGuide.html
code for calling BrowseNodeApi
SignedRequestHelper helper =
new SignedRequestHelper(appConfig["AWSAccessKey"], appConfig["AWSSecretKey"], appConfig["endpoint"]);
string url = helper.Sign("http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&Operation=BrowseNodeLookup&BrowseNodeId=" + value + "&AssociateTag=beginners00-00&Version=2011-08-01");
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
// Get response
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
}
and also download SignatureGenerator class HMAC
How can I programmatically dump/query Launch Services database in MacOS (i.e. analog of command lsregister -dump)?
EDIT: I want to get set of associations UTI -> Bundle_IDs. Using LSCopyAllRoleHandlersForContentType - does not always work, here a similar trouble, therefore concluded that the best working method - parsing the output of "lsregister -dump", but the location of lsregister changes from version to version.