Skip to content

Conversation

@Julien-Mialon
Copy link
Contributor

Add support for W10 UWP platform.
Changes includes : copying most of dependent files from WinRT platform, change the way to get AppName in PlatformHooks.UWP.cs to handle the new manifest format compare to WinRT.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@richardjrossiii
Copy link
Contributor

First, this looks amazing. Great job!

Second, as I do not have windows 10 available locally to run tests against, I would feel much better about merging in the changes if we had a Unit Test target against this Windows 10 UWP. This isn't 100% necessary, but we won't be able to release the binary on the Parse.com website without any unit tests :(.

Finally, there's some minor code-style issues (mostly relating to line-endings), that could be easily fixed by running:

git reset HEAD~ 
git diff | git apply --cached --whitespace=fix
git reset
git commit --amend

This will unstage your commit, fix up the whitespace (and stage it), reset unstaged copy, and then merge it back into the base commit.

I know it's annoying, and I need to make a pass through the entire project to unify the line endings, but it's best solution I have right now.

@Julien-Mialon
Copy link
Contributor Author

Hello,

I fixed line endings, I'm gonna look into unit test.

@Julien-Mialon
Copy link
Contributor Author

I looked into unit test, tried to use the NetFx45 unit test but it uses Moq which is unavailable for UWP (like WinRT & Windows phone).

@SalehAlbuga
Copy link

When can we get this update on NuGet?

@Julien-Mialon
Copy link
Contributor Author

Currently, it's a Pull Request and I have to look into Unit Test before it's accepted. You can still directly use the source for now (only need to reference Parse & Parse.UWP projects)

@lukaszkalnik
Copy link

Hi Julien, Parse.com support,

First, many thanks Julien for providing this! I have just integrated the Parse and Parse.UWP project into our app, however unfortunately I don't get any pushes on the devices.

I initialize Parse providing the app id and key in ParseClient.Initialize(), then subscribe with ParsePush.SubscribeAsync() and ParseAnalytics.TrackAppOpenedAsync().
I do everything as described in the Quick Start:
https://www.parse.com/apps/quickstart#parse_push/windows/

I actually see the devices register in the Parse.com web frontend in the Core Tab when they start the app for the first time. However, when I send the push, the number of sent pushes is at 0 and stays like this. No push arrives to the devices.

I have even published the app to the Windows Store and entered the Package SID and app secret in the Parse.com settings. Unfortunately, still no luck.

Do you have any advice on integrating the SDK on Windows 10?

Thanks so much!
Lukasz

@Julien-Mialon
Copy link
Contributor Author

@lukaszkalnik Hello, I've just answer in an issue there for the same problem : #63 (comment)

Maybe you can check this, I just did the procedure and push notifications are working well for me.
Do not hesitate to come back to me if you still have any issues

@lukaszkalnik
Copy link

Thanks so much @Julien-Mialon, I followed your guide (with a small modification) and it's working! Check my comment under the guide as well: #63 (comment)

Thanks again for your help, you have made my day!

@Julien-Mialon
Copy link
Contributor Author

Hello @richardjrossiii

I looked in Unit test available in the repo for other framework but moq, the framework widely used in unit tests can not be supported with UWP because of the lack of Reflection.Emit.

I think it's the same problem with WinRT SDK and it seems you have internal integration test for this sdk. Couldn't it be a solution for UWP too ?

@wouterds
Copy link

I'm waiting for this PR as well, any idea when it will be in a release?

@richardjrossiii
Copy link
Contributor

@Julien-Mialon No, sadly we do not have Mockable unit testing currently for WinRT.

We're actually internally in the middle of a project restructure (again, I know) in order to support some exciting new Unity features. As soon as that's done, it should make it super easy to support UWP with Unit testing, and I'll take another look at getting this PR merged.

Please hang tight, it is coming!

@Julien-Mialon
Copy link
Contributor Author

@richardjrossiii I just remade my modifications for UWP with your new project structure. I just don't undestand the build failed. I can fix if there is an error.

@wouterds
Copy link

Looks like there were no issues with the tests, it just failed because of coveralls.
Can this be merged please?

Tests run: 192, Errors: 0, Failures: 0, Inconclusive: 0, Time: 5.3424627 seconds

Image

@richardjrossiii
Copy link
Contributor

@wouterds The tests are not running against our new UWP platform yet. I love this PR, and we WILL merge this soon. I will have a new, fully modular project structure for the SDK which means that 99% of parse will be fully PCL, unlike the current solution.

Once that's in it should make supporting UWP even easier (literally only implementing the missing part, push), and at that point I'll merge this PR.

My ETA on getting these changes done is hopefully by the end of the week. Until then, I beg for a little more patience!

Sorry, and again, the community here is awesome!

@wouterds
Copy link

How's the refactor going? Any beta/alpha version already available?

@richardjrossiii
Copy link
Contributor

@wouterds Refactor is going good. Right now I've split out the SDK into four modules:

  • Common, which contains HTTPClient (now based on Microsofts', instead of our own), storage abstractions, and a few common utilities/module features. 100% PCL compatible, with a separate implementation for Unity support.
  • Core, which contains about 90% of what 'Parse' is known as now, minus installations, push notifications, and analytics. Note that core is now 100% a PCL-compatible library, which should grant us UWP support (Yay!).
  • Analytics, which only contains the Parse analytics features (contains a PCL-compatible implementation, alongside a WinRT and WinPhone one)
  • Finally, Push. Which is going to contain a PCL-compatible implementation for ParseInstallation and ParsePush, while keeping platform specific versions available for platforms which actually support push notifications.

I have all of Common, Core, and Analytics working across all platforms locally. Push is proving to be a bit more difficult than expected, but should hopefully not need to be pushed back more than a few more days.

I'd love to release a beta, but I'm not sure the best way of doing that as we're going to be restructuring our entire NuGet structure.

I'll be sure to link the PR's associated with this modularization back to this as soon as it's ready to go.

@wouterds
Copy link

Well.. That's too bad... Since Parse is going down soon, I'll go and find another solution I guess.

@richardjrossiii
Copy link
Contributor

@wouterds Parse is not going away, technically. We have just recently open sourced a compatible back-end for all of our client SDKs (https://github.com/parseplatform/parse-server), and all of these open-source projects will still be maintained well into the future.

There's some awesome community effort as well to get things like dashboard, as well as one-click heroku hosting.

There's also several killer SDK features that still have yet to be rolled out, so stay tuned!

@richardjrossiii
Copy link
Contributor

@wouterds, @Julien-Mialon the first 'beta' of the modular SDK is now available: #169

Please, try this out with Windows 10, as it should work now that Parse is fully PCL-compliant.

@wouterds
Copy link

Awesome, I'll give it a try @richardjrossiii!

@wouterds
Copy link

There's no UWP project in it?

@richardjrossiii
Copy link
Contributor

@wouterds You should be able to use the fully PCL-compliant version. Eventually we'll make a ParsePush.UWP project to support push notifications, but I still need to acquire VS2015 :(

@montymxb
Copy link
Contributor

montymxb commented Dec 3, 2017

This is super out of date now :/. @Julien-Mialon any interest in catching this up with master so we can consider this again?

@TobiasPott
Copy link
Member

Due to the latest merge of #329 into the master branch the support of UWP is provided by the use of SDK mutators (see #329 or the readme for more details).

@TobiasPott TobiasPott closed this Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants