-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathMSAL.podspec
More file actions
96 lines (83 loc) · 3.4 KB
/
MSAL.podspec
File metadata and controls
96 lines (83 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Pod::Spec.new do |s|
s.name = "MSAL"
s.version = "2.9.0"
s.summary = "Microsoft Authentication Library (MSAL) for iOS"
s.description = <<-DESC
The MSAL library for iOS gives your app the ability to begin using the Microsoft Cloud by supporting Microsoft Azure Active Directory and Microsoft Accounts in a converged experience using industry standard OAuth2 and OpenID Connect. The library also supports Microsoft Azure B2C for those using our hosted identity management service.
DESC
s.homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-objc"
s.license = {
:type => "MIT",
:file => "LICENSE"
}
s.authors = { "Microsoft" => "nugetaad@microsoft.com" }
s.social_media_url = "https://twitter.com/azuread"
s.platform = :ios, :osx
s.ios.deployment_target = "14.0"
s.osx.deployment_target = "10.15"
s.source = {
:git => "https://github.com/AzureAD/microsoft-authentication-library-for-objc.git",
:tag => s.version.to_s,
:submodules => true
}
s.swift_versions = '5.0'
s.resource_bundles = {"MSAL" => ["MSAL/PrivacyInfo.xcprivacy"]}
s.default_subspecs ='app-lib'
s.prefix_header_file = "MSAL/src/MSAL.pch"
s.header_dir = "MSAL"
# ================================
# Common Configuration
# ================================
common_xcconfig = {
'CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF' => 'NO',
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) MSAL_COCOAPOD=1'
}
common_source_files = [
"MSAL/src/**/*.{h,m}",
"MSAL/IdentityCore/IdentityCore/src/**/*.{h,m,swift}"
]
common_public_headers = [
"MSAL/src/public/*.h",
"MSAL/src/public/configuration/**/*.h",
"MSAL/src/native_auth/public/*.h"
]
ios_public_headers = common_public_headers + ["MSAL/src/public/ios/**/*.h"]
osx_public_headers = common_public_headers + ["MSAL/src/public/mac/**/*.h"]
ios_exclude_files = ["MSAL/src/**/mac/*", "MSAL/IdentityCore/IdentityCore/src/**/mac/*"]
osx_exclude_files = ["MSAL/src/**/ios/*", "MSAL/IdentityCore/IdentityCore/src/**/ios/*"]
# Helper to apply common subspec configuration
apply_common_config = lambda do |subspec|
subspec.ios.public_header_files = ios_public_headers
subspec.osx.public_header_files = osx_public_headers
subspec.ios.exclude_files = ios_exclude_files
subspec.osx.exclude_files = osx_exclude_files
subspec.requires_arc = true
end
# ================================
# Subspecs
# ================================
s.subspec 'app-lib' do |app|
app.pod_target_xcconfig = common_xcconfig
app.source_files = common_source_files
apply_common_config.call(app)
end
s.subspec 'native-auth' do |nat|
nat.pod_target_xcconfig = common_xcconfig.merge({
'HEADER_SEARCH_PATHS' => "$SRCROOT/MSAL"
})
nat.source_files = common_source_files + [
"MSAL/src/native_auth/**/*.{h,m,swift}",
"MSAL/module.modulemap"
]
apply_common_config.call(nat)
end
# Note, MSAL has limited support for running in app extensions.
s.subspec 'extension' do |ext|
ext.pod_target_xcconfig = common_xcconfig
ext.compiler_flags = '-DADAL_EXTENSION_SAFE=1'
ext.source_files = common_source_files
# There is currently a bug in CocoaPods where it doesn't combine the public headers
# for both the platform and overall.
apply_common_config.call(ext)
end
end