diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC.xcodeproj/project.pbxproj b/SampleNHAppMacObjC/SampleNHAppMacObjC.xcodeproj/project.pbxproj index e00ebe2..2bc1141 100644 --- a/SampleNHAppMacObjC/SampleNHAppMacObjC.xcodeproj/project.pbxproj +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC.xcodeproj/project.pbxproj @@ -7,24 +7,30 @@ objects = { /* Begin PBXBuildFile section */ - 4C10494024ABA6E200FA339E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C10493F24ABA6E200FA339E /* AppDelegate.m */; }; - 4C10494324ABA6E200FA339E /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C10494224ABA6E200FA339E /* ViewController.m */; }; - 4C10494524ABA6E300FA339E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4C10494424ABA6E300FA339E /* Assets.xcassets */; }; - 4C10494824ABA6E300FA339E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4C10494624ABA6E300FA339E /* Main.storyboard */; }; - 4C10494B24ABA6E300FA339E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C10494A24ABA6E300FA339E /* main.m */; }; - 4C10497A24ABA94600FA339E /* WindowsAzureMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C10497924ABA94600FA339E /* WindowsAzureMessaging.framework */; }; - 4C10497B24ABA94600FA339E /* WindowsAzureMessaging.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C10497924ABA94600FA339E /* WindowsAzureMessaging.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 4C1049C324ACE3C200FA339E /* DevSettings.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4C1049C224ACE3C100FA339E /* DevSettings.plist */; }; + 648D01E024ADD85B0081397A /* WindowsAzureMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 64B18FC32452D1A900AA38B1 /* WindowsAzureMessaging.framework */; }; + 648D01E124ADD85B0081397A /* WindowsAzureMessaging.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 64B18FC32452D1A900AA38B1 /* WindowsAzureMessaging.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 648D01E424ADD9EE0081397A /* DevSettings.plist in Resources */ = {isa = PBXBuildFile; fileRef = 648D01E324ADD9EE0081397A /* DevSettings.plist */; }; + 64B18FA82452CEEA00AA38B1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 64B18FA72452CEEA00AA38B1 /* AppDelegate.m */; }; + 64B18FAB2452CEEA00AA38B1 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 64B18FAA2452CEEA00AA38B1 /* SceneDelegate.m */; }; + 64B18FAE2452CEEA00AA38B1 /* SetupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 64B18FAD2452CEEA00AA38B1 /* SetupViewController.m */; }; + 64B18FB12452CEEA00AA38B1 /* NotificationsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 64B18FB02452CEEA00AA38B1 /* NotificationsTableViewController.m */; }; + 64B18FB42452CEEA00AA38B1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 64B18FB22452CEEA00AA38B1 /* Main.storyboard */; }; + 64B18FB62452CEEB00AA38B1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 64B18FB52452CEEB00AA38B1 /* Assets.xcassets */; }; + 64B18FB92452CEEB00AA38B1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 64B18FB72452CEEB00AA38B1 /* LaunchScreen.storyboard */; }; + 64B18FBC2452CEEB00AA38B1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 64B18FBB2452CEEB00AA38B1 /* main.m */; }; + 64B18FC92452DA6500AA38B1 /* TagTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 64B18FC82452DA6500AA38B1 /* TagTableViewCell.m */; }; + 64B18FCF2452E48200AA38B1 /* NotificationDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 64B18FCE2452E48200AA38B1 /* NotificationDetailsViewController.m */; }; + 64B18FD22452E58C00AA38B1 /* NotificationTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 64B18FD12452E58C00AA38B1 /* NotificationTableViewCell.m */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ - 4C10497C24ABA94600FA339E /* Embed Frameworks */ = { + 648D01E224ADD85B0081397A /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - 4C10497B24ABA94600FA339E /* WindowsAzureMessaging.framework in Embed Frameworks */, + 648D01E124ADD85B0081397A /* WindowsAzureMessaging.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -32,70 +38,92 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 4C10493B24ABA6E200FA339E /* SampleNHAppMacObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleNHAppMacObjC.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 4C10493E24ABA6E200FA339E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 4C10493F24ABA6E200FA339E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 4C10494124ABA6E200FA339E /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 4C10494224ABA6E200FA339E /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 4C10494424ABA6E300FA339E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 4C10494724ABA6E300FA339E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 4C10494924ABA6E300FA339E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 4C10494A24ABA6E300FA339E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 4C10494C24ABA6E300FA339E /* SampleNHAppMacObjC.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SampleNHAppMacObjC.entitlements; sourceTree = ""; }; - 4C10497924ABA94600FA339E /* WindowsAzureMessaging.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = WindowsAzureMessaging.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4C1049C224ACE3C100FA339E /* DevSettings.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = DevSettings.plist; sourceTree = ""; }; + 648D01E324ADD9EE0081397A /* DevSettings.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = DevSettings.plist; sourceTree = ""; }; + 648D01E724ADDF300081397A /* SampleNHAppMacObjC.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = SampleNHAppMacObjC.entitlements; sourceTree = ""; }; + 64B18FA32452CEEA00AA38B1 /* SampleNHAppMacObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleNHAppMacObjC.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 64B18FA62452CEEA00AA38B1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 64B18FA72452CEEA00AA38B1 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 64B18FA92452CEEA00AA38B1 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; + 64B18FAA2452CEEA00AA38B1 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; + 64B18FAC2452CEEA00AA38B1 /* SetupViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SetupViewController.h; sourceTree = ""; }; + 64B18FAD2452CEEA00AA38B1 /* SetupViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SetupViewController.m; sourceTree = ""; }; + 64B18FAF2452CEEA00AA38B1 /* NotificationsTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationsTableViewController.h; sourceTree = ""; }; + 64B18FB02452CEEA00AA38B1 /* NotificationsTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationsTableViewController.m; sourceTree = ""; }; + 64B18FB32452CEEA00AA38B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 64B18FB52452CEEB00AA38B1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 64B18FB82452CEEB00AA38B1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 64B18FBA2452CEEB00AA38B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 64B18FBB2452CEEB00AA38B1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 64B18FC32452D1A900AA38B1 /* WindowsAzureMessaging.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = WindowsAzureMessaging.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 64B18FC72452DA6500AA38B1 /* TagTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TagTableViewCell.h; sourceTree = ""; }; + 64B18FC82452DA6500AA38B1 /* TagTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TagTableViewCell.m; sourceTree = ""; }; + 64B18FCD2452E48200AA38B1 /* NotificationDetailsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationDetailsViewController.h; sourceTree = ""; }; + 64B18FCE2452E48200AA38B1 /* NotificationDetailsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationDetailsViewController.m; sourceTree = ""; }; + 64B18FD02452E58C00AA38B1 /* NotificationTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationTableViewCell.h; sourceTree = ""; }; + 64B18FD12452E58C00AA38B1 /* NotificationTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationTableViewCell.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 4C10493824ABA6E200FA339E /* Frameworks */ = { + 64B18FA02452CEEA00AA38B1 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C10497A24ABA94600FA339E /* WindowsAzureMessaging.framework in Frameworks */, + 648D01E024ADD85B0081397A /* WindowsAzureMessaging.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 4C10493224ABA6E200FA339E = { + 64B18F9A2452CEEA00AA38B1 = { isa = PBXGroup; children = ( - 4C10493D24ABA6E200FA339E /* SampleNHAppMacObjC */, - 4C10493C24ABA6E200FA339E /* Products */, - 4C10497824ABA94600FA339E /* Frameworks */, + 64B18FA52452CEEA00AA38B1 /* SampleNHAppMacObjC */, + 64B18FA42452CEEA00AA38B1 /* Products */, + 64B18FC22452D1A900AA38B1 /* Frameworks */, ); sourceTree = ""; }; - 4C10493C24ABA6E200FA339E /* Products */ = { + 64B18FA42452CEEA00AA38B1 /* Products */ = { isa = PBXGroup; children = ( - 4C10493B24ABA6E200FA339E /* SampleNHAppMacObjC.app */, + 64B18FA32452CEEA00AA38B1 /* SampleNHAppMacObjC.app */, ); name = Products; sourceTree = ""; }; - 4C10493D24ABA6E200FA339E /* SampleNHAppMacObjC */ = { + 64B18FA52452CEEA00AA38B1 /* SampleNHAppMacObjC */ = { isa = PBXGroup; children = ( - 4C10493E24ABA6E200FA339E /* AppDelegate.h */, - 4C10493F24ABA6E200FA339E /* AppDelegate.m */, - 4C10494124ABA6E200FA339E /* ViewController.h */, - 4C10494224ABA6E200FA339E /* ViewController.m */, - 4C10494424ABA6E300FA339E /* Assets.xcassets */, - 4C10494624ABA6E300FA339E /* Main.storyboard */, - 4C10494924ABA6E300FA339E /* Info.plist */, - 4C10494A24ABA6E300FA339E /* main.m */, - 4C10494C24ABA6E300FA339E /* SampleNHAppMacObjC.entitlements */, - 4C1049C224ACE3C100FA339E /* DevSettings.plist */, + 648D01E724ADDF300081397A /* SampleNHAppMacObjC.entitlements */, + 64B18FA62452CEEA00AA38B1 /* AppDelegate.h */, + 64B18FA72452CEEA00AA38B1 /* AppDelegate.m */, + 648D01E324ADD9EE0081397A /* DevSettings.plist */, + 64B18FD02452E58C00AA38B1 /* NotificationTableViewCell.h */, + 64B18FD12452E58C00AA38B1 /* NotificationTableViewCell.m */, + 64B18FA92452CEEA00AA38B1 /* SceneDelegate.h */, + 64B18FAA2452CEEA00AA38B1 /* SceneDelegate.m */, + 64B18FAC2452CEEA00AA38B1 /* SetupViewController.h */, + 64B18FAD2452CEEA00AA38B1 /* SetupViewController.m */, + 64B18FC72452DA6500AA38B1 /* TagTableViewCell.h */, + 64B18FC82452DA6500AA38B1 /* TagTableViewCell.m */, + 64B18FAF2452CEEA00AA38B1 /* NotificationsTableViewController.h */, + 64B18FB02452CEEA00AA38B1 /* NotificationsTableViewController.m */, + 64B18FCD2452E48200AA38B1 /* NotificationDetailsViewController.h */, + 64B18FCE2452E48200AA38B1 /* NotificationDetailsViewController.m */, + 64B18FB22452CEEA00AA38B1 /* Main.storyboard */, + 64B18FB52452CEEB00AA38B1 /* Assets.xcassets */, + 64B18FB72452CEEB00AA38B1 /* LaunchScreen.storyboard */, + 64B18FBA2452CEEB00AA38B1 /* Info.plist */, + 64B18FBB2452CEEB00AA38B1 /* main.m */, ); path = SampleNHAppMacObjC; sourceTree = ""; }; - 4C10497824ABA94600FA339E /* Frameworks */ = { + 64B18FC22452D1A900AA38B1 /* Frameworks */ = { isa = PBXGroup; children = ( - 4C10497924ABA94600FA339E /* WindowsAzureMessaging.framework */, + 64B18FC32452D1A900AA38B1 /* WindowsAzureMessaging.framework */, ); name = Frameworks; sourceTree = ""; @@ -103,14 +131,14 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 4C10493A24ABA6E200FA339E /* SampleNHAppMacObjC */ = { + 64B18FA22452CEEA00AA38B1 /* SampleNHAppMacObjC */ = { isa = PBXNativeTarget; - buildConfigurationList = 4C10494F24ABA6E300FA339E /* Build configuration list for PBXNativeTarget "SampleNHAppMacObjC" */; + buildConfigurationList = 64B18FBF2452CEEB00AA38B1 /* Build configuration list for PBXNativeTarget "SampleNHAppMacObjC" */; buildPhases = ( - 4C10493724ABA6E200FA339E /* Sources */, - 4C10493824ABA6E200FA339E /* Frameworks */, - 4C10493924ABA6E200FA339E /* Resources */, - 4C10497C24ABA94600FA339E /* Embed Frameworks */, + 64B18F9F2452CEEA00AA38B1 /* Sources */, + 64B18FA02452CEEA00AA38B1 /* Frameworks */, + 64B18FA12452CEEA00AA38B1 /* Resources */, + 648D01E224ADD85B0081397A /* Embed Frameworks */, ); buildRules = ( ); @@ -118,24 +146,24 @@ ); name = SampleNHAppMacObjC; productName = SampleNHAppMacObjC; - productReference = 4C10493B24ABA6E200FA339E /* SampleNHAppMacObjC.app */; + productReference = 64B18FA32452CEEA00AA38B1 /* SampleNHAppMacObjC.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 4C10493324ABA6E200FA339E /* Project object */ = { + 64B18F9B2452CEEA00AA38B1 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1150; - ORGANIZATIONNAME = "Matthew Podwysocki"; + LastUpgradeCheck = 1140; + ORGANIZATIONNAME = Microsoft; TargetAttributes = { - 4C10493A24ABA6E200FA339E = { - CreatedOnToolsVersion = 11.5; + 64B18FA22452CEEA00AA38B1 = { + CreatedOnToolsVersion = 11.4.1; }; }; }; - buildConfigurationList = 4C10493624ABA6E200FA339E /* Build configuration list for PBXProject "SampleNHAppMacObjC" */; + buildConfigurationList = 64B18F9E2452CEEA00AA38B1 /* Build configuration list for PBXProject "SampleNHAppMacObjC" */; compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; @@ -143,55 +171,69 @@ en, Base, ); - mainGroup = 4C10493224ABA6E200FA339E; - productRefGroup = 4C10493C24ABA6E200FA339E /* Products */; + mainGroup = 64B18F9A2452CEEA00AA38B1; + productRefGroup = 64B18FA42452CEEA00AA38B1 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 4C10493A24ABA6E200FA339E /* SampleNHAppMacObjC */, + 64B18FA22452CEEA00AA38B1 /* SampleNHAppMacObjC */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 4C10493924ABA6E200FA339E /* Resources */ = { + 64B18FA12452CEEA00AA38B1 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4C10494524ABA6E300FA339E /* Assets.xcassets in Resources */, - 4C10494824ABA6E300FA339E /* Main.storyboard in Resources */, - 4C1049C324ACE3C200FA339E /* DevSettings.plist in Resources */, + 64B18FB92452CEEB00AA38B1 /* LaunchScreen.storyboard in Resources */, + 64B18FB62452CEEB00AA38B1 /* Assets.xcassets in Resources */, + 64B18FB42452CEEA00AA38B1 /* Main.storyboard in Resources */, + 648D01E424ADD9EE0081397A /* DevSettings.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 4C10493724ABA6E200FA339E /* Sources */ = { + 64B18F9F2452CEEA00AA38B1 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4C10494324ABA6E200FA339E /* ViewController.m in Sources */, - 4C10494B24ABA6E300FA339E /* main.m in Sources */, - 4C10494024ABA6E200FA339E /* AppDelegate.m in Sources */, + 64B18FD22452E58C00AA38B1 /* NotificationTableViewCell.m in Sources */, + 64B18FBC2452CEEB00AA38B1 /* main.m in Sources */, + 64B18FB12452CEEA00AA38B1 /* NotificationsTableViewController.m in Sources */, + 64B18FC92452DA6500AA38B1 /* TagTableViewCell.m in Sources */, + 64B18FA82452CEEA00AA38B1 /* AppDelegate.m in Sources */, + 64B18FCF2452E48200AA38B1 /* NotificationDetailsViewController.m in Sources */, + 64B18FAE2452CEEA00AA38B1 /* SetupViewController.m in Sources */, + 64B18FAB2452CEEA00AA38B1 /* SceneDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - 4C10494624ABA6E300FA339E /* Main.storyboard */ = { + 64B18FB22452CEEA00AA38B1 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - 4C10494724ABA6E300FA339E /* Base */, + 64B18FB32452CEEA00AA38B1 /* Base */, ); name = Main.storyboard; sourceTree = ""; }; + 64B18FB72452CEEB00AA38B1 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 64B18FB82452CEEB00AA38B1 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 4C10494D24ABA6E300FA339E /* Debug */ = { + 64B18FBD2452CEEB00AA38B1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -241,15 +283,16 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; + IPHONEOS_DEPLOYMENT_TARGET = 13.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; + NEW_SETTING = ""; ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; + SDKROOT = iphoneos; }; name = Debug; }; - 4C10494E24ABA6E300FA339E /* Release */ = { + 64B18FBE2452CEEB00AA38B1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -293,73 +336,75 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; + IPHONEOS_DEPLOYMENT_TARGET = 13.1; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - SDKROOT = macosx; + NEW_SETTING = ""; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; }; name = Release; }; - 4C10495024ABA6E300FA339E /* Debug */ = { + 64B18FC02452CEEB00AA38B1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = SampleNHAppMacObjC/SampleNHAppMacObjC.entitlements; CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = S4V3D7CHJR; - ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = SampleNHAppMacObjC/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", - "@executable_path/../Frameworks", + "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.SampleNHAppMacObjC; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; + TARGETED_DEVICE_FAMILY = 2; }; name = Debug; }; - 4C10495124ABA6E300FA339E /* Release */ = { + 64B18FC12452CEEB00AA38B1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = SampleNHAppMacObjC/SampleNHAppMacObjC.entitlements; CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = S4V3D7CHJR; - ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = SampleNHAppMacObjC/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", - "@executable_path/../Frameworks", + "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.SampleNHAppMacObjC; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; + TARGETED_DEVICE_FAMILY = 2; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 4C10493624ABA6E200FA339E /* Build configuration list for PBXProject "SampleNHAppMacObjC" */ = { + 64B18F9E2452CEEA00AA38B1 /* Build configuration list for PBXProject "SampleNHAppMacObjC" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4C10494D24ABA6E300FA339E /* Debug */, - 4C10494E24ABA6E300FA339E /* Release */, + 64B18FBD2452CEEB00AA38B1 /* Debug */, + 64B18FBE2452CEEB00AA38B1 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4C10494F24ABA6E300FA339E /* Build configuration list for PBXNativeTarget "SampleNHAppMacObjC" */ = { + 64B18FBF2452CEEB00AA38B1 /* Build configuration list for PBXNativeTarget "SampleNHAppMacObjC" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4C10495024ABA6E300FA339E /* Debug */, - 4C10495124ABA6E300FA339E /* Release */, + 64B18FC02452CEEB00AA38B1 /* Debug */, + 64B18FC12452CEEB00AA38B1 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 4C10493324ABA6E200FA339E /* Project object */; + rootObject = 64B18F9B2452CEEA00AA38B1 /* Project object */; } diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SampleNHAppMacObjC/SampleNHAppMacObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..bb3a4b6 --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SampleNHAppMacObjC/SampleNHAppMacObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/AppDelegate.h b/SampleNHAppMacObjC/SampleNHAppMacObjC/AppDelegate.h index 8ecb67a..33d1551 100644 --- a/SampleNHAppMacObjC/SampleNHAppMacObjC/AppDelegate.h +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/AppDelegate.h @@ -1,14 +1,11 @@ -// -// AppDelegate.h -// SampleNHAppMacObjC -// -// Created by Matthew Podwysocki on 6/30/20. -// Copyright © 2020 Matthew Podwysocki. All rights reserved. -// +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- -#import +#import +#import -@interface AppDelegate : NSObject +@interface AppDelegate : UIResponder @end diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/AppDelegate.m b/SampleNHAppMacObjC/SampleNHAppMacObjC/AppDelegate.m index b7c1ec4..e155321 100644 --- a/SampleNHAppMacObjC/SampleNHAppMacObjC/AppDelegate.m +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/AppDelegate.m @@ -1,53 +1,45 @@ -// -// AppDelegate.m -// SampleNHAppMacObjC -// -// Created by Matthew Podwysocki on 6/30/20. -// Copyright © 2020 Matthew Podwysocki. All rights reserved. -// +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- #import "AppDelegate.h" -#import -@interface AppDelegate () +@interface AppDelegate () @end @implementation AppDelegate -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. NSString *path = [[NSBundle mainBundle] pathForResource:@"DevSettings" ofType:@"plist"]; NSDictionary *configValues = [NSDictionary dictionaryWithContentsOfFile:path]; NSString *connectionString = [configValues objectForKey:@"CONNECTION_STRING"]; NSString *hubName = [configValues objectForKey:@"HUB_NAME"]; - [MSNotificationHub setDelegate:self]; [MSNotificationHub startWithConnectionString:connectionString hubName:hubName]; + [MSNotificationHub addTag:@"userAgent:com.microsoft.SampleNHAppMacObjC:1.0"]; + + return YES; } -- (void)applicationWillTerminate:(NSNotification *)aNotification { - // Insert code here to tear down your application + +#pragma mark - UISceneSession lifecycle + + +- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; } -#pragma mark MSNotificationHubDelegate -- (void)application:(NSApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { - NSLog(@"Did register for remote notifications with device token."); +- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } -- (void)application:(NSApplication *)application didFailToRegisterForRemoteNotificationsWithError:(nonnull NSError *)error { - NSLog(@"Did fail to register for remote notifications with error %@.", [error localizedDescription]); -} - -- (void)application:(NSApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { - NSLog(@"Did receive remote notification"); -} - -- (void)notificationHub:(MSNotificationHub *)notificationHub didReceivePushNotification:(MSNotificationHubMessage *)message { - NSLog(@"Message title: %@", message.title); - NSLog(@"Message body: %@", message.body); -} - - @end diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/Assets.xcassets/AppIcon.appiconset/Contents.json b/SampleNHAppMacObjC/SampleNHAppMacObjC/Assets.xcassets/AppIcon.appiconset/Contents.json index 3f00db4..9221b9b 100644 --- a/SampleNHAppMacObjC/SampleNHAppMacObjC/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,54 +1,94 @@ { "images" : [ { - "idiom" : "mac", - "scale" : "1x", - "size" : "16x16" - }, - { - "idiom" : "mac", + "idiom" : "iphone", "scale" : "2x", - "size" : "16x16" + "size" : "20x20" }, { - "idiom" : "mac", - "scale" : "1x", - "size" : "32x32" + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" }, { - "idiom" : "mac", + "idiom" : "iphone", "scale" : "2x", - "size" : "32x32" + "size" : "29x29" }, { - "idiom" : "mac", - "scale" : "1x", - "size" : "128x128" + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" }, { - "idiom" : "mac", + "idiom" : "iphone", "scale" : "2x", - "size" : "128x128" + "size" : "40x40" }, { - "idiom" : "mac", - "scale" : "1x", - "size" : "256x256" + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" }, { - "idiom" : "mac", + "idiom" : "iphone", "scale" : "2x", - "size" : "256x256" + "size" : "60x60" }, { - "idiom" : "mac", + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", "scale" : "1x", - "size" : "512x512" + "size" : "20x20" }, { - "idiom" : "mac", + "idiom" : "ipad", "scale" : "2x", - "size" : "512x512" + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/Base.lproj/LaunchScreen.storyboard b/SampleNHAppMacObjC/SampleNHAppMacObjC/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/Base.lproj/Main.storyboard b/SampleNHAppMacObjC/SampleNHAppMacObjC/Base.lproj/Main.storyboard index 9c0bdf8..1e3e75e 100644 --- a/SampleNHAppMacObjC/SampleNHAppMacObjC/Base.lproj/Main.storyboard +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/Base.lproj/Main.storyboard @@ -1,717 +1,250 @@ - - + + + - + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/Info.plist b/SampleNHAppMacObjC/SampleNHAppMacObjC/Info.plist index dda7fbc..d79a3b9 100644 --- a/SampleNHAppMacObjC/SampleNHAppMacObjC/Info.plist +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/Info.plist @@ -6,8 +6,6 @@ $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) - CFBundleIconFile - CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion @@ -20,17 +18,61 @@ 1.0 CFBundleVersion 1 - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - Copyright © 2020 Matthew Podwysocki. All rights reserved. - NSMainStoryboardFile + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + UIBackgroundModes + + remote-notification + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile Main - NSPrincipalClass - NSApplication - NSSupportsAutomaticTermination - - NSSupportsSuddenTermination - + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarTintParameters + + UINavigationBar + + Style + UIBarStyleDefault + Translucent + + + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationDetailsViewController.h b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationDetailsViewController.h new file mode 100644 index 0000000..9f80bf6 --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationDetailsViewController.h @@ -0,0 +1,18 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NotificationDetailsViewController : UIViewController +@property (weak, nonatomic) IBOutlet UILabel *summaryLabel; +@property (weak, nonatomic) IBOutlet UILabel *detailsLabel; + +@property (weak, nonatomic) MSNotificationHubMessage *notification; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationDetailsViewController.m b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationDetailsViewController.m new file mode 100644 index 0000000..4afd955 --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationDetailsViewController.m @@ -0,0 +1,23 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import "NotificationDetailsViewController.h" + +@interface NotificationDetailsViewController () + +@end + +@implementation NotificationDetailsViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + + self.summaryLabel.text = self.notification.title; + self.detailsLabel.text = self.notification.body; + + [self.detailsLabel sizeToFit]; +} + +@end diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationTableViewCell.h b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationTableViewCell.h new file mode 100644 index 0000000..d4446ba --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationTableViewCell.h @@ -0,0 +1,14 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NotificationTableViewCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UILabel *notificationSummaryLabel; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationTableViewCell.m b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationTableViewCell.m new file mode 100644 index 0000000..d3b9e60 --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationTableViewCell.m @@ -0,0 +1,20 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import "NotificationTableViewCell.h" + +@implementation NotificationTableViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationsTableViewController.h b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationsTableViewController.h new file mode 100644 index 0000000..6ad3a1c --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationsTableViewController.h @@ -0,0 +1,15 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import +#import +#import "NotificationTableViewCell.h" +#import "NotificationDetailsViewController.h" + +@interface NotificationsTableViewController : UITableViewController +@property (nonatomic) NSMutableArray *notifications; + +-(void) addNotification:(MSNotificationHubMessage *) notification; +@end + diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationsTableViewController.m b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationsTableViewController.m new file mode 100644 index 0000000..50790cb --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/NotificationsTableViewController.m @@ -0,0 +1,64 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import "NotificationsTableViewController.h" + +@interface NotificationsTableViewController () + +@end + +@implementation NotificationsTableViewController + +- (id)initWithCoder:(NSCoder *)decoder +{ + self = [super initWithCoder:decoder]; + if (self) { + self.notifications = [NSMutableArray new]; + } + return self; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [self.notifications count]; +} + +- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + NSString *cellIdentifier = @"NotificationCell"; + + NotificationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath]; + + cell.notificationSummaryLabel.text = [self.notifications objectAtIndex:indexPath.row].title ?: [self.notifications objectAtIndex:indexPath.row].body; + + return cell; +} + +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + [super prepareForSegue:segue sender:sender]; + + if ([segue.identifier isEqual: @"showNotificationDetails"]) { + UITableViewCell *cell = sender; + NSIndexPath *indexPath = [self.tableView indexPathForCell:cell]; + NotificationDetailsViewController *detailsView = segue.destinationViewController; + + detailsView.notification = [self.notifications objectAtIndex:indexPath.row]; + [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; + } +} + +-(void) addNotification:(MSNotificationHubMessage *) notification { + [self.notifications addObject:notification]; + [self.tableView reloadData]; +} + + +@end diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/SampleNHAppMacObjC.entitlements b/SampleNHAppMacObjC/SampleNHAppMacObjC/SampleNHAppMacObjC.entitlements index 3be0429..3e47d4d 100644 --- a/SampleNHAppMacObjC/SampleNHAppMacObjC/SampleNHAppMacObjC.entitlements +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/SampleNHAppMacObjC.entitlements @@ -2,11 +2,11 @@ - com.apple.developer.aps-environment + aps-environment development com.apple.security.app-sandbox - com.apple.security.files.user-selected.read-only + com.apple.security.network.client diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/SceneDelegate.h b/SampleNHAppMacObjC/SampleNHAppMacObjC/SceneDelegate.h new file mode 100644 index 0000000..5b360ca --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/SceneDelegate.h @@ -0,0 +1,12 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import + +@interface SceneDelegate : UIResponder + +@property (strong, nonatomic) UIWindow * window; + +@end + diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/SceneDelegate.m b/SampleNHAppMacObjC/SampleNHAppMacObjC/SceneDelegate.m new file mode 100644 index 0000000..d9c562c --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/SceneDelegate.m @@ -0,0 +1,54 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import "SceneDelegate.h" + +@interface SceneDelegate () + +@end + +@implementation SceneDelegate + + +- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). +} + + +- (void)sceneDidDisconnect:(UIScene *)scene { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). +} + + +- (void)sceneDidBecomeActive:(UIScene *)scene { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. +} + + +- (void)sceneWillResignActive:(UIScene *)scene { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). +} + + +- (void)sceneWillEnterForeground:(UIScene *)scene { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. +} + + +- (void)sceneDidEnterBackground:(UIScene *)scene { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. +} + + +@end diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/SetupViewController.h b/SampleNHAppMacObjC/SampleNHAppMacObjC/SetupViewController.h new file mode 100644 index 0000000..8ac205b --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/SetupViewController.h @@ -0,0 +1,20 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import +#import +#import "TagTableViewCell.h" +#import "NotificationsTableViewController.h" + +@interface SetupViewController : UIViewController +@property (weak, nonatomic) IBOutlet UILabel *deviceTokenLabel; +@property (weak, nonatomic) IBOutlet UILabel *installationIdLabel; +@property (weak, nonatomic) IBOutlet UITextField *addNewTagTextField; +@property (weak, nonatomic) IBOutlet UITableView *tagsTable; + +@property (nonatomic, copy) NSArray *tags; +@property (weak, nonatomic) NotificationsTableViewController *notificationsTableView; + +@end + diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/SetupViewController.m b/SampleNHAppMacObjC/SampleNHAppMacObjC/SetupViewController.m new file mode 100644 index 0000000..f4eb42a --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/SetupViewController.m @@ -0,0 +1,85 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import "SetupViewController.h" +#import "NotificationsTableViewController.h" + +@interface SetupViewController () + +@end + +@implementation SetupViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + self.tags = [MSNotificationHub getTags]; + + self.addNewTagTextField.delegate = self; + self.tagsTable.delegate = self; + self.tagsTable.dataSource = self; + [self.tagsTable reloadData]; + + self.deviceTokenLabel.text = [MSNotificationHub getPushChannel]; + self.installationIdLabel.text = [MSNotificationHub getInstallationId]; + + self.notificationsTableView = (NotificationsTableViewController*) [[(UINavigationController*)[[self.tabBarController viewControllers] objectAtIndex:1] viewControllers] objectAtIndex:0]; + + [MSNotificationHub setDelegate:self]; + +} + +- (BOOL)textFieldShouldReturn:(UITextField *)textField { + // Hide the keyboard. + [textField resignFirstResponder]; + return YES; +} + +- (void)textFieldDidEndEditing:(UITextField *)textField { + [MSNotificationHub addTag:textField.text]; + self.tags = [MSNotificationHub getTags]; + textField.text = @""; + [self.tagsTable reloadData]; +} + +- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + NSString *cellIdentifier = @"TagCell"; + + TagTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath]; + + cell.tagLabel.text = self.tags[indexPath.row]; + + return cell; +} + +- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [self.tags count]; +} + +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + if (editingStyle == UITableViewCellEditingStyleDelete) { + [MSNotificationHub removeTag:self.tags[indexPath.row]]; + self.tags = [MSNotificationHub getTags]; + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + [self.tagsTable reloadData]; + } +} + +- (void)notificationHub:(MSNotificationHub *)notificationHub didReceivePushNotification:(MSNotificationHubMessage *)notification { + NSLog(@"Received notification: %@: %@", notification.title, notification.body); + [self.notificationsTableView addNotification:notification]; + + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:notification.title + message:notification.body + preferredStyle:UIAlertControllerStyleAlert]; + [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]]; + [self presentViewController:alertController animated:YES completion:nil]; + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [alertController dismissViewControllerAnimated:YES completion: nil]; + }); +} + + +@end diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/TagTableViewCell.h b/SampleNHAppMacObjC/SampleNHAppMacObjC/TagTableViewCell.h new file mode 100644 index 0000000..f753017 --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/TagTableViewCell.h @@ -0,0 +1,14 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TagTableViewCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UILabel *tagLabel; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/TagTableViewCell.m b/SampleNHAppMacObjC/SampleNHAppMacObjC/TagTableViewCell.m new file mode 100644 index 0000000..f88e9ed --- /dev/null +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/TagTableViewCell.m @@ -0,0 +1,20 @@ +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- + +#import "TagTableViewCell.h" + +@implementation TagTableViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/ViewController.h b/SampleNHAppMacObjC/SampleNHAppMacObjC/ViewController.h deleted file mode 100644 index f661996..0000000 --- a/SampleNHAppMacObjC/SampleNHAppMacObjC/ViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// ViewController.h -// SampleNHAppMacObjC -// -// Created by Matthew Podwysocki on 6/30/20. -// Copyright © 2020 Matthew Podwysocki. All rights reserved. -// - -#import - -@interface ViewController : NSViewController - - -@end - diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/ViewController.m b/SampleNHAppMacObjC/SampleNHAppMacObjC/ViewController.m deleted file mode 100644 index 0f607c5..0000000 --- a/SampleNHAppMacObjC/SampleNHAppMacObjC/ViewController.m +++ /dev/null @@ -1,27 +0,0 @@ -// -// ViewController.m -// SampleNHAppMacObjC -// -// Created by Matthew Podwysocki on 6/30/20. -// Copyright © 2020 Matthew Podwysocki. All rights reserved. -// - -#import "ViewController.h" - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - - // Do any additional setup after loading the view. -} - - -- (void)setRepresentedObject:(id)representedObject { - [super setRepresentedObject:representedObject]; - - // Update the view, if already loaded. -} - - -@end diff --git a/SampleNHAppMacObjC/SampleNHAppMacObjC/main.m b/SampleNHAppMacObjC/SampleNHAppMacObjC/main.m index 0eff0b8..4b6aaed 100644 --- a/SampleNHAppMacObjC/SampleNHAppMacObjC/main.m +++ b/SampleNHAppMacObjC/SampleNHAppMacObjC/main.m @@ -1,16 +1,15 @@ -// -// main.m -// SampleNHAppMacObjC -// -// Created by Matthew Podwysocki on 6/30/20. -// Copyright © 2020 Matthew Podwysocki. All rights reserved. -// +//---------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------------- -#import +#import +#import "AppDelegate.h" -int main(int argc, const char * argv[]) { +int main(int argc, char * argv[]) { + NSString * appDelegateClassName; @autoreleasepool { // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); } - return NSApplicationMain(argc, argv); + return UIApplicationMain(argc, argv, nil, appDelegateClassName); }