Skip to content

Commit

Permalink
Merge pull request #621 from AzureAD/oldalton/remove_backward_compat_…
Browse files Browse the repository at this point in the history
…target

Remove backward compat cocoapods target and move legacy accounts provider to public space
  • Loading branch information
oldalton authored Jul 31, 2019
2 parents 69b7d2f + 1ea87c5 commit f5a8b10
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 46 deletions.
19 changes: 2 additions & 17 deletions MSAL.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,42 +30,27 @@ Pod::Spec.new do |s|

s.subspec 'app-lib' do |app|
app.source_files = "MSAL/src/**/*.{h,m}", "MSAL/IdentityCore/IdentityCore/src/**/*.{h,m}"
app.ios.public_header_files = "MSAL/src/public/*.h","MSAL/src/public/ios/*.h", "MSAL/src/public/configuration/**/*.h"
app.ios.public_header_files = "MSAL/src/public/*.h","MSAL/src/public/ios/**/*.h", "MSAL/src/public/configuration/**/*.h"
app.osx.public_header_files = "MSAL/src/public/mac/*.h","MSAL/src/public/*.h", "MSAL/src/public/configuration/**/*.h"

app.ios.exclude_files = "MSAL/src/**/mac/*", "MSAL/IdentityCore/IdentityCore/src/**/mac/*"

app.osx.exclude_files = "MSAL/src/**/ios/*", "MSAL/IdentityCore/IdentityCore/src/**/ios/*"
app.requires_arc = true
app.prefix_header_contents = "#define MSAL_LEGACY_ACCOUNTS_DISABLED 1"
end

# Note, MSAL has limited support for running in app extensions.
s.subspec 'extension' do |ext|
ext.compiler_flags = '-DADAL_EXTENSION_SAFE=1'
ext.source_files = "MSAL/src/**/*.{h,m}", "MSAL/IdentityCore/IdentityCore/src/**/*.{h,m}"
ext.ios.public_header_files = "MSAL/src/public/*.h","MSAL/src/public/ios/*.h", "MSAL/src/public/configuration/**/*.h"
ext.ios.public_header_files = "MSAL/src/public/*.h","MSAL/src/public/ios/**/*.h", "MSAL/src/public/configuration/**/*.h"
ext.osx.public_header_files = "MSAL/src/public/mac/*.h","MSAL/src/public/*.h", "MSAL/src/public/configuration/**/*.h"

# There is currently a bug in CocoaPods where it doesn't combine the public headers
# for both the platform and overall.
ext.ios.exclude_files = "MSAL/src/**/mac/*", "MSAL/IdentityCore/IdentityCore/src/**/mac/*"
ext.osx.exclude_files = "MSAL/src/**/ios/*", "MSAL/IdentityCore/IdentityCore/src/**/ios/*"
ext.prefix_header_contents = "#define MSAL_LEGACY_ACCOUNTS_DISABLED 1"
ext.requires_arc = true
end

s.subspec 'MSALBackwardCompat' do |legacyapp|

legacyapp.source_files = "MSAL/src/**/*.{h,m}", "MSAL/IdentityCore/IdentityCore/src/**/*.{h,m}", "MSAL/src-internal/**/*.{h,m}"
legacyapp.ios.public_header_files = "MSAL/src/public/*.h","MSAL/src/public/ios/*.h", "MSAL/src/public/configuration/**/*.h", "MSAL/src-internal/public/ios/*.h"
legacyapp.osx.public_header_files = "MSAL/src/public/mac/*.h","MSAL/src/public/*.h", "MSAL/src/public/configuration/**/*.h"

legacyapp.ios.exclude_files = "MSAL/src/**/mac/*", "MSAL/IdentityCore/IdentityCore/src/**/mac/*"

legacyapp.osx.exclude_files = "MSAL/src/**/ios/*", "MSAL/IdentityCore/IdentityCore/src/**/ios/*", "MSAL/src-internal/public/ios/*"
legacyapp.requires_arc = true

end

end
44 changes: 18 additions & 26 deletions MSAL/MSAL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1521,31 +1521,6 @@
path = mac;
sourceTree = "<group>";
};
B223B0A922ADF61C00FB8713 /* public */ = {
isa = PBXGroup;
children = (
B223B0B022ADF63300FB8713 /* ios */,
);
path = public;
sourceTree = "<group>";
};
B223B0B022ADF63300FB8713 /* ios */ = {
isa = PBXGroup;
children = (
B29A56BD228266E20023F5E6 /* MSALLegacySharedAccountsProvider.h */,
);
path = ios;
sourceTree = "<group>";
};
B223B0C722AE27BE00FB8713 /* src-internal */ = {
isa = PBXGroup;
children = (
B223B0A922ADF61C00FB8713 /* public */,
B2725EC722C04562009B454A /* ios */,
);
path = "src-internal";
sourceTree = "<group>";
};
B25A439021C35A67000B3DD4 /* actions */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1583,6 +1558,7 @@
B2659C792287BBB000F5A0C3 /* external */ = {
isa = PBXGroup;
children = (
B2725EC722C04562009B454A /* ios */,
B29A56B9228266B40023F5E6 /* MSALSerializedADALCacheProvider.m */,
B2659C862287D13B00F5A0C3 /* MSALSerializedADALCacheProvider+Internal.h */,
B267569B228F335E000F01D7 /* MSALExternalAccountHandler.h */,
Expand Down Expand Up @@ -1696,6 +1672,22 @@
path = "unit-test-host";
sourceTree = "<group>";
};
B2968C4122F24259005AFC33 /* ios */ = {
isa = PBXGroup;
children = (
B2968C4222F24265005AFC33 /* cache */,
);
path = ios;
sourceTree = "<group>";
};
B2968C4222F24265005AFC33 /* cache */ = {
isa = PBXGroup;
children = (
B29A56BD228266E20023F5E6 /* MSALLegacySharedAccountsProvider.h */,
);
path = cache;
sourceTree = "<group>";
};
B29A56A32282622F0023F5E6 /* cache */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1953,6 +1945,7 @@
232D616922498EDF00260C42 /* MSALJsonSerializable.h */,
23FB5C1C22542B99002BF1EB /* MSALJsonDeserializable.h */,
B27CCDF0229F9F4700CAD565 /* MSALAccountEnumerationParameters.h */,
B2968C4122F24259005AFC33 /* ios */,
);
path = public;
sourceTree = "<group>";
Expand Down Expand Up @@ -2173,7 +2166,6 @@
231CE9E01FECBD4600E95D3E /* unit-test-host.entitlements */,
D6A206191FC50A4D00755A51 /* IdentityCore.xcodeproj */,
D65A6F671E3FF3D900C69FBA /* src */,
B223B0C722AE27BE00FB8713 /* src-internal */,
D61F5B691E53FCA100912CB8 /* test */,
D65A6FB71E3FF44A00C69FBA /* resources */,
D65A6FBC1E3FF46100C69FBA /* xcconfig */,
Expand Down
2 changes: 1 addition & 1 deletion MSAL/src/MSALAccount.m
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ - (instancetype)initWithMSALExternalAccount:(id<MSALAccount>)externalAccount

if (tenantProfileError)
{
MSID_LOG_WITH_CTX(MSIDLogLevelWarning, nil, @"Failed to create tenant profile with error code %ld, domain %@", tenantProfileError.code, tenantProfileError.domain);
MSID_LOG_WITH_CTX(MSIDLogLevelWarning, nil, @"Failed to create tenant profile with error code %ld, domain %@", (long)tenantProfileError.code, tenantProfileError.domain);
}

NSArray *tenantProfiles = tenantProfile ? @[tenantProfile] : nil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#import "MSALAccountEnumerationParameters.h"
#import "MSIDConstants.h"
#import "MSALErrorConverter.h"
#import "MSALAccount.h"
#import "MSALTenantProfile.h"

@interface MSALLegacySharedAccountsProvider()

Expand Down
2 changes: 1 addition & 1 deletion MSAL/src/public/MSAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ FOUNDATION_EXPORT const unsigned char MSAL__Framework_VersionString[];
#import <MSAL/MSALAccountEnumerationParameters.h>
#import <MSAL/MSALExternalAccountProviding.h>
#import <MSAL/MSALSerializedADALCacheProvider.h>
#ifndef MSAL_LEGACY_ACCOUNTS_DISABLED
#if TARGET_OS_IPHONE
#import <MSAL/MSALLegacySharedAccountsProvider.h>
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import <MSAL/MSAL.h>
#import <Foundation/Foundation.h>
#import "MSALExternalAccountProviding.h"

typedef NS_ENUM(NSInteger, MSALLegacySharedAccountMode)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#import "MSALTenantProfile+Internal.h"
#import "MSIDConstants.h"
#import "MSALLegacySharedAccountTestUtil.h"
#import "MSALAccountEnumerationParameters.h"

@interface MSALLegacySharedAccountsProviderTests : XCTestCase

Expand Down

0 comments on commit f5a8b10

Please sign in to comment.