You have a Azure AD Setup
You can find detailed instructions how to set up a new application in Azure AD here.
A working CocoaPods installation CocoaPods - Getting Started
- If CocoaPods is not installed, please run below commands:
pod init
- Add the ADAL ios library to your ios/Podfile file pod
'ADAL', '~> 2.3'
.
target 'example' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Add ADAL Pod
pod 'ADAL', '~> 2.3'
# Pods for example
target 'exampleTests' do
inherit! :search_paths
# Pods for testing
end
end
- Run below command to pull the ios ADAL library down.
pod install
Install NPM module
$ npm install react-native-azure-adal --save
OR
yarn add react-native-azure-adal
$ react-native link react-native-azure-adal
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-azure-adal
and addRNAzureAdal.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNAzureAdal.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)
Click on your project in the Navigator pane in Xcode. Click on your application target and then the Capabilities tab. Scroll down to Keychain Sharing and flip the switch on. Add com.microsoft.adalcache
to that list.
Plugin automatically detects whether to enable brokered authentication based on redirectUri format (if starts with x-msauth-
).
Developer needs to register special redirectUri for broker usage following format below:
x-msauth-<your-bundle-id>://<your.bundle.id>
ex: x-msauth-com-microsoft-mytestiosapp://com.microsoft.mytestiosapp
Read ADAL for iOS to understand broker concept in more details.
Receiving issues After an update? Please:
- Ensure this module is up to date
- If you are still receiving issues after all this then open an issue.
Thanks