Skip to content

Commit b07b409

Browse files
Use notification handler in notification service extension.
1 parent 1c6b91a commit b07b409

File tree

12 files changed

+171
-45
lines changed

12 files changed

+171
-45
lines changed

Notifo.sln

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ VisualStudioVersion = 16.0.31019.35
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.iOS", "sample\Sample.iOS\Sample.iOS.csproj", "{2536F86F-CA74-469A-AFAC-A8BE7B71CED3}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample", "sample\Sample\Sample.csproj", "{DD43F8B0-1925-477A-9FF5-BE3E01350E30}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample", "sample\Sample\Sample.csproj", "{DD43F8B0-1925-477A-9FF5-BE3E01350E30}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{4270D4B1-5081-4E4F-8BDF-61ED888E936E}"
1111
EndProject
1212
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{514F5B61-451C-41EA-801F-9AE1B052A971}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Notifo.SDK.UnitTests", "tests\Notifo.SDK.UnitTests\Notifo.SDK.UnitTests.csproj", "{1F863C31-C0C7-42F7-9609-B122866B6356}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notifo.SDK.UnitTests", "tests\Notifo.SDK.UnitTests\Notifo.SDK.UnitTests.csproj", "{1F863C31-C0C7-42F7-9609-B122866B6356}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Notifo.SDK", "sdk\Notifo.SDK\Notifo.SDK.csproj", "{4F928A67-C5E7-44E2-BE71-6ED155AFED9C}"
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notifo.SDK.Core", "sdk\Notifo.SDK\Notifo.SDK.Core.csproj", "{4F928A67-C5E7-44E2-BE71-6ED155AFED9C}"
1717
EndProject
1818
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sdk", "sdk", "{4D2C377A-D9F6-4EF3-A342-1B5A84F391DB}"
1919
EndProject
@@ -22,12 +22,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2222
.editorconfig = .editorconfig
2323
EndProjectSection
2424
EndProject
25-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Notifo.SDK.FirebasePlugin", "sdk\Notifo.SDK.FirebasePlugin\Notifo.SDK.FirebasePlugin.csproj", "{258DEE06-BB0D-404B-B981-43B091744BD3}"
25+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notifo.SDK.FirebasePlugin", "sdk\Notifo.SDK.FirebasePlugin\Notifo.SDK.FirebasePlugin.csproj", "{258DEE06-BB0D-404B-B981-43B091744BD3}"
2626
EndProject
27-
Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "Sample.Android", "sample\Sample.Android\Sample.Android.csproj", "{01F5694E-102C-4586-805D-BC47DB2C255E}"
27+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Android", "sample\Sample.Android\Sample.Android.csproj", "{C4EF6311-9993-40BD-BEF8-3C495F571302}"
2828
EndProject
2929
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleNotificationServiceExtension", "sample\SampleNotificationServiceExtension\SampleNotificationServiceExtension.csproj", "{1B35BAEA-5666-408C-BED4-DB6114F3070E}"
3030
EndProject
31+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.iOS.Shared", "sample\Sample.iOS.Shared\Sample.iOS.Shared.csproj", "{7D4A0E79-8075-42A6-ACC5-E5B666F75313}"
32+
EndProject
3133
Global
3234
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3335
Debug|Any CPU = Debug|Any CPU
@@ -110,24 +112,24 @@ Global
110112
{258DEE06-BB0D-404B-B981-43B091744BD3}.Release|iPhone.Build.0 = Release|Any CPU
111113
{258DEE06-BB0D-404B-B981-43B091744BD3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
112114
{258DEE06-BB0D-404B-B981-43B091744BD3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
113-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
114-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Debug|Any CPU.Build.0 = Debug|Any CPU
115-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
116-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
117-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Debug|iPhone.Build.0 = Debug|Any CPU
118-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Debug|iPhone.Deploy.0 = Debug|Any CPU
119-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
120-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
121-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
122-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Release|Any CPU.ActiveCfg = Release|Any CPU
123-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Release|Any CPU.Build.0 = Release|Any CPU
124-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Release|Any CPU.Deploy.0 = Release|Any CPU
125-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Release|iPhone.ActiveCfg = Release|Any CPU
126-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Release|iPhone.Build.0 = Release|Any CPU
127-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Release|iPhone.Deploy.0 = Release|Any CPU
128-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
129-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
130-
{01F5694E-102C-4586-805D-BC47DB2C255E}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
115+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
116+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|Any CPU.Build.0 = Debug|Any CPU
117+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
118+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhone.ActiveCfg = Debug|Any CPU
119+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhone.Build.0 = Debug|Any CPU
120+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhone.Deploy.0 = Debug|Any CPU
121+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
122+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
123+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
124+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|Any CPU.ActiveCfg = Release|Any CPU
125+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|Any CPU.Build.0 = Release|Any CPU
126+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|Any CPU.Deploy.0 = Release|Any CPU
127+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhone.ActiveCfg = Release|Any CPU
128+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhone.Build.0 = Release|Any CPU
129+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhone.Deploy.0 = Release|Any CPU
130+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
131+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
132+
{C4EF6311-9993-40BD-BEF8-3C495F571302}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
131133
{1B35BAEA-5666-408C-BED4-DB6114F3070E}.Debug|Any CPU.ActiveCfg = Debug|iPhone
132134
{1B35BAEA-5666-408C-BED4-DB6114F3070E}.Debug|Any CPU.Build.0 = Debug|iPhone
133135
{1B35BAEA-5666-408C-BED4-DB6114F3070E}.Debug|iPhone.ActiveCfg = Debug|iPhone
@@ -140,6 +142,18 @@ Global
140142
{1B35BAEA-5666-408C-BED4-DB6114F3070E}.Release|iPhone.Build.0 = Release|iPhone
141143
{1B35BAEA-5666-408C-BED4-DB6114F3070E}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
142144
{1B35BAEA-5666-408C-BED4-DB6114F3070E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
145+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
146+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Debug|Any CPU.Build.0 = Debug|Any CPU
147+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Debug|iPhone.ActiveCfg = Debug|Any CPU
148+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Debug|iPhone.Build.0 = Debug|Any CPU
149+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
150+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
151+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Release|Any CPU.ActiveCfg = Release|Any CPU
152+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Release|Any CPU.Build.0 = Release|Any CPU
153+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Release|iPhone.ActiveCfg = Release|Any CPU
154+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Release|iPhone.Build.0 = Release|Any CPU
155+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
156+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
143157
EndGlobalSection
144158
GlobalSection(SolutionProperties) = preSolution
145159
HideSolutionNode = FALSE
@@ -150,8 +164,9 @@ Global
150164
{1F863C31-C0C7-42F7-9609-B122866B6356} = {514F5B61-451C-41EA-801F-9AE1B052A971}
151165
{4F928A67-C5E7-44E2-BE71-6ED155AFED9C} = {4D2C377A-D9F6-4EF3-A342-1B5A84F391DB}
152166
{258DEE06-BB0D-404B-B981-43B091744BD3} = {4D2C377A-D9F6-4EF3-A342-1B5A84F391DB}
153-
{01F5694E-102C-4586-805D-BC47DB2C255E} = {4270D4B1-5081-4E4F-8BDF-61ED888E936E}
167+
{C4EF6311-9993-40BD-BEF8-3C495F571302} = {4270D4B1-5081-4E4F-8BDF-61ED888E936E}
154168
{1B35BAEA-5666-408C-BED4-DB6114F3070E} = {4270D4B1-5081-4E4F-8BDF-61ED888E936E}
169+
{7D4A0E79-8075-42A6-ACC5-E5B666F75313} = {4270D4B1-5081-4E4F-8BDF-61ED888E936E}
155170
EndGlobalSection
156171
GlobalSection(ExtensibilityGlobals) = postSolution
157172
SolutionGuid = {87BCC08F-EAE5-4433-97FE-0DE5A56DBF78}

sample/Sample.Android/Sample.Android.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@
129129
<Project>{258dee06-bb0d-404b-b981-43b091744bd3}</Project>
130130
<Name>Notifo.SDK.FirebasePlugin</Name>
131131
</ProjectReference>
132-
<ProjectReference Include="..\..\sdk\Notifo.SDK\Notifo.SDK.csproj">
132+
<ProjectReference Include="..\..\sdk\Notifo.SDK\Notifo.SDK.Core.csproj">
133133
<Project>{4f928a67-c5e7-44e2-be71-6ed155afed9c}</Project>
134-
<Name>Notifo.SDK</Name>
134+
<Name>Notifo.SDK.Core</Name>
135135
</ProjectReference>
136136
<ProjectReference Include="..\Sample\Sample.csproj">
137137
<Project>{D59C868F-F97E-4931-B667-094C1FBC822E}</Project>

sample/Sample.iOS/NotificationHandler.cs renamed to sample/Sample.iOS.Shared/NotificationHandler.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
using Notifo.SDK;
99
using UserNotifications;
1010

11-
#pragma warning disable SA1300 // Element should begin with upper-case letter
12-
namespace Sample.iOS
13-
#pragma warning restore SA1300 // Element should begin with upper-case letter
11+
namespace Sample.iOS.Shared
1412
{
1513
public class NotificationHandler : INotificationHandler
1614
{
@@ -19,4 +17,4 @@ public void OnBuildNotification(UNMutableNotificationContent content, Notificati
1917
content.Sound = UNNotificationSound.GetSound("announcement.caf");
2018
}
2119
}
22-
}
20+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("Sample.iOS.Shared")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Sample.iOS.Shared")]
13+
[assembly: AssemblyCopyright("Copyright © 2021")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("50c7b8c9-e664-45af-b88e-0c9b8b9c1be1")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{7D4A0E79-8075-42A6-ACC5-E5B666F75313}</ProjectGuid>
9+
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
10+
<TemplateGuid>{a52b8a63-bc84-4b47-910d-692533484892}</TemplateGuid>
11+
<OutputType>Library</OutputType>
12+
<RootNamespace>Sample.iOS.Shared</RootNamespace>
13+
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
14+
<AssemblyName>Sample.iOS.Shared</AssemblyName>
15+
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug</OutputPath>
22+
<DefineConstants>DEBUG;</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<DebugType>full</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\Release</OutputPath>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="System" />
35+
<Reference Include="System.Xml" />
36+
<Reference Include="System.Core" />
37+
<Reference Include="Xamarin.iOS" />
38+
</ItemGroup>
39+
<ItemGroup>
40+
<Folder Include="Resources\" />
41+
</ItemGroup>
42+
<ItemGroup>
43+
<Compile Include="NotificationHandler.cs" />
44+
<Compile Include="Properties\AssemblyInfo.cs" />
45+
</ItemGroup>
46+
<ItemGroup>
47+
<ProjectReference Include="..\..\sdk\Notifo.SDK\Notifo.SDK.Core.csproj">
48+
<Project>{4f928a67-c5e7-44e2-be71-6ed155afed9c}</Project>
49+
<Name>Notifo.SDK.Core</Name>
50+
</ProjectReference>
51+
</ItemGroup>
52+
<ItemGroup>
53+
<PackageReference Include="Notifo.SDK" Version="1.0.0-beta7" />
54+
</ItemGroup>
55+
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
56+
</Project>

sample/Sample.iOS/AppDelegate.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Notifo.SDK.FirebasePlugin;
1111
using Prism;
1212
using Prism.Ioc;
13+
using Sample.iOS.Shared;
1314
using UIKit;
1415
using UserNotifications;
1516

sample/Sample.iOS/Sample.iOS.csproj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<MtouchLink>None</MtouchLink>
5353
<MtouchInterpreter>-all</MtouchInterpreter>
5454
<CodesignProvision>
55-
</CodesignProvision>
55+
</CodesignProvision>
5656
</PropertyGroup>
5757
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
5858
<DebugType>none</DebugType>
@@ -76,7 +76,6 @@
7676
<BundleResource Include="GoogleService-Info.plist" />
7777
<None Include="Info.plist" />
7878
<Compile Include="Application.cs" />
79-
<Compile Include="NotificationHandler.cs" />
8079
<Compile Include="Properties\AssemblyInfo.cs" />
8180
<BundleResource Include="Resources\announcement.caf" />
8281
</ItemGroup>
@@ -162,9 +161,15 @@
162161
<Project>{258dee06-bb0d-404b-b981-43b091744bd3}</Project>
163162
<Name>Notifo.SDK.FirebasePlugin</Name>
164163
</ProjectReference>
165-
<ProjectReference Include="..\..\sdk\Notifo.SDK\Notifo.SDK.csproj">
164+
<ProjectReference Include="..\..\sdk\Notifo.SDK\Notifo.SDK.Core.csproj">
166165
<Project>{4f928a67-c5e7-44e2-be71-6ed155afed9c}</Project>
167-
<Name>Notifo.SDK</Name>
166+
<Name>Notifo.SDK.Core</Name>
167+
</ProjectReference>
168+
<ProjectReference Include="..\Sample.iOS.Shared\Sample.iOS.Shared.csproj">
169+
<Project>{7d4a0e79-8075-42a6-acc5-e5b666f75313}</Project>
170+
<Name>Sample.iOS.Shared</Name>
171+
<IsAppExtension>false</IsAppExtension>
172+
<IsWatchApp>false</IsWatchApp>
168173
</ProjectReference>
169174
<ProjectReference Include="..\Sample\Sample.csproj">
170175
<Project>{DD43F8B0-1925-477A-9FF5-BE3E01350E30}</Project>

sample/SampleNotificationServiceExtension/NotificationService.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using Foundation;
33
using Notifo.SDK;
4+
using Sample.iOS.Shared;
45
using UserNotifications;
56

67
namespace SampleNotificationServiceExtension
@@ -21,6 +22,8 @@ public override async void DidReceiveNotificationRequest(UNNotificationRequest r
2122
ContentHandler = contentHandler;
2223
BestAttemptContent = (UNMutableNotificationContent)request.Content.MutableCopy();
2324

25+
NotifoIO.Current.SetNotificationHandler(new NotificationHandler());
26+
2427
await NotifoIO.DidReceiveNotificationRequestAsync(request, BestAttemptContent);
2528

2629
ContentHandler(BestAttemptContent);

sample/SampleNotificationServiceExtension/SampleNotificationServiceExtension.csproj

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -27,13 +27,15 @@
2727
<MtouchArch>x86_64</MtouchArch>
2828
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
2929
<DeviceSpecificBuild>false</DeviceSpecificBuild>
30-
<MtouchVerbosity></MtouchVerbosity>
30+
<MtouchVerbosity>
31+
</MtouchVerbosity>
3132
</PropertyGroup>
3233
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
3334
<DebugType>pdbonly</DebugType>
3435
<Optimize>true</Optimize>
3536
<OutputPath>bin\iPhone\Release</OutputPath>
36-
<DefineConstants></DefineConstants>
37+
<DefineConstants>
38+
</DefineConstants>
3739
<ErrorReport>prompt</ErrorReport>
3840
<WarningLevel>4</WarningLevel>
3941
<CodesignKey>iPhone Developer</CodesignKey>
@@ -43,21 +45,24 @@
4345
<MtouchLink>SdkOnly</MtouchLink>
4446
<MtouchArch>ARM64</MtouchArch>
4547
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
46-
<MtouchVerbosity></MtouchVerbosity>
48+
<MtouchVerbosity>
49+
</MtouchVerbosity>
4750
</PropertyGroup>
4851
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
4952
<DebugType>pdbonly</DebugType>
5053
<Optimize>true</Optimize>
5154
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
52-
<DefineConstants></DefineConstants>
55+
<DefineConstants>
56+
</DefineConstants>
5357
<ErrorReport>prompt</ErrorReport>
5458
<WarningLevel>4</WarningLevel>
5559
<CodesignKey>iPhone Developer</CodesignKey>
5660
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
5761
<MtouchLink>None</MtouchLink>
5862
<MtouchArch>x86_64</MtouchArch>
5963
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
60-
<MtouchVerbosity></MtouchVerbosity>
64+
<MtouchVerbosity>
65+
</MtouchVerbosity>
6166
</PropertyGroup>
6267
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
6368
<DebugSymbols>true</DebugSymbols>
@@ -78,7 +83,8 @@
7883
<MtouchLink>SdkOnly</MtouchLink>
7984
<MtouchArch>ARM64</MtouchArch>
8085
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
81-
<MtouchVerbosity></MtouchVerbosity>
86+
<MtouchVerbosity>
87+
</MtouchVerbosity>
8288
</PropertyGroup>
8389
<ItemGroup>
8490
<Reference Include="System" />
@@ -97,9 +103,15 @@
97103
<Compile Include="NotificationService.cs" />
98104
</ItemGroup>
99105
<ItemGroup>
100-
<ProjectReference Include="..\..\sdk\Notifo.SDK\Notifo.SDK.csproj">
106+
<ProjectReference Include="..\..\sdk\Notifo.SDK\Notifo.SDK.Core.csproj">
101107
<Project>{4F928A67-C5E7-44E2-BE71-6ED155AFED9C}</Project>
102-
<Name>Notifo.SDK</Name>
108+
<Name>Notifo.SDK.Core</Name>
109+
</ProjectReference>
110+
<ProjectReference Include="..\Sample.iOS.Shared\Sample.iOS.Shared.csproj">
111+
<Project>{7d4a0e79-8075-42a6-acc5-e5b666f75313}</Project>
112+
<Name>Sample.iOS.Shared</Name>
113+
<IsAppExtension>false</IsAppExtension>
114+
<IsWatchApp>false</IsWatchApp>
103115
</ProjectReference>
104116
</ItemGroup>
105117
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />

sdk/Notifo.SDK.FirebasePlugin/Notifo.SDK.FirebasePlugin.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@
5454
</ItemGroup>
5555

5656
<ItemGroup>
57-
<ProjectReference Include="..\Notifo.SDK\Notifo.SDK.csproj" />
57+
<ProjectReference Include="..\Notifo.SDK\Notifo.SDK.Core.csproj" />
5858
</ItemGroup>
5959
</Project>

0 commit comments

Comments
 (0)