From 7c92035e148e37b135f74ed4f8c482d106c3411d Mon Sep 17 00:00:00 2001 From: McKercher Date: Mon, 23 Oct 2017 11:20:43 -0700 Subject: [PATCH 1/2] Product name changes --- CONTRIBUTING.md | 22 ++++----- GUIDELINES.md | 20 ++++---- README.md | 129 +++++------------------------------------------- 3 files changed, 33 insertions(+), 138 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 38d86533..3b8d6f13 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,11 @@ -# Contribute to CA Mobile App Services SDK +# Contribute to iOS Mobile SDK Contributions are welcome and much appreciated. Just follow these easy steps to contribute. ## Code Standard and Guideline -For consistency, we ask that you adhere to some basic code guidelines when contributing to the MAS SDK. See the [Code Standard and Guideline][guidelines] for details. +For consistency, we ask that you adhere to some basic code guidelines when contributing to the iOS Mobile SDK. See the [Code Standard and Guideline][guidelines] for details. ## Our Development Process -To continue improving the SDK, the MAS development team will work on the same GitHub repos as you. The `develop branch` is used for development, and the `master branch` is used only for stable releases. +To continue improving the SDK, our development team will work on the same GitHub repos as you. The `develop branch` is used for development, and the `master branch` is used only for stable releases. **Note:** For production environments, please use releases only from the master branch. ### Pull Requests @@ -14,7 +14,7 @@ We welcome and encourage pull requests. When we get a pull request, it is peer r Follow these steps for pull requests: 1. Fork the repo and create your branch from `master`. -4. For any new code, add unit tests. +2. For any new code, add unit tests. 3. If you've changed APIs, update code comments for AppleDocs. 4. Verify that the test suite passes. 5. Verify that your code follows the [Code Standard Guideline][guidelines] @@ -44,12 +44,12 @@ Before filing a new issue, check Known Issues to see if your problem already exi * Anything else that seems relevant. ## License -By contributing to CA Mobile App Services SDK, you agree that your contributions will be licensed under its [license][license-link]. +By contributing to iOS Mobile SDK, you agree that your contributions will be licensed under its [license][license-link]. - [guidelines]: /GUIDELINES.md - [community]: https://communities.ca.com/community/ca-api-management-community/content?filterID=contentstatus%5Bpublished%5D~category%5Bca-mobile-api-gateway%5D - [license-link]: /LICENSE - [cla]: https://www.clahub.com/agreements/CAAPIM/iOS-MAS-Foundation - [casupport]: https://support.ca.com/irj/portal/implsvcnewcase - +[guidelines]: /GUIDELINES.md +[community]: https://communities.ca.com/community/ca-api-management-community/content?filterID=contentstatus%5Bpublished%5D~category%5Bca-mobile-api-gateway%5D +[license-link]: /LICENSE +[cla]: https://www.clahub.com/agreements/CAAPIM/iOS-MAS-Foundation +[casupport]: https://support.ca.com/irj/portal/implsvcnewcase + diff --git a/GUIDELINES.md b/GUIDELINES.md index 125ee546..28972890 100644 --- a/GUIDELINES.md +++ b/GUIDELINES.md @@ -1,21 +1,19 @@ -# CA Technologies Mobile App Services Objective-C Style Guide +# CA Technologies Objective-C Style Guide -This document describes the Objective-C coding style of iOS team for CA Technologies Mobile App Services. This guideline is recommended to comply with all Objective-C implementations of our products. +This document describes the Objective-C coding style of the iOS Mobile SDK team. This guideline is recommended to comply with all Objective-C implementations of our products. -## Review Apple's Official Coding Guideline +## Review Apple Official Coding Guideline -Beyond the guidelines defined in this document, we also recommend reviewing Apple's official coding guidelines. +Beyond the guidelines defined in this document, we also recommend reviewing the Apple official coding guidelines. * [Programming with Objective-C](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html) * [Cocoa Fundamentals Guide](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/Introduction.html) * [Coding Guidelines for Cocoa](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html) * [App Programming Guide for iOS](http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/Introduction/Introduction.html) -### MAS Products +### iOS Mobile SDK -For more information about MAS, see [Mobile App Service developer](http://mas.ca.com). - -Mobile App Services consists of multiple functional products separated into individual frameworks. +The iOS Mobile SDK consists these frameworks. * MASFoundation * MASUI @@ -23,7 +21,7 @@ Mobile App Services consists of multiple functional products separated into indi * MASIdentityManagement * MASStorage -All of frameworks are recommended to comply with the coding guideline. +All of frameworks are recommended to comply with the coding guideline. For more information about the iOS Mobile SDK, see [developer website](http://mas.ca.com). ## Table of Contents @@ -346,7 +344,7 @@ typedef NS_ENUM(NSInteger, MASRequestResponseType) + (MASObject *)currentObject; - (void)setObject:(id)object forKeyedSubscript:(id )key; -``` +``` **Not:** @@ -356,7 +354,7 @@ typedef NS_ENUM(NSInteger, MASRequestResponseType) +(MASObject*)currentObject; -(void)setObject:(id)object forKeyedSubscript:(id)key; -``` +``` #### Newline diff --git a/README.md b/README.md index 635b7ca0..ba39f5ff 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MASFoundation is the core iOS framework of the Mobile SDK, which is part of [CA Mobile App Services][mas.ca.com]. MASFoundation handles the communication and authentication layer of the Mobile SDK, making it easy for developers to establish a secure connection (TLS, Mutual SSL) to any CA Mobile API Gateway (MAG). +MASFoundation is the core iOS framework of the iOS Mobile SDK, which is part of CA Mobile API Gateway. MASFoundation handles the communication and authentication layer of the iOS Mobile SDK, making it easy for developers to establish a secure connection (TLS, Mutual SSL) to any CA Mobile API Gateway (MAG). ## Features @@ -15,15 +15,15 @@ The MASFoundation framework has the following features: + OTP - One Time Password + PKCE - Proof Key for Code Exchange + SSL Pinning with certificate, public key, or public key hash + + Fingerprint Sessions Lock - Support phone unlocking using fingerprint recognition - Dynamic SDK Configuration - Enterprise Browser - Geo Location ## Get Started +- Check out our [documentation][docs] for sample code, video tutorials, and more. - [Download MASFoundation][download] -- Read the ["Getting Started" guide][get-started] or watch some [video tutorials][videos] -- Check out our [documentation][docs] for more details and sample codes ## Communication @@ -36,109 +36,6 @@ The MASFoundation framework has the following features: Contributions are welcome and much appreciated. To learn more, see the [Contribution Guidelines][contributing]. -## Installation - -MASFoundation supports multiple methods for installing the library in a project. - -### Cocoapods (Podfile) Install - -To integrate MASFoundation into your Xcode project using CocoaPods, specify it in your **Podfile:** - -``` -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '9.0' - -pod 'MASFoundation' -``` -Then, run the following command using the command prompt from the folder of your project: - -``` -$ pod install -``` - -### Manual Install - -For manual install, you add the Mobile SDK to your Xcode project. Note that you must add the MASFoundation library. For complete MAS functionality, install all of the MAS libraries as shown. - -1. Open your project in Xcode. -2. Drag the SDK library files, and drop them into your project in the left navigator panel in Xcode. Select the option, `Copy items if needed`. -3. Select `File->Add files to 'project name'` and add the msso_config.json file from your project folder. -4. In Xcode "Build Setting” of your Project Target, add `-ObjC` for `Other Linker Flags`. -5. Import the following Mobile SDK library header file to the classes or to the .pch file if your project has one. - -``` -#import -``` - -## Set Up Project and Start the SDK - -The following ***video*** describes how to set up the project and start the Mobile SDK. - -[![IMAGE ALT TEXT](http://img.youtube.com/vi/h95MF55Uuuw/0.jpg)](http://www.youtube.com/watch?v=h95MF55Uuuw "Starting the SDK") - -After your project is properly configured, you must start the SDK to establish a secure connection with the backend services. The startup process includes: initialize necessary services for library (such as geo-location, BLE, and network services), and load configuration. - -Ideally, SDK startup should be processed before app startup (during the splash/loading screen of your app). We recommended that you process any communication with the backend services upon successful completion of the startup method. Otherwise, the secure communication is not guaranteed and may fail. - -MASFoundation includes the following methods to start the SDK. - -##### Start with standard method -```objectivec - //Initializing the SDK. - [MAS start:^(BOOL completion, NSError *error) { - //Your code here! - }]; -``` -This method starts the SDK with the currently-active configuration. A currently-active configuration is: 1) the last successfully used configuration, 2) the default JSON configuration file (i.e. msso_config.json in your app bundle) or 3) the custom JSON configuration file defined in `[MAS setConfigurationFileName:]`. - -**Recommended for**: Most environments, including production. - -##### Start with default configuration -```objectivec - //Initializing the SDK. - [MAS startWithDefaultConfiguration:YES completion:^(BOOL completed, NSError *error) - //Your code here! - }]; -``` -This method starts the SDK with the currently-active configuration, or the default configuration (depending on the parameter). If you specify the `YES` parameter, this overwrites the currently-active configuration with the default configuration (if two configurations are different.). If you pass the `NO` parameter, this behaves the same as `[MAS start:];`. If the SDK is already started, this method: stops the SDK, then restarts it with the custom JSON object. - -**Recommended for**: Development environments where configurations change often. - -##### Start using custom JSON -```objectivec - //Your custom JSON object. - NSDictionary *jsonObject = @{....}; - - //Initializing the SDK with custom JSON object. - [MAS startWithJSON: jsonObject completion:^(BOOL completed, NSError *error) { - //Your code here! - }]; -``` -This method starts the SDK using the custom JSON object in, NSDictionary. This method overwrites the currently-active configuration with the custom JSON object, and stores it as the active configuration. If the SDK is already started, this method: stops SDK, then it restarts it with the custom JSON object. - -**Recommended for**: Using multiple MAG servers so you can dynamically change the configuration during runtime. Note: The backend servers must have a version of the product that supports dynamic configuration. - -##### Start using file URL -```objectivec - NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"your_file_name" - ofType:@"json"]; - NSURL *thisURL = [NSURL fileURLWithPath:jsonPath]; - - //Initializing the SDK with file URL of JSON configuration. - [MAS startWithURL:thisURL completion:^(BOOL completed, NSError *error) { - //Your code here! - }]; -``` -This method starts the SDK using the custom JSON configuration file. The custom file can be defined in NSURL format, which indicates the path of the custom file. This method overwrites the currently-active configuration with the custom JSON file, and stores it as the active configuration. If the SDK is already started, this method: stops the SDK, then restarts it with the custom JSON file. - -The SDK accepts the NSURL only with __local file path__. If the Web URL is provided, the startup method fails. - -**Recommended for**: Using multiple MAG servers so you can dynamically change the configuration during runtime. Note: The backend servers must have a version of the product that supports dynamic configuration. - -## Documentation - -For more documentation and API references, go to our [main website][docs] - ## License Copyright (c) 2016 CA. All rights reserved. @@ -146,13 +43,13 @@ Copyright (c) 2016 CA. All rights reserved. This software may be modified and distributed under the terms of the MIT license. See the [LICENSE][license-link] file for details. - [mag]: https://docops.ca.com/mag - [mas.ca.com]: http://mas.ca.com/ - [get-started]: http://mas.ca.com/get-started/ - [docs]: http://mas.ca.com/docs/ - [blog]: http://mas.ca.com/blog/ - [videos]: https://www.ca.com/us/developers/mas/videos.html - [StackOverflow]: http://stackoverflow.com/questions/tagged/massdk - [download]: https://github.com/CAAPIM/iOS-MAS-Foundation/archive/master.zip - [contributing]: https://github.com/CAAPIM/iOS-MAS-Foundation/blob/develop/CONTRIBUTING.md - [license-link]: /LICENSE +[mag]: https://docops.ca.com/mag +[mas.ca.com]: http://mas.ca.com/ +[get-started]: http://mas.ca.com/get-started/ +[docs]: http://mas.ca.com/docs/ +[blog]: http://mas.ca.com/blog/ +[videos]: https://www.ca.com/us/developers/mas/videos.html +[StackOverflow]: http://stackoverflow.com/questions/tagged/massdk +[download]: https://github.com/CAAPIM/iOS-MAS-Foundation/archive/master.zip +[contributing]: https://github.com/CAAPIM/iOS-MAS-Foundation/blob/develop/CONTRIBUTING.md +[license-link]: /LICENSE From 2652e336ca5980b5a4b10875dd6d7135499df67d Mon Sep 17 00:00:00 2001 From: McKercher Date: Tue, 24 Oct 2017 12:29:14 -0700 Subject: [PATCH 2/2] Added back installation for Cocoapods. --- README.md | 123 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 113 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ba39f5ff..abc786b3 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,109 @@ The MASFoundation framework has the following features: Contributions are welcome and much appreciated. To learn more, see the [Contribution Guidelines][contributing]. +## Installation + +MASFoundation supports multiple methods for installing the library in a project. + +### Cocoapods (Podfile) Install + +To integrate MASFoundation into your Xcode project using CocoaPods, specify it in your **Podfile:** + +``` +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '9.0' + +pod 'MASFoundation' +``` +Then, run the following command using the command prompt from the folder of your project: + +``` +$ pod install +``` + +### Manual Install + +For manual install, you add the Mobile SDK to your Xcode project. Note that you must add the MASFoundation library. For complete MAS functionality, install all of the MAS libraries as shown. + +1. Open your project in Xcode. +2. Drag the SDK library files, and drop them into your project in the left navigator panel in Xcode. Select the option, `Copy items if needed`. +3. Select `File->Add files to 'project name'` and add the msso_config.json file from your project folder. +4. In Xcode "Build Setting” of your Project Target, add `-ObjC` for `Other Linker Flags`. +5. Import the following Mobile SDK library header file to the classes or to the .pch file if your project has one. + +``` +#import +``` + +## Set Up Project and Start the SDK + +The following ***video*** describes how to set up the project and start the Mobile SDK. + +[![IMAGE ALT TEXT](http://img.youtube.com/vi/h95MF55Uuuw/0.jpg)](http://www.youtube.com/watch?v=h95MF55Uuuw "Starting the SDK") + +After your project is properly configured, you must start the SDK to establish a secure connection with the backend services. The startup process includes: initialize necessary services for library (such as geo-location, BLE, and network services), and load configuration. + +Ideally, SDK startup should be processed before app startup (during the splash/loading screen of your app). We recommended that you process any communication with the backend services upon successful completion of the startup method. Otherwise, the secure communication is not guaranteed and may fail. + +MASFoundation includes the following methods to start the SDK. + +##### Start with standard method +```objectivec + //Initializing the SDK. + [MAS start:^(BOOL completion, NSError *error) { + //Your code here! + }]; +``` +This method starts the SDK with the currently-active configuration. A currently-active configuration is: 1) the last successfully used configuration, 2) the default JSON configuration file (i.e. msso_config.json in your app bundle) or 3) the custom JSON configuration file defined in `[MAS setConfigurationFileName:]`. + +**Recommended for**: Most environments, including production. + +##### Start with default configuration +```objectivec + //Initializing the SDK. + [MAS startWithDefaultConfiguration:YES completion:^(BOOL completed, NSError *error) + //Your code here! + }]; +``` +This method starts the SDK with the currently-active configuration, or the default configuration (depending on the parameter). If you specify the `YES` parameter, this overwrites the currently-active configuration with the default configuration (if two configurations are different.). If you pass the `NO` parameter, this behaves the same as `[MAS start:];`. If the SDK is already started, this method: stops the SDK, then restarts it with the custom JSON object. + +**Recommended for**: Development environments where configurations change often. + +##### Start using custom JSON +```objectivec + //Your custom JSON object. + NSDictionary *jsonObject = @{....}; + + //Initializing the SDK with custom JSON object. + [MAS startWithJSON: jsonObject completion:^(BOOL completed, NSError *error) { + //Your code here! + }]; +``` +This method starts the SDK using the custom JSON object in, NSDictionary. This method overwrites the currently-active configuration with the custom JSON object, and stores it as the active configuration. If the SDK is already started, this method: stops SDK, then it restarts it with the custom JSON object. + +**Recommended for**: Using multiple MAG servers so you can dynamically change the configuration during runtime. Note: The backend servers must have a version of the product that supports dynamic configuration. + +##### Start using file URL +```objectivec + NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"your_file_name" + ofType:@"json"]; + NSURL *thisURL = [NSURL fileURLWithPath:jsonPath]; + + //Initializing the SDK with file URL of JSON configuration. + [MAS startWithURL:thisURL completion:^(BOOL completed, NSError *error) { + //Your code here! + }]; +``` +This method starts the SDK using the custom JSON configuration file. The custom file can be defined in NSURL format, which indicates the path of the custom file. This method overwrites the currently-active configuration with the custom JSON file, and stores it as the active configuration. If the SDK is already started, this method: stops the SDK, then restarts it with the custom JSON file. + +The SDK accepts the NSURL only with __local file path__. If the Web URL is provided, the startup method fails. + +**Recommended for**: Using multiple MAG servers so you can dynamically change the configuration during runtime. Note: The backend servers must have a version of the product that supports dynamic configuration. + +## Documentation + +For more documentation and API references, go to our [main website][docs] + ## License Copyright (c) 2016 CA. All rights reserved. @@ -43,13 +146,13 @@ Copyright (c) 2016 CA. All rights reserved. This software may be modified and distributed under the terms of the MIT license. See the [LICENSE][license-link] file for details. -[mag]: https://docops.ca.com/mag -[mas.ca.com]: http://mas.ca.com/ -[get-started]: http://mas.ca.com/get-started/ -[docs]: http://mas.ca.com/docs/ -[blog]: http://mas.ca.com/blog/ -[videos]: https://www.ca.com/us/developers/mas/videos.html -[StackOverflow]: http://stackoverflow.com/questions/tagged/massdk -[download]: https://github.com/CAAPIM/iOS-MAS-Foundation/archive/master.zip -[contributing]: https://github.com/CAAPIM/iOS-MAS-Foundation/blob/develop/CONTRIBUTING.md -[license-link]: /LICENSE + [mag]: https://docops.ca.com/mag + [mas.ca.com]: http://mas.ca.com/ + [get-started]: http://mas.ca.com/get-started/ + [docs]: http://mas.ca.com/docs/ + [blog]: http://mas.ca.com/blog/ + [videos]: https://www.ca.com/us/developers/mas/videos.html + [StackOverflow]: http://stackoverflow.com/questions/tagged/massdk + [download]: https://github.com/CAAPIM/iOS-MAS-Foundation/archive/master.zip + [contributing]: https://github.com/CAAPIM/iOS-MAS-Foundation/blob/develop/CONTRIBUTING.md + [license-link]: /LICENSE