Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CRMMobileSDK/CRMMobileSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Pod::Spec.new do |s|
s.library = 'xml2'
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '/usr/include/libxml2' }

s.dependency 'ADALiOS', '=1.2.4'
s.dependency 'ADAL', '=2.2.0'
end
118 changes: 93 additions & 25 deletions CRMMobileSDK/CRMMobileSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@
07F0B2BF1B4E485900213CA1 /* SOAPMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 07F0B2741B4E485900213CA1 /* SOAPMapper.h */; };
07F0B2C01B4E485900213CA1 /* SOAPMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 07F0B2751B4E485900213CA1 /* SOAPMapper.m */; };
07F0B2C11B4E485900213CA1 /* SOAPParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 07F0B2761B4E485900213CA1 /* SOAPParser.h */; };
B3609AE7324D1BA4AFC2067E /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BFBBFEE0671167AE8BC4E98C /* libPods.a */; };
293EC7D0F1AEE2622398DF60 /* libPods-CRMMobileSDKTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F32AFC59BAA70F81CB23FB1D /* libPods-CRMMobileSDKTests.a */; };
BCE2C3221D2189E200B4CE43 /* libADAL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BCE2C3211D2189E200B4CE43 /* libADAL.a */; };
E52558B7C68A3C6883B05BB8 /* libPods-CRMMobileSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B19907C609E0D678E8DA13A0 /* libPods-CRMMobileSDK.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -180,17 +182,22 @@
07F0B2741B4E485900213CA1 /* SOAPMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SOAPMapper.h; sourceTree = "<group>"; };
07F0B2751B4E485900213CA1 /* SOAPMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOAPMapper.m; sourceTree = "<group>"; };
07F0B2761B4E485900213CA1 /* SOAPParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SOAPParser.h; sourceTree = "<group>"; };
3110B1357623E61A6A0B1FFD /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
4801670C3408AE5406094208 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
BFBBFEE0671167AE8BC4E98C /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
2452E392085EB22D80DFC2C8 /* Pods-CRMMobileSDK.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CRMMobileSDK.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CRMMobileSDK/Pods-CRMMobileSDK.debug.xcconfig"; sourceTree = "<group>"; };
780065250386E15914BED87A /* Pods-CRMMobileSDK.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CRMMobileSDK.release.xcconfig"; path = "Pods/Target Support Files/Pods-CRMMobileSDK/Pods-CRMMobileSDK.release.xcconfig"; sourceTree = "<group>"; };
B19907C609E0D678E8DA13A0 /* libPods-CRMMobileSDK.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CRMMobileSDK.a"; sourceTree = BUILT_PRODUCTS_DIR; };
BCE2C3211D2189E200B4CE43 /* libADAL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libADAL.a; path = "../../../../Library/Developer/Xcode/DerivedData/CRMMobileSDK-aexqcjwyavoxaicdexeemwqwsrxf/Build/Products/Debug-iphonesimulator/ADAL/libADAL.a"; sourceTree = "<group>"; };
EDDA479B3D424C5BC9D42658 /* Pods-CRMMobileSDKTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CRMMobileSDKTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CRMMobileSDKTests/Pods-CRMMobileSDKTests.debug.xcconfig"; sourceTree = "<group>"; };
F32AFC59BAA70F81CB23FB1D /* libPods-CRMMobileSDKTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CRMMobileSDKTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
FA47CDB5C0D9657DD6AE355B /* Pods-CRMMobileSDKTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CRMMobileSDKTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CRMMobileSDKTests/Pods-CRMMobileSDKTests.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
07F0B2071B4E479B00213CA1 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B3609AE7324D1BA4AFC2067E /* libPods.a in Frameworks */,
BCE2C3221D2189E200B4CE43 /* libADAL.a in Frameworks */,
E52558B7C68A3C6883B05BB8 /* libPods-CRMMobileSDK.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -199,6 +206,7 @@
buildActionMask = 2147483647;
files = (
07F0B2171B4E479B00213CA1 /* CRMMobileSDK.framework in Frameworks */,
293EC7D0F1AEE2622398DF60 /* libPods-CRMMobileSDKTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -211,8 +219,8 @@
07F0B20D1B4E479B00213CA1 /* CRMMobileSDK */,
07F0B21A1B4E479B00213CA1 /* CRMMobileSDKTests */,
07F0B20C1B4E479B00213CA1 /* Products */,
912085BE48B6CB55933E4C71 /* Pods */,
D01AE74EF4779A5D127EC7F3 /* Frameworks */,
16323F07E9603CDB8E124C76 /* Pods */,
64E1D9BA05903623DADE29AD /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -374,19 +382,23 @@
path = SOAP;
sourceTree = "<group>";
};
912085BE48B6CB55933E4C71 /* Pods */ = {
16323F07E9603CDB8E124C76 /* Pods */ = {
isa = PBXGroup;
children = (
3110B1357623E61A6A0B1FFD /* Pods.debug.xcconfig */,
4801670C3408AE5406094208 /* Pods.release.xcconfig */,
2452E392085EB22D80DFC2C8 /* Pods-CRMMobileSDK.debug.xcconfig */,
780065250386E15914BED87A /* Pods-CRMMobileSDK.release.xcconfig */,
EDDA479B3D424C5BC9D42658 /* Pods-CRMMobileSDKTests.debug.xcconfig */,
FA47CDB5C0D9657DD6AE355B /* Pods-CRMMobileSDKTests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
D01AE74EF4779A5D127EC7F3 /* Frameworks */ = {
64E1D9BA05903623DADE29AD /* Frameworks */ = {
isa = PBXGroup;
children = (
BFBBFEE0671167AE8BC4E98C /* libPods.a */,
BCE2C3211D2189E200B4CE43 /* libADAL.a */,
B19907C609E0D678E8DA13A0 /* libPods-CRMMobileSDK.a */,
F32AFC59BAA70F81CB23FB1D /* libPods-CRMMobileSDKTests.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -449,12 +461,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 07F0B2211B4E479B00213CA1 /* Build configuration list for PBXNativeTarget "CRMMobileSDK" */;
buildPhases = (
D2E751B82678652A76AC5C01 /* Check Pods Manifest.lock */,
9543F0699F7AED713517E3AC /* [CP] Check Pods Manifest.lock */,
07F0B2061B4E479B00213CA1 /* Sources */,
07F0B2071B4E479B00213CA1 /* Frameworks */,
07F0B2081B4E479B00213CA1 /* Headers */,
07F0B2091B4E479B00213CA1 /* Resources */,
012337739066BAD0A154F06F /* Copy Pods Resources */,
92949A821F6A8938542C4FCF /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -469,9 +481,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 07F0B2241B4E479B00213CA1 /* Build configuration list for PBXNativeTarget "CRMMobileSDKTests" */;
buildPhases = (
E06D84B42E6287D098260B59 /* [CP] Check Pods Manifest.lock */,
07F0B2121B4E479B00213CA1 /* Sources */,
07F0B2131B4E479B00213CA1 /* Frameworks */,
07F0B2141B4E479B00213CA1 /* Resources */,
96154423A7A59473A680549D /* [CP] Embed Pods Frameworks */,
3892A6206ABADC7D2D8653A2 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -536,29 +551,74 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
012337739066BAD0A154F06F /* Copy Pods Resources */ = {
3892A6206ABADC7D2D8653A2 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CRMMobileSDKTests/Pods-CRMMobileSDKTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
D2E751B82678652A76AC5C01 /* Check Pods Manifest.lock */ = {
92949A821F6A8938542C4FCF /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CRMMobileSDK/Pods-CRMMobileSDK-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9543F0699F7AED713517E3AC /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
96154423A7A59473A680549D /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CRMMobileSDKTests/Pods-CRMMobileSDKTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
E06D84B42E6287D098260B59 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -722,7 +782,7 @@
};
07F0B2221B4E479B00213CA1 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3110B1357623E61A6A0B1FFD /* Pods.debug.xcconfig */;
baseConfigurationReference = 2452E392085EB22D80DFC2C8 /* Pods-CRMMobileSDK.debug.xcconfig */;
buildSettings = {
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -731,21 +791,24 @@
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"${PODS_ROOT}/Headers/Public\"",
"\"${PODS_ROOT}/Headers/Public/ADALiOS\"",
"\"${PODS_ROOT}/Headers/Public/ADAL\"",
/usr/include/libxml2,
);
INFOPLIST_FILE = CRMMobileSDK/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = /usr/include/libxml2;
LIBRARY_SEARCH_PATHS = (
/usr/include/libxml2,
$PODS_CONFIGURATION_BUILD_DIR/ADAL,
);
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
07F0B2231B4E479B00213CA1 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4801670C3408AE5406094208 /* Pods.release.xcconfig */;
baseConfigurationReference = 780065250386E15914BED87A /* Pods-CRMMobileSDK.release.xcconfig */;
buildSettings = {
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -754,20 +817,24 @@
HEADER_SEARCH_PATHS = (
"$(inherited)",
"\"${PODS_ROOT}/Headers/Public\"",
"\"${PODS_ROOT}/Headers/Public/ADALiOS\"",
"\"${PODS_ROOT}/Headers/Public/ADAL\"",
/usr/include/libxml2,
);
INFOPLIST_FILE = CRMMobileSDK/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = /usr/include/libxml2;
LIBRARY_SEARCH_PATHS = (
/usr/include/libxml2,
$PODS_CONFIGURATION_BUILD_DIR/ADAL,
);
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
07F0B2251B4E479B00213CA1 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = EDDA479B3D424C5BC9D42658 /* Pods-CRMMobileSDKTests.debug.xcconfig */;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
Expand All @@ -785,6 +852,7 @@
};
07F0B2261B4E479B00213CA1 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FA47CDB5C0D9657DD6AE355B /* Pods-CRMMobileSDKTests.release.xcconfig */;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
Expand Down
24 changes: 14 additions & 10 deletions CRMMobileSDK/CRMMobileSDK/CRMConnector/CRMClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,20 @@ - (void)loginWithEndpoint:(NSString *)endpoint completion:(ADAuthenticationCallb
}

// This performs the authentication and the library will jump in with the login page if needed
[context acquireTokenWithResource:endpoint
clientId:self.clientID
redirectUri:[NSURL URLWithString:self.redirectURI]
completionBlock:^(ADAuthenticationResult *result) {
if (result.status == AD_SUCCEEDED) {
self.accessToken = result.accessToken;
}

if (completion) completion(result);
}];
// The login can occur on a background thread so it needs to dispatch to the main thread
// in case it needs to display the login screen
dispatch_async(dispatch_get_main_queue(), ^{
[context acquireTokenWithResource:endpoint
clientId:self.clientID
redirectUri:[NSURL URLWithString:self.redirectURI]
completionBlock:^(ADAuthenticationResult *result) {
if (result.status == AD_SUCCEEDED) {
self.accessToken = result.accessToken;
}

if (completion) completion(result);
}];
});
}];

[authorityTask resume];
Expand Down
2 changes: 1 addition & 1 deletion CRMMobileSDK/CRMMobileSDK/CRMConnector/CRMClientPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
#ifndef CRMMobileSDK_CRMClientPrivate_h
#define CRMMobileSDK_CRMClientPrivate_h

#import <ADALiOS/ADAL.h>
#import <ADAL/ADAL.h>

#endif
2 changes: 1 addition & 1 deletion CRMMobileSDK/Podfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'

pod 'ADALiOS', '=1.2.4'
pod 'ADAL', '~> 2.2.0'

target 'CRMMobileSDK' do

Expand Down
15 changes: 11 additions & 4 deletions CRMMobileSDK/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
PODS:
- ADALiOS (1.2.4)
- ADAL (2.2.0.1):
- ADAL/iosinternalheaders (= 2.2.0.1)
- ADAL/no-arc (= 2.2.0.1)
- ADAL/tokencacheheader (= 2.2.0.1)
- ADAL/no-arc (2.2.0.1)
- ADAL/tokencacheheader (2.2.0.1)

DEPENDENCIES:
- ADALiOS (= 1.2.4)
- ADAL (~> 2.2.0)

SPEC CHECKSUMS:
ADALiOS: 8179aed8e136bf79dca5a4138a0c1a0d52701cb2
ADAL: 4664221c1589def234698d51415c78e577e9362e

COCOAPODS: 0.38.2
PODFILE CHECKSUM: a1efc6950cd6b6757309cae9244338c8d9713c5f

COCOAPODS: 1.0.1