Branch.io: detect first install from Unity - installation

Trying to detect the first install event from branch.io link (succesfully implement link creating and sharing). I am using Unity branch sdk. The feature i try to create:
user_1 creates and share link to user_2.
When user_2 opens the link and install app i need to reward both of them (with inner in-game coins)
So i succesfully implement the 1. but I cant understand how to detect is user_2 installs the app or simply open it. All data that comes from branch.io UniversalObject callback doesn't contain information that i need.
Which the correct way to detect the install from code?

Alex from Branch here.
The callback parameter you need is +is_first_session. This is one of the parameters returned when the Branch session is initiated each time your app opens (you can find all all these parameters here). If this returns true, then that device has just installed the app (instead of opening it).
However, note that when these parameters are returned, it's impossible to immediately determine if the user is new (what you want), the device is new (not what you want, since the reward could be given twice if the user has installed on multiple devices), or neither (the user deleted the app and reinstalled on the same device). You would probably want to hold off on actually awarding the referral points until after the user has logged in with some sort of unique ID.
Branch also has a built-in feature for tracking referral points that might be useful. That lets you configure all the rules using the dashboard UI instead of needing to do it programmatically inside your app.

Related

How to extend Solana spl_token program to add more functionality?

SPL_Token program contains lots of features, but I want to add more additional checks as per customer requirement. So I want to create custom spl_token program by extending original spl_token code
e.g. Lets say, I want to limit maximum token that can be transferred to any account in single transaction.
Also I want program_id of my custom program, to be used in assigned_program_id(as shown in solana explorer) of any account which is created.
Any help is appreciated.
If you want your custom program id to be used, you simply need to fork the SPL token code to add your changes.
The code for the base token program exists at https://github.com/solana-labs/solana-program-library/tree/master/token/program, and if you're making small changes, it'll be easiest to change and deploy that.
If the changes are more involved, you can add a new extension to the token-2022 program, found at https://github.com/solana-labs/solana-program-library/tree/master/token/program-2022
To add a new extension, you need to add the state and instructions required for the extension, and whether it exists on a mint or account. Here is a sample pull request to add an extension allowing for mints to be closed: https://github.com/solana-labs/solana-program-library/pull/2754
Note that wallets and dapps will not be compatible with another program id, and it will take some time before they can accept more than one token program id.

IBM BPM 8.6 :: Unable to reassign back to group

We're working with IBM BPM 8.6.
In many workflows, we do the typical team assignment. The users can claim the task, and work with it. But there is a problem, they cannot assign the task back to the group within the Process Portal.
All we get is a tooltip with the "This action is not permitted" when we try to reassign back to the group.
Reassign back to group disabled image
The same happens if we try to reassign it to an specific user:
Reassign to user disabled image
We know that we could add the following instruction to the workflows:
tw.system.currentTask.reassignBackToRole()
to reassign it back,
but this would affect all the projects, and it would require time and resources to do so.
Any help or hints will be appreciated.
You need to check the "action policies" for the Portal (https://www.ibm.com/support/knowledgecenter/SS8JB4_19.x/com.ibm.wbpm.imuc.doc/topics/restricting_access_to_portal_functions.html). I searched for "process portal action policies" to find the linked page (IBMs URLs can be pretty transient).
The one you're interested in is "ACTION_REASSIGN_TASK". This should be available to all users by default so perhaps it has been changed. You can use was_admin to change or check the values e.g.
wsadmin>AdminConfig.modify(getBPMPolicyAction("ACTION_REASSIGN_TASK"), [["roles", "newrole"]])
wsadmin>AdminConfig.save()

How to create a Checkpoint in UFT

Strange enough that I have to ask such a simple question.
I started automating with UFT and I suppose the correct way to check if for instance my login has worked is to add a checkpoint on the next page.
But how do I do that?
All info I get from google is on how to add an already existing checkpoint to may page. But I don't have any.
Here is how I go about automating:
I add manually the relevant objects to the object repository
I create parameters for my action
I create the code that does the steps on the page
one action per page seems to be fine for me
But in the Object Repository of UFT 14.53, there is no button to add a Checkpoint.
A workaround for me would be to just add another Object and check it's existence and forget about checkpoints. Until I hopefully get an answer here, I will try to do just that.
In UFT there are typically two ways to verify that things are working as expected.
Flow (implicit) - In order to verify that progress in the application is successful (e.g. login) one usually just keeps working with the app, assuming that if the previous step failed, the objects needed for the next steps won't exist and the test will fail due to ObjectNotFound errors
State (explicit) - In order to see that objects have a specific state, checkpoints are usually used. Checkpoints are typically added during a record session, I'm not sure if there's a way to add them directly to the repository. An alternative to checkpoints, which works better with keyword driven testing (no recording), is to use the built in CheckProperty method.

Multiple - isolated - WkWebViews in the same app - macOS

Let's say I want to show two WkWebView side by side, each logged in to the same website, but with two different accounts. The logins (and other data) should be persisted between launches
According to this 2017 wwdc talk, it can be done. This is the result I get: they share data.
And this is what I want, not sharing data.
According to the speaker, it's possible. He just doesn't say how.
A few approaches I've tried
Instantiating a new WkWebView. That made no difference. They still share data. I tried instantiating both from a storyboard and in code.
Changing my bundle identifier. Not a viable solution as I want the two datastores to run side by side. But it works, and also it seems the data (sans cookies) is stored in /Users/username/Library/WebKit/(bundle-identifier)
Instantiating a new WKProcessPool with webView.configuration.processPool = WKProcessPool(). Made no difference.
Handling cookies myself. This would be my last resort. I'd set the WKWebsiteDataStore to be the .nonPersistent() one, and save and delete cookies in my own store on open and close (the cookie observer doesn't trigger in nonPersistent). Bad in three ways: 1. I need a secure place to store them - (Keychain)? 2. It won't persist whatever the sites may have in Local Storage, 3: added work and complexity

How to make a Finder Sync Extension change badges in response to outside events

I have a Finder Sync Extension that will display a badge on a file based on the state of a local database. It's straightforward enough to query this database in the requestBadgeIdentifierForURL function, but what if I want the badge to change for a Finder item that's already visible if the state of that database has changed (which can be via a notification through any variety of mechanisms). The documentation (https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html) would seem to imply this is possible with this statement:
You might also want to track these URLs, in order to update their
badges whenever their state changes.
The only ways I can imagine this would be possible (and most seem wrong) would be:
call setBadgeIdentifier:forURL from another application that is aware of the change
Launch a thread in the init function of my extension which listens for notifications and calls setBadgeIdentifier:forURL when it receives them
Call some OS API that prompts Finder that the extension should be triggered via requestBadgeIdentifierForURL.
Only the last one seems feasible, and could be managed via the extension informing the outside resource what needs refreshing via the beginObservingDirectoryAtURL/endObservingDirectoryAtURL callbacks, but i don't know what mechanism could do this.

Resources