I've traveled to Canada for one-week SharePoint teaching gigs and to present at conferences. One visit, I was teaching a class for the government and had a letter from the project leader describing the work done, the duration (one week) and how a non-citizen was chosen to do the work. I was held up in immigration for over an hour and almost sent back home.
Every other time I answered their queries about my visit honestly, I've been treated with varying levels of suspicion, from the "ol' stink eye" to almost being tossed out. And none of those visits were set to be longer than a week.
I can now add "been deported" to my list of life accomplishments... My work visa was rejected because there's no category for "software development" in NAFTA.
While I'm inclined to believe that this app was not spyware, but rather a broken leftover from deleting other apps on my way there, I'm certainly not 100%. I'd say, about 70-30.
My client now wants to move his company out of Canada because of this... Trudeau has a lot of work ahead of him.
Having worked for a couple years for a Canadian company, I will confirm for you: Canada is super-unfriendly about people entering the country to work undisclosed jobs. Canadian customs often seems to start from the presumption that your visit is surreptitiously commercial.
If you give customs a sort of "half-commercial" answer, like "visiting a client" or "giving a talk", it can get worse. I was often given the advice of simply claiming I was there to visit a friend, even when what I was going for was otherwise legit. I've had friends in that same situation turned back at the border.