You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Readme and Add Configuration Hints for Unity Target Platforms (#332)
* Updated code sample formatting for readability.
* Added link.xml hint for iOS platform to the Unity3D section
Added internet access settings requirement for Android platform to the Unity3D section
Co-authored-by: Tobias Pott <tobias@vrtxlabs.com>
Other `IServiceHubMutator` implementations are available that do different things, such as the `RelativeCacheLocationMutator`, which allows a custom cache location relative to the default base folder (`System.Environment.SpecialFolder.LocalApplicationData`) to be specified.
82
93
83
94
If you are having trouble getting the SDK to work on other platforms, try to use the above code to control what values for various metadata information items the SDK will use, to see if that fixes the issue.
84
95
96
+
#### Unity3D on iOS
97
+
98
+
When using the Parse SDK on iOS/iPadOS target platforms you may encounter issues during runtime where the creation of ParseObjects using subclassing or other Parse methods fail. This occurs due to the fact that Unity strips code from the project and it will most likely do so for some parts of the Parse.dll assembly file.
99
+
100
+
To prevent Unity to remove necessary code from the assembly it is necessary to include a link.xml file in your project which tells Unity to not touch anything from the Parse.dll.
101
+
102
+
```xml
103
+
<linker>
104
+
<assemblyfullname="Parse"preserve="all"/>
105
+
</linker>
106
+
```
107
+
Save the above xml code to a file called 'link.xml' and place it in the Assets folder of your project.
108
+
109
+
#### Unity3D on Android
110
+
111
+
When using the Parse SDK on Android target platform you may encounter an issue related to network communication and resolution of host addresses when using the Parse SDK. This occurs in situations where you might use the Parse SDK but did not configure your Android app to require internet access. Whenever a project does not explicitly state it requires internet access Unity will try to remove classes and system assemblies during the build process, causing Parse-calls to fail with different exceptions.
112
+
This may not be the case if your project uses any Unity specific web/networking code, as this will be detected by the engine and the code stripping will not be done.
113
+
114
+
To set your project, navigate to `Project Settings -> Player -> Other Settings -> Internet Access` and switch it to Require.
115
+
Depending on the version of Unity you are using this setting may be found in a slightly different location or with slightly different naming, use the above path as a guidance.
116
+
85
117
### Server-Side Use
86
118
87
119
The SDK can be set up in a way such that every new `ParseClient` instance can authenticate a different user concurrently. This is enabled by an `IServiceHubMutator` implementation which adds itself as an `IServiceHubCloner` implementation to the service hub which, making it so that consecutive calls to the cloning `ParseClient` constructor (the one without parameters) will clone the publicized `ParseClient` instance, exposed by `ParseClient.Instance`, replacing the `IParseCurrentUserController` implementation instance with a fresh one with no caching every time. This allows you to configure the original instance, and have the clones retain the general behaviour, while also allowing the differnt users to be signed into the their respective clones and execute requests concurrently, without causing race conditions. To use this feature of the SDK, the first `ParseClient` instance must be constructued and publicized as follows once, before any other `ParseClient` instantiations. Any classes that need to be registered must be done so with the original instance.
0 commit comments