Merged PR 12899: Update 0.13.7 GraphNotificationsSample for iOS

Updating Podfile to build the samples, renamed Secrets.h.example to Secrets.h to make it easier to build the samples
This commit is contained in:
Sudipta Dey (WDG) 2018-11-16 22:39:00 +00:00
Родитель 332d82f1bc
Коммит 06bfcdee8d
9 изменённых файлов: 50 добавлений и 41 удалений

Просмотреть файл

@ -24,7 +24,7 @@
00823375212F114B0055F6E4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 00823374212F114B0055F6E4 /* main.m */; };
00D6D060213720E5008E5E33 /* NotificationsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 00D6D05F213720E5008E5E33 /* NotificationsViewController.m */; };
00D6D06321384D00008E5E33 /* HistoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 00D6D06221384D00008E5E33 /* HistoryViewController.m */; };
5D93128427C67BC7232939D5 /* libPods-GraphNotifications.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B6312F300B55978A0074729 /* libPods-GraphNotifications.a */; };
2EE8E5D69A29AE7328A7332C /* libPods-GraphNotificationsSample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E4DCC7DAE148F4E1D2FE468 /* libPods-GraphNotificationsSample.a */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@ -44,7 +44,7 @@
0017A49C2135D10E00EB86D8 /* NotificationProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotificationProvider.m; sourceTree = "<group>"; };
003421A72130A887007FC970 /* NotificationsManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationsManager.h; sourceTree = "<group>"; };
003421A821347622007FC970 /* NotificationsManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationsManager.m; sourceTree = "<group>"; };
0082335C212F114B0055F6E4 /* GraphNotifications.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GraphNotifications.app; sourceTree = BUILT_PRODUCTS_DIR; };
0082335C212F114B0055F6E4 /* GraphNotificationsSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GraphNotificationsSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
0082335F212F114B0055F6E4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
00823360212F114B0055F6E4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
00823362212F114B0055F6E4 /* RootViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = "<group>"; };
@ -64,7 +64,9 @@
00D6D06221384D00008E5E33 /* HistoryViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HistoryViewController.m; sourceTree = "<group>"; };
00D6D0642138519C008E5E33 /* GraphNotificationsSample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GraphNotificationsSample.entitlements; sourceTree = "<group>"; };
63E3FBAFA254E6B80A8DA76E /* Pods-GraphNotifications.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GraphNotifications.release.xcconfig"; path = "Pods/Target Support Files/Pods-GraphNotifications/Pods-GraphNotifications.release.xcconfig"; sourceTree = "<group>"; };
9B6312F300B55978A0074729 /* libPods-GraphNotifications.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-GraphNotifications.a"; sourceTree = BUILT_PRODUCTS_DIR; };
75B1BE83D70BE88CC4C7F2C3 /* Pods-GraphNotificationsSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GraphNotificationsSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-GraphNotificationsSample/Pods-GraphNotificationsSample.release.xcconfig"; sourceTree = "<group>"; };
8E4DCC7DAE148F4E1D2FE468 /* libPods-GraphNotificationsSample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-GraphNotificationsSample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
A7B4BBF827070458A6EC64A2 /* Pods-GraphNotificationsSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GraphNotificationsSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GraphNotificationsSample/Pods-GraphNotificationsSample.debug.xcconfig"; sourceTree = "<group>"; };
FFB1B176FF8985E5AD4B88D1 /* Pods-GraphNotifications.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GraphNotifications.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GraphNotifications/Pods-GraphNotifications.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -73,7 +75,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5D93128427C67BC7232939D5 /* libPods-GraphNotifications.a in Frameworks */,
2EE8E5D69A29AE7328A7332C /* libPods-GraphNotificationsSample.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -102,7 +104,6 @@
00823353212F114A0055F6E4 = {
isa = PBXGroup;
children = (
0017A49A2135B55400EB86D8 /* SampleAccountProviders */,
0082335E212F114B0055F6E4 /* GraphNotificationsSample */,
0082335D212F114B0055F6E4 /* Products */,
D9CF36B91E745B7CB13F10B3 /* Pods */,
@ -113,7 +114,7 @@
0082335D212F114B0055F6E4 /* Products */ = {
isa = PBXGroup;
children = (
0082335C212F114B0055F6E4 /* GraphNotifications.app */,
0082335C212F114B0055F6E4 /* GraphNotificationsSample.app */,
);
name = Products;
sourceTree = "<group>";
@ -121,6 +122,7 @@
0082335E212F114B0055F6E4 /* GraphNotificationsSample */ = {
isa = PBXGroup;
children = (
0017A49A2135B55400EB86D8 /* SampleAccountProviders */,
00D6D0642138519C008E5E33 /* GraphNotificationsSample.entitlements */,
0017A49B2135D10A00EB86D8 /* NotificationProvider.h */,
0017A49C2135D10E00EB86D8 /* NotificationProvider.m */,
@ -150,7 +152,7 @@
31E53F56A7E5C56EF7B399C4 /* Frameworks */ = {
isa = PBXGroup;
children = (
9B6312F300B55978A0074729 /* libPods-GraphNotifications.a */,
8E4DCC7DAE148F4E1D2FE468 /* libPods-GraphNotificationsSample.a */,
);
name = Frameworks;
sourceTree = "<group>";
@ -160,6 +162,8 @@
children = (
FFB1B176FF8985E5AD4B88D1 /* Pods-GraphNotifications.debug.xcconfig */,
63E3FBAFA254E6B80A8DA76E /* Pods-GraphNotifications.release.xcconfig */,
A7B4BBF827070458A6EC64A2 /* Pods-GraphNotificationsSample.debug.xcconfig */,
75B1BE83D70BE88CC4C7F2C3 /* Pods-GraphNotificationsSample.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
@ -176,7 +180,6 @@
00823359212F114B0055F6E4 /* Frameworks */,
0082335A212F114B0055F6E4 /* Resources */,
534E2B6519087712F45067D1 /* [CP] Embed Pods Frameworks */,
DF877AD63B2A176428A85DFC /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@ -184,7 +187,7 @@
);
name = GraphNotificationsSample;
productName = GraphNotificationsSample;
productReference = 0082335C212F114B0055F6E4 /* GraphNotifications.app */;
productReference = 0082335C212F114B0055F6E4 /* GraphNotificationsSample.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@ -245,13 +248,18 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-GraphNotificationsSample/Pods-GraphNotificationsSample-frameworks.sh",
"${PODS_ROOT}/AdaptiveCards/AdaptiveCards.framework",
"${PODS_ROOT}/ProjectRomeSdk/ConnectedDevices.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AdaptiveCards.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ConnectedDevices.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GraphNotifications/Pods-GraphNotifications-frameworks.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GraphNotificationsSample/Pods-GraphNotificationsSample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
BBBC242D2C377CDA52234B8A /* [CP] Check Pods Manifest.lock */ = {
@ -260,28 +268,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-GraphNotificationsSample-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
DF877AD63B2A176428A85DFC /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GraphNotifications/Pods-GraphNotifications-resources.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
@ -436,7 +432,7 @@
};
00823379212F114B0055F6E4 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FFB1B176FF8985E5AD4B88D1 /* Pods-GraphNotifications.debug.xcconfig */;
baseConfigurationReference = A7B4BBF827070458A6EC64A2 /* Pods-GraphNotificationsSample.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = GraphNotificationsSample/GraphNotificationsSample.entitlements;
@ -460,7 +456,7 @@
};
0082337A212F114B0055F6E4 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 63E3FBAFA254E6B80A8DA76E /* Pods-GraphNotifications.release.xcconfig */;
baseConfigurationReference = 75B1BE83D70BE88CC4C7F2C3 /* Pods-GraphNotificationsSample.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = GraphNotificationsSample/GraphNotificationsSample.entitlements;

Просмотреть файл

@ -1,5 +1,6 @@
#import "NotificationsManager.h"
#import "Secrets.h"
static NotificationsManager* s_manager;

Просмотреть файл

@ -11,6 +11,7 @@
#import "LoginViewController.h"
#import "NotificationsManager.h"
#import "NotificationProvider.h"
#import "Secrets.h"
@interface RootViewController ()

Просмотреть файл

@ -11,7 +11,7 @@
// AAD is supposed to use this Uri to call the app back after login (currently not true, external requirement)
// And this app is supposed to be able to handle this Uri (currently not true)
// APP_HOST_NAME Cross-device domain of this app's registration
static NSString* const MSA_CLIENT_ID = "<<MSA client ID goes here>>";
static NSString* const AAD_CLIENT_ID = "<<AAD client ID goes here>>";
static NSString* const AAD_REDIRECT_URI = "<<AAD redirect URI goes here>>";
static NSString* const APP_HOST_NAME = "<<App cross-device domain goes here>>";
static NSString* const MSA_CLIENT_ID = @"<<MSA client ID goes here>>";
static NSString* const AAD_CLIENT_ID = @"<<AAD client ID goes here>>";
static NSString* const AAD_REDIRECT_URI = @"<<AAD redirect URI goes here>>";
static NSString* const APP_HOST_NAME = @"<<App cross-device domain goes here>>";

Просмотреть файл

@ -1,13 +1,20 @@
# Uncomment the next line to define a global platform for your project
platform :ios, "10.0"
workspace 'iOSSample'
workspace 'ProjectRomeSamples'
target 'GraphNotificationsSample' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
project 'GraphNotificationsSample.xcodeproj'
pod 'ProjectRomeSdk'
pod 'AdaptiveCards'
pod 'ADAL', '2.6.6'
end
target 'iOSSample' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'ProjectRomeSdk'
# Pods for iOSSample
project 'iOSSample.xcodeproj'
pod 'ProjectRomeSdk'
end

Просмотреть файл

@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
4B50C590D981CE192C5681EE /* libPods-iOSSample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 880A36E3D120962568E8D54D /* libPods-iOSSample.a */; };
514E375D209D7D5A000FFC17 /* AppServiceProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 514E375B209D7D5A000FFC17 /* AppServiceProvider.m */; };
514E3763209D9594000FFC17 /* InboundRequestLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 514E3762209D9594000FFC17 /* InboundRequestLogger.m */; };
8200D3A82098E2CA00D43FA6 /* NotificationProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 8200D3A72098E2CA00D43FA6 /* NotificationProvider.m */; };
@ -88,6 +89,7 @@
8288D5932069A9A900EAABAA /* MSAAccountProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSAAccountProvider.m; sourceTree = "<group>"; };
8288D5942069A9A900EAABAA /* MSATokenCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSATokenCache.h; sourceTree = "<group>"; };
8288D59E206AD47A00EAABAA /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
880A36E3D120962568E8D54D /* libPods-iOSSample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-iOSSample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
CC70B68D1BC172939DC18E64 /* Pods-iOSSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOSSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-iOSSample/Pods-iOSSample.release.xcconfig"; sourceTree = "<group>"; };
DE544A07209D69E700305AE0 /* LaunchUriProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LaunchUriProvider.h; sourceTree = "<group>"; };
DE544A08209D69E700305AE0 /* LaunchUriProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LaunchUriProvider.m; sourceTree = "<group>"; };
@ -98,6 +100,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4B50C590D981CE192C5681EE /* libPods-iOSSample.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -107,6 +110,7 @@
2FA0F9B8E1A5FE221268DAEA /* Frameworks */ = {
isa = PBXGroup;
children = (
880A36E3D120962568E8D54D /* libPods-iOSSample.a */,
);
name = Frameworks;
sourceTree = "<group>";

2
iOS/samples/iOSSample/.gitignore поставляемый
Просмотреть файл

@ -1 +1 @@
Secrets.h

Просмотреть файл

@ -32,7 +32,7 @@
MCDUserDataFeed* userDataFeed = [MCDUserDataFeed userDataFeedForAccount:accounts[0]
platform:[AppDataSource sharedInstance].platform
activitySourceHost:CROSS_PLATFORM_APP_ID];
NSArray<MCDSyncScope*>* syncScopes = @[ [MCDUserActivityChannel syncScope] ];
NSArray<MCDUserDataFeedSyncScope*>* syncScopes = @[ [MCDUserActivityChannel syncScope] ];
[userDataFeed addSyncScopes:syncScopes];
self.channel = [MCDUserActivityChannel userActivityChannelWithUserDataFeed:userDataFeed];
}
@ -140,7 +140,7 @@
else
{
// Stop the UserActivitysession
[self.session close];
[self.session stop];
self.session = nil;
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"UserActivitySession has stopped %@", self.session);