When running a new uwp app as an update to an old one, is there a way to NOT delete the local state on install? - installation

I have associated my new app with the old one in the store, then when hitting Local Machine I get the message:
The app ____ is already installed on this machine.
if you continue with the current deployment , the existing app will be
uninstalled and the apps current state will be deleted.
are you sure you want to continue?"
I need to keep the local state folder as that's where I have saved user data in the first version of the app, I don't want my users losing data.
Does any one know of a way to achieve this ?

This will not happen for actual users of your application who download it from the Store. The issue here is that when debugged, the app is signed with a local certificate as opposed to the Store-signed version. If you want to debug this "update" scenario, the easiest way to do so is:
Checkout the older version of your app from Git
Run it with debugger
Add some data
Close the app
Checkout latest commit again
Run app

Related

Can XCode Bots be added to source control or archived?

We've started to use XCode bots for CI with some success. Due to the presence of libraries and pods we have some pre and post triggers that invokes cocoapods, crashlytics etc.
Is there a way to persist the bots to source control so that if the server is reinstalled or moved to a different machine, I don't need to recreate the bot and the trigger scripts?
Apart from the trigger scripts, there are git repos that need to be connected to, verified, credentialled etc.
(I know I can create bash scripts in the source folder and invoke them however the invoking step would still need to be added)
Xcode bots are stored in a database in Xcode Server. Even though you create them locally, they are stored on the Server in /Library/Developer/XcodeServer/Database
More information dissecting how Xcode bots and server work can be found here Pretty informative look underneath.
They claim that you can hook into the api yourself from the current version of server (4.x), although apple has announced the ability to that in the next version OSX Server 5.0

Parse.com deploying to old app after app cloning even though I no longer have access to the old app

I've cloned an app (the app was made initially by someone else, they've added me as a collaborator as I took the job, but for more security, I've cloned the app myself by using the new clone feature) and renamed the new project, but it's still deploying to the old app, even though I've removed myself from its collaborators. I haven't changed anything on my computer and (presumably) because they have the same name, parse develop myappname and parse deploy [seemed to] work.
Just after I've posted the question, I've found the answer: it was the app key/master key pair. When I cloned the app, my app has been assigned new keys, but ~/config/global.json still had the keys of the old app. I've changed the app key and the master key in that file with the new keys in my Parse settings, and it worked. It's now deploying to my new app. Wish it updated automatically, though.

ClickOnce application deployment issue for new update

I have a clickOnce application which is deployed as "Start the Application from the Web or a Network Share". So, fist time a user try to start the application, it will be downloaded and installed to an application cache on the local computer. My problem is that every time I do a release, I update the new files to the network share. But whenever user try to hit the URL, clickOnce will start the application from the cache instead of downloading the new version. I can go for two solutions:
Every time user closes the application on local system, cache should
be deleted.
If there is a way to get notification of new update
even if application is deployed as "Start the Application from the
Web or a Network Share" and next time it will delete the cache to
download new files.
Any other solution apart from above two will be
helpful.
Make sure when you publish that the Publish version is being incremented. I always check the box "Automatically increment revision with each publish".
If you make changes and deploy with the same version, click once will not update. Hope this helps.

sandboxing an existing OSX app

I have an existing OSX app that supports OSX 10.5 onwards. I want to publish it to the AppStore and therefore I need to sandbox the app. I guess sandbox app should be supporing 10.7 onwards.
The app uses a folder in the username directory to create temp files etc
It also copies a sql db file which already has empty tables to the same temp folder and upates records as the app is used.
Furthermore if there is a crash it picks up logs from the crashlog folder of osx and requests user to submit them to developer.
Question
with a sanbox app, where do I store temp files ?
Where should I place the db file which can be read/witten to + new App update should be able to find exsting db file.
Should the custom code for crash reporter be kept or be made redundant ?
Thanks
where do I store temp files ?
In the directory recommended by NSTemporaryDirectory(). (This applies to both sandboxed and non-sandboxed applications.)
Where should I place the db file which can be read/witten to
In your application's Application Support directory. Use NSSearchPathForDirectoriesInDomains() to find it, then append your application's name. Again, this is the same whether you're sandboxed or not.
new App update should be able to find exsting db file.
Not possible. You can ask the user to locate the existing file with a NSOpenPanel, but you can't open it yourself, because it'd be outside your sandbox.
Should the custom code for crash reporter be kept or be made redundant ?
You'll need to remove it, because it won't work under sandboxing — crash reports are not stored to your sandbox. You will receive crash reports for your application through iTunes Connect.
Alternatively, you may want to look into a third-party crash reporting service like PLCrashReporter.
There is a mechanism to migrate the data of an existing App into the sandbox: Migrating an App to a Sandbox on developer.apple.com
This is done once the newly sandboxed app is launched the first time. If you can determine where the database was stored, you can migrate it into the sandbox.

Overwriting an iPhone app from a different Xcode Project

One of the apps I've developed is submitted and approved to the appstore.
Because of some big changes and a more generic code I created a new XCode project for this app.
The problem is when trying to install the same app (based on bundle identifier) from the new XCode project, it quits with a crash. If I try to install again (Build & Run/Debug) from XCode, it seems to successfully overwrite and run. So it seems the first time there are some merge / overwrite conflicts. A second install, over the failed first attempt makes it work.
I wouldn't want this to happen with app updates downloaded from the store.
I've read that the idea is not to build from XCode, but use an Ad Hoc Build through iTunes instead. This would simulate a more natural end-user process. I've tried this, but somehow it won't sync / overwrite the existing app from the appstore (no errors, the app is just not changing).
Does someone have a hint on how to solve this?
Any help on this matter would be greatly appreciated!
I run into this problem all the time. I use one Developer Profile for all my dev work (and thus, one bundle identifier).
You have to delete the old App from the phone, and do a Clean Build.
These are similar problems. (1) (2)
As it seems working with an Ad Hoc build through iTunes does work.
Yesterday I double-clicked, but never got the iTunes message warning me of an older version existing in my apps and whether I want to replace it.
Dragging the .IPA into the iTunes app section did give me this message. Telling it to replace and next syncing works okay. iTunes sync status bar displays the message "YourAppName Updating". Afterwards launching it works fine with stored data intact.
The flow described here worked for me:
How to test an iPhone application update

Resources