How to build and deploy xamarin-evolve locally in android device - xamarin.android

I'm brand new to xamarin world (as well as visual studio). I've forked xamarin-evolve app 1 and trying to build and deploy in my local android device.
In documentation, under "Mobile App" section, its mentioned:
Simply restore your NuGet packages and build the application.
As a beginner, I'm looking for a bit more explanation how to build and deploy this project locally in my android device. So that I can play with it.
I would truly appreciate any cooperation.
Thanks.

When you Open up src/XamarinEvolve.sln, do the dollowing steps :
Clean the project solution.
Delete the bin & obj folder in XamarinEvolve.Android, XamarinEvolve.iOS and XamarinEvolve.UWP.
Right click on your Project Solution, then click the Restore NuGet packages.
Deploy the XamarinEvolve.Android project in your device.
Effect.

Related

Build iOS .ipa from Ionic 4 project inside Bitbucket pipeline

I have an Ionic v4 project in bitbucket, I created a pipeline to build Android APK from the project using Docker and the basic .apk building steps.
Now I have to do the same thing for iOS. I don't think Docker will be a good option since it can't really run a Mac image.
My question here is: Are there services, libraries or something else that I can use to build the .ipa on the pipeline? Preferably free with the least cost, has anyone made such things and has examples here to help me get it off the ground?
I've been looking at Microsoft App Center and CircleCI, for example, but both seem to have a cost and A LOT of capabilities that really aren't necessary in this project...
Thanks in advance!

mdtool creates IPA file when using release but not when using debug configuration

I want to create an IPA file for both the release and debug for my app created in xamarin. I created the release IPA file with the following command in Bamboo:
-v build -t:Build "-c:Release|iPhone" CustomerApp.sln
This can be replicated on the terminal too by doing this:
/path-to-/mdtool -v build -t:Build "-c:Release|iPhone" CustomerApp.sln
But when I try to use the "-c:Debug|iPhone" this will not create the ipa file, when trying to use the terminal or Bamboo. I then tried different configurations like "-c:Release|iPhoneSimulator", "-c:Debug|iPhoneSimulator", "-c:Ad Hoc|iPhone" and "-c:Debug|iPhoneSimulator" but all of these will not create the IPA file. Why is this?
I know that the path to mdtool and the solution are fine because it works for the Release IPA but is it to do with the configuration in either Xamarin or Xcode?
If you are on the same Mac as the one you are running Xamarin Studio, it should mimic the provisioning profile setup you have in the IDE. If the build in Xamarin Studio builds with that combination with no drop down change on the main project, I would expect the mdtool to work. Note that now in Visual Studio 2017 for Mac it will be vstool under the /Applications/Visual Studio.app folder.
My build line looks like this:
/Applications/Visual\ Studio.app/Contents/MacOS/vstool --verbose build --f --target:Build --configuration:"Debug|iPhone" --buildfile:my.sln > $BuildResults
Update January 2019, I have found very little guidance on the web about what exactly vstool can do and how to use it. I believe it to be the Microsoft version of the mdtool, which is part of the Monodevelop project at Github (mono/monodevelop). The mdtool source code is under monodevelop/main/src/tools folder. It appears to be a runner for a variety of tools available in the Monodevelop / Visual Studio installation. Running
/Applications/Visual\ Studio.app/Contents/MacOS/vstool -q
will list out the available tools. There is also a man page as part of the Monodevelop build process, at monodevelop/main/man which provides a bit more enlightenment. I was shown how to use the specific command by someone who was very familiar with the project.

Apache cordova for visual studio does not update iOS plaftorm files during build

I have just started an ionic based project within Visual Studio 2015 community edition and I am having trouble running the ripple emulator for iOS. It was working fine until I added a few new files to the project (angular translate and some of my own). Now when I go to
platforms\ios\www
I can see that the files I added are never being copied. Everything is working fine in the android platform folder though.
Is there a file that controls which files should be copied during build / deploy?
Like you mentioned in the comments, deleting the platforms folder forces Visual Studio to copy those files again, and it should build/deploy with the updated files.
Note that you may run into issues with some plugins not being able to be restored when you delete the whole platforms folder.
I suggest you just delete the following folder, for Android: platforms\android\assets\www

Problems with cordova remote build from visual studio to ios seems to be because of the phonegap push plugin

First of all, I am developing a Cordova app for Android and iOS, primarily.
I was using the deprecated version of the Phone gap push plugin:
https://github.com/phonegap-build/PushPlugin
Now I am using the new version:
https://github.com/phonegap/phonegap-plugin-push
And all my code is also using the new push plugin; I seem to not be able to get rid of the old push plugin completely and it sucks :(
It is beyond me how the old push plugin has a version number of 2.5 whereas the new push plugin has a version number of 1.5 or 1.6.. But moving on.
I am running the app on Android, and everything is ok. The app is running and working as supposed to. I am also successfully receiving notifications.
On iOS, also, everything was working as supposed to till give or take a month ago; but today when trying to deploy on an iOS device using Taco remote build from a windows pc (visual studio) to an apple macbook pro, I began facing many problems.
I then noticed that in the config.xml of the application (the one in the root of the project) there were both the old and the new push plugin. I mistakenly deleted the new one (because of the misleading version numbers; I thought it was in fact the old one). It seemed to run properly for a bit (on both Android and iOS) but after a while, I noticed that in reality the app was not going to work properly as it needed the new push plugin and it was not being found. So I deleted the old push plugin and installed the new push plugin (which happened to be also a more updated version of the new push plugin that I previously had).
Presently, my problem is that when running via taco remote build, the app manages to successfully deploy on an iOS device (iPhone 6) - so yes the remote build seems to be happening correctly!, however the app seems to not be recognising/locating/finding the new push plugin when running. I am suspecting that the new push plugin is not being transferred from visual studio on my windows pc into my apple macbook pro through the taco remote build.
In this directory: /Users/Jurgen/.taco_home/
I can see the build, with all the generated files. In the outermost plugins folder I can see the phonegap-plugin-push folder referring to the new push plugin:
/Users/Jurgen/.taco_home/remote-builds/taco-remote/builds/16880/cordovaApp/plugins/phonegap-plugin-push
Going further into the directory, into the platforms folder/ios/www/plugins etc, there is no phonegap-plugin-push:
/Users/Jurgen/.taco_home/remote-builds/taco-remote/builds/16880/cordovaApp/platforms/ios/www/plugins/-----
I think this might be the cause of the problem: though I am not 100% sure.
I thought that the iOS build most probably uses the plugins folder from the www folder inside the iOS folder and not the outermost (in the first directory shown above): And since the push plugin was nowhere to be seen inside there; that could have been the problem, even more so when bearing in mind that the .xcodeproject file resides in the same 'ios' folder.
So what I did was manually copy the push plugin folder into the innermost directory; which didn't work either. Even if it did, it does not really make sense and is highly inconvenient.
What can I do to ensure that the plugin is transferred into the iOS build with taco remote build? Could the problem be something else rather than what I suspect?
I am completely stuck; so any help would be greatly appreciated!
It sounds like the remote project is confused. Try this to see if it helps:
On your non-mac machine, ensure that only the correct plugin is referenced. This includes both config.xml and in the plugins folder. Consider removing the plugin entirely, then re-adding the correct version. If other plugins specify a dependency on the push plugin in their plugin.xml then that may also cause problems, especially if the biggest version number is not the latest version. You may need to remove those plugins too.
Once that is done, perform a clean build. Via taco-cli this would be taco build ios --clean, with whatever other device etc flags you want. Using Visual Studio you would go to build -> clean i believe.
This should copy your project in its entirety again, and avoid issues with conflicting plugin versions partially persisting.

What should be default value for Blackberry build configuration ? [Debug,Private,or Release]

I want to know What should be default value for build configuration ? [Debug,Private,or Release] at the time of
1) Running application locally on simulator
2) Generating cod file while actually deploying on device/phone.
Configuration doesn't affect the generated code for BlackBerry projects - it only affects which projects are activated (i.e. that are built when you rebuild your workspace). So go with whatever you want - I usually pick one configuration and stick with it throughout debugging and release.
I would build in debug mode during development, so that you can step through the code. When you go to more formal testing, it would probably make sense to build in release mode, so that you're testing a more realistic build of the code. When you deploy to the device, it's usually best to build in release mode, to make sure you code is optimized to run on the device.
Using build configurations
You can specify several build
configurations for your projects. In
each build configuration, you can
choose projects are active.You can use
this functionality to create a set of
active projects to build with a
BlackBerry Application.
Source:
BlackBerry JDE Plug-in for Eclipse version 1.0 Online Help, Ch. "Building a BlackBerry Application"

Resources