Giter Site home page Giter Site logo

parse-community / parse-sdk-dotnet Goto Github PK

View Code? Open in Web Editor NEW
322.0 64.0 260.0 6.76 MB

Parse SDK for .NET, Xamarin, Unity.

Home Page: http://parseplatform.org

License: Apache License 2.0

C# 99.19% Handlebars 0.27% JavaScript 0.54%
sdk dotnet parse-platform xamarin unity parse-server

parse-sdk-dotnet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parse-sdk-dotnet's Issues

ParseInstallation.SaveAsync Hangs when called with particular Project Settings.

Repro Step

Download:
https://drive.google.com/file/d/0BzoZowZVut_ueWlNNk0wN2lIa3M/view?usp=sharing

  1. Build the Assets/LogInScene Scene to device (iOS)
  2. Press the LogIn button
  3. Observe output on Screen

You will get a crash log with the following stack trace:
ExecutionEngineException: Attempting to JIT compile method 'System.Reflection.MonoProperty:StaticGetterAdapterFrame (System.Reflection.MonoProperty/StaticGetter`1,object)' while running with --aot-only.

  at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in <filename unknown>:0 
  at Parse.ParseInstallation.get_Badge () [0x00000] in <filename unknown>:0 
  at Parse.ParseInstallation.SetPlatformAutomaticValue () [0x00000] in <filename unknown>:0 
  at Parse.ParseInstallation.SetAutomaticValues () [0x00000] in <filename unknown>:0 
  at Parse.ParseInstallation.SaveAsync (System.Threading.Tasks.Task toAwait, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0 
  at Parse.ParseObject+<>c__DisplayClass18.<SaveAsync>b__17 (System.Threading.Tasks.Task toAwait) [0x00000] in <filename unknown>:0 
  at Parse.Internal.TaskQueue.Enqueue[Task] (System.Func`2 taskStart, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0 
  at Parse.ParseObject.SaveAsync (CancellationToken cancellationToken) [0x00000] in <filename unknown>:0 
  at Parse.ParseObject.SaveAsync () [0x00000] in <filename unknown>:0 
  at LogIn+<UpdateInstallation>c__Iterator5.MoveNext () [0x00000] in <filename unknown>:0 
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
<StartLogin>c__Iterator4:MoveNext()

Bug Description

I do not get a ContinueWith callback when I call ParseInstallation.SaveAsync.

I am running Unity 4.6.5f1
Parse Unity SDK 1.5.1

I have supplied a project to demonstrate the issue. This issue appears only when the "Api Compatibility Level" option in the iOS Build Settings is set to ".NET 2.0" as opposed to ".NET 2.0 Subset".

Usage instructions for supplied project:

  1. Build the Assets/LogInScene Scene to device (iOS)
  2. Press the LogIn button
  3. Observe output on Screen

I hope you manage to repro with ease :)

Using Parse SDK in Windows 10 Universal App

Hi, we are working on Windows 10 Universal app and trying to integrate Parse push notifications functionality. We have tried both v1.6.0 and 1.5.5 of Parse SDK to subscribe to a channel using installation.SaveAsync() or using shorthand like SubscribeAsync() , but, the device is not getting registered (i.e. not subscribing to the channel on Parse portal Installation table). Kindly , let us know if there is a fix available for it.

Returning object from cloud missing Dates "createdAt" and "updatedAt"

Just started getting some errors today. When parsing the Date in "ParseDecoder.ParseDate", input is null. Which results in an exception at "DateTime.ParseExact" "s or format is null."

After adding some logging to the methods calling "ParseDecoder.ParseDate", specifically - "ParseObjectCoder.Decode":

DateTime? createdAt = extractFromDictionary<DateTime?>(mutableData, "createdAt", (obj) => {
    return ParseDecoder.ParseDate(obj as string);
});
DateTime? updatedAt = extractFromDictionary<DateTime?>(mutableData, "updatedAt", (obj) => {
    return ParseDecoder.ParseDate(obj as string);
});

The dictionary that contains "createdAt" and "updatedAt" doesn't actually contain those keys, resulting in "null" being sent to ParseDecoder.ParseDate. In other words, When logging all keys and values inside "mutableData", "updatedAt" and "createdAt" don't exist.

The strange this is, adding a custom Date column to my class works, the data is returned as decoded correctly.

Is there a reason why "createdAt" and "updatedAt" aren't being returned in the cloud code response? Or maybe that data is getting lost somehow?

For now I've added this to the ParseDeoder.ParseDate method:

internal static DateTime? ParseDate(string input) {

    if (string.IsNullOrEmpty(input)) {

        UnityEngine.Debug.LogWarning("ParseDate is empty! returning null");
        return null;
    }

    // TODO(hallucinogen): Figure out if we should be more flexible with the date formats
    // we accept.
    return DateTime.ParseExact(input, ParseClient.DateFormatString, CultureInfo.InvariantCulture);
}

Unity SDK fails when run on tvOS

The following error occurs when running the app:

UnauthorizedAccessException: Access to the path "/Parse.settings" is denied.
at System.IO.MonoIO.GetFileType (IntPtr handle, MonoIOError& error) [0x00000] in :0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access) [0x00000] in :0
at Parse.PlatformHooks+SettingsWrapper.Save () [0x00000] in :0
at Parse.PlatformHooks+SettingsWrapper.get_Wrapper () [0x00000] in :0
at Parse.PlatformHooks.Initialize () [0x00000] in :0
at Parse.ParseClient.Initialize (System.String applicationId, System.String dotnetKey) [0x00000] in :0
at Parse.ParseInitializeBehaviour.Initialize () [0x00000] in :0
at Parse.ParseInitializeBehaviour.Awake () [0x00000] in :0
at Boo.Lang.GenericGeneratorEnumerator1[T].MoveNext () [0x00000] in <filename unknown>:0 at Boo.Lang.GenericGeneratorEnumerator1[T].MoveNext () [0x00000] in :0

Cross-thread access exception on the UI thread on Xamarin.iOS

There's a UI cross-thread access exception silently happening on iOS.

I managed to fix the issue locally by modifying the following code :

From
public Task ExecuteParseInstallationSaveHookAsync(ParseInstallation installation) {
return Task.Run(() => {
installation.SetIfDifferent("badge", installation.Badge);
});

To

public async Task ExecuteParseInstallationSaveHookAsync(ParseInstallation installation) {    
    installation.SetIfDifferent ("badge", installation.Badge);
}

I try to make a pull request but I don't have the necessary rights for it.
Please fix the issue as it renders Push on iOS non-working.

Thanks.

Push notifications sent twice on android with dotNET SDK

The bug that has been fixed on Android platform on version 1.9.3 ("Fixed: Receiving duplicate pushes to the same application on the same device.") is apparently still present in the Unity SDK.

Whenever we send push notifications for android users, they receive them twice. This only happens on Android platform (not on iOS).

Example of the payload sent:
{
"alert": "test5"
}

ParseFacebookUtils issue

I am looking through the documentation for the ParseFacebookUtils class and I see that there is a method that can be used to login the user in with their Facebook ID and token. This is great and exactly what I want.

However, when I looked further into the documentation, I saw this

If a user for the given Facebook credentials does not already exist, a new user will be created.

This is a deal breaker for me. Is there no way to disable this and simply show that the user was not authenticated? I do not want to create a new user if this happens, I just want to show that the login was unsuccessful.

[Unity] ParseFile url not https

I use WWW to download a ParseFile but now Unity on iOS is warning me that the given url needs to be https and that they will be removing the mechanism that allows http to work at the moment.

Will this be addressed by Parse?

PlatformHooks.AppName getter blocks indefinitely because of a deadlock

When the AppName getter calls result.Task.Wait(), this blocks the calling thread, which is the UI thread in this case. When the await Package.Current.InstalledLocation.GetFileAsync("AppxManifest.xml") call finishes, it will attempt to run its continuation on the UI thread, but this thread is blocked waiting for the toRun method to finish, which results in a deadlock.

This is better explained here: http://stackoverflow.com/questions/11316438/call-to-await-getfileasync-never-returns-and-app-hangs-in-winrt-app (see Stephen Cleary's answer).

I see that this pattern is implemented in many property getters throughout the SDK and is a potential deadlock source. I think async methods should be used instead of readonly properties in these cases.

java.lang.ClassNotFoundException: com.parse.ParsePushUnityHelper

Hi folks,
I just upgraded my Unity project from Unity 4.6.x to Unity 5.2.0f3 and now I'm getting the following error on the console when running my app on Android devices:

AndroidJavaException: java.lang.ClassNotFoundException: com.parse.ParsePushUnityHelper
I/Unity   ( 9666):   at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <filename unknown>:0 
I/Unity   ( 9666):   at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in <filename unknown>:0 
I/Unity   ( 9666):   at UnityEngine.AndroidJavaObject._CallStatic[AndroidJavaObject] (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0 
I/Unity   ( 9666):   at UnityEngine.AndroidJavaObject.CallStatic[AndroidJavaObject] (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0 
I/Unity   ( 9666):   at UnityEngine.AndroidJavaObject.FindClass (System.String name) [0x00000] in <filename unknown>:0 
I/Unity   ( 9666):   at UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) [0x00000] in <filename unknown>:0 
I/Unity   ( 9666):   at UnityEngine.AndroidJavaClass..ctor (System.String className) [0x00000] in <filename unknown>:0 
I/Unity   ( 9666):   at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, S

I tried updating the Unity SDK (Parse.Unity.dll) from https://parse.com/docs/downloads as well as the Android SDK (Parse-1.10.2.jar, etc). However the missing class seems to be located in the ParsePush.jar mentioned in https://parse.com/apps/quickstart#parse_push/unity/android/existing.

If I include ParsePush.jar in my project then java.lang.IllegalArgumentException: already added:... errors occurs because some classes are already added in Parse-1.10.2.jar. I tried creating a separated .jar file containing only the missing com.parse.ParsePushUnityHelper.class file but without success.

I don't know how to included the "missing" com.parse.ParsePushUnityHelper class on my project...

iOS SDK v1.6.0 breaking bug: ParseUser.SignUpAsync() never throws any exceptions, even on bad data or duplicate users

In the v1.6.0 Parse SDK for iOS (from nuget), ParseUser.SignUpAsync() no longer throws any exceptions, even on bad data or duplicate users. Using TodoParseAuth as a test, in v1.5.5, exceptions are thrown for things like invalid email addresses ( eg: "[email protected]") or users already existing, but as of the 1.6.0 update, exceptions are no longer thrown. Code simply passes through to the next line, with ParseUser.CurrentUser NOT being set to null, but instead being set to an invalid object (where ParseUser.CurrentUser.ObjectId is null).

[Unity] Relation Query Fails with error on iOS.

Error: Query a relation: Must specify a ParseObject class name when creating a ParseQuery.

Unity: We are using 4.6.7 but it also happens on 4.6.8.
Parse plugin 1.6.1 for Unity.
Xcode 6.4

When Querying a relation, we started getting this error after updating parse.

  1. It only happens on iOS, and not in the Unity editor. Query also works in API console.
  2. Did not happen in older version of Parse.

We are querying a relation in this manner:
var FBFriendsRelation = ParseUser.CurrentUser.GetRelation ("FBFriends");
if (FBFriendsRelation != null) {
ParseQuery q = FBFriendsRelation.Query;

In Xcode, the error happens on the final line. We tried this with a stub project that only does this query, and get the same result.

SignUpAsync with invalid email address yields no exception but creates invalid ParseUser.CurrentUser

Specifying an invalid email address in ParseUser.SignUpAsync() does not throw an exception (nor is the user actually saved in the _User class, although this is as expected). However, it does set ParseUser.CurrentUser to a non-null value but where the ParseUser object is in an invalid state, where among other things, its ObjectId is set to NULL.

Example code:

var parseUser = new ParseUser () {
Username = "test",
Password = "test",
Email = "[email protected]", // note the bad email: " period at here dot com "
ACL = new ParseACL()
};
await parseUser.SignUpAsync ();
// no Exception is thrown, but now ParseUser.CurrentUser.ObjectId is NULL

Environment is Xamarin.iOS, running Parse v1.6.0. in a PCL project.

AndroidJavaException: java.lang.ClassNotFoundException: com.parse.ParsePushUnityHelper

The blank 1.6 SDK project is throwing this error on resume when using Unity 5.2.0f3.

Here's a repro project: https://drive.google.com/file/d/0B_RmRasnBaSiSUdSMzBHeFJfbG8/view?usp=sharing

Callstack:
10-06 11:00:45.071 10732-10767/? I/Unity๏น• AndroidJavaException: java.lang.ClassNotFoundException: com.parse.ParsePushUnityHelper
at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in :0
at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in :0
at UnityEngine.AndroidJavaObject._CallStatic[AndroidJavaObject](System.String methodName, System.Object[] args) [0x00000] in :0
at UnityEngine.AndroidJavaObject.CallStatic[AndroidJavaObject](System.String methodName, System.Object[] args) [0x00000] in :0
at UnityEngine.AndroidJavaObject.FindClass (System.String name) [0x00000] in :0
at UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) [0x00000] in :0
at UnityEngine.AndroidJavaClass..ctor (System.String className) [0x00000] in :0
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, S

Our remote push notifications are currently not working.. Have a feeling this is why!

Invalid ParseRelation returned if the object has no data for the relation.

I have code in my user class to get contacts as follows:

        [ParseFieldName("contacts")]
        public ParseRelation<User> Contacts
        {
            get { return GetRelationProperty<User>(); }
        }

If the contacts field on the user is null then if I use the following code I get an ArgumentNullException when accessing the Query field of the returned relation.

var contacts = user.Contacts;
var query = contacts.Query;

My guess is this happens due to line 1339 in ParseObject.cs:

    public ParseRelation<T> GetRelation<T>(string key) where T : ParseObject {
      // All the sanity checking is done when add or remove is called.
      ParseRelation<T> relation = null;
      TryGetValue(key, out relation);
      return relation ?? new ParseRelation<T>(this, key);
    }

In the case where there is no data, the returned relation is null and thus it uses the constructor to create a new ParseRelation. However this constructor does not set the targetClassName on the ParseRelation. This results in the call to Query to throw an ArgumentNullException on className.

Instead line 1139 should be changed to use the other constructor which takes the targetClassName as a parameter. It should get the className from T using the ParseClassName attribute on T.

ParsePush.subscribeAsync("") throwing TargetInvocationException on Windows Phone 8

I'm using VS Express for Windows Phone 2012 to develop my Windows Phone 8 apps.
I followed the WP8 quickstart guide and did everything right.

I'm using the latest relaease (1.6.1).

Here is my code:

ParseClient.Initialize("AppKey". "DotNetKey");
await ParsePush.SubscribeAsync("");
await ParseAnalytics.TrackAppOpenedAsync();

Any ideas why it's throwing the Exception?

Unity 5.2.1f iOS Push notification Exception

Hi i'm integrating parse in my Unity Project, Object creation works fine but I'm having some trouble with the push notification, the device never seem to register with the server on iOS.
using 5.2.1p3

Using ilcpp backend, Link.xml is located in the Asset's folder root.

ExecutionEngineException: Attempting to call method 'System.Reflection.MonoProperty::StaticGetterAdapterFrame' for which no ahead of time (AOT) code was generated.
  at System.Reflection.MonoProperty+GetterAdapter.Invoke (System.Object _this) [0x00000] in :0 
  at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in :0 
  at Parse.PlatformHooks+<>c__DisplayClass2c.b__2b () [0x00000] in :0 
  at System.Action.Invoke () [0x00000] in :0 
  at Parse.PlatformHooks+d__2e.MoveNext () [0x00000] in :0 
UnityEngine.Debug:Internal_LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Parse.d__2e:MoveNext()

Do Parse Push Notifications work when app is in background?

We have been following the Parse for Xamarin Android tutorial as shown in this repository:

https://github.com/ParsePlatform/PushTutorial

And in the parse.com website tutorial. Push notifications work just fine when the app is open, but as soon as the app is put into the background or is closed no push notifications are registered. To see if this was a .NET SDK issue or a parse issue, we also went through the Parse Android (plain-java) Tutorial, which worked as expected. There are some differences between the AndroidManifests in these two implementations, but in both cases we copied line-for-line what was in the Tutorials. Is this a known issue or is something else needed in order to have pushes be registered with the device while the app is not open? What I would like to happen is for this to occur, like it does for the vanilla-Android example:

desired_outcome

Here is our Application class and copy of our AndroidManifest.xml

using Android.App;
using Android.Runtime;
using Android.OS;
using Xamarin;
using System;
using RebuyApp.Green.Cart.Storage;
using System.Linq;
using ReactiveUI;
using Parse;

namespace RebuyApp.Android
{
#if DEBUG
[Application(Debuggable=true)]
#else
[Application(Debuggable=false)]
#endif

    public class RebuyApplication : Application 
    {
        AutoSuspendHelper suspendHelper;

        public RebuyApplication(IntPtr handle, JniHandleOwnership transfer) :
        base(handle, transfer)
        {
        }

        public override void OnCreate()
        {
            base.OnCreate();

            suspendHelper = new AutoSuspendHelper(this);

            RxApp.SuspensionHost.CreateNewAppState = () => new Bootstrap();
            RxApp.SuspensionHost.SetupDefaultSuspendResume();

            ParseClient.Initialize("OUR-CLIENT-KEY",
                "OUR-.NET-KEY");
            ParsePush.ParsePushNotificationReceived += ParsePush.DefaultParsePushNotificationReceivedHandler;

        }
    }
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.0" package="de.rebuy.android" android:versionCode="22">
    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" />
    <application android:label="@string/app_name" android:theme="@style/RebuyTheme" android:debuggable="true" android:icon="@drawable/launcher_icon">
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="" />
        <service android:name="parse.ParsePushService" />
        <receiver android:name="parse.ParsePushBroadcastReceiver" 
        android:permission="com.google.android.c2dm.permission.SEND"
        android:exported="false">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                <category android:name="de.rebuy.android" />
            </intent-filter>
        </receiver>
    </application>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.LOCATION_HARDWARE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.BATTERY_STATS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_LOGS" />
    <uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <permission android:protectionLevel="signature"
    android:name="de.rebuy.android.permission.C2D_MESSAGE"/>
    <uses-permission android:name="de.rebuy.android.permission.C2D_MESSAGE" />
</manifest>

Parse.dll 1.6.0 does not have a strong name and unable to sign it myself

It appears Parse.dll and Parse.NetFx45.dll from the .net 4.5 package do not have a strong name.

I have followed this guide to sign it personally: http://ryanfarley.com/blog/archive/2010/04/23/sign-a-.net-assembly-with-a-strong-name-without-recompiling.aspx

But I still have this exception when launching my app:

Could not load file or assembly 'Parse, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
StackTrace: at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName)
at Parse.ParseClient.GetParseType(String name)
at Parse.ParseClient..cctor()

When showing properties of the said dlls in visual studio, it does say they have a strong name.

Any idea?

EDIT: same thing for 1.6.1

EDIT2: I sign my application with a .pfx. Does it change anything? I have other Dlls that do not have a strong name (WpfAnimatedGif) and there is no problem with them.

Can not install Parse 1.6.0 nuget package

Hey
i try to install the nuget Parse 1.6.0 with Xamarin Studio for Mac 5.9.7 (build 22) on Mac OS X 10.10.5 El Capitan for a Android Solution with Target Android Version 22.

The Package Console show me this error:

Adding Parse...
Unable to find version '1.6.0' of package 'Parse'.

CancellationTokenSource.Token

public CancellationToken Token {
get {
return new CancellationToken(this);
}
}

It's bad to create new token every time in getter.

ParseUser.CurrentUser deadlock

After updating to Parse.iOS 1.6, calling ParseUser.CurrentUser causes 10-30 seconds deadlock on first call - I can't do anything, UI doesn't respond even when I call this in background. After 10-30 seconds it returns null which is right (I'm not and was not logged in, clear installation).

I suppose it doesn't matter, but: I am calling this in UIViewController's ViewWillAppear() method. This controller is one of 3 tabs of UITabBarController. The UIViewController is first controller showed after app launch.

Downgrading to Parse.iOS 1.5.5 solved the issue.

NullReferenceException at Parse.PlatformHooks.Initialize ()

Unity 5.2.1p1
Parse.Unity SDK 1.6.0

Built with Mono2x backend and "Strip Byte Code" stripping level. While running in Xcode I get the following error:

NullReferenceException: A null value was found where an object instance was required.
at System.Reflection.MonoProperty.CreateGetterDelegate (System.Reflection.MethodInfo method) [0x00000] in :0
at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in :0
at Parse.PlatformHooks.Initialize () [0x00000] in :0
at Parse.ParseClient.Initialize (System.String applicationId, System.String dotnetKey) [0x00000] in :0
at Parse.ParseInitializeBehaviour.Initialize () [0x00000] in :0
at Parse.ParseInitializeBehaviour.Awake () [0x00000] in :0

System.FormatException: String was not recognized as a valid DateTime.

We're just using Parse for simple push notifications (for now), and we've gotten the following exception(s):

Package: com.myapp.alpha
Version: 1681
Android: 5.1.1
Manufacturer: samsung
Model: SM-G920I
Date: 05/11/2015 13:03:18

System.FormatException: String was not recognized as a valid DateTime.
            at System.DateTimeParse.ParseExact(System.String_s__System.String_format__System.Globalization.DateTimeFormatInfo_dtfi__DateTimeStyles_style.args:1337)
            at System.DateTime.ParseExact(System.String_s__System.String_format__IFormatProvider_provider.args:1337)
            at com.myapp.alpha.Parse.Internal.ParseDecoder.ParseDate(System.String_input.args:1337)
            at com.myapp.alpha.Parse.Internal.ParseObjectCoder.<Decode>b__3(System.Object_obj.args:1337)
            at com.myapp.alpha.eTime>>:invoke_TResult_T(object.args:1337)
            at com.myapp.alpha.Parse.Internal.ParseObjectCoder.extractFromDictionary[Nullable`1](IDictionary`2_data__System.String_key__System.Func`2_action.args:1337)
                        at com.myapp.alpha.Parse.Internal.ParseObjectCoder.Decode(IDictionary`2_data__Parse.Internal.ParseDecoder_decoder.args:1337)
            at com.myapp.alpha.Parse.Internal.ParseObjectController.<SaveAsync>b__2(System.Threading.Tasks.Task`1_t.args:1337)
            at com.myapp.alpha.Parse.Internal.InternalExtensions+<>c__DisplayClass1`2[System.Tuple`2[System.Net.HttpStatusCode,System.Collections.Generic.IDictionary`2[S\
ystem.String,System.Object]],Parse.Internal.IObjectState].<OnSuccess>b__0(System.Threading.Tasks.Task_t.args:1337)
            at com.myapp.alpha.Parse.Internal.InternalExtensions+<>c__DisplayClass7`1[Parse.Internal.IObjectState].<OnSuccess>b__6(System.Threading.Tasks.Task_t.args:133\
7)
                    at System.Threading.Tasks.ContinuationResultTaskFromTask`1[System.Threading.Tasks.Task`1[Parse.Internal.IObjectState]].InnerInvoke(.args:1337)
            at System.Threading.Tasks.Task.Execute(.args:1337)
            at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(.args:1337)
            at com.myapp.alpha.Parse.Internal.InternalExtensions+<>c__DisplayClass7`1[System.Threading.Tasks.Task].<OnSuccess>b__6(System.Threading.Tasks.Task_t.args:133\
7)
                    at System.Threading.Tasks.ContinuationResultTaskFromTask`1[System.Threading.Tasks.Task`1[System.Threading.Tasks.Task]].InnerInvoke(.args:1337)
            at System.Threading.Tasks.Task.Execute(.args:1337)

And all we do with Parse (for now) is the following:

public override void OnCreate()
{
     base.OnCreate();

     RegisterActivityLifecycleCallbacks(new MyLifecycleHandler());

     ...

     var info = ParseHelper.GetInfo(BuildType);
     ParseClient.Initialize(info.AppId, info.NetKey);
     var installation = ParseInstallation.CurrentInstallation;
     installation.SaveAsync();
     ParsePush.ParsePushNotificationReceived += ParsePush.DefaultParsePushNotificationReceivedHandler;

}

We don't use anything else from Parse... Just the above. Speaking of which, I feel bit funny letting the Save.Async() call dangle like that, but don't really want to await it either. Anyhow, this doesn't always happen, but does happen sometimes. I think the fix would be to go through the code and try/catch around parsing date/time strings.

NullReferenceException raised when a push notification is received

When the client app does not register to the ParsePush.PushNotificationReceived event, when a push notification is received, the event is fired, but since no-one had registred, it is null and a NullReferenceException is thrown on this line: PushNotificationReceived(ParseInstallation.CurrentInstallation, args);

The code should read something like this:

var handler = PushNotificationReceived;
if (handler != null)
{
handler(ParseInstallation.CurrentInstallation, args);
}

Unity 4.6 and iOS 9 Can't find any registered devices yet

I followed the iOS push notifications tutorial: https://parse.com/tutorials/ios-push-notifications
The quick Start App: https://parse.com/apps/quickstart#parse_push/unity/ios/new
The troubleshooting guide: https://groups.google.com/forum/#!topic/parse-developers/65WAfRIiEnA

I've posted this question on the Google Group and Stack overflow a week ago and I never received a reply from anyone.

The issue is not from the setup, but that The Unity Parse SDK does not install the devices and the error messages are not helpful. Simply a 400 error code is returned. I have installed my device manually through a REST api call and I can receive Push Notifications to my device. I am using the following code to register for push notifications. CurrentInstallation seems to find the device properly, but the call to SaveAsync fails.

NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert |
                                                        RemoteNotificationType.Badge |
                                                        RemoteNotificationType.Sound);

// NOTE: I don't have it back to back like this, i ensure the installation is available by the the time this part of the code is reached.
var installation = ParseInstallation.CurrentInstallation;
installation.Channels = new List<string> { "ParseTest" };
installation.SaveAsync();

ArgumentException when saving a record which has two pointers to the same object.

I am trying to save a ParseObject and I run into the following issue:

System.ArgumentException: An item with the same key has already been added.
  at System.ThrowHelper.ThrowArgumentException (ExceptionResource resource) [0x00000] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/throwhelper.cs:74 
  at System.Collections.Generic.Dictionary`2[System.String,Parse.ParseObject].Insert (System.String key, Parse.ParseObject value, Boolean add) [0x0008e] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/collections/generic/dictionary.cs:329 
  at System.Collections.Generic.Dictionary`2[System.String,Parse.ParseObject].Add (System.String key, Parse.ParseObject value) [0x00000] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/collections/generic/dictionary.cs:185 
  at System.Linq.Enumerable.ToDictionary[ParseObject,String,ParseObject] (IEnumerable`1 source, System.Func`2 keySelector, System.Func`2 elementSelector, IEqualityComparer`1 comparer) [0x0002f] in //Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.4.46/src/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:2924 
  at System.Linq.Enumerable.ToDictionary[ParseObject,String,ParseObject] (IEnumerable`1 source, System.Func`2 keySelector, System.Func`2 elementSelector) [0x00000] in //Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.4.46/src/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:2911 
  at Parse.ParseObject.CollectFetchedObjects () [0x00034] in <filename unknown>:0 
  at Parse.ParseObject.MergeFromServer (IObjectState serverState) [0x000d9] in <filename unknown>:0 
  at Parse.ParseObject.HandleSave (IObjectState serverState) [0x0004a] in <filename unknown>:0 
  at Parse.ParseObject+<>c__DisplayClass44.<SaveAsync>b__41 (System.Threading.Tasks.Task`1 t) [0x0002a] in <filename unknown>:0 
  at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[Parse.Internal.IObjectState,System.Threading.Tasks.Task`1[Parse.Internal.IObjectState]].InnerInvoke () [0x00027] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/threading/Tasks/TaskContinuation.cs:207 
  at System.Threading.Tasks.Task.Execute () [0x00016] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2523 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:124 
  at MathChat.Exceptions.ServerException+<Wrap>c__async0+<Wrap>c__AnonStorey6+<Wrap>c__async5.MoveNext () [0x00022] in /Users/kostub/Projects/mathchat-xamarin/MathChatShared/Exceptions/ServerException.cs:25 

This happens consistently in the debugger and looking through the code it seems to create a mapping of objectId -> Object for all fetched objects.

My structure is as follows:

> problem.problem.estimatedData
Count = 21
    [0]: {[ACL, Parse.ParseACL]}
    [1]: {[allCollaborators, System.Collections.Generic.List`1[System.Object]]}
    [2]: {[chatColors, System.Collections.Generic.List`1[System.Object]]}
    [3]: {[collaborators, System.Collections.Generic.List`1[System.Object]]}

> problem.problem.estimatedData["collaborators"][0].ObjectId
"sjtdkpfUj0"
> problem.problem.estimatedData["allCollaborators"][0].ObjectId
"sjtdkpfUj0"
> problem.problem.estimatedData["allCollaborators"][0].IsDataAvailable
true
> problem.problem.estimatedData["collaborators"][0].IsDataAvailable
true

So both the collaborators and allCollaboratorsfields point to the same object and this is causing the exception. Not sure what's the best way to resolve.

Unexpected exception when loading ParseConfig

Sometimes we get an InvalidOperationException when loading ParseConfig. The full stack trace is below (unfortunately no line numbers). This happens in production and we don't have a consistent repro for it:

The code that results in the exception is as follows:

try
{
   this.config = ParseConfig.GetAsync();
   Logger.Log("Loaded Parse config.");
   break;
}
catch (Exception ex)
{
                      ...
}

Seems like an internal issue with Json.Encode

System.InvalidOperationException Collection was modified; enumeration operation may not execute.

  at System.Collections.Generic.Dictionary`2+Enumerator[TKey,TValue].MoveNext () [0x00000] in <filename unknown>:0 
  at Parse.Internal.Json.Encode (IDictionary`2 dict) [0x00000] in <filename unknown>:0 
  at Parse.ParseClient.SerializeJsonString (IDictionary`2 jsonData) [0x00000] in <filename unknown>:0 
  at Parse.PlatformHooks+SettingsWrapper.Save () [0x00000] in <filename unknown>:0 
  at Parse.PlatformHooks+SettingsWrapper.set_Item (System.String key, System.Object value) [0x00000] in <filename unknown>:0 
  at Parse.ParseConfig.SaveCurrentConfigFromFetchedConfig (System.Collections.Generic.Dictionary`2 fetchedConfig) [0x00000] in <filename unknown>:0 
  at Parse.ParseConfig.HandleFetchResult (System.Object result) [0x00000] in <filename unknown>:0 
  at Parse.ParseConfig.<GetAsync>b__6 (System.Threading.Tasks.Task`1 task) [0x00000] in <filename unknown>:0 
  at Parse.Internal.InternalExtensions+<>c__DisplayClass1`2[TIn,TResult].<OnSuccess>b__0 (System.Threading.Tasks.Task t) [0x00000] in <filename unknown>:0 
  at Parse.Internal.InternalExtensions+<>c__DisplayClass7`1[TResult].<OnSuccess>b__6 (System.Threading.Tasks.Task t) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.ContinuationResultTaskFromTask`1[TResult].InnerInvoke () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.Execute () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <filename unknown>:0 
  at MathChat.Exceptions.ServerException+<Wrap>c__async1`1[Parse.ParseConfig].MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <filename unknown>:0 
  at MathChat.Models.Config+<LoadConfig>c__async1.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 
  at MathChat.Models.Config+<WaitForConfigLoad>c__async0.MoveNext () [0x00000] in <filename unknown>:0 

Suggestion: Use a reference assm with different platform impls

As described in your blog post, you use reflection to locate a platform specific helper assembly. Instead, a simpler pattern would be to generate a PCL with the common surface area (everything #ifdef'd out, etc), and then generate the full assembly as platform-specific but with the same name. NuGet would ensure projects get the right references

For example

  • Parse.dll (PCL)
  • Parse.dll (NetFx)
  • Parse.dll (Xamarin)
  • ...

Then, your nuget package would have

lib\portable-win8+wpa81+wp8+net45
lib\win8
lib\net45
...

The reflection hacks would no longer be needed

Unity SDK, iOS build. "Cannot change the appIdentifier" error

Hi guys!

I have a problem with Unity SDK when launching XCode project:

InvalidOperationException: Cannot change the `appIdentifier` property of a `_Installation` object.
  at Parse.ParseObject.CheckKeyIsMutable (System.String key) [0x00000] in <filename unknown>:0 
  at Parse.ParseObject.Remove (System.String key) [0x00000] in <filename unknown>:0 
  at Parse.ParseObject.SetIfDifferent[String] (System.String key, System.String value) [0x00000] in <filename unknown>:0 
  at Parse.ParseInstallation.SaveAsync (System.Threading.Tasks.Task toAwait, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0 
  at Parse.ParseObject+<>c__DisplayClass3a.<SaveAsync>b__39 (System.Threading.Tasks.Task toAwait) [0x00000] in <filename unknown>:0 
  at Parse.Internal.TaskQueue.Enqueue[Task] (System.Func`2 taskStart, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0 
  at Parse.ParseObject.SaveAsync (CancellationToken cancellationToken) [0x00000] in <filename unknown>:0 
  at Parse.ParseObject.SaveAsync () [0x00000] in <filename unknown>:0 
  at Parse.ParseInitializeBehaviour.<Awake>b__0 (System.Byte[] deviceToken) [0x00000] in <filename unknown>:0 
  at Parse.PlatformHooks+<>c__DisplayClass28.<RegisterDeviceTokenRequest>b__26 () [0x00000] in <filename unknown>:0 
  at Parse.PlatformHooks+<RunDispatcher>d__2e.MoveNext () [0x00000] in <filename unknown>:0 

It's not a fatal error - app still working but I think it shouldn't be there.
All that I doing is:

UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert |
                                                                UnityEngine.iOS.NotificationType.Badge |
                                                                UnityEngine.iOS.NotificationType.Sound);

FormatException: Input string was not in the correct format at Parse.Internal.HttpClient > GetStatusCode

Using Parse Unity SDK 1.6.0 and Unity 5.2.1

When my app doesn't have internet connectivity and the app is trying to fetch data using FetchAsync(), I am getting the error "FormatException: Input string was not in the correct format" at Parse.Internal.HttpClient > GetStatusCode every time.

I am trying to write functionality if fetching of data fails, I test internet connectivity and if the connection is good, I ask the user to try and fetch the data again, and if the connection is not good I ask them to check their internet connection. That works if I am connected to the Internet but if I am not I get this error, I never get to the internet connection test, and my code stays in the following loop forever

ParseUser __parseUser = __dataObj as ParseUser;
var __fetchObjTask = __parseUser.FetchAsync();

Debug.Log ("FetchData::fetching parse User!");
//The CODE SITS IN THIS WHILE LOOP FOREVER SINCE IT'S NEVER COMPLETE
//AND I CANNOT CHECK FOR IS FAULTED OR ISCANCELED AS THOSE ARE FALSE IN THE WHILE LOOP
while (!__fetchObjTask.IsCompleted)
{
    Debug.Log ("FETCHING USER DATA!");
    Debug.LogWarning("__fetchObjTask.IsCanceled = "+__fetchObjTask.IsCanceled);
    Debug.LogWarning("__fetchObjTask.IsFaulted = "+__fetchObjTask.IsFaulted);
    yield return null;
}
Debug.Log ("TASK COMPLETED!");
Debug.LogWarning("__fetchObjTask.IsCanceled = "+__fetchObjTask.IsCanceled);
Debug.LogWarning("__fetchObjTask.IsFaulted = "+__fetchObjTask.IsFaulted);
if (__fetchObjTask.IsCanceled || __fetchObjTask.IsFaulted)
{
    Debug.LogWarning("THERE WAS A PROBLEM FETCHING DATA!");
    Debug.LogWarning("FetchData::Error message " + __fetchObjTask.Exception.Message);
}

I have been using Parse for over a year and have not seen this until the latest update, so not sure what got changed but I can't seem to figure out how to catch this error.

Suggestion: Make ParseClient.ConvertTo public

Would be super helpful if this method were public, then we could get typed values out of generic objects returned from a parse cloud. i.e:

//cloud code

response.success({ object1:parseObject, object2:anotherParseObject })

//Unity client

IDictionary<string, object> result = response;

ParseObject object1 = ParseClient.ConvertTo<ParseObject>(result["object1"]);

[Unity] NotificationServices.RegisterForNotifications causing NullReferenceException in Parse?

I've started getting a NullReferenceException somewhere in Parse but I don't think it's caused by something I'm explicitly doing.

I believe it occurs when I register for notifications in Unity because as soon as I make this call it occurs.

NotificationServices.RegisterForNotifications(NotificationType.Alert|NotificationType.Badge|NotificationType.Sound);

I get this printed in the output just before the exception:

didRegisterForRemoteNotificationsWithDeviceToken

NullReferenceException: A null value was found where an object instance was required.
at Parse.ParseInstallation.getLocaleIdentifier () [0x00000] in :0
at Parse.ParseInstallation.SetAutomaticValues () [0x00000] in :0
at Parse.ParseInstallation.SaveAsync (System.Threading.Tasks.Task toAwait, CancellationToken cancellationToken) [0x00000] in :0
at Parse.ParseObject+<>c__DisplayClass18.b__17 (System.Threading.Tasks.Task toAwait) [0x00000] in :0
at Parse.Internal.TaskQueue.Enqueue[Task](System.Func`2 taskStart, CancellationToken cancellationToken) [0x00000] in :0
at Parse.ParseObject.SaveAsync (CancellationToken cancellationToken) [0x00000] in :0
at Parse.ParseObject.SaveAsync () [0x00000] in :0
at Parse.ParseInitializeBehaviour.b__0 (System.Byte[] deviceToken) [0x00000] in :0
at Parse.PlatformHooks+<>c__DisplayClass28.b__26 () [0x00000] in :0
at Parse.PlatformHooks+d__2e.MoveNext () [0x00000] in :0
UnityEngine.Debug:Internal_LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Parse.d__2e:MoveNext()

Support for tvOS?

Any plans for supporting tvOS? From this Parse iOS SDK thread ( parse-community/Parse-SDK-iOS-OSX#250 ), it looks like they are making progress in the native-code side -- can you leverage any of their work? (Unfortunately, there are definitely still some hurdles to work around such as not having any persistent local storage at all...)

Parse 1.6.0 Unity: get_bundleIdentifier can only be called from the main thread.

Hi, after upgrading to the 1.6.0 SDK for Unity, I'm getting this error after calling a CloudCode method

Full exception:

ArgumentException: get_bundleIdentifier can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
System.Reflection.MonoProperty.StaticGetterAdapterFrame[String] (System.Reflection.StaticGetter`1 getter, System.Object obj) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoProperty.cs:239)
System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoProperty.cs:295)
Parse.PlatformHooks.get_AppDisplayVersion ()
Parse.Internal.ParseCommand..ctor (System.String relativeUri, System.String method, System.String sessionToken, IList`1 headers, System.IO.Stream stream, System.String contentType)
Parse.Internal.ParseCommand..ctor (System.String relativeUri, System.String method, System.String sessionToken, IList`1 headers, IDictionary`2 data)

Consistently Fill ParseInstallation Fields

Saving the ParseInstallation object leaves the following fields unpopulated:

  • appIdentifier
  • appName
  • timeZone
  • badge (this is probably fine left unpopulated)
  • parseVersion
  • timeZone

We need to fix it.

Unity webplayer SecurityException with ParseUser.LoginInAsync when not connected to the internet.

Running ParseStarterProject on Unity 5.x without network results in the following error:

SecurityException: No valid crossdomain policy available to allow access
UnityEngine.WWW.get_text ()
Parse.PlatformHooks+<>c__DisplayClass3c+<>c__DisplayClass42.b__36 (UnityEngine.WWW www)
Parse.PlatformHooks+<>c__DisplayClass24.b__23 ()
Parse.PlatformHooks+d__48.MoveNext ()
UnityEngine.Debug:LogException(Exception)
Parse.d__48:MoveNext()

This seems to happen before calling Parse (I guess in the initialization process), so there is no way to catch this exception from the developer.

Original bug report for more context: https://developers.intern.facebook.com/bugs/1630153217241434/

ParseCloud.CallFunctionAsync doesn't always return

We are noticing sometimes that ParseCloud.CallFunctionAsync doesn't always return when internet is bogged down or reception is low on the device. The cloud call works most of the time but it does just sit there forever on occasions. One the app is restarted then it start functioning again.

The function we are calling is just returning static data from some tables so the amount of data and time to retrieve data is always the same so it shouldn't be triggering an internal time out. But even if it does, it should eventually through an exception, return blank or time out rather than just sit there indefinitely.

Is this is a bug with the Parse Unity SDK?

get_bundleIdentifier can only be called from the main thread during a SaveAsync() call

Unity 5.2.1p1 (OSX Editor)
Parse 1.6.0

While executing the following code in the editor:

    ParseQuery<ParseObject> query = new ParseQuery<ParseObject>("SomeClass")
        .WhereEqualTo("someField", "someValue");
    query.FirstAsync().ContinueWith(delegate(Task<ParseObject> arg) {

        // change any value of arg.Result to make the ParseObject dirty

        arg.Result.SaveAsync();
    });

The ParseObject is not saved to the database and the editor console has the following output:

get_bundleIdentifier can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.

Does ParseUser.CurrentUser block?

Does ParseUser.CurrentUser block?

Here's the code for the property.

public static ParseUser CurrentUser { get { Task<ParseUser> currentUserAsync = ParseUser.GetCurrentUserAsync (); currentUserAsync.Wait (); return currentUserAsync.Result; } }

Presumably the Wait call can cause a delay?

Is there a way to determine whether there's a current user logged in without calling ParseUser.CurrentUser? Or do I have to keep track of it myself?

Notification doesn't show if no Android icon in Manifest

Hi,

We have a Xamarin Forms iOS & Android app that uses the .NET SDK.
We spent a day try to figure out why the device didn't show any notification on Android when receiving a push.

The fact is : if you don't have android:icon="@drawable/Icon" in your manifest, no notification is shown.

Using ParsePush.ParsePushNotificationReceived += ParsePush.DefaultParsePushNotificationReceivedHandler;, the push is received, the device vibrates, but no warning or error in the console saying that an icon is needed to show the notification.

It would be nice to either show a default notification or clearly specify it in the QuickStart guide.

Have a good day !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.