wp7 how to add a pre install message - deployment

I want to add a pre install messagebox in my wp7 application, like in most of the application on market place.
e.g., my message :
'This application required your location services access, if you don't want to allow app to use it, click cancel otherwise allow'
if user choose allow then application installs otherwise it doesn't install

These messages are created by the Marketplace / install routine based on the capabilities requested by your app. You can't change them.
For example, if your app manifest says the app will use location services, the install routine prompts the user with a default message asking if they want to allow access.

Related

MacOs. How can I ask access for System Events on every app?

I need my Mac Swift app uses the System Events (via Applescript) to close any app that user adds to a list.
I see in my System Preferences a lot of apps having System Events access in Automation panel (e.g. 'Google's backup and sync' or 'Divvy'). How can I ask permissions for that?
In Info.plist add the key NSAppleEventsUsageDescription in Source Code view
<key>NSAppleEventsUsageDescription</key>
<string>$(PRODUCT_NAME) needs to control System Events</string>
or Privacy - AppleEvents Sending Usage Description in the popup menu in Property List view.
The <string> value is an arbitrary description.
Moreover in Xcode 11 where Hardened Runtime is enabled you have to check the Apple Events checkbox
I found a reliable way to ask Automation permission in my app.
Run a command to send System Event in shell use osascript, like this:
osascript -e 'tell application "System Events" to keystroke "a"'
If this is the first time you have sent System Event on user's computer, an authorization dialog will pop up by system.
If you want to check the Automation permission status, you can run the same script via NSAppleScript.
NSAppleScript *aScript = [[NSAppleScript alloc] initWithSource:source];
NSDictionary<NSString *, id> *errorInfo;
[aScript executeAndReturnError:&errorInfo];
This code will silently fail in both cases when the first time sending System Event and when the authorization had denied. And the error code here will be -1743.
It should be noted that if the Accessibility permission is unauthorized, the error code here will be 1002. So first make sure that accessibility permissions are authorized.

How can I ask for an Administrator Login in an OSX Swift Application?

I'm currently trying to make an application only open if an administrator login is entered into a dialog box. I've tried using an AppleScript under the following method:
set adminLogin to do shell script "" with administrator privileges
display dialog adminLogin
This displays the dialog I'd like, and I was able to throw this into an NSTask to perform it. I can even grab the output and use that to close the application under and if statement.
I'd like to be using the actual application rather than osascript to mention that it requires an administrator login to continue, and this scpt file vanishes as soon as I compile, build, and archive this for actual usage, meaning I'd have to re-add this file post-creation to all of the clients I am making this for. It doesn't seem too effective for the fact that it relies on a different task for a quick login that could possibly be exploited rather than using the same process that the application is holding.
Is there a way I can programmatically ask for an administrator login to continue opening the application? Could I use CoreLocation and-or could I use AuthorizationServices() to perform this task?
Take a look at the LocalAuthentication framework. There is a policy for deviceOwnerAuthentication which handles both Touch ID and device passcode authentication.
LocalAuthentication Framework Reference: https://developer.apple.com/reference/localauthentication
and
deviceOwnerAuthentication:
https://developer.apple.com/reference/localauthentication/lapolicy/1514164-deviceownerauthentication

How do I choose which VSO account to install Application Insights to?

I own one VSO account, and am a member of multiple other accounts (in a single login). When I install Application Insights into a web project, I'm not given an option of which account to use, and it installs to the wrong account.
Changing projects in Application Insights is easy to do but hard to figure out unless you know the "trick." It's a two step process. First you need to grab three keys that are buried in the Application Insights portal, then you need to apply them to a file in your project.
To change your account or application just go to the AppInsights dashboard for the project you want to use and click the gear on the top right of the page (The URL is: <YourVSOnlinePortalName>.visualstudio.com/_appanalytics/_admin#application=<AppInsightsProjectName>), then click "Get configuration keys and downloads." This contains all the keys you need for the project. Copy the following three values:
Account ID (This is the ID of your Application Insights account.)
Primary instrumentation key (This identifies your data so others can't send false data to Application Insights.)
Windows Phone 8 SDK instrumentation key (near the bottom of the page). Use this key no matter what kind of app your project actually is. I.e., even if it's a Web page you will still need this value. (This is the ID for a specific application in your Application Insights account.)
Now that you have these three keys, go to your project in Visual Studio and open the ApplicationInsights.config file.
Paste the Account ID into the <AccountID> element, the LicenseKey into the <LicenseKey> element and the last value, the instrumentation key, into the <ComponentID> element.
Fire up your app and you should start seeing data from the correct project!
"Application Insights Tools for Visual Studio" 1.3.1 released 5/30/2014, allows you to select the VSO account...
I just upgraded it (from 1.3.0) and now it allows me to select which account to send insight data to.

how to use the iphone auto renew subscription without a server

So all the documentation and posts I see about auto-renew subscription are using the server side model to deliver products. Is there a particular reason why one couldn't use the Built-in model.
I am creating a audio player app that will provide new original music every month. With service side verification I understand that it checks to see if the receipt is valid before allowing the user to download the audios from my server.
However, couldn't I just program my app to ping the app store to see if their subscription is active. If their subscription isn't active have the app sit on the home screen saying "Please renew your subscription before regaining access to the audio player"
It's my understanding that the server side model is there to prevent pirates from gaining access to my servers resources. Is there any other reason I should use it?
It depends on whether you want your application to be hacked or not.
Main reason for all the validation routine is that once application is available to user, he can modify it in any way he likes which can be seen on all the hacked iPhone apps out there.
So in your case they would delete all checks from your code and set "active" to true.

Sharing app-IDs among multiple developer account

I have an apple developer account using which I have developed an application for one of my clients. Now, the client also has a developer account. Is there anyway, I can create an app ID like com.client.* in the clients developer account and then upload an application's release version using an appID like com.mycompany.applicationname which is created in my developer account.
Or else, there is no option like that??
An app ID is a unique application identifier. Even the exact same source code, built with two different app ID's, would be considered two completely different applications.
In order for you to compile your client's application, you will need to get a copy of their profile using com.client.* and compile the application as com.client.appname.
That would be possible, (as far as I know, apple doesn't check the AppIDs if they are used anywhere yet outside of your program) but might get problems when submitting to the appstore and furthermore, you could not submit with his account, what he probably wants. Here's what we usually do:
1. Create a *. Provising profile for yourself for development purposese.
3. For push notifications, you should be able to create a DEV certfiicate with Appid com.client.appname in your developer program
4. Have your customer invite you into his Program and create the matching provising profile for appstore submission and push notification with this Appid.
You can be in multiple development programs (I'm currently in three different ones..)