Skip to content

Commit 86d425b

Browse files
committed
v3.0.1032-Beta
1 parent 9f86ff7 commit 86d425b

29 files changed

Lines changed: 563 additions & 338 deletions

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
## Ignore Visual Studio temporary files, build results, and
2-
## files generated by popular Visual Studio add-ons.
3-
##
4-
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5-
61
# User-specific files
72
*.rsuser
83
*.suo

iOS/WebDavCommon/AppGroupSettings.cs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,21 @@ public static ServerSettings GetServerSettings()
1414
using (NSUrl userDataPath = GetSharedContainerUrl())
1515
using (NSDictionary userData = NSDictionary.FromFile(Path.Combine(userDataPath.Path, ServerSettingFile)))
1616
{
17-
if (userData == null)
18-
{
19-
return null;
20-
}
21-
17+
if (userData == null) return null;
2218
return ServerSettings.CreateFromNsDictionary(userData);
2319
}
2420
}
2521

2622
private static NSUrl GetSharedContainerUrl()
2723
{
2824
NSUrl userDataPath = NSFileManager.DefaultManager.GetContainerUrl(AppGroupId);
29-
if (userDataPath == null)
30-
{
31-
throw new AccessViolationException("Group container is null");
32-
}
33-
25+
if (userDataPath == null) throw new AccessViolationException("Group container is null");
3426
return userDataPath;
3527
}
3628

3729
public static void SaveServerSettings(ServerSettings serverSettings)
3830
{
39-
if (serverSettings == null)
40-
{
41-
throw new ArgumentNullException(nameof(serverSettings));
42-
}
43-
31+
if (serverSettings == null) throw new ArgumentNullException(nameof(serverSettings));
4432
using (NSUrl userDataPath = GetSharedContainerUrl())
4533
using (NSDictionary data = serverSettings.ToNsDictionary())
4634
{

iOS/WebDavCommon/MyClass.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
namespace WebDavCommon
3+
{
4+
public class MyClass
5+
{
6+
public MyClass()
7+
{
8+
}
9+
}
10+
}

iOS/WebDavCommon/ServerSettings.cs

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,9 @@ namespace WebDavCommon
55
{
66
public class ServerSettings
77
{
8-
private const string ServerUriKey = "ServerUri";
9-
private const string UserNameKey = "UserName";
10-
private const string PasswordKey = "PassWord";
11-
128
public Uri ServerUri { get; }
139

1410
public string Password { get; set; }
15-
1611
public string UserName { get; set; }
1712

1813
public ServerSettings(string serverUri, string userName = "", string password = "")
@@ -23,26 +18,22 @@ public ServerSettings(string serverUri, string userName = "", string password =
2318
Password = password;
2419
}
2520

26-
public bool HasCredential => !string.IsNullOrEmpty(this.Password) && !string.IsNullOrEmpty(this.UserName);
21+
public bool HasCredential => !string.IsNullOrEmpty(this.Password) && !String.IsNullOrEmpty(this.UserName);
2722

2823
public static ServerSettings CreateFromNsDictionary(NSDictionary userDataDictionary)
2924
{
30-
if(userDataDictionary != null)
31-
{
32-
NSObject serverUrl = userDataDictionary.ValueForKey((NSString) ServerUriKey);
33-
NSObject userName = userDataDictionary.ValueForKey((NSString) UserNameKey);
34-
NSObject passWord = userDataDictionary.ValueForKey((NSString) PasswordKey);
35-
return new ServerSettings(serverUrl.ToString(), userName.ToString(), passWord.ToString());
36-
}
37-
38-
throw new ArgumentNullException(nameof(userDataDictionary));
25+
if(userDataDictionary == null) throw new ArgumentNullException(nameof(userDataDictionary));
26+
NSObject serverUrl = userDataDictionary.ValueForKey((NSString) "ServerUri");
27+
NSObject userName = userDataDictionary.ValueForKey((NSString) "UserName");
28+
NSObject passWord = userDataDictionary.ValueForKey((NSString) "PassWord");
29+
return new ServerSettings(serverUrl.ToString(), userName.ToString(), passWord.ToString());
3930
}
4031

4132
public NSDictionary ToNsDictionary()
4233
{
43-
return new NSDictionary(new NSString(UserNameKey), new NSString(UserName),
44-
new NSString(ServerUriKey), new NSString(ServerUri.ToString()),
45-
new NSString(PasswordKey), new NSString(Password));
34+
return new NSDictionary(new NSString("UserName"), new NSString(UserName),
35+
new NSString("ServerUri"), new NSString(ServerUri.ToString()),
36+
new NSString("PassWord"), new NSString(Password));
4637
}
4738
}
4839
}

iOS/WebDavContainer/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
18+
<string>3.0</string>
1919
<key>LSRequiresIPhoneOS</key>
2020
<true/>
2121
<key>UILaunchStoryboardName</key>
@@ -46,7 +46,7 @@
4646
<key>XSAppIconAssets</key>
4747
<string>Assets.xcassets/AppIcon.appiconset</string>
4848
<key>CFBundleVersion</key>
49-
<string>6</string>
49+
<string>1032</string>
5050
<key>UIDeviceFamily</key>
5151
<array>
5252
<integer>1</integer>

iOS/WebDavContainer/WebDavContainer.csproj

Lines changed: 67 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,21 @@
1818
<DefineConstants>DEBUG;ENABLE_TEST_CLOUD;</DefineConstants>
1919
<ErrorReport>prompt</ErrorReport>
2020
<WarningLevel>4</WarningLevel>
21-
<CodesignKey></CodesignKey>
21+
<CodesignKey>
22+
</CodesignKey>
2223
<MtouchDebug>true</MtouchDebug>
2324
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
2425
<MtouchFastDev>true</MtouchFastDev>
2526
<IOSDebuggerPort>10310</IOSDebuggerPort>
2627
<MtouchLink>None</MtouchLink>
2728
<MtouchArch>x86_64</MtouchArch>
28-
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
29+
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
2930
<DeviceSpecificBuild>false</DeviceSpecificBuild>
3031
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
31-
<CodesignProvision></CodesignProvision>
32+
<CodesignProvision>
33+
</CodesignProvision>
3234
<OptimizePNGs>false</OptimizePNGs>
35+
<MtouchFloat32>true</MtouchFloat32>
3336
</PropertyGroup>
3437
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
3538
<DebugType>
@@ -40,20 +43,24 @@
4043
</DefineConstants>
4144
<ErrorReport>prompt</ErrorReport>
4245
<WarningLevel>4</WarningLevel>
43-
<CodesignKey></CodesignKey>
46+
<CodesignKey>
47+
</CodesignKey>
4448
<MtouchFloat32>true</MtouchFloat32>
4549
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
4650
<MtouchLink>SdkOnly</MtouchLink>
4751
<MtouchArch>ARM64</MtouchArch>
4852
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
49-
<CodesignProvision></CodesignProvision>
50-
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
53+
<CodesignProvision>
54+
</CodesignProvision>
55+
<MtouchNoSymbolStrip>false</MtouchNoSymbolStrip>
5156
<AssemblyName>WebDavContainer</AssemblyName>
5257
<DeviceSpecificBuild>false</DeviceSpecificBuild>
5358
<MtouchFastDev>false</MtouchFastDev>
54-
<BuildIpa>true</BuildIpa>
59+
<BuildIpa>false</BuildIpa>
5560
<IpaMetadata>Info.plist</IpaMetadata>
5661
<IpaPackageName>test</IpaPackageName>
62+
<MtouchUseLlvm>true</MtouchUseLlvm>
63+
<OptimizePNGs>true</OptimizePNGs>
5764
</PropertyGroup>
5865
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
5966
<DebugType>
@@ -64,12 +71,14 @@
6471
</DefineConstants>
6572
<ErrorReport>prompt</ErrorReport>
6673
<WarningLevel>4</WarningLevel>
67-
<CodesignKey></CodesignKey>
74+
<CodesignKey>
75+
</CodesignKey>
6876
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
6977
<MtouchLink>None</MtouchLink>
7078
<MtouchArch>x86_64</MtouchArch>
71-
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
72-
<CodesignProvision></CodesignProvision>
79+
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
80+
<CodesignProvision>
81+
</CodesignProvision>
7382
<MtouchFloat32>true</MtouchFloat32>
7483
</PropertyGroup>
7584
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
@@ -80,7 +89,8 @@
8089
<DefineConstants>DEBUG;ENABLE_TEST_CLOUD;</DefineConstants>
8190
<ErrorReport>prompt</ErrorReport>
8291
<WarningLevel>4</WarningLevel>
83-
<CodesignKey></CodesignKey>
92+
<CodesignKey>
93+
</CodesignKey>
8494
<DeviceSpecificBuild>true</DeviceSpecificBuild>
8595
<MtouchDebug>true</MtouchDebug>
8696
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
@@ -90,8 +100,9 @@
90100
<IOSDebuggerPort>38634</IOSDebuggerPort>
91101
<MtouchLink>SdkOnly</MtouchLink>
92102
<MtouchArch>ARM64</MtouchArch>
93-
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
94-
<CodesignProvision></CodesignProvision>
103+
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
104+
<CodesignProvision>
105+
</CodesignProvision>
95106
<AssemblyName>WebDavContainer</AssemblyName>
96107
</PropertyGroup>
97108
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
@@ -100,7 +111,8 @@
100111
<DefineConstants>
101112
</DefineConstants>
102113
<WarningLevel>4</WarningLevel>
103-
<CodesignKey></CodesignKey>
114+
<CodesignKey>
115+
</CodesignKey>
104116
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
105117
<MtouchVerbosity>
106118
</MtouchVerbosity>
@@ -109,7 +121,8 @@
109121
<MtouchArch>ARM64</MtouchArch>
110122
<MtouchHttpClientHandler>
111123
</MtouchHttpClientHandler>
112-
<CodesignProvision></CodesignProvision>
124+
<CodesignProvision>
125+
</CodesignProvision>
113126
<DeviceSpecificBuild>true</DeviceSpecificBuild>
114127
<MtouchFastDev>true</MtouchFastDev>
115128
<AssemblyName>WebDavContainer</AssemblyName>
@@ -119,7 +132,6 @@
119132
</PropertyGroup>
120133
<ItemGroup>
121134
<Reference Include="System" />
122-
<Reference Include="System.Xml" />
123135
<Reference Include="System.Core" />
124136
<Reference Include="Xamarin.iOS" />
125137
</ItemGroup>
@@ -165,15 +177,21 @@
165177
</ImageAsset>
166178
</ItemGroup>
167179
<ItemGroup>
168-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_1024x1024.png" />
180+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_1024x1024.png">
181+
<Visible>false</Visible>
182+
</ImageAsset>
169183
</ItemGroup>
170184
<ItemGroup>
171185
<InterfaceDefinition Include="LaunchScreen.storyboard" />
172186
<InterfaceDefinition Include="Main.storyboard" />
173187
</ItemGroup>
174188
<ItemGroup>
175-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
176-
<ImageAsset Include="Assets.xcassets\Contents.json" />
189+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
190+
<Visible>false</Visible>
191+
</ImageAsset>
192+
<ImageAsset Include="Assets.xcassets\Contents.json">
193+
<Visible>false</Visible>
194+
</ImageAsset>
177195
<None Include="Info.plist" />
178196
<None Include="Entitlements.plist" />
179197
</ItemGroup>
@@ -202,34 +220,54 @@
202220
<BundleResource Include="Resources\wheel.png" />
203221
</ItemGroup>
204222
<ItemGroup>
205-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_120x120.png" />
223+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_120x120.png">
224+
<Visible>false</Visible>
225+
</ImageAsset>
206226
</ItemGroup>
207227
<ItemGroup>
208-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_152x152.png" />
228+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_152x152.png">
229+
<Visible>false</Visible>
230+
</ImageAsset>
209231
</ItemGroup>
210232
<ItemGroup>
211-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_180x180.png" />
233+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_180x180.png">
234+
<Visible>false</Visible>
235+
</ImageAsset>
212236
</ItemGroup>
213237
<ItemGroup>
214-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_29x29.png" />
238+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_29x29.png">
239+
<Visible>false</Visible>
240+
</ImageAsset>
215241
</ItemGroup>
216242
<ItemGroup>
217-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_40x40.png" />
243+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_40x40.png">
244+
<Visible>false</Visible>
245+
</ImageAsset>
218246
</ItemGroup>
219247
<ItemGroup>
220-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_58x58.png" />
248+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_58x58.png">
249+
<Visible>false</Visible>
250+
</ImageAsset>
221251
</ItemGroup>
222252
<ItemGroup>
223-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_60x60.png" />
253+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_60x60.png">
254+
<Visible>false</Visible>
255+
</ImageAsset>
224256
</ItemGroup>
225257
<ItemGroup>
226-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_76x76.png" />
258+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_76x76.png">
259+
<Visible>false</Visible>
260+
</ImageAsset>
227261
</ItemGroup>
228262
<ItemGroup>
229-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_80x80.png" />
263+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_80x80.png">
264+
<Visible>false</Visible>
265+
</ImageAsset>
230266
</ItemGroup>
231267
<ItemGroup>
232-
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_87x87.png" />
268+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\wheel_87x87.png">
269+
<Visible>false</Visible>
270+
</ImageAsset>
233271
</ItemGroup>
234272
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
235273
</Project>

0 commit comments

Comments
 (0)