Make WP8 app compatible with WP7 - windows-phone-7

I recently made an app for Windows Phone 8, and now I want to be able to run it on older devices with WP7.x as well. Is this possible without having to make a whole new Visual Studio project targeting WP7 instead of WP8? I targeted WP8 to make sure I was not held back on available features, but I don't think I ended up using any features that are not available in WP7 anyway, so now I would like to extend with WP7.x compatibility. Any hints as to how this can be achieved as easily as possible?

Although there's no automated way to "revert" a WP8 project to a WP7 project, it is possible to do it manually, by editing the .csproj file.
I don't have my Windows 8 system handy currently so I can't say for sure which items were involved but looking at the project file for a WP7 project, I (seem to) recall adjusting all or some of the the following lines:
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
If memory serves, the WP8 project file contains similar lines, and they just need to be replaced with ones above. A comparison between a WP7 project file and WP8 project file should get you on your way. Of course, there might be dependencies that need to be removed or added too.
Otherwise, there's always the option to start a completely new project :)

You need to create a new WP7 project. There may be a way to edit you project and solution files but it would be quicket to just create a new WP7 project and add your existing code to t.
Btw. you should do it the other way around, start with WP7 and upgrade the project to WP8 only if you need the (very few) new features in WP8.

You will inevitably have to create another project that targets WP7.x
But that can be relatively easy, especially if you don't use WP8-only features.
To improve maintainability, you should consider sharing reusable code files between projects, for example by taking advantage of the "Add as link" functionality of Visual Studio.

Related

Create a MSIX bundle containing a UWP app and a Windows service

I have read in some threads that MSIX will start to support also windows services from the January build. But I only seem to find information of how to migrate an existing installer containing a service to MSIX. How should I do if I want to create a completely new MSIX bundle from scratch, containing a UWP project and a Windows Service? I can´t seem to find no information about this no matter how much i search. If someone have succeeded in this it would be vary appriciated to hear how you did this!
I have a sollution in visual studio containing  a UWP project and a Windows Service Project. I try to simply add those two projects to a new windows application packaging project but no matter how I do this I only manage to install the UWP app from the created bundle. Is it still not possible to include the Service project in my MSIX? I get no errors when I build my sollution. I have simply added the UWP project and the service under "Applications" in my windows Application Packaging project.
I have also read that background tasks may be prefered to services in msix packages. But I am afraid that a background task may be a bit too limitied for my intentions. My main requirement for a service is not to have something running in the background, but to access functions outside the UWP sandbox. Like USB storage and other functionality. But maybe this can be achieved by a background task as well?
Maybe the MSIX sollution is a bad idea in my case, do you think I need to relay on some other packaging sollution for my projects instead? Like Wix or similar? I have very little experience in packaging installations so I prefer a tool that is as simple as possible.
The recommendation for apps in development is to use background tasks instead of trying to add a Windows Service. 
For the case where you're trying to access content outside the UWP container, you can consider adding a desktop extension component to your UWP package and then using that for your required functionality. Have a look at this blog post for more details - https://stefanwick.com/2018/04/06/uwp-with-desktop-extension-part-1/

Is it possible to structure a Xamarin multiplatform app project for different customers?

right now I am maintaining a Xamarin Multiplatform app that only had to satisfy the needs of one customer.
My Visual Studio Solution consists of a Core project with ViewModels and resources as well as an iOS and an Android project with the UIs and platform specific code.
I now have to release the same app for a different customer with only slight changes.
So I was wondering, is there any possibility to have another iOS and android application that 'extends' my other projects, so that I can just override the parts that need changes?
I'm asking because I saw web applications that satisfy just exactly that issues by just including another project and than overriding different services for example.
Yes there are a lot of ways to do that. Here are just two that came to the top of my head.
Method 1: Multiple Build configs (Intermediate level)
One way is to create multiple build configurations, and select what code is to be run depending on which build you are running.
Basically to do this, and assuming you are using a Mac, and that all the data your UI uses comes from your ViewModels in your Core project. Then
in you Core project settings, go to Configurations and select Release and Click on Copy, and then type in the client name.
Then go to Compiler, Select the client configuration, Add a Define Symbol as shown and press OK
Then in your ViewModel, add your Company specific code using the symbol you defined for the client. Depending on your build configuration, Visual Studio tells you which code will be build using darker colors
Then go to Solution properties->Configurations->General->Add three for each customer/client (once for Android (any CPU), one for iPhone and one for iPhone Simulator).
So it should look like this - Client1, Client1|iPhone, Client1|iPhoneSimulator, Client2,
Client2|iPhone, Client2|iPhoneSimulator. Make sure that "Create
configurations for all solution items" is not checked.
Then, go to the Configuration Mappings tab, select Client1 & Client2 and make sure the right projects are going to be built depending on the Platform selected. And make sure the right Configuration of each Project is appropriate (Debug vs Release). In our case, only the Viewmodels needed client specific code, so the rest of the projects build correctly. . Press Ok et puis voila!
Method 2: Azure Devops (Expert level)
If you want to do automate the entire process from commit to publish, Scott MacDougall, a developer, presented at a Toronto Xamarin Meetup shared exactly how you can resolve this problem using Azure Devops to manage over 10 apps that were to be released to different iOS & Android accounts. He would just makes the change once, and then once the ticket/issue/item/task was approved by QA, it would go right into each store. It is a lot more complicated and I would have to study it more to explain it to you.
If these changes also include some logic, then I would also go with creating multiple Build configurations and using if directives.
Then in your code you can have something like:
private void ExecuteApiCall()
{
#if COMPANY1
//do something
#elif COMPANY2
//do something else
#else
//do else
}
If it only requires some UI changes, you can also think about having multiple themes and then just assigning one to specific customer:
https://medium.com/#milan.gohil/adding-themes-to-your-xamarin-forms-app-3da3032cc3a1

OpenFrameworks setting for latest xcode_How can I make a new project?

I started OpenFrameworks for fun :D
However, setting OF in Xcode is little bit confusing.
According to web search, just copy and paste Example and edit that project.
It is little bit uncomfortable since workspace location is restricted.
Now I am curious is there any tutorial which start with xcode - [new project]?(I mean xcode UI)
So I can make OF Xcode workspace anywhere I wanted.
A Link can be very granted.
Thanks for answer:D
PS. If you do not mind please attach answer as answer section, not in reply, so I can close this question.
I'm a bit confused on what you mean with workspace location is restricted, do you mean that the location where you can put your project is limited?
Generally all projects in openframeworks are being put inside the apps folder of openFrameworks. Technically it is possible to take a project out, but it's not recommended.
You can both have a structure like this:
openframeworks/apps/myApps/myNewSuperOfApp
or
openframeworks/apps/someProject/myNewSuperOfApp
Copying the example is one way of creating a new project, but a easier way (sometimes) is to use the project generator that you find in projectGenerator_osx
You do not want to create an empty project in xcode and, then add openframeworks to it. The projects that are generated with the project generator (or the examples) have a lot of settings that are needed in the xcode project for them to compile with openframeworks. It's not something that you easily can add to an empty xcode project.

Merging Projects

I want to create books for the iPad.
I also want to be to write an app that will give access to those books
and allow me to add more books, without having to re-download the entire app.
My idea is to have a Main project that shows all the available books.
then a separate project for each book which will be downloaded individually (like a sub-project).
Is this possible?
If so, how will I be able to merge the main project with the "sub-project"?
if not, how will I be able to achieve this?
I saw something similar on an app called "Interactive Touch Books for Kids"
I'm using xcode 4.3 and cocos2d.
As far as Xcode projects is concerned, these apps will all be separate Xcode projects. The only thing you can (and should) share is common code, for example the cocos2d library. You do that by creating a static library target for the commonly used code.
As for your main app, keep in mind that you can not instruct the App Store to download another app on your behalf. The user experience will have to be that once the user clicks on a book to download it, he is taken to the App Store app where he can download the book.
In case I mis-understood you and you want all of the books in the same app, you need to implement In-App Purchases to either unlock or download additional content. Regardless of how you setup your Xcode project for that app, users will always have to download an update for your app if you add a new book or make modifications to an existing one. Unless you implement content downloads. But that has nothing to do with the project setup in Xcode.

Are there any limitations with Visual Studio Setup Projects?

Are there any limitations that I might face when using VS Setup Projects?
I plan to use them, but am not sure if this would be a good idea.
Well, in a more advanced setting: VS Setup Projects cannot be automated, e.g. you cannot put your project and the VS Setup Project on a build server and have them built automatically. This might not be an issue for a smaller shop or a single developer, but for a larger enterprise-level development environment, this alone can be quite a killer criteria.
In order to get around this, we use WiX for our setups - more work once up front, but works nicely with continuous integration.
Marc
They are OK, if your starting from scratch I would say look into WIX, or even pony up the cash for Install Shield or one of the other commercial ones, would save you time and money in the long run.
Builds can be very slow, especially if you have a lot of binary files. I have a project with a lot of product images that get packed into the install package, this takes a LONG time, even on a fast machine.
Visual Studio Setup projects lacks a number of key features that Windows Installer Provides. Most notable of these is the 'Feature' feature that allows you to setup several tools that the user can choose to install or exclude. As already recommended, use WiX or a 3rd party full-featured installer tool.
It depends on your project I suppose. It used to be a pain to use to set up web projects, but I think there is an addin now that makes creating a web app setup a lot easier.
More limitations...
There is no way in setup project to perform validation on data that has
been provided by the user on the UI dialogs (acquisition phase).
There is no way to designate a custom action to run with elevated
privileges(System account).
There is no way to make your custom action execute during UI sequence.

Resources