Error building Ionic app using WP8 platform on MAC OSX - windows-phone-8

Happy that the Android .apk file I built using "ionic build android" worked on a Samsung Note phone.
I would like to try the same app but on a different hardware which is my Nokia Lumia Windows Phone 8.
So I added the platform wp8 first and it went well.
$ ionic platform add wp8
Updated the hooks directory to have execute permissions
WARNING: Applications for platform wp8 can not be built on this OS - darwin.
Adding wp8 project...
Running command: /Users/user01/.cordova/lib/npm_cache/cordova-wp8/3.8.2/package/bin/create /Users/user01/repos/myTabs/platforms/wp8 com.ionicframework.mytabs754813 myTabs
Creating Cordova Windows Project:
App Name : myTabs
Namespace : com.ionicframework.mytabs754813
Path : /Users/user01/repos/myTabs/platforms/wp8
Copying necessary files to /Users/user01/repos/myTabs/platforms/wp8
Updating project files
Running command: /Users/user01/repos/myTabs/hooks/after_prepare/010_add_platform_class.js /Users/user01/repos/myTabs
add to body class: platform-wp8
Installing "cordova-plugin-console" for wp8
Installing "cordova-plugin-device" for wp8
Installing "cordova-plugin-splashscreen" for wp8
Installing "cordova-plugin-statusbar" for wp8
Installing "cordova-plugin-whitelist" for wp8
This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
Installing "ionic-plugin-keyboard" for wp8
Saving platform to package.json file
A platform already exists - now updating the entry: android platform=android, version=undefined, locator=wp8
However, I got an error when I ran "ionic build wp8".
$ ionic build wp8
Running command: /Users/user01/repos/myTabs/hooks/after_prepare/010_add_platform_class.js /Users/user01/repos/myTabs
add to body class: platform-wp8
Running command: /Users/user01/repos/myTabs/platforms/wp8/cordova/build
ERROR: MSBuild tools not found
ERROR building one of the platforms: Error: /Users/user01/repos/myTabs/platforms/wp8/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Users/user01/repos/myTabs/platforms/wp8/cordova/build: Command failed with exit code 2

Take a closer look at the logs:
WARNING: Applications for platform wp8 can not be built on this OS - darwin.
It is only possible to build wp8 apps on Windows. Of course, you could use Bootcamp, Parallels or any other virtual machine.

Related

APPX321 SDK folder containing 'UAP.props' for 'UAP 10.0.17763.0' cannot be located

I want to create an upload package for the Windows Store.
The app is essentially "Hello world" for a dev express XAF Win application. I am using the Desktop Bridge.
I am following the docs to create the upload package
This created a file
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage
And an error
APPX3217 SDK folder containing 'UAP.props' for 'UAP 10.0.17763.0'
cannot be located. See http://go.microsoft.com/fwlink/?LinkID=798187 for more information
When I double click the error it goes to the following code in the Targets file
<GetSdkPropertyValue Condition="'$(AppxPackagePipelineVersion)' == '$(UapBuildPipeline)'"
TargetPlatformSdkRootOverride="$(TargetPlatformSdkRootOverride)"
SDKIdentifier="$(SDKIdentifier)"
SDKVersion="$(SDKVersion)"
TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
TargetPlatformMinVersion="$(TargetPlatformMinVersion)"
TargetPlatformVersion="$(TargetPlatformVersion)"
PropertyName="WindowsSdkDir"
VsTelemetrySession="$(VsTelemetrySession)">
I am targeting WIndows 10, version 1809(10.0; Build 17763) and also have this as the min version.
The application is using .Net Framework 4.7.2
As per the Microsoft link I had to install the update for Windows 10 SDK, version 1809.
My Logs :
Error APPX3217: SDK folder containing 'UAP.props' for 'UAP
10.0.18362.0' cannot be located.
This works for me.
Go to https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
Install SDK: Windows 10 SDK, version 1903 (10.0.18362.1)
Then, rebuild it succeeded.
I had the same issue with a CI/CD project that relied on the 1703 release. I used choco to fix it as a build-step.
choco install windows-sdk-10.1 --version=10.1.15063.468

Can't use XLabs prerelease packages in appstore builds

I am building an app with Xamarin Forms and XLabs plugins.
To be able to run everything smoothly on Android and Windows Phone, i've had to use a prerelease version of xlabs (2.2.0-pre05).
When I tried to create a Windows Phone appstore package the certification failed because the packages for 2.2.0-pre05 have been built in debug mode.
To overcome this, I cloned the git hub project for XLabs and built everything in release mode.
The problem is, when I try to build the project with the packages i've built, I get this error:
Payload file '..\packages\Mike Xlabs\XLabs.Platform.WinRT.Phone\FodyWeavers.xml' does not exist.
Also, the windows store certification checks fail because of libraries used by the prerelease package.I'm getting the following error:
Error Found: The supported APIs test detected the following errors:
This API is not supported for this application type - Api=D2D1GetGradientMeshInteriorPointsFromCoonsPatch. Module=d2d1.dll. File=SharpDX.Direct2D1.dll.
Impact if not fixed: Using an API that is not part of the Windows SDK for Windows Phone Store apps violates the Windows Phone Store certification requirements.

onesignal in visual studio 2015

I'm trying to use onesignal in a mobile application for windows phone but i can't reach to make it works.
I created an example App with ionic :
ionic start testAppWithOneSignal blank
I created my App on Windows dev center
On onesignal.com my App is configured for Windows Phone 8.1+
In Visual studio, SDK is installed and appears in references for my App
Package.appxmanifest settings are ok (Toast capable : yes , capabilities : "Internet client & server"
My App is associated with windows store
When i launch my App on a windows phone, it works but when i add this code, my App crash when it goes in :
window.plugins.OneSignal.init("XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
{googleProjectNumber: "XXXXXXXXXXXX"},
function(){console.log('oneSignal OK')});
Here the details of my configuration :
Cordova CLI: 5.3.3
Ionic CLI Version: 1.7.11
Ionic App Lib Version: 0.6.5
Visual studio : Community edition 2015
Windows 10
To get a stack trace of the crash you can try changing the Debugger Type to "Script Only" or "Managed Only" under the properties of the WP8.1 project.
There is also a OneSignal-Ionic-Example project you can try to determine if the crash is from your project or if it is another issue. Make sure you're using the WP8.1 branch of the project.
https://github.com/one-signal/OneSignal-Ionic-Example/tree/WP8.1

Android Platform Guide trouble with adding a platform through the command line

I am following the installation guide: http://cordova.apache.org/docs/en/3.0.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide
As aa early info this is my issue.
C:\apps\hello>cordova platform add android
[Error: An error occured during creation of android sub-project.
Creating Cordova project for the Android platform:
Command failed to execute : ant jar
This is what i did:
I installed all Java Dev packages (everything)
I installed Apache ANT, and created the environment variables (they work)
I created environment variables for PATH for the adt-bundle
All i want is to
cordova platform add android
cordova emulate android
This is due to ANT tools could not find tools.jar in JRE lib directory. When I copied tools.jar from JDK lib directory to JRE lib directory, the problem was absolutely solved and the build was successful when I ran the command "cordova -d platform add android". Hope this helps you.
I got the same issue today. upon research I found that I need to install JDK instead of JRE.
Install JDK from this link
After installation, set the JAVA_HOME to C:\Program Files\Java\jdk1.7.0_45 [your JDK Path].
Hope this helps!!
I installed the JRE instead of the JDK... Im no expert on Java installations, but this was my error.

Windows phone 8 image uploading to windows azure

I want to upload Image from my windows phone 8 application to azure , I have searched a
lot and found various solutions in windows phone 7 all are using
"Phone.Storage"
, but when I try to install it for my windows phone 8 app , it throw error.
I have also tried vaious packages using nuget package manager but every one installation faild at
'Microsoft.WindowsAzure.ConfigurationManager 1.7.0.3'. Install
failed. Rolling back...
Please help me resolve this issue, and if there exist a good tutorial , please share .
Zauk
I had similar problem, the reason was that the NuGet version that ships with VS2012 RTM doesn't support WP8. Can you try to update your NuGet package manager to the latest version.
Go to
Menu Tools -> Extensions and Updates -> Updates -> Visual Studio Gallery -> NuGet
update restart.
If you are getting this error when trying to install the Azure Storage library from Nuget. "Could not install package 'Microsoft.WindowsAzure.ConfigurationManager'" . That is because the package you are trying to install does not include the Windows Phone 8 library.
As a fix: Use this command from the package manager console:
Install-Package WindowsAzure.Storage-Preview -Pre
Here is some documentation on how to implement it, after you are done installing the Azure Storage SDK
http://www.windowsazure.com/en-us/documentation/articles/mobile-services-windows-phone-upload-data-blob-storage/