You've already forked FinalYearProject-MyMind
mirror of
https://github.com/MrLyallCSIT/FinalYearProject-MyMind.git
synced 2026-01-17 22:59:41 +00:00
File Organisation
Includes addition of Individual Project Coursework Documents
This commit is contained in:
|
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"EmergencyContacts" : {
|
||||
"samaritans" : {
|
||||
"name": "Samaritans",
|
||||
"number": "08457909090"
|
||||
},
|
||||
"saneline": {
|
||||
"name": "SANELINE",
|
||||
"number": "08457678000"
|
||||
},
|
||||
"fwdthink" : {
|
||||
"name": "Forward Thinking Birmingham",
|
||||
"number": "03003000099"
|
||||
},
|
||||
|
||||
"bsmhft": {
|
||||
"name": "Birmingham and Solihull Mental Health Foundation Trust",
|
||||
"number": "01213010000"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
\chapter{Project Specification}
|
||||
Summary of the project outline.
|
||||
|
||||
\section{Functional Requirements}
|
||||
some text here
|
||||
|
||||
\section{Non-Functional Requirements}
|
||||
some text here
|
||||
|
||||
\chapter{Project Management}
|
||||
Discussion on how the project was managed. What things impacted the success of the project. How does the continually revised versions of the project plan compare to the initial draft developed at the start of the project. Did everything run according to schedule. What impact did elements such as exams \& coursework have on the project.
|
||||
|
||||
Professor Randy Pausch is well known for his contribution to the Alice 3D environment as well as lectures on Time Management and Fulfilling your Childhood Dreams. Both of these lectures are well worth watching, as such \cite{online:Doolan:2015:PauschLecture} outlines the main elements of both lectures, the post features a number of links allowing one to jump to particular segments of interest in the video lectures. Another post \cite{online:Doolan:2016:SchwarzeneggerInterview} highlights the key elements of success in the form of Goals, Confidence and Time Management. The post once again summarizes and provides links to the key elements of a video interview with Arnold Schwarzenegger.
|
||||
|
||||
\chapter{Another Appendix}
|
||||
|
||||
This appendix makes use of the \emph{rotating} package to rotate both figures and tables ninety degrees allowing for large datasets and illustrations to be represented.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=.9\linewidth]{appendix/images/TemplateStructure.pdf}
|
||||
\caption{Thesis Template Folder and \latex File Structure}
|
||||
\label{fig:append:TemplateStructure}
|
||||
\end{figure}
|
||||
|
||||
\begin{sidewaystable}
|
||||
\begin{center}
|
||||
\begin{tabular}{llllllllll}
|
||||
\toprule
|
||||
\textbf{Heading 1} & \textbf{Heading 2} & \textbf{Heading 3} & \textbf{Heading 4} & \textbf{Heading 5} & \textbf{Heading 6} & \textbf{Heading 7} & \textbf{Heading 8} & \textbf{Heading 9} & \textbf{Heading 10} \cr
|
||||
\midrule
|
||||
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
|
||||
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
|
||||
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
|
||||
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
|
||||
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
|
||||
aaaa & bbbb & cccc & dddd & eeee & ffff & gggg & hhhh & iiii & jjjj \cr
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\caption[A Short Caption for the Table]{
|
||||
A much longer caption that will not be listed in the list of tables page.
|
||||
}
|
||||
\label{tab:sidewaysTable}
|
||||
\end{center}
|
||||
\end{sidewaystable}
|
||||
|
||||
\begin{sidewaysfigure}
|
||||
\centerline{\includegraphics[width=7in]{appendix/images/samplepng}}
|
||||
\caption[A Sideways Figure]{
|
||||
A much longer caption that will not be listed in the list of figures page.
|
||||
}
|
||||
\label{fig:sidewaysFigure}
|
||||
\end{sidewaysfigure}
|
||||
|
||||
\chapter{Presentation Slides}
|
||||
One can readily prepare presentation slides using PowerPoint or Keynote. Saving / Exporting the slides as a pdf document allows for it to be easily incorporated into this template. Each slide will be scaled to 0.45 of the \textbackslash textwidth, individual pages of the file can be accessed via the page=x option of \textbackslash includegraphics.
|
||||
|
||||
|
||||
\begin{figure}[H]
|
||||
\parbox{74.mm}{
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth,page=1]{appendix/images/PresentationSlides}
|
||||
\caption*{Slide 1}
|
||||
}
|
||||
\parbox{74.mm}{
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth,page=2]{appendix/images/PresentationSlides}
|
||||
\caption*{Slide 2}
|
||||
}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\parbox{74.mm}{
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth,page=3]{appendix/images/PresentationSlides}
|
||||
\caption*{Slide 3}
|
||||
}
|
||||
\parbox{74.mm}{
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth,page=4]{appendix/images/PresentationSlides}
|
||||
\caption*{Slide 4}
|
||||
}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\parbox{74.mm}{
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth,page=5]{appendix/images/PresentationSlides}
|
||||
\caption*{Slide 5}
|
||||
}
|
||||
\parbox{74.mm}{
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth,page=6]{appendix/images/PresentationSlides}
|
||||
\caption*{Slide 6}
|
||||
}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\parbox{74.mm}{
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth,page=7]{appendix/images/PresentationSlides}
|
||||
\caption*{Slide 7}
|
||||
}
|
||||
\parbox{74.mm}{
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth,page=8]{appendix/images/PresentationSlides}
|
||||
\caption*{Slide 8}
|
||||
}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\parbox{74.mm}{
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth,page=9]{appendix/images/PresentationSlides}
|
||||
\caption*{Slide 9}
|
||||
}
|
||||
\parbox{74.mm}{
|
||||
\centering
|
||||
\includegraphics[width=0.45\textwidth,page=10]{appendix/images/PresentationSlides}
|
||||
\caption*{Slide 10}
|
||||
}
|
||||
\end{figure}
|
||||
|
||||
\chapter{Project Log}
|
||||
|
||||
The following is a weekly summary of the work carried during the development of this body of work. It covers tasks that were completed, tutorials that were worked through, articles that were read and summaries of discussions / meetings held with the project supervisor and other third parties.
|
||||
|
||||
\section*{Week Beginning: Monday 26/09/2016}
|
||||
|
||||
First week working on the project. Had a meeting with supervisor and discussed some of the issues related to the project. The first deliverable is due for the end of next week (project outline \& ethics form).
|
||||
|
||||
\begin{itemize}
|
||||
\item Downloaded and Installed \latex (MikTeX full install) \& Winshell.
|
||||
\item Started to get to grips with the \latex system by making simple modifications to the template and editing the project log.
|
||||
\item Developed a Mind Map to clarify understanding of project elements.
|
||||
\item Prepared an initial draft of project plan in the form of a Gantt chart.
|
||||
\item Prepared and revised draft of project proposal \& filled in ethics form.
|
||||
\item Downloaded and read half a dozen BSc Reports to see the general format and expected content.
|
||||
\item Started learning how to use some API's needed for the project.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 160 KiB |
@@ -1,9 +0,0 @@
|
||||
\chapter{Background Research}\label{ch:Background}
|
||||
|
||||
This chapter provides some background research on the project and examines some previous work.
|
||||
|
||||
\section{Conclusions}
|
||||
|
||||
The main conclusions for this chapter.
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 200 KiB |
@@ -1,11 +0,0 @@
|
||||
\chapter{Conclusion}\label{ch:Conclusion}
|
||||
|
||||
This chapter summarises the main positive outcomes and conclusions resulting from this body of work. One can explore the overall journey, problems encountered and solutions found. Of key importance is the ``Future Work'' section highlighting how the product may be further developed with new and improved features, futher resources and time.
|
||||
|
||||
\section{Conclusions}
|
||||
|
||||
The main conclusions that may be drawn from the body of work.
|
||||
|
||||
\section{Future Work}
|
||||
|
||||
Further development that could be carried out in the future.
|
||||
@@ -1,9 +0,0 @@
|
||||
\chapter{Design}\label{ch:Design}
|
||||
|
||||
This chapter examines the design of the project.
|
||||
|
||||
\section{Conclusions}
|
||||
|
||||
The main conclusions for this chapter.
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
\chapter{Evaluation \& Testing}\label{ch:Evaluation}
|
||||
|
||||
This chapter evaluates the overall project and provides results of tests carried out.
|
||||
|
||||
\section{Conclusions}
|
||||
|
||||
The main conclusions for this chapter.
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
\chapter{Implementation}\label{ch:Implementation}
|
||||
|
||||
This chapter examines the implementation of the project.
|
||||
|
||||
\section{Conclusions}
|
||||
|
||||
The main conclusions for this chapter.
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
\beforeabstract
|
||||
\prefacesection{Abstract}
|
||||
The Abstract of the report should be written here, it should provide a short summary of the work encompassing no more than one page.
|
||||
|
||||
\prefacesection{Acknowledgements}
|
||||
The Acknowledgements section may be used to thank your supervisor, family, research funding bodies, or any other applicable individuals or institutions.
|
||||
|
||||
\afterpreface \afterabstract
|
||||
@@ -1,42 +0,0 @@
|
||||
\chapter{Introduction}
|
||||
\pagenumbering{arabic} \setcounter{page}{1}
|
||||
|
||||
A short paragraph introducing the topic the chapter examines.
|
||||
|
||||
|
||||
\section{Background}
|
||||
|
||||
A number of pages about the background of the project.
|
||||
|
||||
\section{About this Thesis}
|
||||
This is the report of \emph{\authorName}, submitted as part of the requirements for the degree of \degreeAward at the School of Computing and Digital Technology, Birmingham City University, Birmingham, UK..
|
||||
|
||||
A number of paragraphs detailing the main expectations of this body of work.
|
||||
|
||||
|
||||
\section{Chapter List}
|
||||
Provide a list of all the chapters within the report and a brief summary of the content. Ensure each summary avoids having a repetitive structure such as starting with ``This chapter deals with''.
|
||||
|
||||
\textbf{Chapter \ref{ch:usingLatex}} Using \LaTeX. This chapter
|
||||
deals with how to use the \LaTeX \space system.
|
||||
|
||||
\textbf{Chapter \ref{ch:litReview}} Literature Review. This chapter
|
||||
deals with $\ldots$.
|
||||
|
||||
\textbf{Chapter \ref{ch:Background}} Background Research. This chapter
|
||||
deals with $\ldots$.
|
||||
|
||||
\textbf{Chapter \ref{ch:Design}} Design. This chapter
|
||||
deals with $\ldots$.
|
||||
|
||||
\textbf{Chapter \ref{ch:Implementation}} Implementation. This chapter
|
||||
deals with $\ldots$.
|
||||
|
||||
\textbf{Chapter \ref{ch:Evaluation}} Evaluation \& Testing. This chapter
|
||||
deals with $\ldots$.
|
||||
|
||||
\textbf{Chapter \ref{ch:Conclusion}} Conclusion. The conclusions of the report are presented.
|
||||
|
||||
|
||||
\section{Conclusion}
|
||||
A short conclusion summarising the chapter.
|
||||
@@ -1,21 +0,0 @@
|
||||
\chapter{Literature Review}\label{ch:litReview}
|
||||
|
||||
This chapter provides a comprehensive review of the most relevant literature in the field showing how it feeds into the product being delivered. IEEExplore, Google Scholar and the ACM Digital Library are examples of useful data sources that may be queried as part of the review process. \cite{online:Doolan:2016:AcademicResources} provides links to these and other resources.
|
||||
|
||||
\section{Introduction}
|
||||
|
||||
|
||||
\section{Key Topic Area 1}
|
||||
|
||||
|
||||
\section{Key Topic Area 2}
|
||||
|
||||
|
||||
\section{Key Topic Area 3}
|
||||
|
||||
|
||||
\section{Conclusions}
|
||||
|
||||
The main conclusions of the chapter.
|
||||
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
\NeedsTeXFormat{LaTeX2e} \ProvidesClass{template}
|
||||
|
||||
\RequirePackage{setspace}
|
||||
|
||||
\LoadClass[11pt, a4paper]{report}
|
||||
|
||||
|
||||
|
||||
\brokenpenalty=10000
|
||||
|
||||
\onehalfspacing
|
||||
|
||||
\def\degreetitle#1{\gdef\@degreetitle{#1}}
|
||||
\def\rpttype#1{\gdef\@rpttype{#1}}
|
||||
|
||||
\def\principaladviser#1{\gdef\@principaladviser{#1}}
|
||||
\def\advis@r{Advisor} % default spelling---we are English!
|
||||
\def\principaladvisor#1{\gdef\@principaladviser{#1}\gdef\advis@r{Advisor}}
|
||||
\def\submitdate#1{\gdef\@submitdate{#1}}
|
||||
\def\copyrightyear#1{\gdef\@copyrightyear{#1}}
|
||||
\def\@title{}\def\@author{}\def\@dept{School of Computing and Digital Technology}
|
||||
|
||||
\def\@submitdate{\ifcase\the\month\or
|
||||
January\or February\or March\or April\or May\or June\or
|
||||
July\or August\or September\or October\or November\or December\fi
|
||||
\space \number\the\year}
|
||||
|
||||
\newif\ifcopyright \newif\iffigurespage \newif\iftablespage \newif\ifalgorithmspage \newif\ifsigpage \copyrightfalse \figurespagetrue \tablespagetrue \algorithmspagefalse \sigpagefalse
|
||||
|
||||
\def\titlep{%
|
||||
\thispagestyle{empty}%
|
||||
\null\vskip1in%
|
||||
\begin{center}
|
||||
\large\sc\expandafter{\@title}\\
|
||||
\vskip 0.25in
|
||||
{\Large \@author}
|
||||
\vskip 0.45in
|
||||
\includegraphics[height=40mm]{bculogo.jpg}
|
||||
\vfill
|
||||
\vskip 0.25in
|
||||
\sc A report submitted as part of the requirements \\for the degree of
|
||||
\@degreetitle
|
||||
\\ at the \@dept \\Birmingham City University, Birmingham, UK
|
||||
\vfill
|
||||
\vskip 0.5in
|
||||
\@submitdate
|
||||
\vfill
|
||||
\normalfont
|
||||
Supervisor \@principaladviser\\
|
||||
\end{center}\vskip.5in\newpage}
|
||||
|
||||
\def\declpage{%
|
||||
\prefacesection{Declaration}
|
||||
\begin{center}
|
||||
\begin{minipage}{4.5in}
|
||||
\parindent=0pt
|
||||
I confirm that the work contained in this \@rpttype \space project report has been composed solely by myself and has not been accepted in any previous application for a degree. All sources of information have been specifically acknowledged and all verbatim extracts are distinguished by quotation marks.
|
||||
\par
|
||||
\vskip 2in
|
||||
Signed ............................................ \hspace{0.5 in} Date ......................\\
|
||||
\hspace*{0.4 in} \@author
|
||||
\par
|
||||
\end{minipage}%
|
||||
\end{center}%
|
||||
\vfill}
|
||||
|
||||
\def\beforeabstract{
|
||||
\pagenumbering{roman}
|
||||
\pagestyle{plain}
|
||||
\titlep
|
||||
\ifsigpage\signaturepage\fi
|
||||
|
||||
|
||||
\def\afterabstract{
|
||||
%% \newpage
|
||||
\declpage
|
||||
|
||||
\tableofcontents
|
||||
\newpage
|
||||
\iftablespage
|
||||
\addvspace{10pt}
|
||||
\listoftables
|
||||
\newpage
|
||||
\fi
|
||||
\iffigurespage
|
||||
\addvspace{10pt}
|
||||
\listoffigures
|
||||
\newpage
|
||||
\fi
|
||||
\ifalgorithmspage
|
||||
\addvspace{10pt}
|
||||
\listofalgorithms
|
||||
\newpage
|
||||
\fi}
|
||||
|
||||
}
|
||||
|
||||
\def\prefacesection#1{%
|
||||
\chapter*{#1}
|
||||
\addcontentsline{toc}{chapter}{#1}}
|
||||
|
||||
\def\afterpreface{\newpage
|
||||
\pagestyle{plain}}
|
||||
|
||||
\pagestyle{plain}
|
||||
|
||||
\def\thebibliography#1{\chapter*{\bibname\@mkboth
|
||||
{\uppercase{\bibname}}{\uppercase{\bibname}}}%
|
||||
\addcontentsline{toc}{chapter}{\bibname}%
|
||||
\list
|
||||
{\@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{\@biblabel{#1}}%
|
||||
\leftmargin\labelwidth
|
||||
\advance\leftmargin\labelsep
|
||||
\usecounter{enumiv}%
|
||||
\let\p@enumiv\@empty
|
||||
\def\theenumiv{\arabic{enumiv}}}%
|
||||
\def\newblock{\hskip .11em plus.33em minus.07em}%
|
||||
\sloppy\clubpenalty4000\widowpenalty4000
|
||||
\sfcode`\.=\@m}
|
||||
|
||||
\def\endthebibliography{%
|
||||
\def\@noitemerr{\@warning{Empty `thebibliography' environment}}%
|
||||
\endlist}
|
||||
@@ -1,118 +0,0 @@
|
||||
@mastersthesis{msc:Shannon:1940,
|
||||
author = {Claude Shannon},
|
||||
school = {Massachusetts Institute of Technology},
|
||||
title = {A symbolic Analysis of Relay and Switching Circuits},
|
||||
type = {MSc Thesis},
|
||||
url = {https://dspace.mit.edu/handle/1721.1/11173},
|
||||
year = {1940},
|
||||
}
|
||||
|
||||
@phdthesis{phd:Sutherland:1963,
|
||||
author = {Ivan Edward Sutherland},
|
||||
school = {Massachusetts Institute of Technology},
|
||||
title = {Sketchpad, A Man-machine Graphical Communication System},
|
||||
type = {PhD Thesis},
|
||||
url = {https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-574.pdf},
|
||||
year = {1963},
|
||||
}
|
||||
|
||||
@online{online:berkeleyBOINC,
|
||||
author = {{Berkeley University}},
|
||||
title = {Berkeley Open Infractructure for Network Computing},
|
||||
year = {2016},
|
||||
url = {http://boinc.berkeley.edu/},
|
||||
urldate = {2016-11-28},
|
||||
}
|
||||
|
||||
@online{online:Fear2016BookTabs,
|
||||
author = {Simon Fear},
|
||||
title = {Publication Quality Tables in \LaTeX},
|
||||
year = {2016},
|
||||
url = {https://www.ctan.org/pkg/booktabs?lang=en},
|
||||
urldate = {2016-04-29},
|
||||
}
|
||||
|
||||
@online{online:Fiorio2016algorithm2e,
|
||||
author = {Christophe Fiorio},
|
||||
title = {Algorithm2e.sty - package for algorithms},
|
||||
year = {2016},
|
||||
url = {https://www.ctan.org/pkg/algorithm2e?lang=en},
|
||||
urldate = {2015-10-19},
|
||||
}
|
||||
|
||||
@online{online:Doolan:2015:PauschLecture,
|
||||
author = {Daniel C Doolan},
|
||||
title = {Essential Viewing: Prof Randy Pausch Time Management \& The Last Lecture },
|
||||
year = {2015},
|
||||
url = {http://wp.me/p276Ky-ZN},
|
||||
urldate = {2015-09-02},
|
||||
}
|
||||
|
||||
@online{online:Doolan:2016:SchwarzeneggerInterview,
|
||||
author = {Daniel C Doolan},
|
||||
title = {Essential Viewing: Schwarzenegger Interview: Vision, Goals, Confidence and Time Management },
|
||||
year = {2016},
|
||||
url = {http://wp.me/p276Ky-17T},
|
||||
urldate = {2016-08-25},
|
||||
}
|
||||
|
||||
@online{online:Doolan:2016:AcademicResources,
|
||||
author = {Daniel C Doolan},
|
||||
title = {Useful Academic Resources - Computer Science},
|
||||
year = {2016},
|
||||
url = {https://dcdoolan.wordpress.com/useful-academic-resources-computer-science/},
|
||||
urldate = {2016-11-06},
|
||||
}
|
||||
|
||||
@online{online:Bath:2016:HarvardBathStyle,
|
||||
author = {Alex Ball},
|
||||
title = {Harvard Referencing Style as Recommended by the University of Bath Library},
|
||||
year = {2016},
|
||||
url = {http://www.bath.ac.uk/library/infoskills/referencing-plagiarism/},
|
||||
urldate = {2016-11-28},
|
||||
}
|
||||
|
||||
|
||||
@book{book:knuth_1973,
|
||||
place ={Reading, MA},
|
||||
title ={The art of computer programming},
|
||||
publisher ={Addison-Wesley},
|
||||
author ={Knuth, Donald Ervin},
|
||||
year ={1973}
|
||||
}
|
||||
|
||||
@article{art:Russell:1978:Cray1,
|
||||
author = {Russell, Richard M.},
|
||||
title = {The CRAY-1 Computer System},
|
||||
journal = {Commun. ACM},
|
||||
issue_date = {Jan. 1978},
|
||||
volume = {21},
|
||||
number = {1},
|
||||
month = jan,
|
||||
year = {1978},
|
||||
issn = {0001-0782},
|
||||
pages = {63--72},
|
||||
numpages = {10},
|
||||
url = {http://doi.acm.org/10.1145/359327.359336},
|
||||
doi = {10.1145/359327.359336},
|
||||
acmid = {359336},
|
||||
publisher = {ACM},
|
||||
address = {New York, USA},
|
||||
keywords = {architecture, computer systems},
|
||||
}
|
||||
|
||||
@inproceedings{proc:Ewald:1978:HPG,
|
||||
author = {Ewald, Robert H. and Maas, Lynn D.},
|
||||
title = {A High Performance Graphics System for the CRAY-1},
|
||||
booktitle = {Proceedings of the 5th Annual Conference on Computer Graphics and Interactive Techniques},
|
||||
series = {SIGGRAPH '78},
|
||||
year = {1978},
|
||||
pages = {76--81},
|
||||
numpages = {6},
|
||||
url = {http://doi.acm.org/10.1145/800248.807374},
|
||||
doi = {10.1145/800248.807374},
|
||||
acmid = {807374},
|
||||
publisher = {ACM},
|
||||
venue = {New York, USA},
|
||||
keywords = {CRAY-1, Computer graphics, High performance graphics system, Picture system 2},
|
||||
}
|
||||
@@ -1,163 +0,0 @@
|
||||
\documentclass{template}
|
||||
\usepackage{graphicx,parskip,appendix,float,geometry}
|
||||
|
||||
\usepackage{uarial}
|
||||
% http://tex.stackexchange.com/questions/13509/biblatex-in-a-nutshell-for-beginners
|
||||
% http://tex.stackexchange.com/questions/108605/getting-a-harvard-style-list-of-references-using-biblatex
|
||||
\geometry{
|
||||
a4paper,
|
||||
total={150mm,240mm},
|
||||
left=35mm,
|
||||
top=25mm,
|
||||
}
|
||||
|
||||
% BCU Harvard Referencing
|
||||
% http://library.bcu.ac.uk/references.pdf
|
||||
|
||||
% Citing use \autocite, \parencite, or \textcite rather than \cite.
|
||||
% http://tex.stackexchange.com/questions/102662/harvard-reference-using-biblatex
|
||||
% https://www.sharelatex.com/blog/2013/07/31/getting-started-with-biblatex.html
|
||||
% http://guides.library.yale.edu/bibtex/home
|
||||
%\usepackage[backend=bibtex, style=authoryear, firstinits=true, ]{biblatex}
|
||||
%\addbibresource{thesis.bib}
|
||||
|
||||
% Fontsizes
|
||||
% https://en.wikibooks.org/wiki/LaTeX/Fonts
|
||||
|
||||
%\AtBeginBibliography{\footnotesize}
|
||||
% \DeclareFieldFormat => Remove Quotes from article Titles
|
||||
% http://tex.stackexchange.com/questions/94089/remove-quotes-from-inbook-reference-title-with-biblatex
|
||||
%\DeclareFieldFormat[inbook,inproceedings,article,phdthesis,mastersthesis]{citetitle}{#1}
|
||||
%\DeclareFieldFormat[inbook,inproceedings,article,phdthesis,mastersthesis]{title}{#1}
|
||||
|
||||
\usepackage{natbib}
|
||||
\newcommand*{\urlprefix}{Available from: }
|
||||
\newcommand*{\urldateprefix}{Accessed }
|
||||
\bibliographystyle{bath}
|
||||
|
||||
% Documentation
|
||||
% http://mirror.switch.ch/ftp/mirror/tex/macros/latex/contrib/biblatex/doc/biblatex.pdf
|
||||
\renewcommand*\familydefault{\sfdefault}
|
||||
\usepackage[T1]{fontenc}
|
||||
|
||||
% http://tex.stackexchange.com/questions/86120/font-size-of-figure-caption-header
|
||||
\usepackage[font=small]{caption}
|
||||
|
||||
\usepackage[ruled] {algorithm2e}
|
||||
\usepackage{url,amsmath,amssymb,fancybox,listings,pdfpages,caption,multicol,datetime,rotating, booktabs}
|
||||
%\usepackage[usenames,dvipsnames]{color}
|
||||
\usepackage[pagebackref=false,pdffitwindow=true]{hyperref}
|
||||
|
||||
|
||||
|
||||
%NOTE: The hyperref usepackage should be the last \usepackage!!
|
||||
%NOTE: When pagebackref=true an error will appear at the end of compiling. press `q' to ignore
|
||||
%NOTE: Referencing Algorithms does not work if this usepackage is before the hyperref include.!!
|
||||
%NOTE: This is a comment, ignored when the document is compiled
|
||||
%NOTE: The following document configuration settings generally do not need to be modified
|
||||
%NOTE: More packages may need to be added to provide additional functionality
|
||||
|
||||
% http://tex.stackexchange.com/questions/7546/how-to-get-latex-symbol-in-document
|
||||
\newcommand{\latex}{\LaTeX\ }
|
||||
\newcommand{\authorName}{Author Full Name}
|
||||
\newcommand{\reportTitle}{Report Title}
|
||||
\newcommand{\degreeAward}{BSc in Computer Science }
|
||||
|
||||
\hypersetup{
|
||||
pdftitle = {\reportTitle},
|
||||
pdfauthor = {\authorName},
|
||||
pdfsubject = {Computer Science},
|
||||
pdfkeywords = {Comma separated list of keywords},
|
||||
colorlinks = true, anchorcolor = blue, filecolor = blue, urlcolor = blue,
|
||||
linkcolor = blue, %NOTE: change (blue) to (colIdentifier) to have links within the document in Black
|
||||
citecolor = blue, %NOTE: change (blue) to (colIdentifier) to have citation links within the document in Black
|
||||
}
|
||||
|
||||
\definecolor{colBackGrnd}{rgb}{1,1,0.8}
|
||||
\definecolor{colKeys}{rgb}{0,0,1}
|
||||
\definecolor{colIdentifier}{rgb}{0,0,0}
|
||||
\definecolor{colComments}{rgb}{0,.5,0}
|
||||
\definecolor{colString}{rgb}{0,0,1}
|
||||
\definecolor{colWhite}{rgb}{1,1,1}
|
||||
|
||||
\newcommand{\MyHookSign}{\hbox{\ensuremath\hookleftarrow}}
|
||||
|
||||
\newtheorem{Theorem}{Theorem}
|
||||
\newtheorem{Proposition}[Theorem]{Proposition}
|
||||
\newtheorem{Lemma}[Theorem]{Lemma}
|
||||
\newtheorem{Proof}[Theorem]{Proof}
|
||||
\newtheorem{Remark}[Theorem]{Remark}
|
||||
\newtheorem{Claim}[Theorem]{Claim}
|
||||
\newtheorem{Example}[Theorem]{Example}
|
||||
\newtheorem{Definition}[Theorem]{Definition}
|
||||
|
||||
%NOTE: Setup for including program listings
|
||||
\lstset{%
|
||||
float=H,
|
||||
basicstyle=\ttfamily\footnotesize,
|
||||
identifierstyle=\color{colIdentifier},
|
||||
keywordstyle=\color{colIdentifier}, %
|
||||
stringstyle=\color{colIdentifier},
|
||||
commentstyle=\color{colIdentifier}, %
|
||||
columns=flexible,
|
||||
tabsize=2,
|
||||
frame=single,
|
||||
extendedchars=true, %
|
||||
showspaces=false,
|
||||
showstringspaces=false,
|
||||
numbers=left, %
|
||||
numberstyle=\footnotesize,
|
||||
breaklines=true,
|
||||
prebreak={\space\MyHookSign},
|
||||
language=Java,
|
||||
backgroundcolor=\color{colBackGrnd},
|
||||
breakautoindent=true, %
|
||||
captionpos=b%
|
||||
} %\hypersetup{colorlinks=true, citecolor=\color{colIdentifier}}
|
||||
|
||||
\sloppy %NOTE: To ensure the Right Hand Margin is used (Especially for long URLS)
|
||||
%NOTE: END of the document configuration settings
|
||||
|
||||
\begin{document}
|
||||
|
||||
\DeclareGraphicsExtensions{.jpg,.png,.gif,.pdf}
|
||||
%NOTE: When inserting Figures if the extension of the graphic file is not provided LaTeX will automatically search
|
||||
% for the extensions declared above, in the order declared.
|
||||
|
||||
\title{\huge{\reportTitle}}
|
||||
\author{\authorName}
|
||||
\degreetitle{\degreeAward} % Replace with appropriate degree
|
||||
\rpttype{BSc} % Replace PhD / MSc / BSc.
|
||||
\principaladviser{Dr. Daniel C. Doolan}
|
||||
|
||||
\include{intro/abstract}
|
||||
\listofalgorithms %NOTE: Will generate a list of Algorithms in the Table of Contents Section
|
||||
\lstlistoflistings %NOTE: Will generate a list of Program Listings in the Table of Contents Section
|
||||
|
||||
%NOTE: Include the relative reference for each chapter to be included
|
||||
% dividing the thesis file structure into a number of directories aids development
|
||||
% format: directoryName/filename (the .tex extension is not required for the filename)
|
||||
|
||||
\include{intro/introduction}
|
||||
\include{usingLatex/usingLatex}
|
||||
\include{litreview/litreview}
|
||||
\include{background/background}
|
||||
\include{design/design}
|
||||
\include{impl/implementation}
|
||||
\include{eval/evaluation}
|
||||
\include{conclude/conclude}
|
||||
|
||||
%NOTE: reduced the size of the text for the bibliography
|
||||
%NOTE: set the style for the bibliography and display the references used within the document
|
||||
|
||||
% http://tex.stackexchange.com/questions/67153/bibliography-not-in-toc-when-using-biblatex-biber
|
||||
%\printbibliography[heading=bibintoc]
|
||||
\footnotesize
|
||||
|
||||
\addcontentsline{toc}{chapter}{Bibliography}
|
||||
\bibliography{thesis}
|
||||
|
||||
\normalsize
|
||||
\appendix
|
||||
\include{appendix/appendix}
|
||||
\end{document} %NOTE: END of document, nothing after this point
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 160 KiB |
@@ -1,9 +0,0 @@
|
||||
public void someInterestingMethod( int x ) {
|
||||
try {
|
||||
DataInputStream in = new DataInputStream(req.getInputStream());
|
||||
HttpSession session = req.getSession(true);
|
||||
//Read Input Data
|
||||
in.close();
|
||||
} catch ( Exception err ) { }
|
||||
outputStream.close();
|
||||
}
|
||||
@@ -1,192 +0,0 @@
|
||||
\chapter{Using \LaTeX}\label{ch:usingLatex}
|
||||
|
||||
By reading this chapter and comparing the generated output to the \latex code, one should be able to produce all the necessary content expected of a typeset report. Instructions regarding software installation and compilation are to be found towards the end of the chapter. As with any source code, one should first compile, it to ensure it works. This document should compile with no errors if all the necessary packages are installed. A few warning messages relating to ``Font style'' (Arial) can be ignored.
|
||||
|
||||
\section{Structure of this Template}
|
||||
|
||||
The file thesis.tex in the root of the directory (ThesisTemplate) is the main file of this template. This is the file that must be compiled to create the document. The thesis.tex document contains a lot of configuration settings. The only elements that require editing are details such as the title of the report, authors name and so forth. The only further addition to the file is to use the \emph{\textbackslash include} statement to include additional chapters in the report. One may also comment out the \emph{\textbackslash include} statements using the percentage sign (\%) to develop the report on a chapter by chapter basis. The BibTeX database thesis.bib is also included within the root. All the actual content of the report is divided up into directories each with a .tex file containing the chapter content (Appendix~\ref{fig:append:TemplateStructure}).
|
||||
|
||||
|
||||
|
||||
\section{Using Figures}
|
||||
|
||||
One can insert graphic elements using \latex in a number of ways. Vector based imagery such as diagrams saved to the pdf format may use the \emph{\textbackslash includegraphics} command with the optional \emph{viewport} attribute to specify a precise area of the graphic to be included. Figures should also include a Caption and a Label for referencing.
|
||||
|
||||
When inserting a Figure (Figure~\ref{fig:using:VectorGraphicElementPDF}) one uses the \emph{\textbackslash begin\{figure\}} and \emph{\textbackslash end\{figure\}} commands. The image presented is a vector graphic in the form of a pdf file. When working with such files it is usually necessary to include the optional \emph{viewport} attribute to designate the specific area in which to focus. The first pair of coordinates (x~\&~y) designate the pixel location of the lower left corner. The second pair identify the upper right hand corner. Modification of these coordinates allows one to focus in upon a particular area of interest within the vector image. The optional attribute [H] when beginning a Figure inserts the graphic element at the specified location. Other options such as [htb] (here, top, bottom) will place the graphic in the most suitable place that \latex can find. This however can have a negative impact on memory allocation if a large number of images exist.
|
||||
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=.4\linewidth]{usingLatex/images/VectorGraphicElementPDF.pdf}
|
||||
\caption{Vector Graphic - pdf of a PowerPoint Slide}
|
||||
\label{fig:using:VectorGraphicElementPDF}
|
||||
\end{figure}
|
||||
|
||||
One may use the \emph{minipage} command when inserting two figures to span across the page. This allows for the subdividing of the page into a number of columns of specified width. Figure~\ref{fig:using:Example1} \&~\ref{fig:using:Example2} demonstrate how one may zoom in / focus on a particular section of a graphic by altering the coordinates of the \emph{viewport}.
|
||||
|
||||
\begin{figure}[H]
|
||||
\begin{minipage}[t]{7.4cm}
|
||||
\begin{center}
|
||||
\includegraphics*[viewport= 20 20 600 440, width=.8\linewidth]{usingLatex/images/VectorGraphicElementPDF.pdf}
|
||||
\caption{viewport = 20 20 600 440}
|
||||
\label{fig:using:Example1}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}[t]{7.4cm}
|
||||
\begin{center}
|
||||
\includegraphics*[viewport= 220 200 400 330, width=.8\linewidth]{usingLatex/images/VectorGraphicElementPDF.pdf}
|
||||
\caption{viewport = 220 200 400 330}
|
||||
\label{fig:using:Example2}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\end{figure}
|
||||
|
||||
The example below (Figure~\ref{fig:using:samplepngImage}) features a bitmap image. One can see that the extension for the image file isn't specified, as this template is setup to automatically search for .jpg, .png, .gif and .pdf images. The size of the displayed image within the document can be varied by adjusting the height and width attributes. To rotate an image 90 degrees an optional attribute can be added, for example [width=.4\textbackslash linewidth, angle=90].
|
||||
|
||||
\begin{figure}[H]
|
||||
\begin{center}
|
||||
\includegraphics[width=.34\linewidth]{usingLatex/images/samplepng}
|
||||
\caption{Caption for Bitmap Image Example} \label{fig:using:samplepngImage}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
|
||||
\section{Referencing}
|
||||
|
||||
To refer to another part of the document one must use a combination of the \emph{\textbackslash ref} and \emph{\textbackslash label} commands. The label is a unique identifier, therefore when working with large documents it helps to give references meaningful names. Examples of this includes prefixing Table references with \emph{tab:}, figures with \emph{fig:}, chapters with \emph{ch:}. In very large documents in may also be useful to add an additional level of prefixing to represent the chapter the label is in. In this example chapter the tables and figures have the additional prefix of \emph{using} to represent the \emph{usingLatex} chapter. The tilde ($\sim$) is used to ensure that a reference remains as a single object. All instances of \emph{\textbackslash ref} should be preceded with the tilde.
|
||||
|
||||
\section{Citing Bibliographic References}
|
||||
|
||||
Bibliographic references are stored in a database (.bib file extension), this contains a list of articles, proceedings, books, thesis and so forth. Each type of publication has a number of required fields such as a unique identifier, author and title. To cite a reference within the main body text one must use the \emph{\textbackslash cite} and \emph{\textbackslash citep} commands as in the following examples. \cite{book:knuth_1973} for example is well known for his work on the Art of Computer Programming. The SETI@Home project \citep{online:berkeleyBOINC} is an example of a webpage citation. One can also work with articles \citep{art:Russell:1978:Cray1}, MSc Thesis \citep{msc:Shannon:1940}, PhD Thesis \citep{phd:Sutherland:1963} or articles within conference proceedings \citep{proc:Ewald:1978:HPG}. Several other types of published work exist, but they are used to a lesser degree, see the Bath University Library Style guide \citep{online:Bath:2016:HarvardBathStyle}.
|
||||
|
||||
\cite{online:Doolan:2016:AcademicResources} has provided a list of resources that may be of use to ones project in the form of links to searchable databases and \latex tools. The previous citation was generated using the \emph{\textbackslash cite\{bibEntryReference\}} command.
|
||||
|
||||
\subsection{Compiling a BibTeX Database}
|
||||
|
||||
Having initially compiled the document using pdfLatex a number of helper files are created that aid in referencing and citations. One must the compile the bibtex database, followed by an additional two compiles using pdfLatex. Citing additional bibliographic references within the body of the document being produced will require the recompile of the bibtex database. In the case that the bibtex reference of a cited article cannot be found one will see a question mark (?) instead of the proper citation and a compile warning.
|
||||
|
||||
\subsection{The Harvard Bibliography Style}
|
||||
|
||||
The bibliographic references are laid out using the Harvard referencing style. This style is generally more applicable to humanities rather than the sciences. One would typically expect to see the use of a numbered reference style in the sciences - such as IEEE or Vancouver. In \latex the Harvard style is depreciated. As such alternative solutions are to use the \emph{natbib} or \emph{biblatex} packages, these however yield references of an author, name format, but don't quite conform to a Harvard style.
|
||||
|
||||
Fortunately a Harvard style has been developed at the University of Bath \citep{online:Bath:2016:HarvardBathStyle}. It has been included in this template in the form of a file called \emph{bath.bst}, dated 24 October 2016. The style file can be downloaded as a zip file from the University of Bath Library webpage dedicated to referencing and plagiarism. The zip file includes very useful package documentation, with numerous bibtex examples alongside the resultant output.
|
||||
|
||||
\section{Inserting an Algorithm}
|
||||
|
||||
The \emph{algorithm2e} environment \citep{online:Fiorio2016algorithm2e} may be used to generate algorithms (Algorithm~\ref{alg:using:SampleAlgorithm}). If no algorithms are used within the document then comment out \emph{\textbackslash listofalgorithms } in the file {\tt thesis.tex} to remove the list of algorithms page.
|
||||
|
||||
\begin{algorithm}
|
||||
%\dontprintsemicolon
|
||||
\While{(RANK $<$ COMPSIZE)}{
|
||||
\If{(RANK == MASTER)}{
|
||||
generate random value \;
|
||||
\For{(each item K)}{
|
||||
get result \;
|
||||
}
|
||||
}
|
||||
}
|
||||
\caption{A Sample Algorithm} \label{alg:using:SampleAlgorithm}
|
||||
\end{algorithm}
|
||||
|
||||
|
||||
\section{Table Creation}
|
||||
|
||||
The data in Table~\ref{tab:using:TableExample} displays three columns of left-aligned and one column of justified data. The cell contents can be aligned to the left (l), right (r), center (c) or (p). Vertical bars may sometimes be seen in tables but these generally look unprofessional. The Booktabs package \citep{online:Fear2016BookTabs} allows for the creation of professional looking tables as shown in the example. The use of \emph{\textbackslash toprule}, \emph{\textbackslash midrule} and \emph{\textbackslash bottomrule} commands provided by the package allow for rules of varying thickness and spacing. Data elements (cells / columns) within a table are divided up using the ampersand (\&). To complete a row one must end with a double backslash (\textbackslash\textbackslash). Tables as with figures need a caption and a label. The WinShell editor has a GUI based utility to aid in the creation of the tabular data.
|
||||
|
||||
\begin{table}[H]
|
||||
\caption{Table Caption}\label{tab:using:TableExample}
|
||||
\centering
|
||||
\small
|
||||
\begin{tabular}{lllp{5cm}}
|
||||
\toprule \textbf{Heading 1}& \textbf{Heading 2}&\textbf{Heading 3}&\textbf{Heading 4}\\
|
||||
\midrule
|
||||
Cell A1 & Cell B2 & Cell C3 & Cell D4\\
|
||||
Cell E1 & Cell F2 & Cell G3 & Justified text with a defined column size of 5cm\\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section{Inserting Program Code Samples}
|
||||
|
||||
To insert small segments of program code (Listing~\ref{code:SampleCode}) that detail how interesting algorithms and so forth are implemented use the \emph{lstlisting} command. Inclusion of program code again requires a Caption and Label. Sample code from external files may also be included (Listing~\ref{code:externalSampleCodeLabel}), by supplying the relative path to the source file.
|
||||
|
||||
\begin{lstlisting}[caption=Sample Program Code Listing, label=code:SampleCode]
|
||||
if(rndVal==0){
|
||||
if(opType > 2){
|
||||
//do something
|
||||
}
|
||||
}
|
||||
\end{lstlisting}
|
||||
|
||||
\lstinputlisting[caption={The Caption for the Code Listing},label={code:externalSampleCodeLabel}]{usingLatex/myCodeFile.java}
|
||||
|
||||
|
||||
\section{Working with Maths}
|
||||
The power of \latex in typesetting mathematical formula is one of its key strengths. The mathematical definition of the ``Cantor set'' is a good example of this in action encompassed within an \emph{\textbackslash equation} environment.
|
||||
|
||||
\begin{equation}
|
||||
\displaystyle\sum_{n=0}^\infty \frac{2^n}{3^{n+1}} = \frac{1}{3} +
|
||||
\frac{2}{9} + \frac{4}{27} + \frac{8}{81} + \cdots =
|
||||
\frac{1}{3}\left(\frac{1}{1-\frac{2}{3}}\right) = 1
|
||||
\end{equation}
|
||||
The previous equation demonstrates the use of sigma, fractions, large brackets, power, and dots. The function that defines the MSet $Z_{n+1} =
|
||||
Z_{n}^2 + C$ is a simpler example of math in use within the body text of a paragraph. Matrix Multiplication is typically regarded as an $O(n^3)$
|
||||
operation. One may use the \emph{equation} environment for more complex mathematical formula that should standout. For example the product $C$ of two matrices $A \in M_{n,m}(R)$ and $B \in
|
||||
M_{m,p}(R)$ may be defined as
|
||||
|
||||
\begin{equation}
|
||||
(A \times B)_{ij} = \sum_{k=0} ^{m-1} a_{ik}b_{kj},~
|
||||
i=0,...,n-1,~j=0,...,p-1.
|
||||
\end{equation}
|
||||
|
||||
The sizes of the matrices must satisfy $(n \times m)(m \times p) =
|
||||
(n \times p)$. Matrix multiplication is an associative process
|
||||
thereby $a\cdot(b \cdot c) = (a \cdot b) \cdot c$. Essentially to
|
||||
find the value of a particular cell $C_{i,j}$ it is necessary to
|
||||
multiply row $i$ of the matrix $A$ with column $j$ of matrix $B$
|
||||
summing all the multiplications.
|
||||
|
||||
\section{Using the Correct Quotes}
|
||||
To surround a piece of text with double quotes one must place two single quotes on either side of the text. The double quote on the left is created using two left quotes (\lq) this is located just above the \emph{tab} key on the keyboard. The right hand double quote is created using two right hand quotes via (\rq) located just above and to the left of the right shift key. A properly formatted quotation should look like ``This is a quotation''. Notice how the direction of the quotes are opposite to one another. A larger example using the \emph{\textbackslash Huge} font size option, is presented below so the quotes can be clearly seen.
|
||||
|
||||
\begin{center}
|
||||
\Huge{``This is a quotation''}
|
||||
\end{center}
|
||||
|
||||
|
||||
\section{Start Compiling and Editing}
|
||||
\begin{enumerate}
|
||||
\item Read the instructions in this file thesisTemplate.pdf, compare the code in the file usingLatex.tex to that of the resultant output of the Using \latex chapter.
|
||||
|
||||
\item Download and install the necessary software - back-end \latex system and front-end text editor.
|
||||
|
||||
\item Compile the files thesis.tex and thesis.bib to generate the file thesis.pdf so that it is identical to file thesisTemplate.pdf.
|
||||
\begin{enumerate}
|
||||
\item To achieve this compile with pdfLaTeX, then run BibTeX and compile with pdfLaTeX two further times.
|
||||
|
||||
\item It is only necessary to run BibTeX when new citations are added in the thesis document.
|
||||
|
||||
\item Two compiles of pdfLaTeX is sufficient to allow for correct references to be established.
|
||||
|
||||
\item If one is simply adding additional content (text / figures / tables) then a single compile of pdfLaTeX is sufficient for testing purposes.
|
||||
\end{enumerate}
|
||||
\item Note that quite a number of additional files may now be seen in the root and subfolders of the (ThesisTemplate) directory.
|
||||
|
||||
\item With a successful compile achieved, start reading through the \latex documents (.tex) to see how the various elements are assembled.
|
||||
|
||||
\item Begin editing the document starting with thesis.tex by entering elements such as Thesis Title and Author.
|
||||
|
||||
\item When it is necessary to start inserting figures / tables and so forth, copy and paste the \latex code provided and edit as necessary.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection{Required Software}
|
||||
The implementation of \latex typically used is MikTeX (\url{http://miktex.org}). It is typically best to install the complete MiKTeX system. A complete system comprises of around 40K files. A minimal install will necessitate the installation of packages as needed. One can individually download and integrate packages into a MikTeX system using the Package Manager (Admin) application. Initially a small installer application must be downloaded and executed. This in-turn downloads the most recent implementation of the MikTeX system. Run the installer again and select the directory of the downloaded package. The MacTeX distribution (\url{http://www.tug.org/mactex/}) is a useful alternative for Mac users.
|
||||
|
||||
The other necessary element is an editor. TeXnicCenter is a free download available at (\url{http://sourceforge.net/projects/texniccenter/}). An alternative is WinEdt a shareware ASCII editor (\url{http://www.winedt.com}). WinEdt can be freely used for a 30 day period, after which one will periodically receive reminders to register the product. Another option for Windows users is WinShell (\url{http://www.winshell.de}). An advantage of WinShell is its in-built BibTeX GUI editor. It also features a useful Table Wizard. For Mac users TexShop (\url{http://pages.uoregon.edu/koch/texshop/}) is a popular option, providing a very easy to use editor. Note the website links in this section were created using the \emph{\textbackslash url} command and included for ease of reference. One should ideally include such references in the Bibliography.
|
||||
|
||||
\section{Conclusion}
|
||||
Having read this chapter and compared the .tex source to the generated output, one should have all the knowledge necessary to typeset a well formatted and elegant project report. One needs to become familiar with a number of commands, but once mastered it should greatly speedup the report writing process. By using \latex to typeset a document one is removed from a myriad of issues in relation to formatting allowing one to concentrate on the most important task, that of content creation.
|
||||
@@ -1,770 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 48;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
5F3156141E8EE8670010FE7D /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D6F1E8DB2F100BCE63D /* libsqlite3.tbd */; };
|
||||
5F3156151E8EE8670010FE7D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D701E8DB2F100BCE63D /* libz.tbd */; };
|
||||
5F5A1D291E8DB0F300BCE63D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A1D281E8DB0F300BCE63D /* AppDelegate.swift */; };
|
||||
5F5A1D2E1E8DB0F300BCE63D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5F5A1D2C1E8DB0F300BCE63D /* Main.storyboard */; };
|
||||
5F5A1D301E8DB0F300BCE63D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5F5A1D2F1E8DB0F300BCE63D /* Assets.xcassets */; };
|
||||
5F5A1D331E8DB0F300BCE63D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5F5A1D311E8DB0F300BCE63D /* LaunchScreen.storyboard */; };
|
||||
5F5A1D3E1E8DB0F300BCE63D /* My_MindTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A1D3D1E8DB0F300BCE63D /* My_MindTests.swift */; };
|
||||
5F5A1D491E8DB0F300BCE63D /* My_MindUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A1D481E8DB0F300BCE63D /* My_MindUITests.swift */; };
|
||||
5F5A1D571E8DB24C00BCE63D /* Sdk in Resources */ = {isa = PBXBuildFile; fileRef = 5F5A1D561E8DB24C00BCE63D /* Sdk */; };
|
||||
5F5A1D5D1E8DB26200BCE63D /* AWSCognitoIdentityProvider.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D581E8DB26200BCE63D /* AWSCognitoIdentityProvider.framework */; };
|
||||
5F5A1D5E1E8DB26200BCE63D /* AWSCognitoIdentityProvider.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D581E8DB26200BCE63D /* AWSCognitoIdentityProvider.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
5F5A1D5F1E8DB26200BCE63D /* AWSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D591E8DB26200BCE63D /* AWSCore.framework */; };
|
||||
5F5A1D601E8DB26200BCE63D /* AWSCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D591E8DB26200BCE63D /* AWSCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
5F5A1D611E8DB26200BCE63D /* AWSPinpoint.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D5A1E8DB26200BCE63D /* AWSPinpoint.framework */; };
|
||||
5F5A1D621E8DB26200BCE63D /* AWSPinpoint.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D5A1E8DB26200BCE63D /* AWSPinpoint.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
5F5A1D631E8DB26200BCE63D /* AWSS3.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D5B1E8DB26200BCE63D /* AWSS3.framework */; };
|
||||
5F5A1D641E8DB26200BCE63D /* AWSS3.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D5B1E8DB26200BCE63D /* AWSS3.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
5F5A1D6B1E8DB2A300BCE63D /* AWSConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A1D681E8DB2A300BCE63D /* AWSConfiguration.swift */; };
|
||||
5F5A1D6C1E8DB2A300BCE63D /* AWSMobileClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A1D691E8DB2A300BCE63D /* AWSMobileClient.swift */; };
|
||||
5F5A1D6D1E8DB2A300BCE63D /* AWSMobileHubHelper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5A1D6A1E8DB2A300BCE63D /* AWSMobileHubHelper.framework */; };
|
||||
5FDAA1351E946EDE00FF80D4 /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FDAA1341E946EDE00FF80D4 /* TabBarController.swift */; };
|
||||
5FF72FEF1E8DDECA00FFD64D /* SignInViewControllerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF72FE81E8DDECA00FFD64D /* SignInViewControllerExtensions.swift */; };
|
||||
5FF72FF01E8DDECA00FFD64D /* UserPoolForgotPasswordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF72FE91E8DDECA00FFD64D /* UserPoolForgotPasswordViewController.swift */; };
|
||||
5FF72FF11E8DDECA00FFD64D /* UserPoolMFAViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF72FEA1E8DDECA00FFD64D /* UserPoolMFAViewController.swift */; };
|
||||
5FF72FF21E8DDECA00FFD64D /* UserPoolNewPasswordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF72FEB1E8DDECA00FFD64D /* UserPoolNewPasswordViewController.swift */; };
|
||||
5FF72FF41E8DDECA00FFD64D /* UserPoolSignUpConfirmationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF72FED1E8DDECA00FFD64D /* UserPoolSignUpConfirmationViewController.swift */; };
|
||||
5FF72FF51E8DDECA00FFD64D /* UserPoolSignUpViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF72FEE1E8DDECA00FFD64D /* UserPoolSignUpViewController.swift */; };
|
||||
5FF9721B1E8DBA98007AE280 /* OnBoardingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF9721A1E8DBA98007AE280 /* OnBoardingController.swift */; };
|
||||
5FF9721E1E8DBAC3007AE280 /* WelcomeScreenOne.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF9721D1E8DBAC3007AE280 /* WelcomeScreenOne.swift */; };
|
||||
5FF972201E8DBAD9007AE280 /* WelcomeScreenTwo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF9721F1E8DBAD9007AE280 /* WelcomeScreenTwo.swift */; };
|
||||
5FF972221E8DBAE1007AE280 /* WelcomeScreenThree.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF972211E8DBAE1007AE280 /* WelcomeScreenThree.swift */; };
|
||||
5FF972281E8DC9F3007AE280 /* ForumView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF972271E8DC9F3007AE280 /* ForumView.swift */; };
|
||||
5FF9722A1E8DCE83007AE280 /* UserViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF972291E8DCE83007AE280 /* UserViews.swift */; };
|
||||
5FF9722D1E8DCEA7007AE280 /* SignUpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF9722C1E8DCEA7007AE280 /* SignUpView.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
5F5A1D3A1E8DB0F300BCE63D /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 5F5A1D1D1E8DB0F300BCE63D /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 5F5A1D241E8DB0F300BCE63D;
|
||||
remoteInfo = "My Mind";
|
||||
};
|
||||
5F5A1D451E8DB0F300BCE63D /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 5F5A1D1D1E8DB0F300BCE63D /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 5F5A1D241E8DB0F300BCE63D;
|
||||
remoteInfo = "My Mind";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
5F5A1D651E8DB26200BCE63D /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
5F5A1D641E8DB26200BCE63D /* AWSS3.framework in Embed Frameworks */,
|
||||
5F5A1D5E1E8DB26200BCE63D /* AWSCognitoIdentityProvider.framework in Embed Frameworks */,
|
||||
5F5A1D601E8DB26200BCE63D /* AWSCore.framework in Embed Frameworks */,
|
||||
5F5A1D621E8DB26200BCE63D /* AWSPinpoint.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
5F5A1D251E8DB0F300BCE63D /* My Mind.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "My Mind.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5F5A1D281E8DB0F300BCE63D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
5F5A1D2D1E8DB0F300BCE63D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
5F5A1D2F1E8DB0F300BCE63D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
5F5A1D321E8DB0F300BCE63D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
5F5A1D341E8DB0F300BCE63D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
5F5A1D391E8DB0F300BCE63D /* My MindTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "My MindTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5F5A1D3D1E8DB0F300BCE63D /* My_MindTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = My_MindTests.swift; sourceTree = "<group>"; };
|
||||
5F5A1D3F1E8DB0F300BCE63D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
5F5A1D441E8DB0F300BCE63D /* My MindUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "My MindUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5F5A1D481E8DB0F300BCE63D /* My_MindUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = My_MindUITests.swift; sourceTree = "<group>"; };
|
||||
5F5A1D4A1E8DB0F400BCE63D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
5F5A1D561E8DB24C00BCE63D /* Sdk */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Sdk; sourceTree = "<group>"; };
|
||||
5F5A1D581E8DB26200BCE63D /* AWSCognitoIdentityProvider.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AWSCognitoIdentityProvider.framework; path = "My Mind/Sdk/Aws/AWSCognitoIdentityProvider.framework"; sourceTree = "<group>"; };
|
||||
5F5A1D591E8DB26200BCE63D /* AWSCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AWSCore.framework; path = "My Mind/Sdk/Aws/AWSCore.framework"; sourceTree = "<group>"; };
|
||||
5F5A1D5A1E8DB26200BCE63D /* AWSPinpoint.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AWSPinpoint.framework; path = "My Mind/Sdk/Aws/AWSPinpoint.framework"; sourceTree = "<group>"; };
|
||||
5F5A1D5B1E8DB26200BCE63D /* AWSS3.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AWSS3.framework; path = "My Mind/Sdk/Aws/AWSS3.framework"; sourceTree = "<group>"; };
|
||||
5F5A1D5C1E8DB26200BCE63D /* extras */ = {isa = PBXFileReference; lastKnownFileType = folder; name = extras; path = "My Mind/Sdk/Aws/extras"; sourceTree = "<group>"; };
|
||||
5F5A1D681E8DB2A300BCE63D /* AWSConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AWSConfiguration.swift; sourceTree = "<group>"; };
|
||||
5F5A1D691E8DB2A300BCE63D /* AWSMobileClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AWSMobileClient.swift; sourceTree = "<group>"; };
|
||||
5F5A1D6A1E8DB2A300BCE63D /* AWSMobileHubHelper.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AWSMobileHubHelper.framework; sourceTree = "<group>"; };
|
||||
5F5A1D6F1E8DB2F100BCE63D /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
|
||||
5F5A1D701E8DB2F100BCE63D /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
|
||||
5FB1172E1E8DE5C800BB1B9B /* My Mind.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "My Mind.entitlements"; sourceTree = "<group>"; };
|
||||
5FDAA1341E946EDE00FF80D4 /* TabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = "<group>"; };
|
||||
5FF72FE81E8DDECA00FFD64D /* SignInViewControllerExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignInViewControllerExtensions.swift; sourceTree = "<group>"; };
|
||||
5FF72FE91E8DDECA00FFD64D /* UserPoolForgotPasswordViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserPoolForgotPasswordViewController.swift; sourceTree = "<group>"; };
|
||||
5FF72FEA1E8DDECA00FFD64D /* UserPoolMFAViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserPoolMFAViewController.swift; sourceTree = "<group>"; };
|
||||
5FF72FEB1E8DDECA00FFD64D /* UserPoolNewPasswordViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserPoolNewPasswordViewController.swift; sourceTree = "<group>"; };
|
||||
5FF72FED1E8DDECA00FFD64D /* UserPoolSignUpConfirmationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserPoolSignUpConfirmationViewController.swift; sourceTree = "<group>"; };
|
||||
5FF72FEE1E8DDECA00FFD64D /* UserPoolSignUpViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserPoolSignUpViewController.swift; sourceTree = "<group>"; };
|
||||
5FF9721A1E8DBA98007AE280 /* OnBoardingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnBoardingController.swift; sourceTree = "<group>"; };
|
||||
5FF9721D1E8DBAC3007AE280 /* WelcomeScreenOne.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeScreenOne.swift; sourceTree = "<group>"; };
|
||||
5FF9721F1E8DBAD9007AE280 /* WelcomeScreenTwo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeScreenTwo.swift; sourceTree = "<group>"; };
|
||||
5FF972211E8DBAE1007AE280 /* WelcomeScreenThree.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeScreenThree.swift; sourceTree = "<group>"; };
|
||||
5FF972271E8DC9F3007AE280 /* ForumView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ForumView.swift; sourceTree = "<group>"; };
|
||||
5FF972291E8DCE83007AE280 /* UserViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserViews.swift; sourceTree = "<group>"; };
|
||||
5FF9722C1E8DCEA7007AE280 /* SignUpView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignUpView.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
5F5A1D221E8DB0F300BCE63D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5F3156141E8EE8670010FE7D /* libsqlite3.tbd in Frameworks */,
|
||||
5F3156151E8EE8670010FE7D /* libz.tbd in Frameworks */,
|
||||
5F5A1D6D1E8DB2A300BCE63D /* AWSMobileHubHelper.framework in Frameworks */,
|
||||
5F5A1D631E8DB26200BCE63D /* AWSS3.framework in Frameworks */,
|
||||
5F5A1D5D1E8DB26200BCE63D /* AWSCognitoIdentityProvider.framework in Frameworks */,
|
||||
5F5A1D5F1E8DB26200BCE63D /* AWSCore.framework in Frameworks */,
|
||||
5F5A1D611E8DB26200BCE63D /* AWSPinpoint.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5F5A1D361E8DB0F300BCE63D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5F5A1D411E8DB0F300BCE63D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
5F5A1D1C1E8DB0F300BCE63D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5F5A1D581E8DB26200BCE63D /* AWSCognitoIdentityProvider.framework */,
|
||||
5F5A1D591E8DB26200BCE63D /* AWSCore.framework */,
|
||||
5F5A1D5A1E8DB26200BCE63D /* AWSPinpoint.framework */,
|
||||
5F5A1D5B1E8DB26200BCE63D /* AWSS3.framework */,
|
||||
5F5A1D5C1E8DB26200BCE63D /* extras */,
|
||||
5F5A1D271E8DB0F300BCE63D /* My Mind */,
|
||||
5F5A1D3C1E8DB0F300BCE63D /* My MindTests */,
|
||||
5F5A1D471E8DB0F300BCE63D /* My MindUITests */,
|
||||
5F5A1D261E8DB0F300BCE63D /* Products */,
|
||||
5F5A1D6E1E8DB2F000BCE63D /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5F5A1D261E8DB0F300BCE63D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5F5A1D251E8DB0F300BCE63D /* My Mind.app */,
|
||||
5F5A1D391E8DB0F300BCE63D /* My MindTests.xctest */,
|
||||
5F5A1D441E8DB0F300BCE63D /* My MindUITests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5F5A1D271E8DB0F300BCE63D /* My Mind */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5F5A1D561E8DB24C00BCE63D /* Sdk */,
|
||||
5FB1172E1E8DE5C800BB1B9B /* My Mind.entitlements */,
|
||||
5F5A1D341E8DB0F300BCE63D /* Info.plist */,
|
||||
5F5A1D281E8DB0F300BCE63D /* AppDelegate.swift */,
|
||||
5F5A1D2F1E8DB0F300BCE63D /* Assets.xcassets */,
|
||||
5FDAA1361E9483B200FF80D4 /* Controllers */,
|
||||
5F5A1D311E8DB0F300BCE63D /* LaunchScreen.storyboard */,
|
||||
5F5A1D2C1E8DB0F300BCE63D /* Main.storyboard */,
|
||||
);
|
||||
path = "My Mind";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5F5A1D3C1E8DB0F300BCE63D /* My MindTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5F5A1D3D1E8DB0F300BCE63D /* My_MindTests.swift */,
|
||||
5F5A1D3F1E8DB0F300BCE63D /* Info.plist */,
|
||||
);
|
||||
path = "My MindTests";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5F5A1D471E8DB0F300BCE63D /* My MindUITests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5F5A1D481E8DB0F300BCE63D /* My_MindUITests.swift */,
|
||||
5F5A1D4A1E8DB0F400BCE63D /* Info.plist */,
|
||||
);
|
||||
path = "My MindUITests";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5F5A1D671E8DB2A300BCE63D /* AmazonAws */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5F5A1D681E8DB2A300BCE63D /* AWSConfiguration.swift */,
|
||||
5F5A1D691E8DB2A300BCE63D /* AWSMobileClient.swift */,
|
||||
5F5A1D6A1E8DB2A300BCE63D /* AWSMobileHubHelper.framework */,
|
||||
);
|
||||
name = AmazonAws;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5F5A1D6E1E8DB2F000BCE63D /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5F5A1D6F1E8DB2F100BCE63D /* libsqlite3.tbd */,
|
||||
5F5A1D701E8DB2F100BCE63D /* libz.tbd */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FDAA1361E9483B200FF80D4 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5F5A1D671E8DB2A300BCE63D /* AmazonAws */,
|
||||
5FF972191E8DBA65007AE280 /* User Controller Group */,
|
||||
5FF972181E8DBA4C007AE280 /* Main Controller Group */,
|
||||
5FF9721C1E8DBAA6007AE280 /* OnBoarding Controller Group */,
|
||||
);
|
||||
name = Controllers;
|
||||
path = AmazonAws;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FF72FE71E8DDECA00FFD64D /* UserPools */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FF72FE81E8DDECA00FFD64D /* SignInViewControllerExtensions.swift */,
|
||||
5FF72FE91E8DDECA00FFD64D /* UserPoolForgotPasswordViewController.swift */,
|
||||
5FF72FEA1E8DDECA00FFD64D /* UserPoolMFAViewController.swift */,
|
||||
5FF72FEB1E8DDECA00FFD64D /* UserPoolNewPasswordViewController.swift */,
|
||||
5FF72FED1E8DDECA00FFD64D /* UserPoolSignUpConfirmationViewController.swift */,
|
||||
5FF72FEE1E8DDECA00FFD64D /* UserPoolSignUpViewController.swift */,
|
||||
);
|
||||
path = UserPools;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FF972181E8DBA4C007AE280 /* Main Controller Group */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FF972271E8DC9F3007AE280 /* ForumView.swift */,
|
||||
5FDAA1341E946EDE00FF80D4 /* TabBarController.swift */,
|
||||
);
|
||||
name = "Main Controller Group";
|
||||
path = ..;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FF972191E8DBA65007AE280 /* User Controller Group */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FF972291E8DCE83007AE280 /* UserViews.swift */,
|
||||
5FF9722C1E8DCEA7007AE280 /* SignUpView.swift */,
|
||||
5FF72FE71E8DDECA00FFD64D /* UserPools */,
|
||||
);
|
||||
name = "User Controller Group";
|
||||
path = ..;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FF9721C1E8DBAA6007AE280 /* OnBoarding Controller Group */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FF9721A1E8DBA98007AE280 /* OnBoardingController.swift */,
|
||||
5FF9721D1E8DBAC3007AE280 /* WelcomeScreenOne.swift */,
|
||||
5FF9721F1E8DBAD9007AE280 /* WelcomeScreenTwo.swift */,
|
||||
5FF972211E8DBAE1007AE280 /* WelcomeScreenThree.swift */,
|
||||
);
|
||||
name = "OnBoarding Controller Group";
|
||||
path = ..;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
5F5A1D241E8DB0F300BCE63D /* My Mind */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 5F5A1D4D1E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My Mind" */;
|
||||
buildPhases = (
|
||||
5F5A1D211E8DB0F300BCE63D /* Sources */,
|
||||
5F5A1D221E8DB0F300BCE63D /* Frameworks */,
|
||||
5F5A1D231E8DB0F300BCE63D /* Resources */,
|
||||
5F5A1D651E8DB26200BCE63D /* Embed Frameworks */,
|
||||
5F5A1D661E8DB27100BCE63D /* Run Script */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "My Mind";
|
||||
productName = "My Mind";
|
||||
productReference = 5F5A1D251E8DB0F300BCE63D /* My Mind.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
5F5A1D381E8DB0F300BCE63D /* My MindTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 5F5A1D501E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My MindTests" */;
|
||||
buildPhases = (
|
||||
5F5A1D351E8DB0F300BCE63D /* Sources */,
|
||||
5F5A1D361E8DB0F300BCE63D /* Frameworks */,
|
||||
5F5A1D371E8DB0F300BCE63D /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
5F5A1D3B1E8DB0F300BCE63D /* PBXTargetDependency */,
|
||||
);
|
||||
name = "My MindTests";
|
||||
productName = "My MindTests";
|
||||
productReference = 5F5A1D391E8DB0F300BCE63D /* My MindTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
5F5A1D431E8DB0F300BCE63D /* My MindUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 5F5A1D531E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My MindUITests" */;
|
||||
buildPhases = (
|
||||
5F5A1D401E8DB0F300BCE63D /* Sources */,
|
||||
5F5A1D411E8DB0F300BCE63D /* Frameworks */,
|
||||
5F5A1D421E8DB0F300BCE63D /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
5F5A1D461E8DB0F300BCE63D /* PBXTargetDependency */,
|
||||
);
|
||||
name = "My MindUITests";
|
||||
productName = "My MindUITests";
|
||||
productReference = 5F5A1D441E8DB0F300BCE63D /* My MindUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.ui-testing";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
5F5A1D1D1E8DB0F300BCE63D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0830;
|
||||
LastUpgradeCheck = 0830;
|
||||
ORGANIZATIONNAME = "Alexander Davis";
|
||||
TargetAttributes = {
|
||||
5F5A1D241E8DB0F300BCE63D = {
|
||||
CreatedOnToolsVersion = 8.3;
|
||||
ProvisioningStyle = Automatic;
|
||||
SystemCapabilities = {
|
||||
com.apple.BackgroundModes = {
|
||||
enabled = 1;
|
||||
};
|
||||
com.apple.DataProtection = {
|
||||
enabled = 1;
|
||||
};
|
||||
com.apple.Push = {
|
||||
enabled = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
5F5A1D381E8DB0F300BCE63D = {
|
||||
CreatedOnToolsVersion = 8.3;
|
||||
DevelopmentTeam = 28CC8SCVUN;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = 5F5A1D241E8DB0F300BCE63D;
|
||||
};
|
||||
5F5A1D431E8DB0F300BCE63D = {
|
||||
CreatedOnToolsVersion = 8.3;
|
||||
DevelopmentTeam = 28CC8SCVUN;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = 5F5A1D241E8DB0F300BCE63D;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 5F5A1D201E8DB0F300BCE63D /* Build configuration list for PBXProject "My Mind" */;
|
||||
compatibilityVersion = "Xcode 8.0";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 5F5A1D1C1E8DB0F300BCE63D;
|
||||
productRefGroup = 5F5A1D261E8DB0F300BCE63D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
5F5A1D241E8DB0F300BCE63D /* My Mind */,
|
||||
5F5A1D381E8DB0F300BCE63D /* My MindTests */,
|
||||
5F5A1D431E8DB0F300BCE63D /* My MindUITests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
5F5A1D231E8DB0F300BCE63D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5F5A1D331E8DB0F300BCE63D /* LaunchScreen.storyboard in Resources */,
|
||||
5F5A1D571E8DB24C00BCE63D /* Sdk in Resources */,
|
||||
5F5A1D301E8DB0F300BCE63D /* Assets.xcassets in Resources */,
|
||||
5F5A1D2E1E8DB0F300BCE63D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5F5A1D371E8DB0F300BCE63D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5F5A1D421E8DB0F300BCE63D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
5F5A1D661E8DB27100BCE63D /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework/strip-frameworks.sh\"";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
5F5A1D211E8DB0F300BCE63D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5FF9721B1E8DBA98007AE280 /* OnBoardingController.swift in Sources */,
|
||||
5FF9721E1E8DBAC3007AE280 /* WelcomeScreenOne.swift in Sources */,
|
||||
5FF972221E8DBAE1007AE280 /* WelcomeScreenThree.swift in Sources */,
|
||||
5FF9722A1E8DCE83007AE280 /* UserViews.swift in Sources */,
|
||||
5FF72FEF1E8DDECA00FFD64D /* SignInViewControllerExtensions.swift in Sources */,
|
||||
5FF72FF21E8DDECA00FFD64D /* UserPoolNewPasswordViewController.swift in Sources */,
|
||||
5FDAA1351E946EDE00FF80D4 /* TabBarController.swift in Sources */,
|
||||
5FF72FF01E8DDECA00FFD64D /* UserPoolForgotPasswordViewController.swift in Sources */,
|
||||
5FF72FF51E8DDECA00FFD64D /* UserPoolSignUpViewController.swift in Sources */,
|
||||
5FF72FF11E8DDECA00FFD64D /* UserPoolMFAViewController.swift in Sources */,
|
||||
5F5A1D6B1E8DB2A300BCE63D /* AWSConfiguration.swift in Sources */,
|
||||
5FF72FF41E8DDECA00FFD64D /* UserPoolSignUpConfirmationViewController.swift in Sources */,
|
||||
5F5A1D6C1E8DB2A300BCE63D /* AWSMobileClient.swift in Sources */,
|
||||
5FF9722D1E8DCEA7007AE280 /* SignUpView.swift in Sources */,
|
||||
5F5A1D291E8DB0F300BCE63D /* AppDelegate.swift in Sources */,
|
||||
5FF972281E8DC9F3007AE280 /* ForumView.swift in Sources */,
|
||||
5FF972201E8DBAD9007AE280 /* WelcomeScreenTwo.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5F5A1D351E8DB0F300BCE63D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5F5A1D3E1E8DB0F300BCE63D /* My_MindTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5F5A1D401E8DB0F300BCE63D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5F5A1D491E8DB0F300BCE63D /* My_MindUITests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
5F5A1D3B1E8DB0F300BCE63D /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5F5A1D241E8DB0F300BCE63D /* My Mind */;
|
||||
targetProxy = 5F5A1D3A1E8DB0F300BCE63D /* PBXContainerItemProxy */;
|
||||
};
|
||||
5F5A1D461E8DB0F300BCE63D /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5F5A1D241E8DB0F300BCE63D /* My Mind */;
|
||||
targetProxy = 5F5A1D451E8DB0F300BCE63D /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
5F5A1D2C1E8DB0F300BCE63D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
5F5A1D2D1E8DB0F300BCE63D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5F5A1D311E8DB0F300BCE63D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
5F5A1D321E8DB0F300BCE63D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
5F5A1D4B1E8DB0F400BCE63D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5F5A1D4C1E8DB0F400BCE63D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5F5A1D4E1E8DB0F400BCE63D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = "My Mind/My Mind.entitlements";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = 28CC8SCVUN;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/My\\ Mind/Sdk/Aws",
|
||||
"$(PROJECT_DIR)/My\\ Mind/Sdk/Aws",
|
||||
"$(PROJECT_DIR)/My\\ Mind/Sdk/Aws",
|
||||
"$(PROJECT_DIR)/My\\ Mind/Sdk/Aws",
|
||||
"$(PROJECT_DIR)/My\\ Mind/AmazonAws",
|
||||
"$(SRCROOT)/**",
|
||||
);
|
||||
INFOPLIST_FILE = "My Mind/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-Mind";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5F5A1D4F1E8DB0F400BCE63D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = "My Mind/My Mind.entitlements";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = 28CC8SCVUN;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/My\\ Mind/Sdk/Aws",
|
||||
"$(PROJECT_DIR)/My\\ Mind/Sdk/Aws",
|
||||
"$(PROJECT_DIR)/My\\ Mind/Sdk/Aws",
|
||||
"$(PROJECT_DIR)/My\\ Mind/Sdk/Aws",
|
||||
"$(PROJECT_DIR)/My\\ Mind/AmazonAws",
|
||||
"$(SRCROOT)/**",
|
||||
);
|
||||
INFOPLIST_FILE = "My Mind/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-Mind";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5F5A1D511E8DB0F400BCE63D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
DEVELOPMENT_TEAM = 28CC8SCVUN;
|
||||
INFOPLIST_FILE = "My MindTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-MindTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/My Mind.app/My Mind";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5F5A1D521E8DB0F400BCE63D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
DEVELOPMENT_TEAM = 28CC8SCVUN;
|
||||
INFOPLIST_FILE = "My MindTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-MindTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/My Mind.app/My Mind";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5F5A1D541E8DB0F400BCE63D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
DEVELOPMENT_TEAM = 28CC8SCVUN;
|
||||
INFOPLIST_FILE = "My MindUITests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-MindUITests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_TARGET_NAME = "My Mind";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5F5A1D551E8DB0F400BCE63D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
DEVELOPMENT_TEAM = 28CC8SCVUN;
|
||||
INFOPLIST_FILE = "My MindUITests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-MindUITests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_TARGET_NAME = "My Mind";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
5F5A1D201E8DB0F300BCE63D /* Build configuration list for PBXProject "My Mind" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5F5A1D4B1E8DB0F400BCE63D /* Debug */,
|
||||
5F5A1D4C1E8DB0F400BCE63D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
5F5A1D4D1E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My Mind" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5F5A1D4E1E8DB0F400BCE63D /* Debug */,
|
||||
5F5A1D4F1E8DB0F400BCE63D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
5F5A1D501E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My MindTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5F5A1D511E8DB0F400BCE63D /* Debug */,
|
||||
5F5A1D521E8DB0F400BCE63D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
5F5A1D531E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My MindUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5F5A1D541E8DB0F400BCE63D /* Debug */,
|
||||
5F5A1D551E8DB0F400BCE63D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 5F5A1D1D1E8DB0F300BCE63D /* Project object */;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:My Mind.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
Binary file not shown.
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildLocationStyle</key>
|
||||
<string>UseAppPreferences</string>
|
||||
<key>CustomBuildLocationType</key>
|
||||
<string>RelativeToDerivedData</string>
|
||||
<key>DerivedDataLocationStyle</key>
|
||||
<string>Default</string>
|
||||
<key>IssueFilterStyle</key>
|
||||
<string>ShowActiveSchemeOnly</string>
|
||||
<key>LiveSourceIssuesEnabled</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Bucket
|
||||
type = "1"
|
||||
version = "2.0">
|
||||
<Breakpoints>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
scope = "0"
|
||||
stopOnStyle = "0">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
@@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0830"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5F5A1D241E8DB0F300BCE63D"
|
||||
BuildableName = "My Mind.app"
|
||||
BlueprintName = "My Mind"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5F5A1D381E8DB0F300BCE63D"
|
||||
BuildableName = "My MindTests.xctest"
|
||||
BlueprintName = "My MindTests"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5F5A1D431E8DB0F300BCE63D"
|
||||
BuildableName = "My MindUITests.xctest"
|
||||
BlueprintName = "My MindUITests"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5F5A1D241E8DB0F300BCE63D"
|
||||
BuildableName = "My Mind.app"
|
||||
BlueprintName = "My Mind"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5F5A1D241E8DB0F300BCE63D"
|
||||
BuildableName = "My Mind.app"
|
||||
BlueprintName = "My Mind"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5F5A1D241E8DB0F300BCE63D"
|
||||
BuildableName = "My Mind.app"
|
||||
BlueprintName = "My Mind"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>My Mind.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>5F5A1D241E8DB0F300BCE63D</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>5F5A1D381E8DB0F300BCE63D</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>5F5A1D431E8DB0F300BCE63D</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,29 +0,0 @@
|
||||
//
|
||||
// AWSConfiguration.swift
|
||||
// My Mind
|
||||
//
|
||||
//
|
||||
// Copyright 2017 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
// Source code generated from Amazon Mobile Hub
|
||||
//
|
||||
//
|
||||
|
||||
import AWSCore
|
||||
|
||||
let ServiceKey: String = "Prod";
|
||||
|
||||
// Cognito User Pools Identity Id
|
||||
let AWSCognitoUserPoolId: String = "eu-west-2_GyTxJ1kUG"
|
||||
|
||||
// Cognito User Pools App Client Id
|
||||
let AWSCognitoUserPoolAppClientId: String = "2qlv4rkq1ea4sg0v6loen29lph"
|
||||
|
||||
// Cognito User Pools Region
|
||||
let AWSCognitoUserPoolRegion: AWSRegionType = .EUWest2
|
||||
|
||||
// Cognito User Pools Client Secret
|
||||
let AWSCognitoUserPoolClientSecret: String = "19uu3s8skbcoqcdn4dhj6q180q31laf8cr4bopd4k36t8k01jn3j"
|
||||
@@ -1,110 +0,0 @@
|
||||
//
|
||||
// AWSMobileClient.swift
|
||||
// My Mind
|
||||
//
|
||||
//
|
||||
// Copyright 2017 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
// Source code generated from Amazon Mobile Hub
|
||||
//
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AWSCore
|
||||
import AWSMobileHubHelper
|
||||
import AWSPinpoint
|
||||
|
||||
/**
|
||||
* AWSMobileClient is a singleton that bootstraps the app. It creates an identity manager to establish the user identity with Amazon Cognito.
|
||||
*/
|
||||
class AWSMobileClient: NSObject {
|
||||
|
||||
// Shared instance of this class
|
||||
static let sharedInstance = AWSMobileClient()
|
||||
fileprivate var isInitialized: Bool
|
||||
//Used for checking whether Push Notification is enabled in Amazon Pinpoint
|
||||
static let remoteNotificationKey = "RemoteNotification"
|
||||
fileprivate override init() {
|
||||
isInitialized = false
|
||||
super.init()
|
||||
}
|
||||
|
||||
deinit {
|
||||
// Should never be called
|
||||
print("Mobile Client deinitialized. This should not happen.")
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure third-party services from application delegate with url, application
|
||||
* that called this provider, and any annotation info.
|
||||
*
|
||||
* - parameter application: instance from application delegate.
|
||||
* - parameter url: called from application delegate.
|
||||
* - parameter sourceApplication: that triggered this call.
|
||||
* - parameter annotation: from application delegate.
|
||||
* - returns: true if call was handled by this component
|
||||
*/
|
||||
func withApplication(_ application: UIApplication, withURL url: URL, withSourceApplication sourceApplication: String?, withAnnotation annotation: Any) -> Bool {
|
||||
print("withApplication:withURL")
|
||||
AWSIdentityManager.default().interceptApplication(application, open: url, sourceApplication: sourceApplication, annotation: annotation)
|
||||
|
||||
if (!isInitialized) {
|
||||
isInitialized = true
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs any additional activation steps required of the third party services
|
||||
* e.g. Facebook
|
||||
*
|
||||
* - parameter application: from application delegate.
|
||||
*/
|
||||
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||
print("applicationDidBecomeActive:")
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Configures all the enabled AWS services from application delegate with options.
|
||||
*
|
||||
* - parameter application: instance from application delegate.
|
||||
* - parameter launchOptions: from application delegate.
|
||||
*/
|
||||
func didFinishLaunching(_ application: UIApplication, withOptions launchOptions: [AnyHashable: Any]?) -> Bool {
|
||||
print("didFinishLaunching:")
|
||||
|
||||
// Register the sign in provider instances with their unique identifier
|
||||
|
||||
// set up cognito user pool
|
||||
setupUserPool()
|
||||
|
||||
|
||||
let didFinishLaunching: Bool = AWSIdentityManager.default().interceptApplication(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
|
||||
if (!isInitialized) {
|
||||
AWSIdentityManager.default().resumeSession(completionHandler: { (result: Any?, error: Error?) in
|
||||
print("Result: \(String(describing: result)) \n Error:\(String(describing: error))")
|
||||
}) // If you get an EXC_BAD_ACCESS here in iOS Simulator, then do Simulator -> "Reset Content and Settings..."
|
||||
// This will clear bad auth tokens stored by other apps with the same bundle ID.
|
||||
isInitialized = true
|
||||
}
|
||||
|
||||
return didFinishLaunching
|
||||
}
|
||||
|
||||
func setupUserPool() {
|
||||
// register your user pool configuration
|
||||
AWSCognitoUserPoolsSignInProvider.setupUserPool(withId: AWSCognitoUserPoolId, cognitoIdentityUserPoolAppClientId: AWSCognitoUserPoolAppClientId, cognitoIdentityUserPoolAppClientSecret: AWSCognitoUserPoolClientSecret, region: AWSCognitoUserPoolRegion)
|
||||
|
||||
AWSSignInProviderFactory.sharedInstance().register(signInProvider: AWSCognitoUserPoolsSignInProvider.sharedInstance(), forKey:AWSCognitoUserPoolsSignInProviderKey)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -1,77 +0,0 @@
|
||||
//
|
||||
// AWSAuthorizationManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
extern NSString * _Nonnull const AWSAuthorizationManagerErrorDomain;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, AWSAuthorizationManagerError) {
|
||||
AWSAuthorizationErrorUserCancelledFlow,
|
||||
AWSAuthorizationErrorConnectionError,
|
||||
AWSAuthorizationErrorFailedToRetrieveAccessToken,
|
||||
AWSAuthorizationErrorMissingRequiredParameter,
|
||||
};
|
||||
|
||||
@interface AWSAuthorizationManager : NSObject
|
||||
|
||||
/**
|
||||
* Singleton used to authorize user during OAuth1.0, 2.0, other flows.
|
||||
* @return the singleton
|
||||
*/
|
||||
+ (instancetype _Nonnull)sharedInstance;
|
||||
|
||||
/**
|
||||
* Utility method that constructs form encoded portion of url
|
||||
* i.e. @{@"grant": @"code", @"client_id": @"abc123"} -> @"grant=code&client_id=abc123&"
|
||||
*
|
||||
* @return the string representation of a form
|
||||
*/
|
||||
+ (NSString * _Nonnull)constructURIWithParameters:(NSDictionary * _Nonnull)params;
|
||||
|
||||
/**
|
||||
* Utility method that constructs dictionary from simple form encoded url
|
||||
* i.e. @"grant=code&client_id=abc123" -> @{@"grant": @"code", @"client_id": @"abc123"}
|
||||
*
|
||||
* @return the dictionary representation of a url encoded form
|
||||
*/
|
||||
+ (NSDictionary * _Nonnull)constructParametersWithURI:(NSString * _Nonnull)formString;
|
||||
|
||||
/**
|
||||
* Starts the authorization flow. Should be called from main thread.
|
||||
*
|
||||
* @param authorizeViewController The view controller that user sees right before they should see a login screen.
|
||||
* @param completionHandler The code that will follow after receiving successful login. Executes BEFORE login screen is dismissed.
|
||||
*/
|
||||
- (void)authorizeWithView:(UIViewController * _Nonnull)authorizeViewController completionHandler:(void (^ _Nullable)(id _Nullable result, NSError * _Nullable error)) completionHandler;
|
||||
|
||||
/**
|
||||
* This method should be placed in the AppDelegate to listen for the redirect URI.
|
||||
*
|
||||
* - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
||||
*
|
||||
* @param url The url that the authorization flow gives back.
|
||||
* @return YES if the url matches an expected response, NO if it is not expected.
|
||||
*/
|
||||
- (BOOL)handleURL:(NSURL * _Nullable)url;
|
||||
|
||||
/**
|
||||
* @return the accessToken used for API calls
|
||||
*/
|
||||
- (NSString * _Nullable)getAccessToken;
|
||||
|
||||
/**
|
||||
* Starts the logout flow. Should be called from main thread.
|
||||
*
|
||||
* @param logoutViewController The view controller that user sees right before they should see a logout indication.
|
||||
* @param completionHandler The code that will follow after receiving successful login. Executes BEFORE login screen is dismissed.
|
||||
*/
|
||||
- (void)logout:(UIViewController * _Nonnull)logoutViewController completionHandler:(void (^ _Nullable)(id _Nullable result, NSError * _Nullable error)) completionHandler;
|
||||
|
||||
@end
|
||||
@@ -1,140 +0,0 @@
|
||||
//
|
||||
// AWSCloudLogic.h
|
||||
//
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import <AWSCore/AWSCore.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Cloud logic helper singleton class that provides convenient interface to invoke
|
||||
* AWS Lambda functions and handle the results asynchronously.
|
||||
* Requires the AWSLambda framework of AWSiOSSDK.
|
||||
*/
|
||||
@interface AWSCloudLogic : NSObject
|
||||
|
||||
/**
|
||||
Returns the default Cloud Logic singleton instance configured using the information provided in `Info.plist` file.
|
||||
|
||||
*Swift*
|
||||
|
||||
let cloudLogic = AWSCloudLogic.default()
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCloudLogic *cloudLogic = [AWSCloudLogic defaultCloudLogic];
|
||||
|
||||
*/
|
||||
+ (instancetype)defaultCloudLogic;
|
||||
|
||||
/**
|
||||
Creates a helper client for `AWSCloud` for specified configuration with mentioned key.
|
||||
Use this method only if you require a helper client with specific configuration.
|
||||
|
||||
For example, set the configuration in `- application:didFinishLaunchingWithOptions:`
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
|
||||
AWSCloudLogic.register(with: configuration, forKey: "USWest2CloudLogic")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
[AWSCloudLogic registerCloudLogicWithConfiguration:configuration
|
||||
forKey:@"USWest2CloudLogic"];
|
||||
|
||||
Then call the following to get the helper client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let cloudLogic = AWSCloudLogic(forKey: "USWest2CloudLogic")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCloudLogic *cloudLogic = [AWSCloudLogic cloudLogicForKey:@"USWest2CloudLogic"];
|
||||
|
||||
@warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
|
||||
|
||||
@param serviceConfiguration AWSServiceConfiguration object for the cloud logic.
|
||||
@param key A string to identify the helper client.
|
||||
*/
|
||||
+ (void)registerCloudLogicWithConfiguration:(AWSServiceConfiguration *)serviceConfiguration
|
||||
forKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Retrieves the helper client associated with the key. You need to call `+ registercloudLogicWithConfiguration:` before invoking this method. If `+ registercloudLogicWithConfiguration:` has not been called in advance or the key does not exist, this method returns `nil`.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
|
||||
AWSCloudLogic.registercloudLogicWithConfiguration(configuration, forKey: "USWest2cloudLogic")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
[AWSCloudLogic registercloudLogicWithConfiguration:configuration
|
||||
forKey:@"USWest2cloudLogic"];
|
||||
|
||||
Then call the following to get the helper client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let CloudLogic = AWSCloudLogic(forKey: "USWest2cloudLogic")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCloudLogic *CloudLogic = [AWSCloudLogic CloudLogicForKey:@"USWest2cloudLogic"];
|
||||
|
||||
@param key A string to identify the helper client.
|
||||
@return An instance of AWSCloudLogic for specified key.
|
||||
*/
|
||||
+ (instancetype)CloudLogicForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Removes the helper client associated with the key and release it.
|
||||
|
||||
*Swift*
|
||||
|
||||
AWSCloudLogic.remove(forKey: "USWest2CloudLogic")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
[AWSCloudLogic removeCloudLogicForKey:@"USWest2CloudLogic"];
|
||||
|
||||
@warning Before calling this method, make sure no method is running on this client.
|
||||
|
||||
@param key A string to identify the helper client.
|
||||
*/
|
||||
+ (void)removeCloudLogicForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Invokes the specified AWS Lambda function and passes the results and possible error back to the application asynchronously.
|
||||
|
||||
@param name AWS Lambda function name, e.g., hello-world
|
||||
@param parameters The object from which to generate JSON request data. Can be `nil`.
|
||||
@param completionBlock handler for results from the function
|
||||
*/
|
||||
- (void)invokeFunction:(NSString *)name
|
||||
withParameters:(nullable id)parameters
|
||||
completionBlock:(void (^)(id _Nullable result, NSError * _Nullable error))completionBlock;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,86 +0,0 @@
|
||||
//
|
||||
// AWSCognitoUserPoolsSignInProvider.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSSignInProvider.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSCognitoUserPoolsSignInProviderKey;
|
||||
|
||||
@protocol AWSCognitoUserPoolsSignInHandler
|
||||
|
||||
/**
|
||||
* This method is called when `loginWithSignInProvider` is called by `AWSIdentityManager`.
|
||||
* This method should handle the input from the user and set the `taskCompletionSournce` result required by Cognito Idp SDK.
|
||||
*/
|
||||
- (void)handleUserPoolSignInFlowStart;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* `AWSCognitoUserPoolsSignInProvider` adopts the `AWSSignInProvider` protocol.
|
||||
*
|
||||
* It works with the AWS Cognito User Pools SDK internally.
|
||||
*/
|
||||
@interface AWSCognitoUserPoolsSignInProvider : NSObject <AWSSignInProvider>
|
||||
|
||||
/**
|
||||
* Registers the cognito pool with specified configuration. The pool object can be accessed by using the `CognitoIdentityUserPoolForKey:` method using `AWSCognitoUserPoolsSignInProviderKey` as the identifier key.
|
||||
*
|
||||
* @param cognitoIdentityUserPoolId The Cognito Identity User Pool Id
|
||||
* @param cognitoIdentityUserPoolAppClientId The Cognito Identity User Pool Client Id
|
||||
* @param cognitoIdentityUserPoolAppClientSecret The Cognito Identity User Pool Client Secret
|
||||
* @param region The Cognito Identity User Pool Service Region
|
||||
*/
|
||||
+ (void)setupUserPoolWithId:(NSString *)cognitoIdentityUserPoolId
|
||||
cognitoIdentityUserPoolAppClientId:(NSString *)cognitoIdentityUserPoolAppClientId
|
||||
cognitoIdentityUserPoolAppClientSecret:(NSString *)cognitoIdentityUserPoolAppClientSecret
|
||||
region:(AWSRegionType)region;
|
||||
|
||||
/**
|
||||
Fetches the shared instance for AWSCognitoUserPoolsSignInProvider. The method `setupUserPoolWithId:cognitoIdentityUserPoolAppClientId:cognitoIdentityUserPoolAppClientSecret:region` has to be called once before accessing the shared instance.
|
||||
|
||||
@return the single instance of AWSCognitoUserPoolsSignInProvider
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
* Set the instance of the class adopting the `AWSCognitoIdentityInteractiveAuthenticationDelegate` protocol of Cognito Idp SDK.
|
||||
*
|
||||
* @param interactiveAuthDelegate A class adopting the `AWSCognitoIdentityInteractiveAuthenticationDelegate` protocol
|
||||
*/
|
||||
- (void)setInteractiveAuthDelegate:(id)interactiveAuthDelegate;
|
||||
|
||||
/**
|
||||
* Returns the status of the current user pool user.
|
||||
*
|
||||
* @return `YES` if the user is signed in.
|
||||
*/
|
||||
- (BOOL)isLoggedIn;
|
||||
|
||||
/**
|
||||
* Sets the userName value of the signed-in user into a persistent store.
|
||||
* Should be called on a successful login to set the user name which is used by `AWSIdentityManager`.
|
||||
*
|
||||
* @param userName the user name of the signed-in user
|
||||
*/
|
||||
- (void)setUserName:(NSString *)userName;
|
||||
|
||||
/**
|
||||
* Sets the imageURL value of the signed-in user into a persistent store.
|
||||
* Should be called on a successful login to set the user name which is used by `AWSIdentityManager`.
|
||||
*
|
||||
* @param imageURL the image URL for a picture of the signed-in user
|
||||
*/
|
||||
- (void)setImageURL:(NSURL *)imageURL;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,601 +0,0 @@
|
||||
//
|
||||
// AWSContentManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AWSCore/AWSCore.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* The error domain for `AWSContentManager`.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const AWSContentManagerErrorDomain;
|
||||
|
||||
/**
|
||||
* The error codes for `AWSContentManager`.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, AWSContentManagerErrorType){
|
||||
/**
|
||||
* Generic error.
|
||||
*/
|
||||
AWSContentManagerErrorTypeUnknown,
|
||||
/**
|
||||
* Initiated a transfer on a content that is already running.
|
||||
*/
|
||||
AWSContentManagerErrorTypeTransferAlreadyInProgress,
|
||||
/**
|
||||
* Initiated a transfer on a directory. Directories cannot be downloaded.
|
||||
*/
|
||||
AWSContentManagerErrorTypeDirectoryCannotBeDownloaded,
|
||||
/**
|
||||
* A server returned a client exception (e.g. HTTP status code 4xx).
|
||||
*/
|
||||
AWSContentManagerErrorTypeClientException,
|
||||
/**
|
||||
* A server returned a service exception (e.g. HTTP status code 5xx).
|
||||
*/
|
||||
AWSContentManagerErrorTypeServiceException,
|
||||
};
|
||||
|
||||
@class AWSContent;
|
||||
@class AWSContentManagerConfiguration;
|
||||
|
||||
/**
|
||||
* The Content Manager manages caching and transfer of files from Amazon S3 and/or
|
||||
* Amazon CloudFront. It lists files directly using S3, regardless of whether
|
||||
* Amazon CloudFront is in use. It maintains a size-limited cache for files stored
|
||||
* on the local device and provides operations to set the cache size limit and
|
||||
* clear files from the local cache. It serves as the application's interface into
|
||||
* the Content Delivery feature. Content Manager instances are also used internally
|
||||
* for the User Files feature.
|
||||
* Requires the AWSS3 framework of AWSiOSSDK.
|
||||
*/
|
||||
@interface AWSContentManager : NSObject
|
||||
|
||||
/**
|
||||
* Local cache size limit in bytes.
|
||||
*/
|
||||
@property (nonatomic, assign) NSUInteger maxCacheSize;
|
||||
|
||||
/**
|
||||
* Local cache bytes used.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSUInteger cachedUsedSize;
|
||||
|
||||
/**
|
||||
* Number of bytes pinned in the cache. Pinned items do not count towards the
|
||||
* cache size limit.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSUInteger pinnedSize;
|
||||
|
||||
/**
|
||||
Returns the default Content Manager singleton instance configured using the information provided in `Info.plist` file.
|
||||
|
||||
*Swift*
|
||||
|
||||
let contentManager = AWSContentManager.default()
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSContentManager *contentManager = [AWSContentManager defaultContentManager];
|
||||
|
||||
*/
|
||||
+ (instancetype)defaultContentManager;
|
||||
|
||||
/**
|
||||
Creates a helper client for AWSContentManager for specified configuration with mentioned key.
|
||||
Use this method only if you require a helper client with specific configuration.
|
||||
|
||||
For example, set the configuration in `- application:didFinishLaunchingWithOptions:`
|
||||
|
||||
*Swift*
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
AWSServiceManager.default().defaultServiceConfiguration = configuration
|
||||
|
||||
let contentManagerConfiguration = AWSContentManagerConfiguration(bucketName: "myBucket")
|
||||
|
||||
AWSContentManager.register(with: contentManagerConfiguration, forKey: "defaultManager")
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
|
||||
AWSContentManagerConfiguration *contentManagerConfiguration = [[AWSContentManager alloc] initWithBucketName:@"myBucketName"];
|
||||
[AWSContentManager registerUserFileManagerWithConfiguration:contentManagerConfiguration
|
||||
forKey:@"defaultManager"];
|
||||
return YES;
|
||||
}
|
||||
|
||||
Then call the following to get the helper client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let contentManager = AWSContentManager(forKey: "defaultManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSContentManager *contentManager = [AWSContentManager contentManagerForKey:@"defaultManager"];
|
||||
|
||||
@warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
|
||||
|
||||
@param contentManagerConfiguration AWSContentManagerConfiguration object for the manager.
|
||||
@param key A string to identify the helper client.
|
||||
*/
|
||||
+ (void)registerContentManagerWithConfiguration:(AWSContentManagerConfiguration *)contentManagerConfiguration
|
||||
forKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Retrieves the helper client associated with the key. You need to call `+ registerContentManagerWithConfiguration:forKey:` before invoking this method. If `+ registerContentManagerWithConfiguration:forKey:` has not been called in advance or the key does not exist, this method returns `nil`.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
AWSServiceManager.default().defaultServiceConfiguration = configuration
|
||||
|
||||
let contentManagerConfiguration = AWSContentManagerConfiguration(bucketName: "myBucket")
|
||||
|
||||
AWSContentManager.register(with: contentManagerConfiguration, forKey: "defaultManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
|
||||
AWSContentManagerConfiguration *contentManagerConfiguration = [[AWSContentManager alloc] initWithBucketName:@"myBucketName"];
|
||||
[AWSContentManager registerUserFileManagerWithConfiguration:userFileManagerConfiguration
|
||||
forKey:@"defaultManager"];
|
||||
|
||||
Then call the following to get the helper client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let ContentManager = AWSContentManager(forKey: "defaultManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSContentManager *ContentManager = [AWSContentManager ContentManagerForKey:@"defaultManager"];
|
||||
|
||||
@param key A string to identify the helper client.
|
||||
@return An instance of AWSUserFileManager for specified key.
|
||||
*/
|
||||
+ (instancetype)ContentManagerForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Removes the helper client associated with the key and release it.
|
||||
|
||||
*Swift*
|
||||
|
||||
AWSContentManager.remove(forKey: "defaultManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
[AWSContentManager removeContentManagerForKey:@"defaultManager"];
|
||||
|
||||
@warning Before calling this method, make sure no method is running on this client.
|
||||
|
||||
@param key A string to identify the helper client.
|
||||
*/
|
||||
+ (void)removeContentManagerForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Loads the list of available files in the Amazon S3 bucket under the folder specified by the prefix parameter. Results are paged with page size of 100 files. The marker parameter value returned from a call should be passed to a subsequent call, in order to page through the list of files.
|
||||
|
||||
*Swift*
|
||||
|
||||
let contentManager = AWSContentManager(forKey: "defaultManager")
|
||||
manager.listAvailableContents(withPrefix: "prefix", marker: marker, completionHandler: {(contents: [AWSContent]?, nextMarker: String?, error: Error?) -> Void in
|
||||
if let error = error {
|
||||
print("Failed to load the list of contents. \(error)")
|
||||
// handle content load failure here
|
||||
}
|
||||
if let contents = contents, contents.count > 0 {
|
||||
// Use marker and contents here
|
||||
}
|
||||
// handle successful result here
|
||||
})
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSContentManager *contentManager = [AWSContentManager contentManagerForKey:@"defaultManager"];
|
||||
[contentManager
|
||||
listAvailableContentsWithPrefix:@"prefix"
|
||||
marker:marker
|
||||
completionHandler:^(NSArray *contents, NSString *nextMarker, NSError *error) {
|
||||
if (error) {
|
||||
NSLog(@"Failed to load the list of contents. %@", error);
|
||||
// handle content load failure here
|
||||
}
|
||||
if (contents.count > 0) {
|
||||
// Use marker and contents here
|
||||
}
|
||||
// handle successful result here
|
||||
}];
|
||||
|
||||
@param prefix Limits the response to keys that begin with the specified prefix.
|
||||
@param marker The key to start with when listing objects in a bucket. It loads object metadata from the S3 bucket in alphabetical order, starting with the key after the marker in order.
|
||||
@param completionHandler The completion handler that returns the results and error.
|
||||
*/
|
||||
- (void)listAvailableContentsWithPrefix:(nullable NSString *)prefix
|
||||
marker:(nullable NSString *)marker
|
||||
completionHandler:(void (^)(NSArray<AWSContent *> * _Nullable contents, NSString * _Nullable marker, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
Returns a list of contents that fit in the available cache. The list is sorted by last modified date on the S3 bucket, the most recently modified one first.
|
||||
|
||||
*Swift*
|
||||
|
||||
let contentManager = AWSContentManager(forKey: "defaultManager")
|
||||
contentManager.listRecentContents(withPrefix: "prefix", completionHandler: {(result: [AWSContent]?, error: Error?) -> Void in
|
||||
if let error = error {
|
||||
print("Failed to load the list of recent contents. \(error)")
|
||||
// Handle error here
|
||||
}
|
||||
if let downloadResult: [AWSContent] = result {
|
||||
// Handle successful result here
|
||||
for content: AWSContent in downloadResult {
|
||||
// Handle each of the item in the result
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSContentManager *contentManager = [AWSContentManager contentManagerForKey:@"defaultManager"];
|
||||
[contentManager listRecentContentsWithPrefix:@"prefix"
|
||||
completionHandler:^(NSArray<AWSContent *> * result, NSError *error) {
|
||||
if (error) {
|
||||
NSLog(@"%@", error.description);
|
||||
}
|
||||
for (AWSContent *content in result) {
|
||||
// Handle each of the item in result
|
||||
}
|
||||
}];
|
||||
|
||||
|
||||
@param prefix Limits the response to keys that begin with the specified prefix.
|
||||
@param completionHandler The completion handler that returns the result and error.
|
||||
*/
|
||||
- (void)listRecentContentsWithPrefix:(nullable NSString *)prefix
|
||||
completionHandler:(void (^)(NSArray<AWSContent *> * _Nullable result, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
* Removes all cached contents. It does not modify the remote objects.
|
||||
*/
|
||||
- (void)clearCache;
|
||||
|
||||
/**
|
||||
Returns an instance of `AWSContent` for a given key. You can use this method to download content without first load its metadata using `- loadContentMetadataWithPrefix:marker:completionHandler:`.
|
||||
|
||||
@param key The key of the content.
|
||||
|
||||
@return An instance of `AWSContent`.
|
||||
*/
|
||||
- (AWSContent *)contentWithKey:(NSString *)key;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* Status of content item download.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, AWSContentStatusType){
|
||||
/**
|
||||
* Unknown status. This should not happen.
|
||||
*/
|
||||
AWSContentStatusTypeUnknown,
|
||||
/**
|
||||
* Has been created but has not started running yet.
|
||||
*/
|
||||
AWSContentStatusTypeNotStarted,
|
||||
/**
|
||||
* Is running and transferring data from/to the remote server.
|
||||
*/
|
||||
AWSContentStatusTypeRunning,
|
||||
/**
|
||||
* Has completed transferring data from/to the remote server.
|
||||
*/
|
||||
AWSContentStatusTypeCompleted,
|
||||
/**
|
||||
* Has failed to transfer data from/to the remote server.
|
||||
*/
|
||||
AWSContentStatusTypeFailed,
|
||||
};
|
||||
|
||||
/**
|
||||
* Policy to use when downloading a file.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, AWSContentDownloadType){
|
||||
/**
|
||||
* Downalods a file if not cached locally.
|
||||
*/
|
||||
AWSContentDownloadTypeIfNotCached,
|
||||
/**
|
||||
* Downloads a file if not cached locally or the remote version is newer than the locally cached version.
|
||||
*/
|
||||
AWSContentDownloadTypeIfNewerExists,
|
||||
/**
|
||||
* Downloads a file and overwrite it if the local cache exists.
|
||||
*/
|
||||
AWSContentDownloadTypeAlways,
|
||||
};
|
||||
|
||||
/**
|
||||
* The content object that holds the cached data and its metadata.
|
||||
*/
|
||||
@interface AWSContent : NSObject
|
||||
|
||||
/**
|
||||
* The Amazon S3 key associated with the content.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *key;
|
||||
|
||||
/**
|
||||
* Shows if the content is a directory.
|
||||
*/
|
||||
@property (nonatomic, readonly, getter=isDirectory) BOOL directory;
|
||||
|
||||
/**
|
||||
* The status of the content.
|
||||
*/
|
||||
@property (nonatomic, readonly) AWSContentStatusType status;
|
||||
|
||||
/**
|
||||
* The transfer progress.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSProgress *progress;
|
||||
|
||||
/**
|
||||
* The last known size reported by the Amazon S3. May be different from the actual size if the file was modified on the server.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSUInteger knownRemoteByteCount;
|
||||
|
||||
/**
|
||||
* The last known last modified date reported by the Amazon S3. May be different from the actual last modified date if the file was modified on the server.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSDate * _Nullable knownRemoteLastModifiedDate;
|
||||
|
||||
/**
|
||||
* The cached data object.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSData *cachedData;
|
||||
|
||||
/**
|
||||
* The cached data size.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSUInteger fileSize;
|
||||
|
||||
/**
|
||||
* The date the cached data was downloaded.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSDate * _Nullable downloadedDate;
|
||||
|
||||
/**
|
||||
* Wheather the content is locally cached.
|
||||
*/
|
||||
@property (nonatomic, readonly, getter=isCached) BOOL cached;
|
||||
|
||||
/**
|
||||
* Weather the content is pinned. Pinned objects are not subject to the content cache limit.
|
||||
*/
|
||||
@property (nonatomic, readonly, getter=isPinned) BOOL pinned;
|
||||
|
||||
/**
|
||||
Downloads a file from the remote server.
|
||||
|
||||
*Swift*
|
||||
|
||||
func downloadContent(content: AWSContent, pinOnCompletion: Bool) {
|
||||
content.download(with: .ifNewerExists, pinOnCompletion: pinOnCompletion, progressBlock: { (content: AWSContent, content: Progress) in
|
||||
// Handle progress feedback
|
||||
}, completionHandler: { (content: AWSContent?, data: Data?, error: Error?) in
|
||||
if let error = error {
|
||||
print("Failed to download a content from a server.)")
|
||||
// Handle error here
|
||||
return
|
||||
}
|
||||
// Handle successful download here
|
||||
})
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (void)downloadContent:(AWSContent *)content
|
||||
pinOnCompletion:(BOOL)pinOnCompletion {
|
||||
[content downloadWithDownloadType:AWSContentDownloadTypeIfNewerExists
|
||||
pinOnCompletion:pinOnCompletion
|
||||
progressBlock:^(AWSContent *content, NSProgress *progress) {
|
||||
// Handle progress feedback
|
||||
}
|
||||
completionHandler:^(AWSContent *content, NSData *data, NSError *error) {
|
||||
if (error) {
|
||||
NSLog(@"Failed to download a content from a server. %@", error);
|
||||
// Handle error here
|
||||
return;
|
||||
}
|
||||
// Handle successful download here
|
||||
}];
|
||||
}
|
||||
|
||||
@param loadingType Specifies the loading behavior for downloading data.
|
||||
@param pinOnCompletion When set to `YES`, it pins the content on completion. You can download a content that does not fit in the content cache by setting it to `YES`.
|
||||
@param progressBlock The progress feedback block.
|
||||
@param completionHandler The completion handler block.
|
||||
*/
|
||||
- (void)downloadWithDownloadType:(AWSContentDownloadType)loadingType
|
||||
pinOnCompletion:(BOOL)pinOnCompletion
|
||||
progressBlock:(void(^ _Nullable)(AWSContent *content, NSProgress *progress))progressBlock
|
||||
completionHandler:(void(^)(AWSContent * _Nullable content, NSData * _Nullable data, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
Gets Presigned URL or the Cloud Front URL for the file.
|
||||
|
||||
*Swift*
|
||||
|
||||
func getContentURL(content: AWSContent) {
|
||||
content.getRemoteFileURLWithCompletionHandler({ (url: URL?, error: Error?) -> Void in
|
||||
guard let url = url else {
|
||||
NSLog("Error getting URL for file. \(error)")
|
||||
return
|
||||
}
|
||||
// Handle successfully generated URL here
|
||||
})
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (void)getContentURL:(AWSContent *)content {
|
||||
[content getRemoteFileURLWithCompletionHandler:^(NSURL *url, NSError *error) {
|
||||
if (error) {
|
||||
NSLog(@"Failed to get a valid URL from a server. %@", error);
|
||||
}
|
||||
// handle successfully generated URL here
|
||||
}];
|
||||
}
|
||||
|
||||
@param completionHandler The completion handler block.
|
||||
*/
|
||||
- (void)getRemoteFileURLWithCompletionHandler:(void(^)(NSURL * _Nullable url, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
* Pins the locally cached object. Pinned objects are not subject to the content cache limit.
|
||||
*/
|
||||
- (void)pin;
|
||||
|
||||
/**
|
||||
* Unpins the pinned object. It may purge the content cache if the content cache does not have enough available space to fit the unpinned data.
|
||||
*/
|
||||
- (void)unPin;
|
||||
|
||||
/**
|
||||
* Removes locally cached data regardless of the pinning status.
|
||||
*/
|
||||
- (void)removeLocal;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* `AWSContentManagerConfiguration` is the configuration object for `AWSContentManager` class.
|
||||
*/
|
||||
@interface AWSContentManagerConfiguration: NSObject
|
||||
|
||||
@property (nonatomic, readonly) AWSServiceConfiguration *serviceConfiguration;
|
||||
@property (nonatomic, readonly) NSString *bucketName;
|
||||
@property (nonatomic, readonly, nullable) NSString *cloudFrontURL;
|
||||
|
||||
|
||||
/**
|
||||
Returns an instance of `AWSContentManagerConfiguration` using the default service configuration and specified bucket name. Use this as the configuration object for AWSContentManager.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
AWSServiceManager.default().defaultServiceConfiguration = configuration
|
||||
|
||||
let contentManagerConfiguration = AWSContentManagerConfiguration(bucketName: "myBucket")
|
||||
|
||||
AWSContentManager.register(with: contentManagerConfiguration, forKey: "defaultManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
|
||||
AWSContentManagerConfiguration *contentManagerConfiguration = [[AWSContentManager alloc] initWithBucketName:@"myBucketName"];
|
||||
[AWSContentManager registerUserFileManagerWithConfiguration:userFileManagerConfiguration
|
||||
forKey:@"defaultManager"];
|
||||
|
||||
|
||||
@param bucketName Name of the bucket for manager
|
||||
@return an instance of AWSUserFileManagerConfiguration
|
||||
*/
|
||||
- (instancetype)initWithBucketName:(NSString *)bucketName;
|
||||
|
||||
/**
|
||||
Returns an instance of`AWSContentManagerConfiguration` using the specified bucket name, CloudFront URL and the default service configuration. Use this as the configuration object for AWSContentManager.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
AWSServiceManager.default().defaultServiceConfiguration = configuration;
|
||||
|
||||
let contentManagerConfiguration = AWSContentManagerConfiguration(bucketName: "myBucket", cloudFrontURL: "https:/a.b.myurl")
|
||||
|
||||
AWSContentManager.register(with: contentManagerConfiguration, forKey: "defaultManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
|
||||
AWSContentManagerConfiguration *contentManagerConfiguration = [[AWSContentManager alloc] initWithBucketName:@"myBucketName"
|
||||
cloudFrontURL:@"https:/a.b.myurl"];
|
||||
[AWSContentManager registerUserFileManagerWithConfiguration:userFileManagerConfiguration
|
||||
forKey:@"defaultManager"];
|
||||
|
||||
|
||||
@param bucketName Name of the bucket for manager
|
||||
@param cloudFrontURL CloudFront URL for the bucket if enabled; nil otherwise
|
||||
@return an instance of AWSUserFileManagerConfiguration
|
||||
*/
|
||||
- (instancetype)initWithBucketName:(NSString *)bucketName
|
||||
cloudFrontURL:(nullable NSString *)cloudFrontURL;
|
||||
|
||||
|
||||
/**
|
||||
Returns an instance of `AWSContentManagerConfiguration` using the specified bucket name, CloudFront URL and service configuration. Use this as the configuration object for AWSContentManager.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
|
||||
let contentManagerConfiguration = AWSContentManagerConfiguration(bucketName: "myBucket", cloudFrontURL: "https:/a.b.myurl", serviceConfiguration: configuration)
|
||||
|
||||
AWSContentManager.register(with: contentManagerConfiguration, forKey: "USWest2BucketContentManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSContentManagerConfiguration *contentManagerConfiguration = [[AWSContentManager alloc] initWithBucketName:@"myBucketName"
|
||||
cloudFrontURL:@"https:/a.b.myurl"
|
||||
serviceConfiguration:configuration];
|
||||
[AWSContentManager registerUserFileManagerWithConfiguration:userFileManagerConfiguration
|
||||
forKey:@"USWest2BucketContentManager"];
|
||||
|
||||
|
||||
@param bucketName Name of the bucket for manager
|
||||
@param cloudFrontURL CloudFront URL for the bucket if enabled; nil otherwise
|
||||
@param serviceConfiguration AWSServiceConfiguration for the bucket; nil for default configuration
|
||||
@return an instance of AWSUserFileManagerConfiguration
|
||||
*/
|
||||
- (instancetype)initWithBucketName:(NSString *)bucketName
|
||||
cloudFrontURL:(nullable NSString *)cloudFrontURL
|
||||
serviceConfiguration:(nullable AWSServiceConfiguration *)serviceConfiguration;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,55 +0,0 @@
|
||||
//
|
||||
// AWSFacebookSignInProvider.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSSignInProvider.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSFacebookSignInProviderKey;
|
||||
|
||||
/**
|
||||
* `AWSFacebookSignInProvider` adopts the `AWSSignInProvider` protocol.
|
||||
*
|
||||
* It works with the FacebookLoginSDK internally and uses the Facebook App ID specified in the info.plist file.
|
||||
*/
|
||||
@interface AWSFacebookSignInProvider : NSObject <AWSSignInProvider>
|
||||
|
||||
/**
|
||||
Fetches the singleton instance of AWSFacebookSignInProvider.
|
||||
|
||||
@return the singleton instance of AWSFacebookSignInProvider
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
Sets the login behavior of the Facebook SignIn SDK.
|
||||
Choices are listed in enum FBSDKLoginBehavior.
|
||||
Default behaviors for iOS:
|
||||
9+ SFSafariViewController used.
|
||||
8 WebViewController used.
|
||||
@loginBehavior a FBSDKLoginBehavior enum entry
|
||||
*/
|
||||
- (void)setLoginBehavior:(NSUInteger)loginBehavior;
|
||||
|
||||
/**
|
||||
Sets the permissions requested during login.
|
||||
Default behavior is no permissions are required.
|
||||
*/
|
||||
- (void)setPermissions:(NSArray *)permissions;
|
||||
|
||||
/**
|
||||
Sets the ViewController used for Facebook SignIn.
|
||||
Defaults to nil and handled by Facebook SDK.
|
||||
*/
|
||||
- (void)setViewControllerForFacebookSignIn:(UIViewController *)signInViewController;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,44 +0,0 @@
|
||||
//
|
||||
// AWSGoogleSignInProvider.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSSignInProvider.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSGoogleSignInProviderKey;
|
||||
|
||||
/**
|
||||
* `AWSGoogleSignInProvider` adopts the `AWSSignInProvider` protocol.
|
||||
*
|
||||
* It works with the Google Sign In SDK internally and requires the Google Client ID provided by Google.
|
||||
*/
|
||||
@interface AWSGoogleSignInProvider : NSObject <AWSSignInProvider>
|
||||
|
||||
/**
|
||||
Fetches the shared instance for AWSGoogleSignInProvider.
|
||||
|
||||
@return the single instance of AWSGoogleSignInProvider
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
Sets the scopes required by the app during login.
|
||||
Defaults are openid and profile.
|
||||
*/
|
||||
- (void)setScopes:(NSArray *)scopes;
|
||||
|
||||
/**
|
||||
Sets the ViewController used for Google SignIn.
|
||||
Defaults to rootViewController in keyWindow during signin.
|
||||
*/
|
||||
- (void)setViewControllerForGoogleSignIn:(UIViewController *)signInViewController;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,57 +0,0 @@
|
||||
//
|
||||
// AWSHubspotAuthorizationManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import "AWSAuthorizationManager.h"
|
||||
|
||||
@interface AWSHubspotAuthorizationManager : AWSAuthorizationManager
|
||||
|
||||
/**
|
||||
* Singleton used to authorize user during OAuth2.0
|
||||
* @return the singleton
|
||||
*/
|
||||
+ (instancetype _Nonnull)sharedInstance;
|
||||
|
||||
/**
|
||||
* Customize the flow.
|
||||
*
|
||||
* @param clientID The client ID provided by Hubspot
|
||||
* @param portalID The portal ID provided by Hubspot
|
||||
* @param redirectURI The redirect URI that your app has registered
|
||||
* i.e. https://mysampleapp.amazonaws.com/hubspot/success
|
||||
*/
|
||||
- (void)configureWithClientID:(NSString * _Nonnull)clientID
|
||||
portalID:(NSString * _Nonnull)portalID
|
||||
redirectURI:(NSString * _Nonnull)redirectURI;
|
||||
|
||||
/**
|
||||
* Offline Access offline This application can make API requests on behalf of the user when
|
||||
* the user is offline (not actively using the app). You will receive
|
||||
* a refresh token when the user authenticates that you can store to
|
||||
* gain access to a new, valid access token programtically using the
|
||||
* refresh token method.
|
||||
* Contacts Read/Write contacts-rw This application reads your contact information, as well as creates
|
||||
* new contacts, contact lists, and contact properties. It can also
|
||||
* modify existing contacts, properties, and contact lists.
|
||||
* Contacts Read-Only contacts-ro This application can read your contact information, as well as
|
||||
* information about your contact properties and contact lists.
|
||||
* Blog Read/Write blog-rw This application can read your blog data, including posts and
|
||||
* comments, as well as create new blog posts and comments.
|
||||
* Blog Read-Only blog-ro This application can read your blog data, including posts and comments.
|
||||
* Events Read/Write events-rw This application can read your marketing events, as well as post
|
||||
* new ones into your HubSpot account.
|
||||
* Keywords Read/Write keyword-rw This application can read your keyword data, as well as insert new
|
||||
* ones into your HubSpot account.
|
||||
*
|
||||
* @param scope Specify the amount of access the user would like.
|
||||
* i.e. @"contacts-rw"
|
||||
* @"contacts-rw+blog-rw"
|
||||
*/
|
||||
- (void)setScope:(NSString * _Nonnull)scope;
|
||||
|
||||
@end
|
||||
@@ -1,118 +0,0 @@
|
||||
//
|
||||
// AWSIdentityManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AWSCore/AWSCore.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSSignInProvider.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSIdentityManagerDidSignInNotification;
|
||||
FOUNDATION_EXPORT NSString *const AWSIdentityManagerDidSignOutNotification;
|
||||
|
||||
@interface AWSIdentityManager : NSObject<AWSIdentityProviderManager>
|
||||
|
||||
/**
|
||||
* Indicates whether the user is signed-in or not.
|
||||
* @return true if user is signed-in
|
||||
*/
|
||||
@property (nonatomic, readonly, getter=isLoggedIn) BOOL loggedIn;
|
||||
|
||||
/**
|
||||
* URL for the user's image, if user is signed-in with a third party identity provider,
|
||||
* like Facebook or Google.
|
||||
* @return url of image file, if user is signed-in
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSURL * imageURL;
|
||||
|
||||
/**
|
||||
* User name acquired from third party identity provider, such as Facebook or Google.
|
||||
* @return user name, if user is signed-in
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSString * userName;
|
||||
|
||||
/**
|
||||
* Amazon Cognito User Identity ID. This uniquely identifies the user, regardless of
|
||||
* whether or not the user is signed-in, if User Sign-in is enabled in the project.
|
||||
* @return unique user identifier
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSString *identityId;
|
||||
|
||||
/**
|
||||
* Amazon Cognito Credentials Provider. This is the credential provider used by the Identity Manager.
|
||||
*
|
||||
* @return the cognito credentials provider
|
||||
*/
|
||||
@property (nonatomic, readonly, strong) AWSCognitoCredentialsProvider *credentialsProvider;
|
||||
|
||||
/**
|
||||
Returns the Identity Manager singleton instance configured using the information provided in `Info.plist` file.
|
||||
|
||||
*Swift*
|
||||
|
||||
let identityManager = AWSIdentityManager.default()
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSIdentityManager *identityManager = [AWSIdentityManager defaultIdentityManager];
|
||||
*/
|
||||
+ (instancetype)defaultIdentityManager;
|
||||
|
||||
/**
|
||||
* Signs the user out of whatever third party identity provider they used to sign in.
|
||||
* @param completionHandler used to callback application with async operation results
|
||||
*/
|
||||
- (void)logoutWithCompletionHandler:(void (^)(id _Nullable result, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
* Signs the user in with an identity provider. Note that even if User Sign-in is not
|
||||
* enabled in the project, the user is still signed-in with the Guest type provider.
|
||||
* @param signInProviderType provider type
|
||||
* @param completionHandler used to callback application with async operation results
|
||||
*/
|
||||
- (void)loginWithSignInProvider:(id<AWSSignInProvider>)signInProvider
|
||||
completionHandler:(void (^)(id _Nullable result, NSError * _Nullable error))completionHandler NS_SWIFT_NAME(login(signInProvider:completionHandler:));
|
||||
|
||||
/**
|
||||
* Attempts to resume session with the previous sign-in provider.
|
||||
* @param completionHandler used to callback application with async operation results
|
||||
*/
|
||||
- (void)resumeSessionWithCompletionHandler:(void (^)(id _Nullable result, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
* Passes parameters used to launch the application to the current identity provider. For some
|
||||
* third party providers, this completes the User Sign-in call flow, which used a browser to
|
||||
* get information from the user, directly. The current sign-in provider will be set to nil if
|
||||
* the sign-in provider is not registered using `registerAWSSignInProvider:forKey` method of
|
||||
* `AWSSignInProviderFactory` class.
|
||||
* @param application application
|
||||
* @param launchOptions options used to launch the application
|
||||
* @return true if this call handled the operation
|
||||
*/
|
||||
- (BOOL)interceptApplication:(UIApplication *)application
|
||||
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions;
|
||||
|
||||
/**
|
||||
* Passes parameters used to launch the application to the current identity provider. For some
|
||||
* third party providers, this completes the User Sign-in call flow, which used a browser to
|
||||
* get information from the user, directly.
|
||||
* @param application application
|
||||
* @param url url used to open the application
|
||||
* @param sourceApplication source application
|
||||
* @param annotation annotation
|
||||
* @return true if this call handled the operation
|
||||
*/
|
||||
- (BOOL)interceptApplication:(UIApplication *)application
|
||||
openURL:(NSURL *)url
|
||||
sourceApplication:(nullable NSString *)sourceApplication
|
||||
annotation:(id)annotation;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,55 +0,0 @@
|
||||
//
|
||||
// AWSMSDynamicsAuthorizationManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import "AWSAuthorizationManager.h"
|
||||
|
||||
@interface AWSMSDynamicsAuthorizationManager : AWSAuthorizationManager
|
||||
|
||||
/**
|
||||
* Singleton used to authorize user during OAuth2.0
|
||||
* @return the singleton
|
||||
*/
|
||||
+ (instancetype _Nonnull)sharedInstance;
|
||||
|
||||
/**
|
||||
* Customize the flow.
|
||||
*
|
||||
* @param clientID The client ID provided by Microsoft Dynamics
|
||||
* @param redirectURI The redirect URI you provided Microsoft Dynamics
|
||||
* i.e. https://mysampleapp.amazonaws.com/msdynamics/success
|
||||
* @param resource The URL of the resource you will access
|
||||
*/
|
||||
- (void)configureWithClientID:(NSString * _Nonnull)clientID
|
||||
redirectURI:(NSString * _Nonnull)redirectURI
|
||||
resource:(NSString * _Nonnull)resource;
|
||||
/**
|
||||
* @param The version of Microsoft Dynamics API you are using.
|
||||
* The default value is "v8.0"
|
||||
*/
|
||||
- (void)setAPIVersion:(NSString * _Nonnull)apiVersion;
|
||||
|
||||
/**
|
||||
* @return The token type. Available after user authorizes app.
|
||||
* i.e. Bearer
|
||||
*/
|
||||
- (NSString * _Nullable)getTokenType;
|
||||
|
||||
/**
|
||||
* @return The resource you will access in Microsoft Dynamics
|
||||
* with the API version attached to the end
|
||||
* i.e. https://emhawsapps.crm.dynamics.com
|
||||
*/
|
||||
- (NSString * _Nullable)getResourceURL;
|
||||
|
||||
/**
|
||||
* @return the accessToken used for API calls
|
||||
*/
|
||||
- (NSString * _Nullable)getAccessToken;
|
||||
|
||||
@end
|
||||
@@ -1,59 +0,0 @@
|
||||
//
|
||||
// AWSMarketoAuthorizationManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import "AWSAuthorizationManager.h"
|
||||
|
||||
@interface AWSMarketoAuthorizationManager : AWSAuthorizationManager
|
||||
|
||||
/**
|
||||
* Singleton used to authorize user for Marketo
|
||||
* @return the singleton
|
||||
*/
|
||||
+ (instancetype _Nonnull)sharedInstance;
|
||||
|
||||
/**
|
||||
* Customize the flow.
|
||||
*
|
||||
* @param clientID Client ID provided by Salesforce.
|
||||
* @param redirectURI Should be you're bundle ID or universal URL
|
||||
* i.e. com.amazonaws.mysampleapp://salesforce/success
|
||||
* https://mysampleapp.amazonaws.com/success
|
||||
* @return the singleton
|
||||
*/
|
||||
- (void)configureWithIdentityURI:(NSString * _Nonnull)identityURI
|
||||
restApiURI:(NSString * _Nonnull)restApiURI;
|
||||
|
||||
/**
|
||||
* @param clientID Specify the Client ID provided by Marketo.
|
||||
* i.e. @"abc123...-abc123...-..."
|
||||
*/
|
||||
- (void)setClientID:(NSString * _Nonnull)clientID;
|
||||
|
||||
/**
|
||||
* @param clientSecret Specify the Client Secret provided by Marketo.
|
||||
* i.e. @"aBc123..."
|
||||
*/
|
||||
- (void)setClientSecret:(NSString * _Nonnull)clientSecret;
|
||||
|
||||
/**
|
||||
* @return The access token used for API calls
|
||||
*/
|
||||
- (NSString * _Nullable)getAccessToken;
|
||||
|
||||
/**
|
||||
* @return The identity URI used during authorization and API calls
|
||||
*/
|
||||
- (NSString * _Nullable)getIdentityURI;
|
||||
|
||||
/**
|
||||
* @return The REST API URI used during authorization and API calls
|
||||
*/
|
||||
- (NSString * _Nullable)getRestApiURI;
|
||||
|
||||
@end
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// AWSMobileHubHelper.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import "AWSContentManager.h"
|
||||
#import "AWSCloudLogic.h"
|
||||
#import "AWSIdentityManager.h"
|
||||
#import "AWSPushManager.h"
|
||||
#import "AWSFacebookSignInProvider.h"
|
||||
#import "AWSGoogleSignInProvider.h"
|
||||
#import "AWSUserFileManager.h"
|
||||
#import "AWSSignInProviderFactory.h"
|
||||
#import "AWSSAMLSignInProvider.h"
|
||||
#import "AWSCognitoUserPoolsSignInProvider.h"
|
||||
#import "AWSAuthorizationManager.h"
|
||||
#import "AWSSalesforceAuthorizationManager.h"
|
||||
#import "AWSZendeskAuthorizationManager.h"
|
||||
#import "AWSMSDynamicsAuthorizationManager.h"
|
||||
#import "AWSQuickbooksAuthorizationManager.h"
|
||||
#import "AWSHubspotAuthorizationManager.h"
|
||||
#import "AWSMarketoAuthorizationManager.h"
|
||||
@@ -1,500 +0,0 @@
|
||||
//
|
||||
// AWSPushManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AWSCore/AWSCore.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
The error domain for `PushManager`.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const AWSPushManagerErrorDomain;
|
||||
|
||||
/**
|
||||
The error code for `AWSPushManagerErrorDomain`.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, AWSPushManagerErrorType){
|
||||
/**
|
||||
An unknown error. This should not happen.
|
||||
*/
|
||||
AWSPushManagerErrorTypeUnknown,
|
||||
/**
|
||||
The device token returned by the OS is invalid and cannot be processed.
|
||||
*/
|
||||
AWSPushManagerErrorTypeInvalidDeviceToken,
|
||||
/**
|
||||
Unsubscribe requests failed while disabling `PushManager`.
|
||||
*/
|
||||
AWSPushManagerErrorTypeUnsubscribeFailed,
|
||||
};
|
||||
|
||||
@class AWSPushManager;
|
||||
@class AWSPushTopic;
|
||||
@class AWSPushManagerConfiguration;
|
||||
|
||||
@protocol AWSPushManagerDelegate;
|
||||
@protocol AWSPushTopicDelegate;
|
||||
|
||||
/**
|
||||
The Push Manager registers the app on the device with Apple Push Notification Service (APNS) and registers the resulting device token in Amazon SNS. The result of this registration process is an Amazon SNS Endpoint ARN, which can be used to send push notifications directly to a specific device. The Push Manager also manages Amazon SNS topic subscriptions, allowing the app to subscribe to Amazon SNS topics, which let you target groups of devices with push notifications. Requires the AWSSNS framework of AWSiOSSDK.
|
||||
*/
|
||||
@interface AWSPushManager : NSObject
|
||||
|
||||
/**
|
||||
Indicates if `PushManager` is enabled or disabled.
|
||||
*/
|
||||
@property (nonatomic, readonly, getter=isEnabled) BOOL enabled;
|
||||
|
||||
/**
|
||||
The device token returned by iOS.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSString *deviceToken;
|
||||
|
||||
/**
|
||||
The application platform endpoint ARN for Amazon SNS.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSString *endpointARN;
|
||||
|
||||
/**
|
||||
The application platform ARN for the app.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSString *platformARN;
|
||||
|
||||
/**
|
||||
A list of topic ARNs selected during project configuraiton on AWS Mobile Hub from the `Info.plist` file.
|
||||
If a custom helper client is used, it would contain the topic ARNs specified in AWSPushManagerConfiguration object.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSArray<NSString *> * topicARNs;
|
||||
|
||||
/**
|
||||
The list of `PushTopic`.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSArray<AWSPushTopic *> *topics;
|
||||
|
||||
/**
|
||||
The delegate for receiving `PushManager` and `PushTopic` events.
|
||||
*/
|
||||
@property (nonatomic, weak) id<AWSPushManagerDelegate, AWSPushTopicDelegate> delegate;
|
||||
|
||||
/**
|
||||
Returns the default Push Manager singleton instance configured using the information provided in `Info.plist` file.
|
||||
|
||||
*Swift*
|
||||
|
||||
let pushManager = AWSPushManager.default()
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSPushManager *pushManager = [AWSPushManager defaultPushManager];
|
||||
*/
|
||||
+ (instancetype)defaultPushManager;
|
||||
|
||||
/**
|
||||
Creates a helper client for `AWSPushManager` for specified configuration with mentioned key.
|
||||
Use this method only if you require a helper client with specific configuration.
|
||||
|
||||
For example, set the configuration in `- application:didFinishLaunchingWithOptions:`
|
||||
|
||||
*Swift*
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
AWSServiceManager.default().defaultServiceConfiguration = configuration
|
||||
|
||||
let pushManagerConfiguration = AWSPushManagerConfiguration(snsPlatformARN: "SNS_PLATFORM_ARN")
|
||||
|
||||
AWSPushManager.register(with: pushManagerConfiguration, forKey: "defaultPushManager")
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
|
||||
AWSPushManagerConfiguration *pushManagerConfiguration = [[AWSPushManager alloc] initWithSNSPlatformARN:@"SNS_PLATFORM_ARN"];
|
||||
[AWSPushManager registerPushManagerWithConfiguration:pushManagerConfiguration
|
||||
forKey:@"defaultPushManager"];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
Then call the following to get the helper client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let pushmanager = AWSPushManager(forKey: "defaultPushManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSPushManager *pushmanager = [AWSPushManager pushManagerForKey:@"defaultPushManager"];
|
||||
|
||||
@warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
|
||||
|
||||
@param pushManagerConfiguration AWSPushManagerConfiguration object for the manager.
|
||||
@param key A string to identify the helper client.
|
||||
*/
|
||||
+ (void)registerPushManagerWithConfiguration:(AWSPushManagerConfiguration *)pushManagerConfiguration
|
||||
forKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Retrieves the helper client associated with the key. You need to call `+ registerPushManagerWithConfiguration:forKey:` before invoking this method. If `+ registerPushManagerWithConfiguration:forKey:` has not been called in advance or the key does not exist, this method returns `nil`.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
AWSServiceManager.default().defaultServiceConfiguration = configuration
|
||||
|
||||
let pushManagerConfiguration = AWSPushManagerConfiguration(snsPlatformARN: "SNS_PLATFORM_ARN")
|
||||
|
||||
AWSPushManager.register(with: pushManagerConfiguration, forKey: "defaultPushManager")
|
||||
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
|
||||
AWSPushManagerConfiguration *pushManagerConfiguration = [[AWSPushManager alloc] initWithSNSPlatformARN:@"SNS_PLATFORM_ARN"];
|
||||
[AWSPushManager registerPushManagerWithConfiguration:pushManagerConfiguration
|
||||
forKey:@"defaultPushManager"];
|
||||
|
||||
Then call the following to get the helper client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let Pushmanager = AWSPushManager(forKey: "defaultPushManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSPushManager *Pushmanager = [AWSPushManager PushManagerForKey:@"defaultPushManager"];
|
||||
|
||||
@param key A string to identify the helper client.
|
||||
@return An instance of AWSPushManager for specified key.
|
||||
*/
|
||||
+ (instancetype)PushManagerForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Removes the helper client associated with the key and release it.
|
||||
|
||||
*Swift*
|
||||
|
||||
AWSPushManager.remove(forKey: "USWest2PushManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
[AWSPushManager removePushManagerForKey:@"USWest2PushManager"];
|
||||
|
||||
@warning Before calling this method, make sure no method is running on this client.
|
||||
|
||||
@param key A string to identify the helper client.
|
||||
*/
|
||||
+ (void)removePushManagerForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Initializes `PushManager` with the list of topic ARNs.
|
||||
|
||||
@param topicARNs A list of topic ARNs from Amazon SNS. It needs to be an `NSArray` containing only `NSString`.
|
||||
*/
|
||||
- (void)registerTopicARNs:(NSArray<NSString *> *)topicARNs;
|
||||
|
||||
/**
|
||||
Returns a topic associated with the specified topic ARN.
|
||||
|
||||
@param topicARN A topic ARN from Amazon SNS.
|
||||
|
||||
@return The topic with the specified topic ARN.
|
||||
*/
|
||||
- (AWSPushTopic *)topicForTopicARN:(NSString *)topicARN;
|
||||
|
||||
/**
|
||||
Initiates the process to enable Push Notifications.
|
||||
When called for the first time, it asks the user for the permission to enable Push Notifications. If the user decline it, it fails to enable Push Notifications.
|
||||
|
||||
On success, it calls `- pushManagerDidRegister:` from `AWSPushManagerDelegate`.
|
||||
On failure, it calls `- pushManager:didFailToRegisterWithError:` from `AWSPushManagerDelegate`.
|
||||
*/
|
||||
- (void)registerForPushNotifications;
|
||||
|
||||
/**
|
||||
Unsubscribes from all subscribed topics, then marks `PushManager` as disabled.
|
||||
|
||||
On success, it calls `- pushManagerDidDisable:` from `AWSPushManagerDelegate`.
|
||||
On failure, it calls `- pushManager:didFailToDisableWithError:` from `AWSPushManagerDelegate`.
|
||||
*/
|
||||
- (void)disablePushNotifications;
|
||||
|
||||
/**
|
||||
Intercepts the `- application:didFinishLaunchingWithOptions:` application delegate.
|
||||
|
||||
@param application Your singleton app object.
|
||||
@param launchOptions A dictionary indicating the reason the app was launched (if any). The contents of this dictionary may be empty in situations where the user launched the app directly. For information about the possible keys in this dictionary and how to handle them, see Launch Options Keys.
|
||||
*/
|
||||
- (BOOL)interceptApplication:(UIApplication *)application
|
||||
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions;
|
||||
|
||||
/**
|
||||
Intercepts the `- application:didRegisterForRemoteNotificationsWithDeviceToken:` application delegate.
|
||||
|
||||
@param application The app object that initiated the remote-notification registration process.
|
||||
@param deviceToken A token that identifies the device to APNs.
|
||||
*/
|
||||
- (void)interceptApplication:(UIApplication *)application
|
||||
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
|
||||
|
||||
/**
|
||||
Intercepts the `- application:didFailToRegisterForRemoteNotificationsWithError:` application delegate.
|
||||
|
||||
@param application The app object that initiated the remote-notification registration process.
|
||||
@param error An `NSError` object that encapsulates information why registration did not succeed.
|
||||
*/
|
||||
- (void)interceptApplication:(UIApplication *)application
|
||||
didFailToRegisterForRemoteNotificationsWithError:(nullable NSError *)error;
|
||||
|
||||
/**
|
||||
Intercepts the `- application:didReceiveRemoteNotification:` application delegate.
|
||||
|
||||
@param application The app object that received the remote notification.
|
||||
@param userInfo A dictionary that contains information related to the remote notification, potentially including a badge number for the app icon, an alert sound, an alert message to display to the user, a notification identifier, and custom data. The provider originates it as a JSON-defined dictionary that iOS converts to an `NSDictionary` object; the dictionary may contain only property-list objects plus `NSNull`.
|
||||
*/
|
||||
- (void)interceptApplication:(UIApplication *)application
|
||||
didReceiveRemoteNotification:(nullable NSDictionary *)userInfo;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
A topic object.
|
||||
*/
|
||||
@interface AWSPushTopic : NSObject
|
||||
|
||||
/**
|
||||
Initializes the topic object with a given topic ARN.
|
||||
|
||||
@param topicARN A topic ARN from Amazon SNS.
|
||||
|
||||
@return An initialized instance of `PushTopic`.
|
||||
*/
|
||||
- (instancetype)initWithTopicARN:(NSString *)topicARN
|
||||
pushManager:(AWSPushManager *)pushManager;
|
||||
|
||||
/**
|
||||
The topic ARN.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *topicARN;
|
||||
|
||||
/**
|
||||
The topic name.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *topicName;
|
||||
|
||||
/**
|
||||
Indicates if the device is registered for the topic.
|
||||
*/
|
||||
@property (nonatomic, readonly, getter=isSubscribed) BOOL subscribed;
|
||||
|
||||
/**
|
||||
The subscription ARN from Amazon SNS.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSString *subscriptionARN;
|
||||
|
||||
/**
|
||||
Subscribes the device to the topic.
|
||||
|
||||
On success, it calls `- topicDidSubscribe:` from `AWSPushTopicDelegate`.
|
||||
On failure, it calls `topic:didFailToSubscribeWithError:` from `AWSPushTopicDelegate`.
|
||||
*/
|
||||
- (void)subscribe;
|
||||
|
||||
/**
|
||||
Unsubscribes the device from the topic.
|
||||
|
||||
On success, it calls `- topicDidUnsubscribe:` from `AWSPushTopicDelegate`.
|
||||
On failure, it calls `topic:didFailToUnsubscribeWithError:` from `AWSPushTopicDelegate`.
|
||||
*/
|
||||
- (void)unsubscribe;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
/**
|
||||
A delegate for receiving `PushManager` events.
|
||||
*/
|
||||
@protocol AWSPushManagerDelegate <NSObject>
|
||||
|
||||
@required
|
||||
|
||||
/**
|
||||
Indicates the success of the `- registerForPushNotifications` call.
|
||||
|
||||
@param pushManager An instance of `PushManager`.
|
||||
*/
|
||||
- (void)pushManagerDidRegister:(AWSPushManager *)pushManager;
|
||||
|
||||
/**
|
||||
Indicates the failure of the `- registerForPushNotifications` call.
|
||||
|
||||
@param pushManager An instance of `PushManager`.
|
||||
@param error An `NSError` object that encapsulates information why registration did not succeed.
|
||||
*/
|
||||
- (void)pushManager:(AWSPushManager *)pushManager
|
||||
didFailToRegisterWithError:(NSError *)error;
|
||||
|
||||
/**
|
||||
Indicates the device received a Push Notifiation.
|
||||
|
||||
@param userInfo A dictionary that contains information related to the remote notification, potentially including a badge number for the app icon, an alert sound, an alert message to display to the user, a notification identifier, and custom data. The provider originates it as a JSON-defined dictionary that iOS converts to an `NSDictionary` object; the dictionary may contain only property-list objects plus `NSNull`.
|
||||
*/
|
||||
- (void)pushManager:(AWSPushManager *)pushManager
|
||||
didReceivePushNotification:(NSDictionary *)userInfo;
|
||||
|
||||
/**
|
||||
Indicates the success of the `- disablePushNotifications` call.
|
||||
|
||||
@param pushManager An instance of `PushManager`.
|
||||
*/
|
||||
- (void)pushManagerDidDisable:(AWSPushManager *)pushManager;
|
||||
|
||||
/**
|
||||
Indicates the failure of the `- disablePushNotifications` call.
|
||||
|
||||
@param pushManager An instance of `PushManager`.
|
||||
@param error An `NSError` object that encapsulates information why disable did not succeed.
|
||||
*/
|
||||
- (void)pushManager:(AWSPushManager *)pushManager
|
||||
didFailToDisableWithError:(NSError *)error;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
A delegate for receiving `PushTopic` events.
|
||||
*/
|
||||
@protocol AWSPushTopicDelegate <NSObject>
|
||||
|
||||
@required
|
||||
|
||||
/**
|
||||
Indicates the subscribe succeeded.
|
||||
|
||||
@param topic The topic object.
|
||||
*/
|
||||
- (void)topicDidSubscribe:(AWSPushTopic *)topic;
|
||||
|
||||
/**
|
||||
Indicates the subscribe failed.
|
||||
|
||||
@param topic The topic object.
|
||||
@param error An `NSError` object that encapsulates information why subscribe did not succeed.
|
||||
*/
|
||||
- (void)topic:(AWSPushTopic *)topic
|
||||
didFailToSubscribeWithError:(NSError *)error;
|
||||
|
||||
/**
|
||||
Indicates the unsubscribe succeeded.
|
||||
|
||||
@param topic The topic object.
|
||||
*/
|
||||
- (void)topicDidUnsubscribe:(AWSPushTopic *)topic;
|
||||
|
||||
/**
|
||||
Indicates the unsubscribe failed.
|
||||
|
||||
@param topic The topic object.
|
||||
@param error An `NSError` object that encapsulates information why unsubscribe did not succeed.
|
||||
*/
|
||||
- (void)topic:(AWSPushTopic *)topic
|
||||
didFailToUnsubscribeWithError:(NSError *)error;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* `AWSPushManagerConfiguration` is the configuration object for `AWSPushManager` class.
|
||||
*/
|
||||
@interface AWSPushManagerConfiguration : NSObject
|
||||
|
||||
@property (nonatomic, readonly, nullable) AWSServiceConfiguration *serviceConfiguration;
|
||||
@property (nonatomic, readonly) NSString *platformARN;
|
||||
@property (nonatomic, readonly, nullable) NSArray<NSString *> *topicARNs;
|
||||
|
||||
/**
|
||||
Returns an instance of `AWSPushManagerConfiguration`. Use this as the configuration object for AWSPushManager.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
AWSServiceManager.default().defaultServiceConfiguration = configuration
|
||||
|
||||
let pushManagerConfiguration = AWSPushManagerConfiguration(snsPlatformARN: "SNS_PLATFORM_ARN")
|
||||
|
||||
AWSPushManager.register(with: pushManagerConfiguration, forKey: "defaultPushManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
|
||||
AWSPushManagerConfiguration *pushManagerConfiguration = [[AWSPushManager alloc] initWithSNSPlatformARN:@"SNS_PLATFORM_ARN"];
|
||||
[AWSPushManager registerPushManagerWithConfiguration:pushManagerConfiguration
|
||||
forKey:@"defaultPushManager"];
|
||||
|
||||
@param snsPlatformARN The SNS Platform ARN
|
||||
|
||||
@return an instance of `AWSPushManagerConfiguration`
|
||||
*/
|
||||
- (instancetype)initWithPlatformARN:(NSString *)platformARN;
|
||||
|
||||
/**
|
||||
Returns an instance of `AWSPushManagerConfiguration`. Use this as the configuration object for AWSPushManager.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
|
||||
|
||||
let pushManagerConfiguration = AWSPushManagerConfiguration(snsPlatformARN: "SNS_PLATFORM_ARN", topicARNs: nil, serviceConfiguration: configuration)
|
||||
|
||||
AWSPushManager.register(with: pushManagerConfiguration, forKey: "defaultPushManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
|
||||
credentialsProvider:credentialsProvider];
|
||||
|
||||
AWSPushManagerConfiguration *pushManagerConfiguration = [[AWSPushManager alloc] initWithSNSPlatformARN:@"SNS_PLATFORM_ARN"
|
||||
topicARNs:nil
|
||||
serviceConfiguration:configuration];
|
||||
[AWSPushManager registerPushManagerWithConfiguration:pushManagerConfiguration
|
||||
forKey:@"defaultPushManager"];
|
||||
|
||||
@param platformARN The SNS Platform ARN
|
||||
@param topicARN The list of SNS topics that could be registered
|
||||
@param serviceConfiguration AWSServiceConfiguration object; nil for default configuration
|
||||
@return an instance of `AWSPushManagerConfiguration`
|
||||
*/
|
||||
- (instancetype)initWithPlatformARN:(NSString *)platformARN
|
||||
topicARNs:(nullable NSArray<NSString *> *)topicARNs
|
||||
serviceConfiguration:(nullable AWSServiceConfiguration *)serviceConfiguration;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,64 +0,0 @@
|
||||
//
|
||||
// AWSQuickbooksAuthorizationManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import "AWSAuthorizationManager.h"
|
||||
|
||||
@interface AWSQuickbooksAuthorizationManager : AWSAuthorizationManager
|
||||
|
||||
/**
|
||||
* Singleton used to authorize user during OAuth1.0
|
||||
* @return the singleton
|
||||
*/
|
||||
+ (instancetype _Nonnull)sharedInstance;
|
||||
|
||||
/**
|
||||
* Customize the flow.
|
||||
*
|
||||
* @param key The API key provided by Quickbooks
|
||||
* @param redirectURI The redirect URI you provided Zendesk
|
||||
* i.e. https://mysampleapp.amazonaws.com/zendesk/success
|
||||
*/
|
||||
- (void)configureWithAPIKey:(NSString * _Nonnull)key
|
||||
redirectURI:(NSString * _Nonnull)redirectURI;
|
||||
|
||||
/**
|
||||
* The secret must be set before attempting to authorize.
|
||||
* It is recommended that this secret be securely passed to this point.
|
||||
*
|
||||
* @param secret The API secret provided by Quickbooks
|
||||
* i.e. @"abc123"
|
||||
*/
|
||||
- (void)setAPISecret:(NSString * _Nonnull)secret;
|
||||
|
||||
/**
|
||||
* @return The API secret used to authorize
|
||||
*/
|
||||
- (NSString * _Nullable)getAPIKey;
|
||||
|
||||
/**
|
||||
* @return The API secret used to authorize
|
||||
*/
|
||||
- (NSString * _Nullable)getAPISecret;
|
||||
|
||||
/**
|
||||
* @return The access token, available after authorization
|
||||
*/
|
||||
- (NSString * _Nullable)getAccessToken;
|
||||
|
||||
/**
|
||||
* @return The token secret, available after authorization
|
||||
*/
|
||||
- (NSString * _Nullable)getAccessTokenSecret;
|
||||
|
||||
/**
|
||||
* @return The realm ID, available after authorization
|
||||
*/
|
||||
- (NSString * _Nullable)getRealmID;
|
||||
|
||||
@end
|
||||
@@ -1,167 +0,0 @@
|
||||
//
|
||||
// AWSSAMLSignInProvider.h
|
||||
// AWSMobileHubHelper
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import "AWSSignInProvider.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Any class over-riding the `AWSSAMLSignInProvider` class for implemeting `SAML` as a sign-in provider,
|
||||
* should also adopt the `AWSSAMLSignInProviderInstance` protocol.
|
||||
*/
|
||||
@protocol AWSSAMLSignInProviderInstance
|
||||
|
||||
/**
|
||||
* The shared instance of the class implementing `SAML` as a sign-in provider.
|
||||
*
|
||||
* @return the shared instance of the class implementing `SAML` as a sign-in provider.
|
||||
*/
|
||||
+ (id<AWSSignInProvider>)sharedInstance;
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSSAMLSignInProvider : NSObject <AWSSignInProvider>
|
||||
|
||||
#pragma mark - Initializer
|
||||
|
||||
/*
|
||||
The only initializer for AWSSAMLSignInProvider. This initializer has to be used by the class over-riding AWSSAMLSignInProvider.
|
||||
@param uniqueIdentifier The unique identifier string for the SAML Sign In Provider
|
||||
@param identityProviderName The identifier provider name for SAML provider (the Identity Provider ARN for SAML)
|
||||
@return instance of AWSSAMLSignInProvider
|
||||
*/
|
||||
- (instancetype)initWithIdentifier:(NSString *)uniqueIdentifier
|
||||
identityProviderName:(NSString *)identityProviderName;
|
||||
|
||||
#pragma mark - Mandatory Override Methods
|
||||
|
||||
// The user is expected to over the methods in this pragma mark
|
||||
|
||||
/**
|
||||
* This method will be called when `loginWithSignInProvider` is invoked from `AWSIdentityManager`.
|
||||
* Developer is expected to call `setResult` on `taskCompletionSource` with the SAML login token on a successful login,
|
||||
* or `setError` when the login is cancelled or encounters an error.
|
||||
*
|
||||
* The token internally is stored in the keychain store, and a flag is set in `NSUserDefaults` indicating the user is logged in using this `SAML` sign-in provider.
|
||||
*
|
||||
* ** Objective-C ***
|
||||
* - (void)handleLoginWithTaskCompletionSource:(AWSTaskCompletionSource<NSString *> *)taskCompletionSource {
|
||||
* // handle login logic
|
||||
* if(loginSuccessful) {
|
||||
* [taskCompletionSource setResult:@"SuccessfullyGeneratedToken"];
|
||||
* } else {
|
||||
* [taskCompletionSource setError:error];
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* ** Swift **
|
||||
* func handleLogicWithTaskCompletionSource(taskCompletionSource: AWSTaskCompletionSource<String>) {
|
||||
* if(loginSuccessful) {
|
||||
* taskCompletionSource.setResult("SuccessfullyGeneratedToken")
|
||||
* } else {
|
||||
* taskCompletionSource.setError(error)
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @param taskCompletionSource the `AWSTaskCompletionSource` object which is used to call `setResult` or `setError`
|
||||
*/
|
||||
- (void)handleLoginWithTaskCompletionSource:(AWSTaskCompletionSource<NSString *> *)taskCompletionSource;
|
||||
|
||||
/**
|
||||
* This method is called whenver the cognito credentials are refreshed or when app is loaded from background state / closed state.
|
||||
* The previous saved token can be fetched using `fetchStoredToken`, and if it is valid the same can be returned without refreshing.
|
||||
*
|
||||
* @return an instance of `AWSTask`. `task.result` should contain the valid token in case of successful token fetch, or `task.error` should be set
|
||||
*/
|
||||
- (AWSTask<NSString *>*)fetchLatestToken;
|
||||
|
||||
#pragma mark - Optional Override Methods
|
||||
|
||||
/**
|
||||
* Passes parameters used to launch the application to the current identity provider.
|
||||
* It can be used to complete the user sign-in call flow, which uses a browser to
|
||||
* get information from the user, directly. The current sign-in provider will be set to nil if
|
||||
* the sign-in provider is not registered using `registerAWSSignInProvider:forKey` method of
|
||||
* `AWSSignInProviderFactory` class.
|
||||
*
|
||||
* @param application application
|
||||
* @param launchOptions options used to launch the application
|
||||
* @return true if this call handled the operation
|
||||
*/
|
||||
- (BOOL)interceptApplication:(UIApplication *)application
|
||||
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions;
|
||||
|
||||
/**
|
||||
* Passes parameters used to launch the application to the current identity provider.
|
||||
* It can be used to complete the user sign-in call flow, which uses a browser to
|
||||
* get information from the user, directly. The developer should store a reference to
|
||||
* the `taskCompletionSource` instance provided by the `handleLoginWithTaskCompletionSouce`
|
||||
* method to set the result with successfully retrieved token.
|
||||
*
|
||||
* @param application application
|
||||
* @param url url used to open the application
|
||||
* @param sourceApplication source application
|
||||
* @param annotation annotation
|
||||
* @return true if this call handled the operation
|
||||
*/
|
||||
- (BOOL)interceptApplication:(UIApplication *)application
|
||||
openURL:(NSURL *)url
|
||||
sourceApplication:(nullable NSString *)sourceApplication
|
||||
annotation:(id)annotation;
|
||||
|
||||
#pragma mark - Instance Methods
|
||||
|
||||
/**
|
||||
* Sets the userName value of the signed-in user into a persistent store.
|
||||
* Should be called on a successful login to set the user name which is used by `AWSIdentityManager`.
|
||||
*
|
||||
* @param userName the user name of the signed-in user
|
||||
*/
|
||||
- (void)setUserName:(NSString *)userName;
|
||||
|
||||
/**
|
||||
* Sets the imageURL value of the signed-in user into a persistent store.
|
||||
* Should be called on a successful login to set the user name which is used by `AWSIdentityManager`.
|
||||
*
|
||||
* @param imageURL the image URL for a picture of the signed-in user
|
||||
*/
|
||||
- (void)setImageURL:(NSURL *)imageURL;
|
||||
|
||||
/**
|
||||
* Can be used to store a reference of teh view controller from which `loginWithSignInProvider` is invoked by `AWSIdentityManager`
|
||||
*
|
||||
* @param signInViewController the signInViewController object whose reference needs to be stored
|
||||
*/
|
||||
- (void)setViewControllerForSignIn:(UIViewController *)signInViewController;
|
||||
|
||||
/**
|
||||
* This method returns the view controller whose reference was stored using `setViewControllerForSignIn`
|
||||
*
|
||||
* @return the stored view controller if set, else `nil`
|
||||
*/
|
||||
- (UIViewController *)getViewControllerForSignIn;
|
||||
|
||||
/**
|
||||
* Returns the token stored in keychain as-is (without refreshing)
|
||||
*
|
||||
* @return the token if available in keychain, else `nil`
|
||||
*/
|
||||
- (NSString *)fetchStoredToken;
|
||||
|
||||
/**
|
||||
* Determines if the user is logged in based on the token available in keychain and if the login flag is set internally.
|
||||
*
|
||||
* @return `YES` if the user is logged in using `SAML` sign-in provider instance
|
||||
*/
|
||||
- (BOOL)isLoggedIn;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,43 +0,0 @@
|
||||
//
|
||||
// AWSSalesforceAuthorizationManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import "AWSAuthorizationManager.h"
|
||||
|
||||
@interface AWSSalesforceAuthorizationManager : AWSAuthorizationManager
|
||||
|
||||
/**
|
||||
* Singleton used to authorize user during OAuth2.0
|
||||
* @return the singleton
|
||||
*/
|
||||
+ (instancetype _Nonnull)sharedInstance;
|
||||
|
||||
/**
|
||||
* Customize the flow.
|
||||
*
|
||||
* @param clientID Client ID provided by Salesforce.
|
||||
* @param redirectURI Should be you're bundle ID or universal URL
|
||||
* i.e. com.amazonaws.mysampleapp://salesforce/success
|
||||
* https://mysampleapp.amazonaws.com/success
|
||||
* @return the singleton
|
||||
*/
|
||||
- (void)configureWithClientID:(NSString * _Nonnull)clientID redirectURI:(NSString * _Nonnull)redirectURI;
|
||||
|
||||
/**
|
||||
* @return The token type. Available after user authorizes app.
|
||||
* i.e. Bearer
|
||||
*/
|
||||
- (NSString * _Nullable)getTokenType;
|
||||
|
||||
/**
|
||||
* @return The instance Salesforce has assigned you. Available after user authorizes app.
|
||||
* i.e. https://na15.salesforce.com/
|
||||
*/
|
||||
- (NSString * _Nullable)getInstanceURL;
|
||||
|
||||
@end
|
||||
@@ -1,84 +0,0 @@
|
||||
//
|
||||
// AWSSignInProvider.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AWSCore/AWSCore.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class AWSIdentityManager;
|
||||
|
||||
/**
|
||||
* `AWSSignInProvider` protocol defines a list of methods and properties which a Sign-In Provider should implement.
|
||||
*
|
||||
* The AWSSignInProvider is implemented by difference Sign-In Providers like FacbookSignInProvider, GoogleSignInProvider, etc.
|
||||
*
|
||||
*/
|
||||
@protocol AWSSignInProvider <AWSIdentityProvider>
|
||||
|
||||
/**
|
||||
Determines if a user is logged in.
|
||||
*/
|
||||
@property (nonatomic, readonly, getter=isLoggedIn) BOOL loggedIn;
|
||||
|
||||
/**
|
||||
The URL for profile image of a user.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSURL *imageURL;
|
||||
|
||||
/**
|
||||
The User Name of a user.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSString *userName;
|
||||
|
||||
/**
|
||||
The login handler method for the Sign-In Provider.
|
||||
The completionHandler will bubble back errors to the developers.
|
||||
*/
|
||||
- (void)login:(void (^)(id _Nullable result, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
The logout handler method for the Sign-In Provider.
|
||||
*/
|
||||
- (void)logout;
|
||||
|
||||
/**
|
||||
* Call this method on a successful login. This method should store a flag in persistent storage which determines if the user has signed-in using this sign-in provider.
|
||||
* This method is called by AWSIdentityManager on `interceptApplication:didFinishLaunchingWithOptions` method to set the current sign-in provider.
|
||||
*/
|
||||
- (void)setCachedLoginFlag;
|
||||
|
||||
/**
|
||||
* Clears the cached login flag. This method should be called during `logout` to clear the stored flag.
|
||||
*/
|
||||
- (void)clearCachedLoginFlag;
|
||||
|
||||
/**
|
||||
* Fetches the status of the cached login flag set using `setCachedLoginFlag`.
|
||||
*
|
||||
* @return `YES` if the setCachedLoginFlag is set.
|
||||
*/
|
||||
- (BOOL)isCachedLoginFlagSet;
|
||||
|
||||
/**
|
||||
The handler method for managing the session reload for the Sign-In Provider.
|
||||
*/
|
||||
- (void)reloadSession;
|
||||
|
||||
- (BOOL)interceptApplication:(UIApplication *)application
|
||||
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions;
|
||||
|
||||
- (BOOL)interceptApplication:(UIApplication *)application
|
||||
openURL:(NSURL *)url
|
||||
sourceApplication:(nullable NSString *)sourceApplication
|
||||
annotation:(id)annotation;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,44 +0,0 @@
|
||||
//
|
||||
// AWSSignInProviderFactory.h
|
||||
// AWSMobileHubHelper
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSSignInProvider.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*
|
||||
`AWSSignInProviderFactory` stores the instances of the sign in providers implemented using the protocol `AWSSignInProvider`. The instances registered with `AWSSignInProviderFactory` are fetched by `AWSIdentityManager` when `interceptApplication:didFinishLaunchingWithOptions` is called from `AWSMobileClient`.
|
||||
*/
|
||||
@interface AWSSignInProviderFactory : NSObject
|
||||
|
||||
// Fetches the shared instance of `AWSSignInProviderFactory`.
|
||||
+(instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
Registers the shared instance of sign in provider implementing `AWSSignInProvider` with specified key.
|
||||
|
||||
@param signInProvider The shared instance of sign in provider implementing `AWSSignInProvider` protocol.
|
||||
@param key A string to identify the signInProvider.
|
||||
**/
|
||||
-(void)registerAWSSignInProvider:(id<AWSSignInProvider>)signInProvider
|
||||
forKey:(NSString *)key NS_SWIFT_NAME(register(signInProvider:forKey:));
|
||||
|
||||
/**
|
||||
Fetches the shared instance of sign in provider implementing `AWSSignInProvider` with specified key.
|
||||
|
||||
@param key A string to identify the signInProvider.
|
||||
|
||||
@return The shared instance of sign in provider implementing `AWSSignInProvider` registered with specified key.
|
||||
**/
|
||||
-(id<AWSSignInProvider>)signInProviderForKey:(NSString *)key;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,358 +0,0 @@
|
||||
//
|
||||
// AWSUserFileManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
#import <AWSCore/AWSCore.h>
|
||||
#import "AWSContentManager.h"
|
||||
|
||||
@class AWSLocalContent;
|
||||
@class AWSUserFileManagerConfiguration;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* `AWSUserFileManager` inherits from `AWSContentManager` and adds the upload capabilities.
|
||||
*
|
||||
* The User File Manager uploads and downloads files from Amazon S3. It caches downloaded
|
||||
* files locally on the device in a size-limited cache. Downloaded files may be pinned
|
||||
* to the cache, so that they are not automatically removed when the cache size limit
|
||||
* is exceeded. The User File Manager provides access to two folders in the Amazon S3 bucket,
|
||||
* one called "public/" for public files, which are accessible to any user of the app,
|
||||
* and one called "private/" which contains a sub-folder for each Amazon Cognito
|
||||
* identified user. Files in the user's private folder can only be accessed by that user.
|
||||
* The User File Manager serves as the application's interface into the file-related
|
||||
* functionality of the User Data Storage feature.
|
||||
* Requires the AWSS3 framework of AWSiOSSDK.
|
||||
*/
|
||||
@interface AWSUserFileManager : AWSContentManager
|
||||
|
||||
/**
|
||||
* The list of currently uploading contents.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSArray<AWSLocalContent *> *uploadingContents;
|
||||
|
||||
/**
|
||||
Returns the default User File Manager singleton instance configured using the information provided in `Info.plist` file.
|
||||
|
||||
*Swift*
|
||||
|
||||
let userFileManager = AWSUserFileManager.defaultUserFileManager()
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSUserFileManager *userFileManager = [AWSUserFileManager defaultUserFileManager];
|
||||
|
||||
*/
|
||||
+ (instancetype)defaultUserFileManager NS_SWIFT_NAME(defaultUserFileManager());
|
||||
|
||||
/**
|
||||
Creates a helper client for AWSUserFileManager for specified configuration with mentioned key.
|
||||
Use this method only if you require a helper client with specific configuration.
|
||||
|
||||
For example, set the configuration in `- application:didFinishLaunchingWithOptions:`
|
||||
|
||||
*Swift*
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
let userFileManagerConfiguration = AWSUserFileManagerConfiguration(bucketName: "myBucket", serviceConfiguration: configuration)
|
||||
AWSUserFileManager.register(with: userFileManagerConfiguration, forKey: "USWest2BucketManager")
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSUserFileManagerConfiguration *userFileManagerConfiguration = [[AWSUserFileManager alloc] initWithBucketName:@"myBucketName"
|
||||
serviceConfiguration:configuration];
|
||||
[AWSUserFileManager registerUserFileManagerWithConfiguration:userFileManagerConfiguration
|
||||
forKey:@"USWest2BucketManager"];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
Then call the following to get the helper client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let userFilemanager = AWSUserFileManager(forKey: "USWest2BucketManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSUserFileManager *userFileManager = [AWSUserFileManager userFileManagerForKey:@"USWest2BucketManager"];
|
||||
|
||||
@warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
|
||||
|
||||
@param userFileManagerConfiguration AWSUserFileManagerConfiguration object for the manager.
|
||||
@param key A string to identify the helper client.
|
||||
*/
|
||||
+ (void)registerUserFileManagerWithConfiguration:(AWSUserFileManagerConfiguration *)userFileManagerConfiguration
|
||||
forKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Retrieves the helper client associated with the key. You need to call `+ registerUserFileManagerWithConfiguration:forKey:` before invoking this method. If `+ registerUserFileManagerWithConfiguration:forKey:` has not been called in advance or the key does not exist, this method returns `nil`.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
let userFileManagerConfiguration = AWSUserFileManagerConfiguration(bucketName: "myBucket", serviceConfiguration: configuration)
|
||||
AWSUserFileManager.register(with: userFileManagerConfiguration, forKey: "USWest2BucketManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSUserFileManagerConfiguration *userFileManagerConfiguration = [[AWSUserFileManager alloc] initWithBucketName:@"myBucketName"
|
||||
serviceConfiguration:configuration];
|
||||
[AWSUserFileManager registerUserFileManagerWithConfiguration:userFileManagerConfiguration
|
||||
forKey:@"USWest2BucketManager"];
|
||||
|
||||
Then call the following to get the helper client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let UserFilemanager = AWSUserFileManager(forKey: "USWest2BucketManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSUserFileManager *UserFileManager = [AWSUserFileManager UserFileManagerForKey:@"USWest2BucketManager"];
|
||||
|
||||
|
||||
@param key A string to identify the helper client.
|
||||
@return An instance of AWSUserFileManager for specified key.
|
||||
*/
|
||||
+ (instancetype)UserFileManagerForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Removes the helper client associated with the key and release it.
|
||||
|
||||
*Swift*
|
||||
|
||||
AWSUserFileManager.remove(forKey: "USWest2BucketManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
[AWSUserFileManager removeUserFileManagerForKey:@"USWest2BucketManager"];
|
||||
|
||||
@warning Before calling this method, make sure no method is running on this client.
|
||||
|
||||
@param key A string to identify the helper client.
|
||||
*/
|
||||
+ (void)removeUserFileManagerForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Returns an instance of `AWSLocalContent`. You use this method to create an instance of `AWSLocalContent` to upload data to an Amazon S3 bucket with the specified key.
|
||||
|
||||
*Swift*
|
||||
|
||||
func uploadWithData(data: NSData, forKey key: String) {
|
||||
|
||||
let userFilemanager = AWSUserFileManager(forKey: "KeyUsedToRegister")
|
||||
let localContent = userFilemanager.localContent(with: data, key: key)
|
||||
localContent.uploadWithPinOnCompletion(..., progressBlock: ..., completionHandler: ...)
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (void)uploadWithData:(NSData *)data forKey:(NSString *)key {
|
||||
|
||||
AWSUserFileManager *userFileManager = [AWSUserFileManager userFileManagerForKey:@"KeyUsedToRegister"];
|
||||
AWSLocalContent *localContent = [self.manager localContentWithData:data
|
||||
key:key];
|
||||
[localContent uploadWithPinOnCompletion:...
|
||||
progressBlock:...
|
||||
completionHandler:...];
|
||||
}
|
||||
|
||||
@param data The data to be uploaded.
|
||||
@param key The Amazon S3 key.
|
||||
|
||||
@return An instance of `AWSLocalContent` that represents data to be uploaded.
|
||||
*/
|
||||
- (AWSLocalContent *)localContentWithData:(nullable NSData *)data
|
||||
key:(NSString *)key;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* A category to add remote file removal to `AWSContent`.
|
||||
*/
|
||||
@interface AWSContent(AWSUserFileManager)
|
||||
|
||||
/**
|
||||
Removes the remote file associated with `AWSContent`.
|
||||
|
||||
*Swift*
|
||||
|
||||
func removeContent(content: AWSContent) {
|
||||
content.removeRemoteContent(completionHandler: {(content: AWSContent?, error: NSError?) -> Void in
|
||||
if let error = error {
|
||||
print("Failed to delete an object from the remote server. \(error)")
|
||||
} else {
|
||||
print("Success")
|
||||
// Do something further
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (void)removeContent:(AWSContent *)content {
|
||||
[content removeRemoteContentWithCompletionHandler:^(AWSContent *content, NSError *error) {
|
||||
if (error) {
|
||||
NSLog(@"Failed to delete an object from the remote server. %@", error);
|
||||
} else {
|
||||
NSLog(@"Success");
|
||||
// Do something further
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@param completionHandler The completion handler block.
|
||||
*/
|
||||
- (void)removeRemoteContentWithCompletionHandler:(void(^ _Nullable)(AWSContent * _Nullable content, NSError * _Nullable error))completionHandler;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* A representation of the local content that may not exist in the Amazon S3 bucket yet. When uploading data to an S3 bucket, you first need to create an instance of this class.
|
||||
*/
|
||||
@interface AWSLocalContent : AWSContent
|
||||
|
||||
/**
|
||||
Uploads data associated with the local content.
|
||||
|
||||
*Swift*
|
||||
|
||||
func uploadWithData(data: NSData, forKey key: String) {
|
||||
|
||||
let userFilemanager = AWSUserFileManager(forKey: "KeyUsedToRegister")
|
||||
let localContent = userFilemanager.localContent(with: data, key: key)
|
||||
localContent.uploadWithPinOnCompletion(false, progressBlock: {(content: AWSLocalContent?, progress: NSProgress?) -> Void in
|
||||
// handle progress here
|
||||
}, completionHandler: {(content: AWSContent?, error: Error?) -> Void in
|
||||
if let error = error {
|
||||
// handle error here
|
||||
print("Error occured in uploading: \(error)")
|
||||
return
|
||||
}
|
||||
// handle successful upload here
|
||||
})
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (void)uploadWithData:(NSData *)data forKey:(NSString *)key {
|
||||
|
||||
AWSUserFileManager *userFileManager = [AWSUserFileManager userFileManagerForKey:@"KeyUsedToRegister"];
|
||||
AWSLocalContent *localContent = [self.manager localContentWithData:data
|
||||
key:key];
|
||||
[localContent uploadWithPinOnCompletion:NO
|
||||
progressBlock:^(AWSLocalContent *content, NSProgress *progress) {
|
||||
// handle progress here
|
||||
}
|
||||
completionHandler:^(AWSContent *content, NSError *error) {
|
||||
if (error) {
|
||||
// handle error here
|
||||
NSLog(@"Error occured in uploading: %@", error);
|
||||
return;
|
||||
}
|
||||
// perform tasks after successful upload
|
||||
}];
|
||||
}
|
||||
|
||||
@param pinOnCompletion When set to `YES`, it pins the content after finishing uploading it.
|
||||
@param progressBlock The upload progress block.
|
||||
@param completionHandler The completion handler block.
|
||||
*/
|
||||
- (void)uploadWithPinOnCompletion:(BOOL)pinOnCompletion
|
||||
progressBlock:(void(^ _Nullable)(AWSLocalContent *content, NSProgress *progress))progressBlock
|
||||
completionHandler:(void(^ _Nullable)(AWSLocalContent * _Nullable content, NSError * _Nullable error))completionHandler;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* `AWSUserFileManagerConfiguration` is the configuration object for `AWSUserFileManager` class.
|
||||
*
|
||||
*/
|
||||
@interface AWSUserFileManagerConfiguration: NSObject
|
||||
|
||||
@property (nonatomic, assign, readonly) AWSServiceConfiguration *serviceConfiguration;
|
||||
@property (nonatomic, readonly) NSString *bucketName;
|
||||
|
||||
/**
|
||||
Returns an instance of `AWSUserFileManagerConfiguration`. Use this as the configuration object for AWSUserFileManager.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
|
||||
let userFileManagerConfiguration = AWSUserFileManagerConfiguration(bucketName: "myBucket", serviceConfiguration: configuration)
|
||||
|
||||
AWSUserFileManager.registerUserFileManagerWithConfiguration(userFileManagerConfiguration, forKey: "USWest2BucketManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
|
||||
AWSUserFileManagerConfiguration *userFileManagerConfiguration = [[AWSUserFileManager alloc] initWithBucketName:@"myBucketName"
|
||||
serviceConfiguration:configuration];
|
||||
[AWSUserFileManager registerUserFileManagerWithConfiguration:userFileManagerConfiguration
|
||||
forKey:@"USWest2BucketManager"];
|
||||
|
||||
@param bucketName Name of the bucket
|
||||
@param serviceConfiguration AWSServiceConfiguration object; nil for default configuration
|
||||
@return an instance of AWSUserFileManagerConfiguration
|
||||
*/
|
||||
- (instancetype)initWithBucketName:(NSString *)bucketName
|
||||
serviceConfiguration:(nullable AWSServiceConfiguration *)serviceConfiguration;
|
||||
|
||||
/**
|
||||
Returns an instance of `AWSUserFileManagerConfiguration` using the default service configuration. Use this as the configuration object for AWSUserFileManager.
|
||||
|
||||
*Swift*
|
||||
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
AWSServiceManager.defaultServiceManager().defaultServiceConfiguration = configuration
|
||||
|
||||
let userFileManagerConfiguration = AWSUserFileManagerConfiguration(bucketName: "myBucket")
|
||||
|
||||
AWSUserFileManager.registerUserFileManagerWithConfiguration(userFileManagerConfiguration, forKey: "USWest2BucketManager")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
AWSUserFileManagerConfiguration *userFileManagerConfiguration = [[AWSUserFileManager alloc] initWithBucketName:@"myBucketName"];
|
||||
[AWSUserFileManager registerUserFileManagerWithConfiguration:userFileManagerConfiguration
|
||||
forKey:@"USWest2BucketManager"];
|
||||
|
||||
|
||||
@param bucketName Name of the bucket
|
||||
@return an instance of AWSUserFileManagerConfiguration
|
||||
*/
|
||||
- (instancetype)initWithBucketName:(NSString *)bucketName;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,89 +0,0 @@
|
||||
//
|
||||
// AWSZendeskAuthorizationManager.h
|
||||
//
|
||||
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
|
||||
//
|
||||
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
|
||||
// copy, distribute and modify it.
|
||||
//
|
||||
|
||||
#import "AWSAuthorizationManager.h"
|
||||
|
||||
@interface AWSZendeskAuthorizationManager : AWSAuthorizationManager
|
||||
|
||||
/**
|
||||
* Singleton used to authorize user during OAuth2.0
|
||||
* @return the singleton
|
||||
*/
|
||||
+ (instancetype _Nonnull)sharedInstance;
|
||||
|
||||
/**
|
||||
* Customize the flow. This relies on the redirectURI being an Universal link.
|
||||
*
|
||||
* @param clientID The client ID that you signed up for in Zendesk
|
||||
* @param redirectURI The redirect URI you provided Zendesk
|
||||
* i.e. https://mysampleapp.amazonaws.com/zendesk/success
|
||||
* @param subdomain The subdomain that you signed up for in Zendesk
|
||||
*/
|
||||
- (void)configureWithClientID:(NSString * _Nonnull)clientID
|
||||
redirectURI:(NSString * _Nonnull)redirectURI
|
||||
subdomain:(NSString * _Nonnull)subdomain;
|
||||
|
||||
/**
|
||||
* If you are unable to setup Universal links at this moment, then for development purposes
|
||||
* you may consider use a HTTPS endpoint that you control to redirect to a custom app scheme url.
|
||||
*
|
||||
* Example:
|
||||
* Endpoint HTML content at https://awsmobilehub.s3-us-west-2.amazonaws.com/zendesk
|
||||
* <html>
|
||||
* <script>window.location.href = "com.amazon.mysampleapp://zendesk/oauth2" + window.location.href;</script>
|
||||
* </html>
|
||||
*
|
||||
* customSchemeRedirectURI = @"com.amazon.mysampleapp://zendesk/oauth2";
|
||||
* httpsEndpoint = @"https://awsmobilehub.s3-us-west-2.amazonaws.com/zendesk";
|
||||
*
|
||||
* @param clientID The client ID that you signed up for in Zendesk
|
||||
* @param customSchemeRedirectURI The redirectURI that has the custom app scheme
|
||||
* @param httpsEndpoint The HTTPS endpoint that needs to be registered with Zendesk.
|
||||
* This endpoint must redirect the page to the customSchemeRedirectURI
|
||||
* provided here.
|
||||
* @param subdomain The subdomain that you signed up for in Zendesk
|
||||
*/
|
||||
- (void)configureWithClientID:(NSString * _Nonnull)clientID
|
||||
setCustomSchemeRedirectURI:(NSString * _Nonnull)customSchemeRedirectURI
|
||||
httpsEndpoint:(NSString * _Nonnull)httpsEndpoint
|
||||
subdomain:(NSString * _Nonnull)subdomain;
|
||||
|
||||
/**
|
||||
*
|
||||
* Available scopes:
|
||||
* tickets
|
||||
* users
|
||||
* auditlogs (read only)
|
||||
* organizations
|
||||
* hc
|
||||
* apps
|
||||
* triggers
|
||||
* automations
|
||||
* targets
|
||||
*
|
||||
* @param scope Specify the amount of access the user would like.
|
||||
* i.e. @"read"
|
||||
* @"read tickets:write"
|
||||
* @"tickets:read tickets:write"
|
||||
*/
|
||||
- (void)setScope:(NSString * _Nonnull)scope;
|
||||
|
||||
/**
|
||||
* @return The token type. Available after user authorizes app.
|
||||
* i.e. Bearer
|
||||
*/
|
||||
- (NSString * _Nullable)getTokenType;
|
||||
|
||||
/**
|
||||
* @return The subdomain that you signed up for in Zendesk.
|
||||
* i.e. aws
|
||||
*/
|
||||
- (NSString * _Nullable)getSubdomain;
|
||||
|
||||
@end
|
||||
@@ -1,6 +0,0 @@
|
||||
framework module AWSMobileHubHelper {
|
||||
umbrella header "AWSMobileHubHelper.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// AppDelegate.swift
|
||||
// My Mind
|
||||
//
|
||||
// Created by Alexander Davis on 30/03/2017.
|
||||
// Copyright © 2017 Alexander Davis. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import AWSCore
|
||||
import AWSCognitoIdentityProvider
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
func applicationWillResignActive(_ application: UIApplication) {
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
func applicationDidEnterBackground(_ application: UIApplication) {
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_ application: UIApplication) {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
return AWSMobileClient.sharedInstance.didFinishLaunching(application, withOptions: launchOptions)
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
|
||||
return AWSMobileClient.sharedInstance.withApplication(application, withURL: url, withSourceApplication: sourceApplication, withAnnotation: annotation)
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||
AWSMobileClient.sharedInstance.applicationDidBecomeActive(application)
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="GW0-69-bD5">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="M8s-fF-QEx">
|
||||
<objects>
|
||||
<viewController id="GW0-69-bD5" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="lMs-dA-kqk"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="WDo-zS-HHP"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="ppq-VJ-VDs">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright © 2017 Alexander Davis." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="zGC-go-npl">
|
||||
<rect key="frame" x="20" y="626" width="336" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iTunesArtwork" translatesAutoresizingMaskIntoConstraints="NO" id="nap-1D-EZj">
|
||||
<rect key="frame" x="67" y="42" width="242" height="242"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="My Mind" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="Uex-kl-GPa">
|
||||
<rect key="frame" x="20" y="373" width="335" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.25098040700000002" green="0.0" blue="0.50196081400000003" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="zGC-go-npl" secondAttribute="bottom" constant="20" id="58u-0f-xbE"/>
|
||||
<constraint firstItem="zGC-go-npl" firstAttribute="leading" secondItem="ppq-VJ-VDs" secondAttribute="leading" constant="20" symbolic="YES" id="Adf-Vm-odA"/>
|
||||
<constraint firstAttribute="centerX" secondItem="zGC-go-npl" secondAttribute="centerX" id="eca-p0-zJE"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<size key="freeformSize" width="375" height="667"/>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Ioh-gR-H2E" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="52" y="374.66266866566718"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="iTunesArtwork" width="512" height="512"/>
|
||||
</resources>
|
||||
</document>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,34 +0,0 @@
|
||||
//
|
||||
// ForumView.swift
|
||||
// My Mind
|
||||
//
|
||||
// Created by Alexander Davis on 31/03/2017.
|
||||
// Copyright © 2017 Alexander Davis. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
class ForumViewController: UIViewController {
|
||||
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle {
|
||||
return .lightContent
|
||||
}
|
||||
|
||||
@IBOutlet var webView: UIWebView!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
let url = NSURL (string: "https://www.mymindforum.com");
|
||||
let requestObj = NSURLRequest(url: url! as URL);
|
||||
webView.loadRequest(requestObj as URLRequest);
|
||||
}
|
||||
|
||||
override func didReceiveMemoryWarning() {
|
||||
super.didReceiveMemoryWarning()
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AWS</key>
|
||||
<dict>
|
||||
<key>CredentialsProvider</key>
|
||||
<dict>
|
||||
<key>CognitoIdentity</key>
|
||||
<dict>
|
||||
<key>Default</key>
|
||||
<dict>
|
||||
<key>PoolId</key>
|
||||
<string>eu-west-2:53bd16f0-753d-4d1c-8181-3d01aa7811b5</string>
|
||||
<key>Region</key>
|
||||
<string>eu-west-2</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>IdentityManager</key>
|
||||
<dict>
|
||||
<key>Default</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
<key>MobileHub</key>
|
||||
<dict>
|
||||
<key>ProjectClientId</key>
|
||||
<string>MobileHub 9af77051-19c5-4bb5-a348-cfc67821053e aws-my-sample-app-ios-swift-v0.12</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>Cognito</key>
|
||||
<dict>
|
||||
<key>Default</key>
|
||||
<dict>
|
||||
<key>Region</key>
|
||||
<string>eu-west-2</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>fetch</string>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UIStatusBarStyle</key>
|
||||
<string>UIStatusBarStyleLightContent</string>
|
||||
<key>UIStatusBarTintParameters</key>
|
||||
<dict>
|
||||
<key>UINavigationBar</key>
|
||||
<dict>
|
||||
<key>Style</key>
|
||||
<string>UIBarStyleDefault</string>
|
||||
<key>Translucent</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>UserFileManager</key>
|
||||
<dict>
|
||||
<key>Default</key>
|
||||
<dict>
|
||||
<key>Region</key>
|
||||
<string>eu-west-2</string>
|
||||
<key>S3Bucket</key>
|
||||
<string>mymind-userfiles-mobilehub-700183796</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.default-data-protection</key>
|
||||
<string>NSFileProtectionComplete</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,83 +0,0 @@
|
||||
//
|
||||
// OnBoardingController.swift
|
||||
// My Mind
|
||||
//
|
||||
// Created by Alexander Davis on 30/03/2017.
|
||||
// Copyright © 2017 Alexander Davis. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
class OnBoardingController : UIPageViewController {
|
||||
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle {
|
||||
return .lightContent
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
// Set the dataSource and delegate in code.
|
||||
// I can't figure out how to do this in the Storyboard!
|
||||
dataSource = self
|
||||
delegate = self
|
||||
// This is the starting point. Start with step zero.
|
||||
setViewControllers([getPageOne()], direction: .forward, animated: false, completion: nil)
|
||||
}
|
||||
|
||||
func getPageOne() -> PageOne {
|
||||
return storyboard!.instantiateViewController(withIdentifier: "WelcomeScreenOne") as! PageOne
|
||||
}
|
||||
|
||||
func getPageTwo() -> PageTwo {
|
||||
return storyboard!.instantiateViewController(withIdentifier: "WelcomeScreenTwo") as! PageTwo
|
||||
}
|
||||
|
||||
func getPageThree() -> PageThree {
|
||||
return storyboard!.instantiateViewController(withIdentifier: "WelcomeScreenThree") as! PageThree
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - UIPageViewControllerDataSource methods
|
||||
|
||||
extension OnBoardingController : UIPageViewControllerDataSource {
|
||||
|
||||
func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController? {
|
||||
if viewController.isKind(of: PageTwo.self) {
|
||||
// 2 -> 1
|
||||
return getPageTwo()
|
||||
} else if viewController.isKind(of: PageTwo.self) {
|
||||
// 1 -> 0
|
||||
return getPageOne()
|
||||
} else {
|
||||
// 0 -> end of the road
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UIViewController) -> UIViewController? {
|
||||
if viewController.isKind(of: PageOne.self) {
|
||||
// 0 -> 1
|
||||
return getPageTwo()
|
||||
} else if viewController.isKind(of: PageTwo.self) {
|
||||
// 1 -> 2
|
||||
return getPageThree()
|
||||
} else {
|
||||
// 2 -> end of the road
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This only gets called once, when setViewControllers is called
|
||||
func presentationIndex(for pageViewController: UIPageViewController) -> Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - UIPageViewControllerDelegate methods
|
||||
|
||||
extension OnBoardingController : UIPageViewControllerDelegate {
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -1,27 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for AWSCognitoIdentityProvider.
|
||||
FOUNDATION_EXPORT double AWSCognitoIdentityProviderVersionNumber;
|
||||
|
||||
//! Project version string for AWSCognitoIdentityProvider.
|
||||
FOUNDATION_EXPORT const unsigned char AWSCognitoIdentityProviderVersionString[];
|
||||
|
||||
#import <AWSCore/AWSCore.h>
|
||||
#import "AWSCognitoIdentityProviderService.h"
|
||||
#import "AWSCognitoIdentityUserPool.h"
|
||||
#import "AWSCognitoIdentityUser.h"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface AWSCognitoIdentityProviderResources : NSObject
|
||||
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
- (NSDictionary *)JSONObject;
|
||||
|
||||
@end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,326 +0,0 @@
|
||||
//
|
||||
// Copyright 2014-2017 Amazon.com,
|
||||
// Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Amazon Software License (the "License").
|
||||
// You may not use this file except in compliance with the
|
||||
// License. A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/asl/
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is
|
||||
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
// CONDITIONS OF ANY KIND, express or implied. See the License
|
||||
// for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSCognitoIdentityProviderService.h"
|
||||
|
||||
/**
|
||||
The status of the user.
|
||||
<ul>
|
||||
<li>AWSCognitoIdentityUserStatusUnknown - The user status is unknown.</li>
|
||||
<li>AWSCognitoIdentityUserStatusConfirmed - The user was auto confirmed.</li>
|
||||
<li>AWSCognitoIdentityUserStatusUnconfirmed - The user was not confirmed.</li>
|
||||
</ul>
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, AWSCognitoIdentityUserStatus) {
|
||||
AWSCognitoIdentityUserStatusUnknown = 0,
|
||||
AWSCognitoIdentityUserStatusConfirmed = -1000,
|
||||
AWSCognitoIdentityUserStatusUnconfirmed = -2000,
|
||||
};
|
||||
|
||||
@class AWSCognitoIdentityUserPool;
|
||||
@class AWSCognitoIdentityUserSession;
|
||||
@class AWSCognitoIdentityUserSessionToken;
|
||||
@class AWSCognitoIdentityUserSettings;
|
||||
@class AWSCognitoIdentityUserMFAOption;
|
||||
|
||||
@class AWSCognitoIdentityUserConfirmSignUpResponse;
|
||||
@class AWSCognitoIdentityUserGetDetailsResponse;
|
||||
@class AWSCognitoIdentityUserResendConfirmationCodeResponse;
|
||||
@class AWSCognitoIdentityUserForgotPasswordResponse;
|
||||
@class AWSCognitoIdentityUserConfirmForgotPasswordResponse;
|
||||
@class AWSCognitoIdentityUserChangePasswordResponse;
|
||||
@class AWSCognitoIdentityUserAttributeType;
|
||||
@class AWSCognitoIdentityUserUpdateAttributesResponse;
|
||||
@class AWSCognitoIdentityUserDeleteAttributesResponse;
|
||||
@class AWSCognitoIdentityUserVerifyAttributeResponse;
|
||||
@class AWSCognitoIdentityUserGetAttributeVerificationCodeResponse;
|
||||
@class AWSCognitoIdentityUserSetUserSettingsResponse;
|
||||
@class AWSCognitoIdentityUserGlobalSignOutResponse;
|
||||
@class AWSCognitoIdentityUserListDevicesResponse;
|
||||
@class AWSCognitoIdentityUserUpdateDeviceStatusResponse;
|
||||
@class AWSCognitoIdentityUserGetDeviceResponse;
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AWSCognitoIdentityUser : NSObject
|
||||
|
||||
/**
|
||||
The username of this user
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSString *username;
|
||||
|
||||
/**
|
||||
If this user is a result of a signup, this has the confirmation status
|
||||
*/
|
||||
@property (nonatomic, readonly) AWSCognitoIdentityUserStatus confirmedStatus;
|
||||
|
||||
/**
|
||||
Determines whether this user has an active session or not. If the refresh token is expired
|
||||
the user will be prompted to authenticate when you call getSession.
|
||||
*/
|
||||
@property (nonatomic, readonly, getter=isSignedIn) BOOL signedIn;
|
||||
|
||||
/**
|
||||
Get the device id
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString * deviceId;
|
||||
|
||||
/**
|
||||
Confirm a users' sign up with the confirmation code
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserConfirmSignUpResponse *> *)confirmSignUp:(NSString *)confirmationCode;
|
||||
|
||||
|
||||
/**
|
||||
Confirm a users' sign up with the confirmation code. If forceAliasCreation is set, if another user is aliased to the same email/phone this code was sent to, reassign alias to this user.
|
||||
*/
|
||||
-(AWSTask<AWSCognitoIdentityUserConfirmSignUpResponse *> *) confirmSignUp:(NSString *) confirmationCode forceAliasCreation:(BOOL)forceAliasCreation;
|
||||
|
||||
/**
|
||||
Resend the confirmation code sent during sign up
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserResendConfirmationCodeResponse *> *)resendConfirmationCode;
|
||||
|
||||
/**
|
||||
Get a session with id, access and refresh tokens.
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserSession *> *)getSession;
|
||||
|
||||
/**
|
||||
Get a session with the following username and password
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserSession *> *)getSession:(NSString *)username
|
||||
password:(NSString *)password
|
||||
validationData:(nullable NSArray<AWSCognitoIdentityUserAttributeType *> *)validationData;
|
||||
|
||||
/**
|
||||
Get details about this user, including user attributes
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserGetDetailsResponse *> *)getDetails;
|
||||
|
||||
/**
|
||||
Send a code to this user to initiate the forgot password flow
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserForgotPasswordResponse *> *)forgotPassword;
|
||||
|
||||
/**
|
||||
Conclude the forgot password flow by providing the forgot password code and new password.
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserConfirmForgotPasswordResponse *> *)confirmForgotPassword:(NSString *)confirmationCode
|
||||
password:(NSString *)password;
|
||||
|
||||
/**
|
||||
Change this user's password
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserChangePasswordResponse *> *)changePassword:(NSString *)currentPassword
|
||||
proposedPassword:(NSString *)proposedPassword;
|
||||
|
||||
/**
|
||||
Update this user's attributes
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserUpdateAttributesResponse *> *)updateAttributes:(NSArray<AWSCognitoIdentityUserAttributeType *> *)attributes;
|
||||
|
||||
/**
|
||||
Delete the attributes specified by attributeNames
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserDeleteAttributesResponse *> *)deleteAttributes:(NSArray<NSString *> *)attributeNames;
|
||||
|
||||
|
||||
/**
|
||||
Verify a user attribute upon receiving the verification code.
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserVerifyAttributeResponse *> *)verifyAttribute:(NSString *)attributeName
|
||||
code:(NSString *)code;
|
||||
|
||||
/**
|
||||
Request a verification code to verify an attribute.
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserGetAttributeVerificationCodeResponse *> *)getAttributeVerificationCode:(NSString *)attributeName;
|
||||
|
||||
/**
|
||||
Set the user settings for this user such as MFA
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserSetUserSettingsResponse *> *)setUserSettings:(AWSCognitoIdentityUserSettings *)settings;
|
||||
|
||||
/**
|
||||
Delete this user
|
||||
*/
|
||||
- (AWSTask *)deleteUser;
|
||||
|
||||
/**
|
||||
Remove all sessions from the keychain for this user. Last known user remains.
|
||||
*/
|
||||
- (void)signOut;
|
||||
|
||||
/**
|
||||
Invalidate any active sessions with the service. Last known user remains.
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserGlobalSignOutResponse *> *) globalSignOut;
|
||||
|
||||
/**
|
||||
Remove all sessions from the keychain for this user and clear last known user.
|
||||
*/
|
||||
- (void)signOutAndClearLastKnownUser;
|
||||
|
||||
|
||||
/**
|
||||
List devices for this user
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserListDevicesResponse *> *) listDevices: (int) limit paginationToken:(NSString * _Nullable) paginationToken;
|
||||
|
||||
/**
|
||||
Update device remembered status for a specific device id.
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserUpdateDeviceStatusResponse *> *) updateDeviceStatus: (NSString *) deviceId remembered:(BOOL) remembered;
|
||||
|
||||
/**
|
||||
Convenience method to update device remembered status for this device.
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserUpdateDeviceStatusResponse *> *) updateDeviceStatus: (BOOL) remembered;
|
||||
|
||||
|
||||
/**
|
||||
Get device details for a specific deviceId.
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserGetDeviceResponse *> *) getDevice: (NSString *) deviceId;
|
||||
|
||||
/**
|
||||
Convenience method to get device details for this device.
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserGetDeviceResponse *> *) getDevice;
|
||||
|
||||
|
||||
/**
|
||||
Forget (stop tracking) a specific deviceId.
|
||||
*/
|
||||
- (AWSTask *) forgetDevice: (NSString *) deviceId;
|
||||
|
||||
/**
|
||||
Forget (stop tracking) this device.
|
||||
*/
|
||||
- (AWSTask *) forgetDevice;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
/**
|
||||
A User session. Encapsulates all tokens (id, access and refresh tokens) for a user.
|
||||
*/
|
||||
@interface AWSCognitoIdentityUserSession : NSObject
|
||||
|
||||
@property (nonatomic, readonly) AWSCognitoIdentityUserSessionToken * _Nullable idToken;
|
||||
@property (nonatomic, readonly) AWSCognitoIdentityUserSessionToken * _Nullable accessToken;
|
||||
@property (nonatomic, readonly) AWSCognitoIdentityUserSessionToken * _Nullable refreshToken;
|
||||
@property (nonatomic, readonly) NSDate * _Nullable expirationTime;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
A JWT session token.
|
||||
*/
|
||||
@interface AWSCognitoIdentityUserSessionToken : NSObject
|
||||
|
||||
@property (nonatomic, readonly) NSString * tokenString;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
User settings. Currently only mfa options.
|
||||
*/
|
||||
@interface AWSCognitoIdentityUserSettings : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSArray<AWSCognitoIdentityUserMFAOption *>* _Nullable mfaOptions;
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserMFAOption : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString * attributeName;
|
||||
@property (nonatomic, assign) AWSCognitoIdentityProviderDeliveryMediumType deliveryMedium;
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserAttributeType : AWSCognitoIdentityProviderAttributeType
|
||||
- (instancetype) initWithName:(NSString *) name value:(NSString *) value;
|
||||
@end
|
||||
|
||||
#pragma Response wrappers
|
||||
@interface AWSCognitoIdentityUserConfirmSignUpResponse : AWSCognitoIdentityProviderConfirmSignUpResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserResendConfirmationCodeResponse :AWSCognitoIdentityProviderResendConfirmationCodeResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserGetDetailsResponse : AWSCognitoIdentityProviderGetUserResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserForgotPasswordResponse : AWSCognitoIdentityProviderForgotPasswordResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserConfirmForgotPasswordResponse : AWSCognitoIdentityProviderConfirmForgotPasswordResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserChangePasswordResponse : AWSCognitoIdentityProviderChangePasswordResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserUpdateAttributesResponse : AWSCognitoIdentityProviderUpdateUserAttributesResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserDeleteAttributesResponse : AWSCognitoIdentityProviderDeleteUserAttributesResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserVerifyAttributeResponse : AWSCognitoIdentityProviderVerifyUserAttributeResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserGetAttributeVerificationCodeResponse : AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserSetUserSettingsResponse : AWSCognitoIdentityProviderSetUserSettingsResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserGlobalSignOutResponse : AWSCognitoIdentityProviderGlobalSignOutResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserListDevicesResponse : AWSCognitoIdentityProviderListDevicesResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserUpdateDeviceStatusResponse : AWSCognitoIdentityProviderUpdateDeviceStatusResponse
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserGetDeviceResponse : AWSCognitoIdentityProviderGetDeviceResponse
|
||||
|
||||
@end
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,359 +0,0 @@
|
||||
//
|
||||
// Copyright 2014-2017 Amazon.com,
|
||||
// Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Amazon Software License (the "License").
|
||||
// You may not use this file except in compliance with the
|
||||
// License. A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/asl/
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is
|
||||
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
// CONDITIONS OF ANY KIND, express or implied. See the License
|
||||
// for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSCognitoIdentityProviderService.h"
|
||||
|
||||
@class AWSCognitoIdentityUser;
|
||||
@class AWSCognitoIdentityUserAttributeType;
|
||||
@class AWSCognitoIdentityPasswordAuthenticationInput;
|
||||
@class AWSCognitoIdentityMultifactorAuthenticationInput;
|
||||
@class AWSCognitoIdentityPasswordAuthenticationDetails;
|
||||
@class AWSCognitoIdentityCustomChallengeDetails;
|
||||
@class AWSCognitoIdentityUserPoolConfiguration;
|
||||
@class AWSCognitoIdentityUserPoolSignUpResponse;
|
||||
@class AWSCognitoIdentityNewPasswordRequiredDetails;
|
||||
|
||||
@protocol AWSCognitoIdentityInteractiveAuthenticationDelegate;
|
||||
@protocol AWSCognitoIdentityPasswordAuthentication;
|
||||
@protocol AWSCognitoIdentityMultiFactorAuthentication;
|
||||
@protocol AWSCognitoIdentityCustomAuthentication;
|
||||
@protocol AWSCognitoIdentityRememberDevice;
|
||||
@protocol AWSCognitoIdentityNewPasswordRequired;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AWSCognitoIdentityUserPool : NSObject <AWSIdentityProvider, AWSIdentityProviderManager>
|
||||
|
||||
@property (nonatomic, readonly) AWSServiceConfiguration *configuration;
|
||||
@property (nonatomic, readonly) AWSCognitoIdentityUserPoolConfiguration *userPoolConfiguration;
|
||||
@property (nonatomic, readonly) NSString *identityProviderName;
|
||||
|
||||
/**
|
||||
Set this delegate to interactively prompt users for authentication challenges when necessary
|
||||
*/
|
||||
@property (nonatomic, strong) id <AWSCognitoIdentityInteractiveAuthenticationDelegate> delegate;
|
||||
|
||||
/**
|
||||
* Fetches the Cognito User Pool instance configured in the `info.plist` under `CognitoUserPool`
|
||||
*
|
||||
* @return the default instance for Cognito User Pool
|
||||
*/
|
||||
+ (instancetype)defaultCognitoIdentityUserPool;
|
||||
|
||||
+ (void)registerCognitoIdentityUserPoolWithUserPoolConfiguration:(AWSCognitoIdentityUserPoolConfiguration *)userPoolConfiguration
|
||||
forKey:(NSString *)key;
|
||||
|
||||
+ (void)registerCognitoIdentityUserPoolWithConfiguration:(nullable AWSServiceConfiguration *)configuration
|
||||
userPoolConfiguration:(AWSCognitoIdentityUserPoolConfiguration *)userPoolConfiguration
|
||||
forKey:(NSString *)key;
|
||||
|
||||
+ (instancetype)CognitoIdentityUserPoolForKey:(NSString *)key;
|
||||
|
||||
+ (void)removeCognitoIdentityUserPoolForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Sign up a new user
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityUserPoolSignUpResponse *> *)signUp:(NSString *)username
|
||||
password:(NSString *)password
|
||||
userAttributes:(nullable NSArray<AWSCognitoIdentityUserAttributeType *> *)userAttributes
|
||||
validationData:(nullable NSArray<AWSCognitoIdentityUserAttributeType *> *)validationData;
|
||||
|
||||
/**
|
||||
Return the user who last authenticated. Username may be nil if current user is unknown.
|
||||
@return The last authenticated user
|
||||
*/
|
||||
- (nullable AWSCognitoIdentityUser *)currentUser;
|
||||
|
||||
/**
|
||||
Return the user without a username, when username is unknown.
|
||||
*/
|
||||
- (AWSCognitoIdentityUser *)getUser;
|
||||
|
||||
/**
|
||||
Return the user with a specific username
|
||||
*/
|
||||
- (AWSCognitoIdentityUser *)getUser:(NSString *)username;
|
||||
|
||||
/**
|
||||
Clear the last known user only without signing out of their user session
|
||||
*/
|
||||
- (void) clearLastKnownUser;
|
||||
|
||||
/**
|
||||
Clear everything from keychain, including last known user and user sessions for all users.
|
||||
*/
|
||||
- (void) clearAll;
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSCognitoIdentityUserPoolConfiguration : NSObject
|
||||
|
||||
@property (nonatomic, readonly) NSString *clientId;
|
||||
@property (nonatomic, readonly, nullable) NSString *clientSecret;
|
||||
@property (nonatomic, readonly) NSString *poolId;
|
||||
@property (nonatomic, readonly) BOOL shouldProvideCognitoValidationData;
|
||||
|
||||
- (instancetype)initWithClientId:(NSString *)clientId
|
||||
clientSecret:(nullable NSString *)clientSecret
|
||||
poolId:(NSString *)poolId;
|
||||
|
||||
- (instancetype)initWithClientId:(NSString *)clientId
|
||||
clientSecret:(nullable NSString *)clientSecret
|
||||
poolId:(NSString *)poolId
|
||||
shouldProvideCognitoValidationData:(BOOL)shouldProvideCognitoValidationData;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
When interactive sign in is initiated, this encapsulates the last known username
|
||||
*/
|
||||
@interface AWSCognitoIdentityPasswordAuthenticationInput : NSObject
|
||||
|
||||
@property(nonatomic, readonly, nullable) NSString *lastKnownUsername;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
/**
|
||||
When interactive auth requires a multifactor authentication code, this encapsulates the
|
||||
destination and delivery medium
|
||||
*/
|
||||
@interface AWSCognitoIdentityMultifactorAuthenticationInput : NSObject
|
||||
|
||||
@property(nonatomic, readonly, nullable) NSString *destination;
|
||||
@property(nonatomic, assign, readonly) AWSCognitoIdentityProviderDeliveryMediumType deliveryMedium;
|
||||
@end
|
||||
|
||||
/**
|
||||
When responding to an interactive sign in, this encapsulates the end users' username and password
|
||||
*/
|
||||
@interface AWSCognitoIdentityPasswordAuthenticationDetails : NSObject
|
||||
|
||||
@property(nonatomic, strong) NSString *username;
|
||||
@property(nonatomic, strong) NSString *password;
|
||||
@property(nonatomic, strong, nullable) NSArray<AWSCognitoIdentityUserAttributeType *> *validationData;
|
||||
|
||||
- (nullable instancetype)initWithUsername:(NSString *)username
|
||||
password:(NSString *)password;
|
||||
@end
|
||||
|
||||
|
||||
/**
|
||||
When responding to a custom sign in, this encapsulates the end users challenge responses
|
||||
*/
|
||||
@interface AWSCognitoIdentityCustomChallengeDetails : NSObject
|
||||
|
||||
/**
|
||||
Optional developer provided validation data to add to the initate auth call
|
||||
*/
|
||||
@property(nonatomic, strong, nullable) NSArray<AWSCognitoIdentityUserAttributeType *> *validationData;
|
||||
|
||||
/**
|
||||
If you know your initial challenge, set this property to the challenge name
|
||||
*/
|
||||
@property(nonatomic, strong, nullable) NSString *initialChallengeName;
|
||||
|
||||
/**
|
||||
The end user challenge responses for this challenge
|
||||
*/
|
||||
@property(nonatomic, strong) NSDictionary<NSString*,NSString*>* challengeResponses;
|
||||
|
||||
-(instancetype) initWithChallengeResponses: (NSDictionary<NSString*,NSString*> *) challengeResponses;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
/**
|
||||
When responding to a new password required challenge this encapsulates the end users' new password and required attributes
|
||||
*/
|
||||
@interface AWSCognitoIdentityNewPasswordRequiredDetails : NSObject
|
||||
/**
|
||||
The end user's new password
|
||||
*/
|
||||
@property(nonatomic, strong, nonnull) NSString *proposedPassword;
|
||||
/**
|
||||
Any attribute the end user is setting. Values must be present for all
|
||||
required attributes. Any other attributes are optional.
|
||||
*/
|
||||
@property(nonatomic, strong, nullable) NSArray<AWSCognitoIdentityUserAttributeType*> *userAttributes;
|
||||
|
||||
/**
|
||||
Initializer given a new password and map of user attributes to set
|
||||
**/
|
||||
-(instancetype) initWithProposedPassword: (NSString *) proposedPassword userAttributes:(NSDictionary<NSString*,NSString*> *) userAttributes;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
When responding to a custom sign in, this encapsulates the challenge parameters that define the challenge
|
||||
*/
|
||||
@interface AWSCognitoIdentityCustomAuthenticationInput : NSObject
|
||||
|
||||
@property(nonatomic, strong) NSDictionary<NSString*,NSString*>* challengeParameters;
|
||||
|
||||
-(instancetype) initWithChallengeParameters: (NSDictionary<NSString*,NSString*> *) challengeParameters;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
When responding to new password required, this encapsulates the existing user attributes and the required user attributes.
|
||||
*/
|
||||
@interface AWSCognitoIdentityNewPasswordRequiredInput : NSObject
|
||||
|
||||
@property(nonatomic, strong) NSDictionary<NSString*,NSString*>* userAttributes;
|
||||
|
||||
@property(nonatomic, strong) NSSet<NSString*>* requiredAttributes;
|
||||
|
||||
-(instancetype) initWithUserAttributes: (NSDictionary<NSString*,NSString*> *) userAttributes requiredAttributes: (NSSet<NSString*>*) requiredAttributes;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
/**
|
||||
The error domain for AWSCognitoIdentityProvider errors.
|
||||
<ul>
|
||||
<li>AWSCognitoIdentityProviderClientErrorUnknown - Unknown error.</li>
|
||||
<li>AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate - Necessary authentication delegate isn't set.</li>
|
||||
<li>AWSCognitoIdentityProviderClientErrorCustomAuthenticationNotSupported - Custom authentication is not supported by this SDK.</li>
|
||||
<li>AWSCognitoIdentityProviderClientErrorDeviceNotTracked - This device does not have an id, either it was never tracked or previously forgotten.</li>
|
||||
</ul>
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, AWSCognitoIdentityClientErrorType) {
|
||||
AWSCognitoIdentityProviderClientErrorUnknown = 0,
|
||||
AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate = -1000,
|
||||
AWSCognitoIdentityProviderClientErrorCustomAuthenticationNotSupported = -2000,
|
||||
AWSCognitoIdentityProviderClientErrorDeviceNotTracked = -3000,
|
||||
};
|
||||
|
||||
@interface AWSCognitoIdentityUserPoolSignUpResponse : AWSCognitoIdentityProviderSignUpResponse
|
||||
@property (nonatomic, readonly) AWSCognitoIdentityUser* user;
|
||||
@end
|
||||
|
||||
@protocol AWSCognitoIdentityInteractiveAuthenticationDelegate <NSObject>
|
||||
@optional
|
||||
/**
|
||||
Initialize ui to prompt end user for username and password
|
||||
*/
|
||||
-(id<AWSCognitoIdentityPasswordAuthentication>) startPasswordAuthentication;
|
||||
|
||||
/**
|
||||
Initialize ui to prompt end user for multifactor authentication code
|
||||
*/
|
||||
-(id<AWSCognitoIdentityMultiFactorAuthentication>) startMultiFactorAuthentication;
|
||||
|
||||
/**
|
||||
Initialize ui to prompt end user to remember this device
|
||||
*/
|
||||
-(id<AWSCognitoIdentityRememberDevice>) startRememberDevice;
|
||||
|
||||
/**
|
||||
Initialize ui to prompt end user to set a new password and specify profile information as part of sign in
|
||||
*/
|
||||
-(id<AWSCognitoIdentityNewPasswordRequired>) startNewPasswordRequired;
|
||||
|
||||
/**
|
||||
Initialize ui to prompt end user for custom authentication flow
|
||||
*/
|
||||
-(id<AWSCognitoIdentityCustomAuthentication>) startCustomAuthentication;
|
||||
|
||||
@end
|
||||
|
||||
@protocol AWSCognitoIdentityPasswordAuthentication <NSObject>
|
||||
/**
|
||||
Obtain username and password from end user.
|
||||
@param authenticationInput input details including last known username
|
||||
@param passwordAuthenticationCompletionSource set passwordAuthenticationCompletionSource.result
|
||||
with the username and password received from the end user.
|
||||
*/
|
||||
-(void) getPasswordAuthenticationDetails: (AWSCognitoIdentityPasswordAuthenticationInput *) authenticationInput passwordAuthenticationCompletionSource: (AWSTaskCompletionSource<AWSCognitoIdentityPasswordAuthenticationDetails *> *) passwordAuthenticationCompletionSource;
|
||||
/**
|
||||
This step completed, usually either display an error to the end user or dismiss ui
|
||||
@param error the error if any that occured
|
||||
*/
|
||||
-(void) didCompletePasswordAuthenticationStepWithError:(NSError* _Nullable) error;
|
||||
@end
|
||||
|
||||
@protocol AWSCognitoIdentityMultiFactorAuthentication <NSObject>
|
||||
/**
|
||||
Obtain mfa code from the end user
|
||||
@param authenticationInput details about the deliveryMedium and masked destination for where the code was sent
|
||||
@param mfaCodeCompletionSource set mfaCodeCompletionSource.result with the mfa code from end user
|
||||
*/
|
||||
-(void) getMultiFactorAuthenticationCode: (AWSCognitoIdentityMultifactorAuthenticationInput *) authenticationInput mfaCodeCompletionSource: (AWSTaskCompletionSource<NSString *> *) mfaCodeCompletionSource;
|
||||
/**
|
||||
This step completed, usually either display an error to the end user or dismiss ui
|
||||
@param error the error if any that occured
|
||||
*/
|
||||
-(void) didCompleteMultifactorAuthenticationStepWithError:(NSError* _Nullable) error;
|
||||
@end
|
||||
|
||||
|
||||
@protocol AWSCognitoIdentityCustomAuthentication <NSObject>
|
||||
|
||||
|
||||
/**
|
||||
Obtain input for a custom challenge from the end user
|
||||
@param authenticationInput details the challenge including the challenge name and inputs
|
||||
@param customAuthCompletionSource set customAuthCompletionSource.result with the challenge answers from the end user
|
||||
*/
|
||||
-(void) getCustomChallengeDetails: (AWSCognitoIdentityCustomAuthenticationInput *) authenticationInput customAuthCompletionSource: (AWSTaskCompletionSource<AWSCognitoIdentityCustomChallengeDetails *> *) customAuthCompletionSource;
|
||||
/**
|
||||
This step completed, usually either display an error to the end user or dismiss ui
|
||||
@param error the error if any that occured
|
||||
*/
|
||||
-(void) didCompleteCustomAuthenticationStepWithError:(NSError* _Nullable) error;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@protocol AWSCognitoIdentityRememberDevice <NSObject>
|
||||
|
||||
/**
|
||||
Obtain whether to remember this device or not
|
||||
@param rememberDeviceCompletionSource set customAuthCompletionSource.result with YES or NO answer from the end user
|
||||
*/
|
||||
-(void) getRememberDevice: (AWSTaskCompletionSource<NSNumber *> *) rememberDeviceCompletionSource;
|
||||
/**
|
||||
This step completed, usually either display an error to the end user or dismiss ui
|
||||
@param error the error if any that occured
|
||||
*/
|
||||
-(void) didCompleteRememberDeviceStepWithError:(NSError* _Nullable) error;
|
||||
@end
|
||||
|
||||
|
||||
@protocol AWSCognitoIdentityNewPasswordRequired <NSObject>
|
||||
|
||||
/**
|
||||
Obtain a new password and specify profile information as part of sign in from the end user
|
||||
@param newPasswordRequiredInput user profile and required attributes of the end user
|
||||
@param newPasswordRequiredCompletionSource set newPasswordRequiredCompletionSource with the new password and any attribute updates from the end user
|
||||
*/
|
||||
-(void) getNewPasswordDetails: (AWSCognitoIdentityNewPasswordRequiredInput *) newPasswordRequiredInput newPasswordRequiredCompletionSource: (AWSTaskCompletionSource<AWSCognitoIdentityNewPasswordRequiredDetails *> *) newPasswordRequiredCompletionSource;
|
||||
/**
|
||||
This step completed, usually either display an error to the end user or dismiss ui
|
||||
@param error the error if any that occured
|
||||
*/
|
||||
-(void) didCompleteNewPasswordStepWithError:(NSError* _Nullable) error;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Binary file not shown.
@@ -1,6 +0,0 @@
|
||||
framework module AWSCognitoIdentityProvider {
|
||||
umbrella header "AWSCognitoIdentityProvider.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
Binary file not shown.
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
|
||||
#import "AWSCancellationToken.h"
|
||||
#import "AWSCancellationTokenRegistration.h"
|
||||
#import "AWSCancellationTokenSource.h"
|
||||
#import "AWSExecutor.h"
|
||||
#import "AWSGeneric.h"
|
||||
#import "AWSTask.h"
|
||||
#import "AWSTaskCompletionSource.h"
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
A string containing the version of the Bolts Framework used by the current application.
|
||||
*/
|
||||
extern NSString *const AWSBoltsFrameworkVersionString;
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "AWSCancellationTokenRegistration.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*!
|
||||
A block that will be called when a token is cancelled.
|
||||
*/
|
||||
typedef void(^AWSCancellationBlock)();
|
||||
|
||||
/*!
|
||||
The consumer view of a CancellationToken.
|
||||
Propagates notification that operations should be canceled.
|
||||
A AWSCancellationToken has methods to inspect whether the token has been cancelled.
|
||||
*/
|
||||
@interface AWSCancellationToken : NSObject
|
||||
|
||||
/*!
|
||||
Whether cancellation has been requested for this token source.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested;
|
||||
|
||||
/*!
|
||||
Register a block to be notified when the token is cancelled.
|
||||
If the token is already cancelled the delegate will be notified immediately.
|
||||
*/
|
||||
- (AWSCancellationTokenRegistration *)registerCancellationObserverWithBlock:(AWSCancellationBlock)block;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*!
|
||||
Represents the registration of a cancellation observer with a cancellation token.
|
||||
Can be used to unregister the observer at a later time.
|
||||
*/
|
||||
@interface AWSCancellationTokenRegistration : NSObject
|
||||
|
||||
/*!
|
||||
Removes the cancellation observer registered with the token
|
||||
and releases all resources associated with this registration.
|
||||
*/
|
||||
- (void)dispose;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class AWSCancellationToken;
|
||||
|
||||
/*!
|
||||
AWSCancellationTokenSource represents the producer side of a CancellationToken.
|
||||
Signals to a CancellationToken that it should be canceled.
|
||||
It is a cancellation token that also has methods
|
||||
for changing the state of a token by cancelling it.
|
||||
*/
|
||||
@interface AWSCancellationTokenSource : NSObject
|
||||
|
||||
/*!
|
||||
Creates a new cancellation token source.
|
||||
*/
|
||||
+ (instancetype)cancellationTokenSource;
|
||||
|
||||
/*!
|
||||
The cancellation token associated with this CancellationTokenSource.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) AWSCancellationToken *token;
|
||||
|
||||
/*!
|
||||
Whether cancellation has been requested for this token source.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested;
|
||||
|
||||
/*!
|
||||
Cancels the token if it has not already been cancelled.
|
||||
*/
|
||||
- (void)cancel;
|
||||
|
||||
/*!
|
||||
Schedules a cancel operation on this CancellationTokenSource after the specified number of milliseconds.
|
||||
@param millis The number of milliseconds to wait before completing the returned task.
|
||||
If delay is `0` the cancel is executed immediately. If delay is `-1` any scheduled cancellation is stopped.
|
||||
*/
|
||||
- (void)cancelAfterDelay:(int)millis;
|
||||
|
||||
/*!
|
||||
Releases all resources associated with this token source,
|
||||
including disposing of all registrations.
|
||||
*/
|
||||
- (void)dispose;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,101 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSServiceEnum.h"
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSDateRFC822DateFormat1;
|
||||
FOUNDATION_EXPORT NSString *const AWSDateISO8601DateFormat1;
|
||||
FOUNDATION_EXPORT NSString *const AWSDateISO8601DateFormat2;
|
||||
FOUNDATION_EXPORT NSString *const AWSDateISO8601DateFormat3;
|
||||
FOUNDATION_EXPORT NSString *const AWSDateShortDateFormat1;
|
||||
FOUNDATION_EXPORT NSString *const AWSDateShortDateFormat2;
|
||||
|
||||
@interface NSDate (AWS)
|
||||
|
||||
+ (NSDate *)aws_clockSkewFixedDate;
|
||||
|
||||
+ (NSDate *)aws_dateFromString:(NSString *)string;
|
||||
+ (NSDate *)aws_dateFromString:(NSString *)string format:(NSString *)dateFormat;
|
||||
- (NSString *)aws_stringValue:(NSString *)dateFormat;
|
||||
|
||||
/**
|
||||
* Set the clock skew for the current device. This clock skew will be used for calculating
|
||||
* signatures to AWS signatures and for parsing/converting date values from responses.
|
||||
*
|
||||
* @param clockskew the skew (in seconds) for this device. If the clock on the device is fast, pass positive skew to correct. If the clock on the device is slow, pass negative skew to correct.
|
||||
*/
|
||||
+ (void)aws_setRuntimeClockSkew:(NSTimeInterval)clockskew;
|
||||
|
||||
/**
|
||||
* Get the clock skew for the current device.
|
||||
*
|
||||
* @return the skew (in seconds) currently set for this device. Positive clock skew implies the device is fast, negative implies the device is slow.
|
||||
*/
|
||||
+ (NSTimeInterval)aws_getRuntimeClockSkew;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSDictionary (AWS)
|
||||
|
||||
- (NSDictionary *)aws_removeNullValues;
|
||||
- (id)aws_objectForCaseInsensitiveKey:(id)aKey;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSJSONSerialization (AWS)
|
||||
|
||||
+ (NSData *)aws_dataWithJSONObject:(id)obj
|
||||
options:(NSJSONWritingOptions)opt
|
||||
error:(NSError **)error;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSNumber (AWS)
|
||||
|
||||
+ (NSNumber *)aws_numberFromString:(NSString *)string;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSObject (AWS)
|
||||
|
||||
- (NSDictionary *)aws_properties;
|
||||
- (void)aws_copyPropertiesFromObject:(NSObject *)object;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSString (AWS)
|
||||
|
||||
+ (NSString *)aws_base64md5FromData:(NSData *)data;
|
||||
- (BOOL)aws_isBase64Data;
|
||||
- (NSString *)aws_stringWithURLEncoding;
|
||||
- (NSString *)aws_stringWithURLEncodingPath;
|
||||
- (NSString *)aws_stringWithURLEncodingPathWithoutPriorDecoding;
|
||||
- (NSString *)aws_md5String;
|
||||
- (NSString *)aws_md5StringLittleEndian;
|
||||
- (BOOL)aws_isVirtualHostedStyleCompliant;
|
||||
|
||||
- (AWSRegionType)aws_regionTypeValue;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSFileManager (AWS)
|
||||
|
||||
- (BOOL)aws_atomicallyCopyItemAtURL:(NSURL *)sourceURL
|
||||
toURL:(NSURL *)destinationURL
|
||||
backupItemName:(NSString *)backupItemName
|
||||
error:(NSError **)outError;
|
||||
|
||||
@end
|
||||
@@ -1,56 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSClientContextVersion;
|
||||
FOUNDATION_EXPORT NSString *const AWSClientContextHeader;
|
||||
FOUNDATION_EXPORT NSString *const AWSClientContextHeaderEncoding;
|
||||
|
||||
@interface AWSClientContext : NSObject
|
||||
|
||||
#pragma mark - App Details
|
||||
@property (nonatomic, strong, readonly) NSString *installationId;
|
||||
@property (nonatomic, strong) NSString *appVersion;
|
||||
@property (nonatomic, strong) NSString *appBuild;
|
||||
@property (nonatomic, strong) NSString *appPackageName;
|
||||
@property (nonatomic, strong) NSString *appName;
|
||||
|
||||
#pragma mark - Device Details
|
||||
@property (nonatomic, strong) NSString *devicePlatformVersion;
|
||||
@property (nonatomic, strong) NSString *devicePlatform;
|
||||
@property (nonatomic, strong) NSString *deviceManufacturer;
|
||||
@property (nonatomic, strong) NSString *deviceModel;
|
||||
@property (nonatomic, strong) NSString *deviceModelVersion;
|
||||
@property (nonatomic, strong) NSString *deviceLocale;
|
||||
|
||||
#pragma mark - Custom Attributes
|
||||
@property (nonatomic, strong) NSDictionary *customAttributes;
|
||||
|
||||
#pragma mark - Service Details
|
||||
@property (nonatomic, strong, readonly) NSDictionary *serviceDetails;
|
||||
|
||||
- (instancetype)init;
|
||||
|
||||
- (NSDictionary *)dictionaryRepresentation;
|
||||
|
||||
- (NSString *)JSONString;
|
||||
|
||||
- (NSString *)base64EncodedJSONString;
|
||||
|
||||
- (void)setDetails:(id)details
|
||||
forService:(NSString *)service;
|
||||
|
||||
@end
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
|
||||
|
||||
#import "AWSCore.h"
|
||||
#import "AWSCognitoIdentityService.h"
|
||||
@@ -1,806 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSNetworking.h"
|
||||
#import "AWSModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSCognitoIdentityErrorDomain;
|
||||
|
||||
typedef NS_ENUM(NSInteger, AWSCognitoIdentityErrorType) {
|
||||
AWSCognitoIdentityErrorUnknown,
|
||||
AWSCognitoIdentityErrorConcurrentModification,
|
||||
AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered,
|
||||
AWSCognitoIdentityErrorExternalService,
|
||||
AWSCognitoIdentityErrorInternalError,
|
||||
AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration,
|
||||
AWSCognitoIdentityErrorInvalidParameter,
|
||||
AWSCognitoIdentityErrorLimitExceeded,
|
||||
AWSCognitoIdentityErrorNotAuthorized,
|
||||
AWSCognitoIdentityErrorResourceConflict,
|
||||
AWSCognitoIdentityErrorResourceNotFound,
|
||||
AWSCognitoIdentityErrorTooManyRequests,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, AWSCognitoIdentityErrorCode) {
|
||||
AWSCognitoIdentityErrorCodeUnknown,
|
||||
AWSCognitoIdentityErrorCodeAccessDenied,
|
||||
AWSCognitoIdentityErrorCodeInternalServerError,
|
||||
};
|
||||
|
||||
@class AWSCognitoIdentityCognitoIdentityProvider;
|
||||
@class AWSCognitoIdentityCreateIdentityPoolInput;
|
||||
@class AWSCognitoIdentityCredentials;
|
||||
@class AWSCognitoIdentityDeleteIdentitiesInput;
|
||||
@class AWSCognitoIdentityDeleteIdentitiesResponse;
|
||||
@class AWSCognitoIdentityDeleteIdentityPoolInput;
|
||||
@class AWSCognitoIdentityDescribeIdentityInput;
|
||||
@class AWSCognitoIdentityDescribeIdentityPoolInput;
|
||||
@class AWSCognitoIdentityGetCredentialsForIdentityInput;
|
||||
@class AWSCognitoIdentityGetCredentialsForIdentityResponse;
|
||||
@class AWSCognitoIdentityGetIdInput;
|
||||
@class AWSCognitoIdentityGetIdResponse;
|
||||
@class AWSCognitoIdentityGetIdentityPoolRolesInput;
|
||||
@class AWSCognitoIdentityGetIdentityPoolRolesResponse;
|
||||
@class AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput;
|
||||
@class AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse;
|
||||
@class AWSCognitoIdentityGetOpenIdTokenInput;
|
||||
@class AWSCognitoIdentityGetOpenIdTokenResponse;
|
||||
@class AWSCognitoIdentityIdentityDescription;
|
||||
@class AWSCognitoIdentityIdentityPool;
|
||||
@class AWSCognitoIdentityIdentityPoolShortDescription;
|
||||
@class AWSCognitoIdentityListIdentitiesInput;
|
||||
@class AWSCognitoIdentityListIdentitiesResponse;
|
||||
@class AWSCognitoIdentityListIdentityPoolsInput;
|
||||
@class AWSCognitoIdentityListIdentityPoolsResponse;
|
||||
@class AWSCognitoIdentityLookupDeveloperIdentityInput;
|
||||
@class AWSCognitoIdentityLookupDeveloperIdentityResponse;
|
||||
@class AWSCognitoIdentityMergeDeveloperIdentitiesInput;
|
||||
@class AWSCognitoIdentityMergeDeveloperIdentitiesResponse;
|
||||
@class AWSCognitoIdentitySetIdentityPoolRolesInput;
|
||||
@class AWSCognitoIdentityUnlinkDeveloperIdentityInput;
|
||||
@class AWSCognitoIdentityUnlinkIdentityInput;
|
||||
@class AWSCognitoIdentityUnprocessedIdentityId;
|
||||
|
||||
/**
|
||||
<p>A provider representing a Cognito User Identity Pool and its client ID.</p>
|
||||
*/
|
||||
@interface AWSCognitoIdentityCognitoIdentityProvider : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
<p>The client ID for the Cognito User Identity Pool.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable clientId;
|
||||
|
||||
/**
|
||||
<p>The provider name for a Cognito User Identity Pool. For example, <code>cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789</code>.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable providerName;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the CreateIdentityPool action.</p>
|
||||
Required parameters: [IdentityPoolName, AllowUnauthenticatedIdentities]
|
||||
*/
|
||||
@interface AWSCognitoIdentityCreateIdentityPoolInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
<p>TRUE if the identity pool supports unauthenticated logins.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSNumber * _Nullable allowUnauthenticatedIdentities;
|
||||
|
||||
/**
|
||||
<p>A list representing a Cognito User Identity Pool and its client ID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<AWSCognitoIdentityCognitoIdentityProvider *> * _Nullable cognitoIdentityProviders;
|
||||
|
||||
/**
|
||||
<p>The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the <code>DeveloperProviderName</code>, you can use letters as well as period (<code>.</code>), underscore (<code>_</code>), and dash (<code>-</code>).</p><p>Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable developerProviderName;
|
||||
|
||||
/**
|
||||
<p>A string that you provide.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolName;
|
||||
|
||||
/**
|
||||
<p>A list of OpendID Connect provider ARNs.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<NSString *> * _Nullable openIdConnectProviderARNs;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<NSString *> * _Nullable samlProviderARNs;
|
||||
|
||||
/**
|
||||
<p>Optional key:value pairs mapping provider names to provider app IDs.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable supportedLoginProviders;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Credentials for the provided identity ID.</p>
|
||||
*/
|
||||
@interface AWSCognitoIdentityCredentials : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
<p>The Access Key portion of the credentials.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable accessKeyId;
|
||||
|
||||
/**
|
||||
<p>The date at which these credentials will expire.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDate * _Nullable expiration;
|
||||
|
||||
/**
|
||||
<p>The Secret Access Key portion of the credentials</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable secretKey;
|
||||
|
||||
/**
|
||||
<p>The Session Token portion of the credentials</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable sessionToken;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the <code>DeleteIdentities</code> action.</p>
|
||||
Required parameters: [IdentityIdsToDelete]
|
||||
*/
|
||||
@interface AWSCognitoIdentityDeleteIdentitiesInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
<p>A list of 1-60 identities that you want to delete.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<NSString *> * _Nullable identityIdsToDelete;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Returned in response to a successful <code>DeleteIdentities</code> operation.</p>
|
||||
*/
|
||||
@interface AWSCognitoIdentityDeleteIdentitiesResponse : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
<p>An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<AWSCognitoIdentityUnprocessedIdentityId *> * _Nullable unprocessedIdentityIds;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the DeleteIdentityPool action.</p>
|
||||
Required parameters: [IdentityPoolId]
|
||||
*/
|
||||
@interface AWSCognitoIdentityDeleteIdentityPoolInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
An identity pool ID in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the <code>DescribeIdentity</code> action.</p>
|
||||
Required parameters: [IdentityId]
|
||||
*/
|
||||
@interface AWSCognitoIdentityDescribeIdentityInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
<p>A unique identifier in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
Input to the DescribeIdentityPool action.
|
||||
Required parameters: [IdentityPoolId]
|
||||
*/
|
||||
@interface AWSCognitoIdentityDescribeIdentityPoolInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
An identity pool ID in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the <code>GetCredentialsForIdentity</code> action.</p>
|
||||
Required parameters: [IdentityId]
|
||||
*/
|
||||
@interface AWSCognitoIdentityGetCredentialsForIdentityInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable customRoleArn;
|
||||
|
||||
/**
|
||||
<p>A unique identifier in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
/**
|
||||
<p>A set of optional name-value pairs that map provider names to provider tokens.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable logins;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Returned in response to a successful <code>GetCredentialsForIdentity</code> operation.</p>
|
||||
*/
|
||||
@interface AWSCognitoIdentityGetCredentialsForIdentityResponse : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
<p>Credentials for the provided identity ID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) AWSCognitoIdentityCredentials * _Nullable credentials;
|
||||
|
||||
/**
|
||||
<p>A unique identifier in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
Input to the GetId action.
|
||||
Required parameters: [IdentityPoolId]
|
||||
*/
|
||||
@interface AWSCognitoIdentityGetIdInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
A standard AWS account ID (9+ digits).
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable accountId;
|
||||
|
||||
/**
|
||||
An identity pool ID in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
/**
|
||||
<p>A set of optional name-value pairs that map provider names to provider tokens.</p><p>The available provider names for <code>Logins</code> are as follows: <ul><li>Facebook: <code>graph.facebook.com</code></li><li>Amazon Cognito Identity Provider: <code>cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789</code></li><li>Google: <code>accounts.google.com</code></li><li>Amazon: <code>www.amazon.com</code></li><li>Twitter: <code>api.twitter.com</code></li><li>Digits: <code>www.digits.com</code></li></ul></p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable logins;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
Returned in response to a GetId request.
|
||||
*/
|
||||
@interface AWSCognitoIdentityGetIdResponse : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
A unique identifier in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the <code>GetIdentityPoolRoles</code> action.</p>
|
||||
Required parameters: [IdentityPoolId]
|
||||
*/
|
||||
@interface AWSCognitoIdentityGetIdentityPoolRolesInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
<p>An identity pool ID in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Returned in response to a successful <code>GetIdentityPoolRoles</code> operation.</p>
|
||||
*/
|
||||
@interface AWSCognitoIdentityGetIdentityPoolRolesResponse : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
<p>An identity pool ID in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
/**
|
||||
<p>The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable roles;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the <code>GetOpenIdTokenForDeveloperIdentity</code> action.</p>
|
||||
Required parameters: [IdentityPoolId, Logins]
|
||||
*/
|
||||
@interface AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
<p>A unique identifier in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
/**
|
||||
<p>An identity pool ID in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
/**
|
||||
<p>A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax <code>"developer_provider_name": "developer_user_identifier"</code>. The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable logins;
|
||||
|
||||
/**
|
||||
<p>The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSNumber * _Nullable tokenDuration;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Returned in response to a successful <code>GetOpenIdTokenForDeveloperIdentity</code> request.</p>
|
||||
*/
|
||||
@interface AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
<p>A unique identifier in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
/**
|
||||
<p>An OpenID token.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable token;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
Input to the GetOpenIdToken action.
|
||||
Required parameters: [IdentityId]
|
||||
*/
|
||||
@interface AWSCognitoIdentityGetOpenIdTokenInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
A unique identifier in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
/**
|
||||
<p>A set of optional name-value pairs that map provider names to provider tokens. When using graph.facebook.com and www.amazon.com, supply the access_token returned from the provider's authflow. For accounts.google.com, an Amazon Cognito Identity Provider, or any other OpenId Connect provider, always include the <code>id_token</code>.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable logins;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
Returned in response to a successful GetOpenIdToken request.
|
||||
*/
|
||||
@interface AWSCognitoIdentityGetOpenIdTokenResponse : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one passed on input.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
/**
|
||||
An OpenID token, valid for 15 minutes.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable token;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
A description of the identity.
|
||||
*/
|
||||
@interface AWSCognitoIdentityIdentityDescription : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
<p>Date on which the identity was created.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDate * _Nullable creationDate;
|
||||
|
||||
/**
|
||||
A unique identifier in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
/**
|
||||
<p>Date on which the identity was last modified.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDate * _Nullable lastModifiedDate;
|
||||
|
||||
/**
|
||||
A set of optional name-value pairs that map provider names to provider tokens.
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<NSString *> * _Nullable logins;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
An object representing a Cognito identity pool.
|
||||
Required parameters: [IdentityPoolId, IdentityPoolName, AllowUnauthenticatedIdentities]
|
||||
*/
|
||||
@interface AWSCognitoIdentityIdentityPool : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
TRUE if the identity pool supports unauthenticated logins.
|
||||
*/
|
||||
@property (nonatomic, strong) NSNumber * _Nullable allowUnauthenticatedIdentities;
|
||||
|
||||
/**
|
||||
<p>A list representing a Cognito User Identity Pool and its client ID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<AWSCognitoIdentityCognitoIdentityProvider *> * _Nullable cognitoIdentityProviders;
|
||||
|
||||
/**
|
||||
<p>The "domain" by which Cognito will refer to your users.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable developerProviderName;
|
||||
|
||||
/**
|
||||
An identity pool ID in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
/**
|
||||
<p>A string that you provide.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolName;
|
||||
|
||||
/**
|
||||
<p>A list of OpendID Connect provider ARNs.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<NSString *> * _Nullable openIdConnectProviderARNs;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<NSString *> * _Nullable samlProviderARNs;
|
||||
|
||||
/**
|
||||
<p>Optional key:value pairs mapping provider names to provider app IDs.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable supportedLoginProviders;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
A description of the identity pool.
|
||||
*/
|
||||
@interface AWSCognitoIdentityIdentityPoolShortDescription : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
An identity pool ID in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
/**
|
||||
A string that you provide.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolName;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
Input to the ListIdentities action.
|
||||
Required parameters: [IdentityPoolId, MaxResults]
|
||||
*/
|
||||
@interface AWSCognitoIdentityListIdentitiesInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
<p>An optional boolean parameter that allows you to hide disabled identities. If omitted, the ListIdentities API will include disabled identities in the response.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSNumber * _Nullable hideDisabled;
|
||||
|
||||
/**
|
||||
An identity pool ID in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
/**
|
||||
The maximum number of identities to return.
|
||||
*/
|
||||
@property (nonatomic, strong) NSNumber * _Nullable maxResults;
|
||||
|
||||
/**
|
||||
A pagination token.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable nextToken;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
The response to a ListIdentities request.
|
||||
*/
|
||||
@interface AWSCognitoIdentityListIdentitiesResponse : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
An object containing a set of identities and associated mappings.
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<AWSCognitoIdentityIdentityDescription *> * _Nullable identities;
|
||||
|
||||
/**
|
||||
An identity pool ID in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
/**
|
||||
A pagination token.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable nextToken;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
Input to the ListIdentityPools action.
|
||||
Required parameters: [MaxResults]
|
||||
*/
|
||||
@interface AWSCognitoIdentityListIdentityPoolsInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
The maximum number of identities to return.
|
||||
*/
|
||||
@property (nonatomic, strong) NSNumber * _Nullable maxResults;
|
||||
|
||||
/**
|
||||
A pagination token.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable nextToken;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
The result of a successful ListIdentityPools action.
|
||||
*/
|
||||
@interface AWSCognitoIdentityListIdentityPoolsResponse : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
The identity pools returned by the ListIdentityPools action.
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<AWSCognitoIdentityIdentityPoolShortDescription *> * _Nullable identityPools;
|
||||
|
||||
/**
|
||||
A pagination token.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable nextToken;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the <code>LookupDeveloperIdentityInput</code> action.</p>
|
||||
Required parameters: [IdentityPoolId]
|
||||
*/
|
||||
@interface AWSCognitoIdentityLookupDeveloperIdentityInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
<p>A unique ID used by your backend authentication process to identify a user. Typically, a developer identity provider would issue many developer user identifiers, in keeping with the number of users.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable developerUserIdentifier;
|
||||
|
||||
/**
|
||||
<p>A unique identifier in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
/**
|
||||
<p>An identity pool ID in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
/**
|
||||
<p>The maximum number of identities to return.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSNumber * _Nullable maxResults;
|
||||
|
||||
/**
|
||||
<p>A pagination token. The first call you make will have <code>NextToken</code> set to null. After that the service will return <code>NextToken</code> values as needed. For example, let's say you make a request with <code>MaxResults</code> set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable nextToken;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Returned in response to a successful <code>LookupDeveloperIdentity</code> action.</p>
|
||||
*/
|
||||
@interface AWSCognitoIdentityLookupDeveloperIdentityResponse : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
<p>This is the list of developer user identifiers associated with an identity ID. Cognito supports the association of multiple developer user identifiers with an identity ID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<NSString *> * _Nullable developerUserIdentifierList;
|
||||
|
||||
/**
|
||||
<p>A unique identifier in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
/**
|
||||
<p>A pagination token. The first call you make will have <code>NextToken</code> set to null. After that the service will return <code>NextToken</code> values as needed. For example, let's say you make a request with <code>MaxResults</code> set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable nextToken;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the <code>MergeDeveloperIdentities</code> action.</p>
|
||||
Required parameters: [SourceUserIdentifier, DestinationUserIdentifier, DeveloperProviderName, IdentityPoolId]
|
||||
*/
|
||||
@interface AWSCognitoIdentityMergeDeveloperIdentitiesInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
<p>User identifier for the destination user. The value should be a <code>DeveloperUserIdentifier</code>.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable destinationUserIdentifier;
|
||||
|
||||
/**
|
||||
<p>The "domain" by which Cognito will refer to your users. This is a (pseudo) domain name that you provide while creating an identity pool. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the <code>DeveloperProviderName</code>, you can use letters as well as period (.), underscore (_), and dash (-).</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable developerProviderName;
|
||||
|
||||
/**
|
||||
<p>An identity pool ID in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
/**
|
||||
<p>User identifier for the source user. The value should be a <code>DeveloperUserIdentifier</code>.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable sourceUserIdentifier;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Returned in response to a successful <code>MergeDeveloperIdentities</code> action.</p>
|
||||
*/
|
||||
@interface AWSCognitoIdentityMergeDeveloperIdentitiesResponse : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
<p>A unique identifier in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the <code>SetIdentityPoolRoles</code> action.</p>
|
||||
Required parameters: [IdentityPoolId, Roles]
|
||||
*/
|
||||
@interface AWSCognitoIdentitySetIdentityPoolRolesInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
<p>An identity pool ID in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
/**
|
||||
<p>The map of roles associated with this pool. For a given role, the key will be either "authenticated" or "unauthenticated" and the value will be the Role ARN.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable roles;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>Input to the <code>UnlinkDeveloperIdentity</code> action.</p>
|
||||
Required parameters: [IdentityId, IdentityPoolId, DeveloperProviderName, DeveloperUserIdentifier]
|
||||
*/
|
||||
@interface AWSCognitoIdentityUnlinkDeveloperIdentityInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
<p>The "domain" by which Cognito will refer to your users.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable developerProviderName;
|
||||
|
||||
/**
|
||||
A unique ID used by your backend authentication process to identify a user.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable developerUserIdentifier;
|
||||
|
||||
/**
|
||||
<p>A unique identifier in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
/**
|
||||
<p>An identity pool ID in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityPoolId;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
Input to the UnlinkIdentity action.
|
||||
Required parameters: [IdentityId, Logins, LoginsToRemove]
|
||||
*/
|
||||
@interface AWSCognitoIdentityUnlinkIdentityInput : AWSRequest
|
||||
|
||||
|
||||
/**
|
||||
A unique identifier in the format REGION:GUID.
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
/**
|
||||
A set of optional name-value pairs that map provider names to provider tokens.
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable logins;
|
||||
|
||||
/**
|
||||
Provider names to unlink from this identity.
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<NSString *> * _Nullable loginsToRemove;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
<p>An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.</p>
|
||||
*/
|
||||
@interface AWSCognitoIdentityUnprocessedIdentityId : AWSModel
|
||||
|
||||
|
||||
/**
|
||||
<p>The error code indicating the type of error that occurred.</p>
|
||||
*/
|
||||
@property (nonatomic, assign) AWSCognitoIdentityErrorCode errorCode;
|
||||
|
||||
/**
|
||||
<p>A unique identifier in the format REGION:GUID.</p>
|
||||
*/
|
||||
@property (nonatomic, strong) NSString * _Nullable identityId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface AWSCognitoIdentityResources : NSObject
|
||||
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
- (NSDictionary *)JSONObject;
|
||||
|
||||
@end
|
||||
@@ -1,614 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSCore.h"
|
||||
#import "AWSCognitoIdentityModel.h"
|
||||
#import "AWSCognitoIdentityResources.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
<fullname>Amazon Cognito</fullname><p>Amazon Cognito is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. Amazon Cognito uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.</p><p>Using Amazon Cognito, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon), and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.</p><p>To provide end-user credentials, first make an unsigned call to <a>GetId</a>. If the end user is authenticated with one of the supported identity providers, set the <code>Logins</code> map with the identity provider token. <code>GetId</code> returns a unique identifier for the user.</p><p>Next, make an unsigned call to <a>GetCredentialsForIdentity</a>. This call expects the same <code>Logins</code> map as the <code>GetId</code> call, as well as the <code>IdentityID</code> originally returned by <code>GetId</code>. Assuming your identity pool has been configured via the <a>SetIdentityPoolRoles</a> operation, <code>GetCredentialsForIdentity</code> will return AWS credentials for your use. If your pool has not been configured with <code>SetIdentityPoolRoles</code>, or if you want to follow legacy flow, make an unsigned call to <a>GetOpenIdToken</a>, which returns the OpenID token necessary to call STS and retrieve AWS credentials. This call expects the same <code>Logins</code> map as the <code>GetId</code> call, as well as the <code>IdentityID</code> originally returned by <code>GetId</code>. The token returned by <code>GetOpenIdToken</code> can be passed to the STS operation <a href="http://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html">AssumeRoleWithWebIdentity</a> to retrieve AWS credentials.</p><p>If you want to use Amazon Cognito in an Android, iOS, or Unity application, you will probably want to make API calls via the AWS Mobile SDK. To learn more, see the <a href="http://docs.aws.amazon.com/mobile/index.html">AWS Mobile SDK Developer Guide</a>.</p>
|
||||
*/
|
||||
@interface AWSCognitoIdentity : AWSService
|
||||
|
||||
/**
|
||||
The service configuration used to instantiate this service client.
|
||||
|
||||
@warning Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration;
|
||||
|
||||
/**
|
||||
Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with `defaultServiceConfiguration` from `[AWSServiceManager defaultServiceManager]`. The reference to this object is maintained by the SDK, and you do not need to retain it manually.
|
||||
|
||||
For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
|
||||
|
||||
*Swift*
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
|
||||
AWSServiceManager.default().defaultServiceConfiguration = configuration
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
|
||||
credentialsProvider:credentialsProvider];
|
||||
[AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
Then call the following to get the default service client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let CognitoIdentity = AWSCognitoIdentity.default()
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity defaultCognitoIdentity];
|
||||
|
||||
@return The default service client.
|
||||
*/
|
||||
+ (instancetype)defaultCognitoIdentity;
|
||||
|
||||
/**
|
||||
Creates a service client with the given service configuration and registers it for the key.
|
||||
|
||||
For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
|
||||
|
||||
*Swift*
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
AWSCognitoIdentity.register(with: configuration!, forKey: "USWest2CognitoIdentity")
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
|
||||
[AWSCognitoIdentity registerCognitoIdentityWithConfiguration:configuration forKey:@"USWest2CognitoIdentity"];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
Then call the following to get the service client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let CognitoIdentity = AWSCognitoIdentity(forKey: "USWest2CognitoIdentity")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity CognitoIdentityForKey:@"USWest2CognitoIdentity"];
|
||||
|
||||
@warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
|
||||
|
||||
@param configuration A service configuration object.
|
||||
@param key A string to identify the service client.
|
||||
*/
|
||||
+ (void)registerCognitoIdentityWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Retrieves the service client associated with the key. You need to call `+ registerCognitoIdentityWithConfiguration:forKey:` before invoking this method.
|
||||
|
||||
For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
|
||||
|
||||
*Swift*
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
|
||||
let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
|
||||
AWSCognitoIdentity.register(with: configuration!, forKey: "USWest2CognitoIdentity")
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
*Objective-C*
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
|
||||
identityPoolId:@"YourIdentityPoolId"];
|
||||
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
|
||||
credentialsProvider:credentialsProvider];
|
||||
|
||||
[AWSCognitoIdentity registerCognitoIdentityWithConfiguration:configuration forKey:@"USWest2CognitoIdentity"];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
Then call the following to get the service client:
|
||||
|
||||
*Swift*
|
||||
|
||||
let CognitoIdentity = AWSCognitoIdentity(forKey: "USWest2CognitoIdentity")
|
||||
|
||||
*Objective-C*
|
||||
|
||||
AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity CognitoIdentityForKey:@"USWest2CognitoIdentity"];
|
||||
|
||||
@param key A string to identify the service client.
|
||||
|
||||
@return An instance of the service client.
|
||||
*/
|
||||
+ (instancetype)CognitoIdentityForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
Removes the service client associated with the key and release it.
|
||||
|
||||
@warning Before calling this method, make sure no method is running on this client.
|
||||
|
||||
@param key A string to identify the service client.
|
||||
*/
|
||||
+ (void)removeCognitoIdentityForKey:(NSString *)key;
|
||||
|
||||
/**
|
||||
<p>Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account. The keys for <code>SupportedLoginProviders</code> are as follows: <ul><li>Facebook: <code>graph.facebook.com</code></li><li>Google: <code>accounts.google.com</code></li><li>Amazon: <code>www.amazon.com</code></li><li>Twitter: <code>api.twitter.com</code></li><li>Digits: <code>www.digits.com</code></li></ul> You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the CreateIdentityPool service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityPool`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`.
|
||||
|
||||
@see AWSCognitoIdentityCreateIdentityPoolInput
|
||||
@see AWSCognitoIdentityIdentityPool
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityIdentityPool *> *)createIdentityPool:(AWSCognitoIdentityCreateIdentityPoolInput *)request;
|
||||
|
||||
/**
|
||||
<p>Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account. The keys for <code>SupportedLoginProviders</code> are as follows: <ul><li>Facebook: <code>graph.facebook.com</code></li><li>Google: <code>accounts.google.com</code></li><li>Amazon: <code>www.amazon.com</code></li><li>Twitter: <code>api.twitter.com</code></li><li>Digits: <code>www.digits.com</code></li></ul> You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the CreateIdentityPool service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`.
|
||||
|
||||
@see AWSCognitoIdentityCreateIdentityPoolInput
|
||||
@see AWSCognitoIdentityIdentityPool
|
||||
*/
|
||||
- (void)createIdentityPool:(AWSCognitoIdentityCreateIdentityPoolInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityPool * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the DeleteIdentities service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityDeleteIdentitiesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityDeleteIdentitiesInput
|
||||
@see AWSCognitoIdentityDeleteIdentitiesResponse
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityDeleteIdentitiesResponse *> *)deleteIdentities:(AWSCognitoIdentityDeleteIdentitiesInput *)request;
|
||||
|
||||
/**
|
||||
<p>Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the DeleteIdentities service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityDeleteIdentitiesInput
|
||||
@see AWSCognitoIdentityDeleteIdentitiesResponse
|
||||
*/
|
||||
- (void)deleteIdentities:(AWSCognitoIdentityDeleteIdentitiesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityDeleteIdentitiesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Deletes a user pool. Once a pool is deleted, users will not be able to authenticate with the pool.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the DeleteIdentityPool service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityDeleteIdentityPoolInput
|
||||
*/
|
||||
- (AWSTask *)deleteIdentityPool:(AWSCognitoIdentityDeleteIdentityPoolInput *)request;
|
||||
|
||||
/**
|
||||
<p>Deletes a user pool. Once a pool is deleted, users will not be able to authenticate with the pool.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the DeleteIdentityPool service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityDeleteIdentityPoolInput
|
||||
*/
|
||||
- (void)deleteIdentityPool:(AWSCognitoIdentityDeleteIdentityPoolInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Returns metadata related to the given identity, including when the identity was created and any associated linked logins.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the DescribeIdentity service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityDescription`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityDescribeIdentityInput
|
||||
@see AWSCognitoIdentityIdentityDescription
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityIdentityDescription *> *)describeIdentity:(AWSCognitoIdentityDescribeIdentityInput *)request;
|
||||
|
||||
/**
|
||||
<p>Returns metadata related to the given identity, including when the identity was created and any associated linked logins.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the DescribeIdentity service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityDescribeIdentityInput
|
||||
@see AWSCognitoIdentityIdentityDescription
|
||||
*/
|
||||
- (void)describeIdentity:(AWSCognitoIdentityDescribeIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityDescription * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the DescribeIdentityPool service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityPool`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityDescribeIdentityPoolInput
|
||||
@see AWSCognitoIdentityIdentityPool
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityIdentityPool *> *)describeIdentityPool:(AWSCognitoIdentityDescribeIdentityPoolInput *)request;
|
||||
|
||||
/**
|
||||
<p>Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the DescribeIdentityPool service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityDescribeIdentityPoolInput
|
||||
@see AWSCognitoIdentityIdentityPool
|
||||
*/
|
||||
- (void)describeIdentityPool:(AWSCognitoIdentityDescribeIdentityPoolInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityPool * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.</p><p>This is a public API. You do not need any credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the GetCredentialsForIdentity service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetCredentialsForIdentityResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
|
||||
|
||||
@see AWSCognitoIdentityGetCredentialsForIdentityInput
|
||||
@see AWSCognitoIdentityGetCredentialsForIdentityResponse
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityGetCredentialsForIdentityResponse *> *)getCredentialsForIdentity:(AWSCognitoIdentityGetCredentialsForIdentityInput *)request;
|
||||
|
||||
/**
|
||||
<p>Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.</p><p>This is a public API. You do not need any credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the GetCredentialsForIdentity service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
|
||||
|
||||
@see AWSCognitoIdentityGetCredentialsForIdentityInput
|
||||
@see AWSCognitoIdentityGetCredentialsForIdentityResponse
|
||||
*/
|
||||
- (void)getCredentialsForIdentity:(AWSCognitoIdentityGetCredentialsForIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetCredentialsForIdentityResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.</p><p>This is a public API. You do not need any credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the GetId service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetIdResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`, `AWSCognitoIdentityErrorExternalService`.
|
||||
|
||||
@see AWSCognitoIdentityGetIdInput
|
||||
@see AWSCognitoIdentityGetIdResponse
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityGetIdResponse *> *)getId:(AWSCognitoIdentityGetIdInput *)request;
|
||||
|
||||
/**
|
||||
<p>Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.</p><p>This is a public API. You do not need any credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the GetId service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`, `AWSCognitoIdentityErrorExternalService`.
|
||||
|
||||
@see AWSCognitoIdentityGetIdInput
|
||||
@see AWSCognitoIdentityGetIdResponse
|
||||
*/
|
||||
- (void)getId:(AWSCognitoIdentityGetIdInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetIdResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Gets the roles for an identity pool.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the GetIdentityPoolRoles service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetIdentityPoolRolesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityGetIdentityPoolRolesInput
|
||||
@see AWSCognitoIdentityGetIdentityPoolRolesResponse
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityGetIdentityPoolRolesResponse *> *)getIdentityPoolRoles:(AWSCognitoIdentityGetIdentityPoolRolesInput *)request;
|
||||
|
||||
/**
|
||||
<p>Gets the roles for an identity pool.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the GetIdentityPoolRoles service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityGetIdentityPoolRolesInput
|
||||
@see AWSCognitoIdentityGetIdentityPoolRolesResponse
|
||||
*/
|
||||
- (void)getIdentityPoolRoles:(AWSCognitoIdentityGetIdentityPoolRolesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetIdentityPoolRolesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by <a>GetId</a>. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.</p><p>The OpenId token is valid for 15 minutes.</p><p>This is a public API. You do not need any credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the GetOpenIdToken service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetOpenIdTokenResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
|
||||
|
||||
@see AWSCognitoIdentityGetOpenIdTokenInput
|
||||
@see AWSCognitoIdentityGetOpenIdTokenResponse
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityGetOpenIdTokenResponse *> *)getOpenIdToken:(AWSCognitoIdentityGetOpenIdTokenInput *)request;
|
||||
|
||||
/**
|
||||
<p>Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by <a>GetId</a>. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.</p><p>The OpenId token is valid for 15 minutes.</p><p>This is a public API. You do not need any credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the GetOpenIdToken service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
|
||||
|
||||
@see AWSCognitoIdentityGetOpenIdTokenInput
|
||||
@see AWSCognitoIdentityGetOpenIdTokenResponse
|
||||
*/
|
||||
- (void)getOpenIdToken:(AWSCognitoIdentityGetOpenIdTokenInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetOpenIdTokenResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Registers (or retrieves) a Cognito <code>IdentityId</code> and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the <code>Logins</code> map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users.</p><p>You can use <code>GetOpenIdTokenForDeveloperIdentity</code> to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the <code>IdentityId</code> should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing <code>IdentityId</code>. This API will create the identity in the specified <code>IdentityPoolId</code>.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the GetOpenIdTokenForDeveloperIdentity service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered`.
|
||||
|
||||
@see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput
|
||||
@see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse *> *)getOpenIdTokenForDeveloperIdentity:(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput *)request;
|
||||
|
||||
/**
|
||||
<p>Registers (or retrieves) a Cognito <code>IdentityId</code> and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the <code>Logins</code> map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users.</p><p>You can use <code>GetOpenIdTokenForDeveloperIdentity</code> to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the <code>IdentityId</code> should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing <code>IdentityId</code>. This API will create the identity in the specified <code>IdentityPoolId</code>.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the GetOpenIdTokenForDeveloperIdentity service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered`.
|
||||
|
||||
@see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput
|
||||
@see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse
|
||||
*/
|
||||
- (void)getOpenIdTokenForDeveloperIdentity:(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Lists the identities in a pool.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the ListIdentities service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityListIdentitiesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityListIdentitiesInput
|
||||
@see AWSCognitoIdentityListIdentitiesResponse
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityListIdentitiesResponse *> *)listIdentities:(AWSCognitoIdentityListIdentitiesInput *)request;
|
||||
|
||||
/**
|
||||
<p>Lists the identities in a pool.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the ListIdentities service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityListIdentitiesInput
|
||||
@see AWSCognitoIdentityListIdentitiesResponse
|
||||
*/
|
||||
- (void)listIdentities:(AWSCognitoIdentityListIdentitiesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityListIdentitiesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Lists all of the Cognito identity pools registered for your account.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the ListIdentityPools service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityListIdentityPoolsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityListIdentityPoolsInput
|
||||
@see AWSCognitoIdentityListIdentityPoolsResponse
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityListIdentityPoolsResponse *> *)listIdentityPools:(AWSCognitoIdentityListIdentityPoolsInput *)request;
|
||||
|
||||
/**
|
||||
<p>Lists all of the Cognito identity pools registered for your account.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the ListIdentityPools service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityListIdentityPoolsInput
|
||||
@see AWSCognitoIdentityListIdentityPoolsResponse
|
||||
*/
|
||||
- (void)listIdentityPools:(AWSCognitoIdentityListIdentityPoolsInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityListIdentityPoolsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Retrieves the <code>IdentityID</code> associated with a <code>DeveloperUserIdentifier</code> or the list of <code>DeveloperUserIdentifier</code>s associated with an <code>IdentityId</code> for an existing identity. Either <code>IdentityID</code> or <code>DeveloperUserIdentifier</code> must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, <code>DeveloperUserIdentifier</code> will be matched against <code>IdentityID</code>. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a <code>ResourceConflictException</code> is thrown.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the LookupDeveloperIdentity service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityLookupDeveloperIdentityResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityLookupDeveloperIdentityInput
|
||||
@see AWSCognitoIdentityLookupDeveloperIdentityResponse
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityLookupDeveloperIdentityResponse *> *)lookupDeveloperIdentity:(AWSCognitoIdentityLookupDeveloperIdentityInput *)request;
|
||||
|
||||
/**
|
||||
<p>Retrieves the <code>IdentityID</code> associated with a <code>DeveloperUserIdentifier</code> or the list of <code>DeveloperUserIdentifier</code>s associated with an <code>IdentityId</code> for an existing identity. Either <code>IdentityID</code> or <code>DeveloperUserIdentifier</code> must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, <code>DeveloperUserIdentifier</code> will be matched against <code>IdentityID</code>. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a <code>ResourceConflictException</code> is thrown.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the LookupDeveloperIdentity service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityLookupDeveloperIdentityInput
|
||||
@see AWSCognitoIdentityLookupDeveloperIdentityResponse
|
||||
*/
|
||||
- (void)lookupDeveloperIdentity:(AWSCognitoIdentityLookupDeveloperIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityLookupDeveloperIdentityResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Merges two users having different <code>IdentityId</code>s, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (<code>SourceUserIdentifier</code>) with the <code>IdentityId</code> of the <code>DestinationUserIdentifier</code>. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the MergeDeveloperIdentities service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityMergeDeveloperIdentitiesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityMergeDeveloperIdentitiesInput
|
||||
@see AWSCognitoIdentityMergeDeveloperIdentitiesResponse
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityMergeDeveloperIdentitiesResponse *> *)mergeDeveloperIdentities:(AWSCognitoIdentityMergeDeveloperIdentitiesInput *)request;
|
||||
|
||||
/**
|
||||
<p>Merges two users having different <code>IdentityId</code>s, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (<code>SourceUserIdentifier</code>) with the <code>IdentityId</code> of the <code>DestinationUserIdentifier</code>. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the MergeDeveloperIdentities service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityMergeDeveloperIdentitiesInput
|
||||
@see AWSCognitoIdentityMergeDeveloperIdentitiesResponse
|
||||
*/
|
||||
- (void)mergeDeveloperIdentities:(AWSCognitoIdentityMergeDeveloperIdentitiesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityMergeDeveloperIdentitiesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Sets the roles for an identity pool. These roles are used when making calls to <code>GetCredentialsForIdentity</code> action.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the SetIdentityPoolRoles service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`.
|
||||
|
||||
@see AWSCognitoIdentitySetIdentityPoolRolesInput
|
||||
*/
|
||||
- (AWSTask *)setIdentityPoolRoles:(AWSCognitoIdentitySetIdentityPoolRolesInput *)request;
|
||||
|
||||
/**
|
||||
<p>Sets the roles for an identity pool. These roles are used when making calls to <code>GetCredentialsForIdentity</code> action.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the SetIdentityPoolRoles service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`.
|
||||
|
||||
@see AWSCognitoIdentitySetIdentityPoolRolesInput
|
||||
*/
|
||||
- (void)setIdentityPoolRoles:(AWSCognitoIdentitySetIdentityPoolRolesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Unlinks a <code>DeveloperUserIdentifier</code> from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the UnlinkDeveloperIdentity service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityUnlinkDeveloperIdentityInput
|
||||
*/
|
||||
- (AWSTask *)unlinkDeveloperIdentity:(AWSCognitoIdentityUnlinkDeveloperIdentityInput *)request;
|
||||
|
||||
/**
|
||||
<p>Unlinks a <code>DeveloperUserIdentifier</code> from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the UnlinkDeveloperIdentity service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`.
|
||||
|
||||
@see AWSCognitoIdentityUnlinkDeveloperIdentityInput
|
||||
*/
|
||||
- (void)unlinkDeveloperIdentity:(AWSCognitoIdentityUnlinkDeveloperIdentityInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible.</p><p>This is a public API. You do not need any credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the UnlinkIdentity service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
|
||||
|
||||
@see AWSCognitoIdentityUnlinkIdentityInput
|
||||
*/
|
||||
- (AWSTask *)unlinkIdentity:(AWSCognitoIdentityUnlinkIdentityInput *)request;
|
||||
|
||||
/**
|
||||
<p>Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible.</p><p>This is a public API. You do not need any credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the UnlinkIdentity service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`.
|
||||
|
||||
@see AWSCognitoIdentityUnlinkIdentityInput
|
||||
*/
|
||||
- (void)unlinkIdentity:(AWSCognitoIdentityUnlinkIdentityInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
<p>Updates a user pool.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the UpdateIdentityPool service method.
|
||||
|
||||
@return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityPool`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`, `AWSCognitoIdentityErrorLimitExceeded`.
|
||||
|
||||
@see AWSCognitoIdentityIdentityPool
|
||||
@see AWSCognitoIdentityIdentityPool
|
||||
*/
|
||||
- (AWSTask<AWSCognitoIdentityIdentityPool *> *)updateIdentityPool:(AWSCognitoIdentityIdentityPool *)request;
|
||||
|
||||
/**
|
||||
<p>Updates a user pool.</p><p>You must use AWS Developer credentials to call this API.</p>
|
||||
|
||||
@param request A container for the necessary parameters to execute the UpdateIdentityPool service method.
|
||||
@param completionHandler The completion handler to call when the load request is complete.
|
||||
`response` - A response object, or `nil` if the request failed.
|
||||
`error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`, `AWSCognitoIdentityErrorLimitExceeded`.
|
||||
|
||||
@see AWSCognitoIdentityIdentityPool
|
||||
@see AWSCognitoIdentityIdentityPool
|
||||
*/
|
||||
- (void)updateIdentityPool:(AWSCognitoIdentityIdentityPool *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityPool * _Nullable response, NSError * _Nullable error))completionHandler;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,51 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for AWSCore.
|
||||
FOUNDATION_EXPORT double AWSCoreVersionNumber;
|
||||
|
||||
//! Project version string for AWSCore.
|
||||
FOUNDATION_EXPORT const unsigned char AWSCoreVersionString[];
|
||||
|
||||
#import "AWSServiceEnum.h"
|
||||
#import "AWSService.h"
|
||||
#import "AWSCredentialsProvider.h"
|
||||
#import "AWSIdentityProvider.h"
|
||||
#import "AWSModel.h"
|
||||
#import "AWSNetworking.h"
|
||||
#import "AWSCategory.h"
|
||||
#import "AWSLogging.h"
|
||||
#import "AWSClientContext.h"
|
||||
#import "AWSSynchronizedMutableDictionary.h"
|
||||
#import "AWSSerialization.h"
|
||||
#import "AWSURLRequestSerialization.h"
|
||||
#import "AWSURLResponseSerialization.h"
|
||||
#import "AWSURLSessionManager.h"
|
||||
#import "AWSSignature.h"
|
||||
#import "AWSURLRequestRetryHandler.h"
|
||||
#import "AWSValidation.h"
|
||||
#import "AWSInfo.h"
|
||||
|
||||
#import "AWSBolts.h"
|
||||
#import "AWSGZIP.h"
|
||||
#import "AWSFMDB.h"
|
||||
#import "AWSKSReachability.h"
|
||||
#import "AWSTMCache.h"
|
||||
#import "AWSUICKeyChainStore.h"
|
||||
|
||||
#import "AWSSTS.h"
|
||||
#import "AWSCognitoIdentity.h"
|
||||
@@ -1,242 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSServiceEnum.h"
|
||||
#import "AWSIdentityProvider.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSCognitoCredentialsProviderErrorDomain;
|
||||
typedef NS_ENUM(NSInteger, AWSCognitoCredentialsProviderErrorType) {
|
||||
AWSCognitoCredentialsProviderErrorUnknown,
|
||||
AWSCognitoCredentialsProviderIdentityIdIsNil,
|
||||
AWSCognitoCredentialsProviderInvalidConfiguration,
|
||||
AWSCognitoCredentialsProviderInvalidCognitoIdentityToken,
|
||||
AWSCognitoCredentialsProviderCredentialsRefreshTimeout,
|
||||
};
|
||||
|
||||
@class AWSTask<__covariant ResultType>;
|
||||
|
||||
/**
|
||||
An AWS credentials container class.
|
||||
*/
|
||||
@interface AWSCredentials : NSObject
|
||||
|
||||
/**
|
||||
Access Key component of credentials.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSString *accessKey;
|
||||
|
||||
/**
|
||||
Secret Access Key component of credentials.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSString *secretKey;
|
||||
|
||||
/**
|
||||
Session Token component of credentials.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) NSString *sessionKey;
|
||||
|
||||
/**
|
||||
Date at which these credentials will expire.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) NSDate *expiration;
|
||||
|
||||
/**
|
||||
Initiates an AWS credentials object.
|
||||
|
||||
@param accessKey An AWS Access key.
|
||||
@param secretKey An AWS Secret key.
|
||||
@param sessionKey An AWS Session key.
|
||||
@param expiration The expiration date of the temporary AWS credentials.
|
||||
|
||||
@return An AWS credentials object.
|
||||
*/
|
||||
- (instancetype)initWithAccessKey:(NSString *)accessKey
|
||||
secretKey:(NSString *)secretKey
|
||||
sessionKey:(nullable NSString *)sessionKey
|
||||
expiration:(nullable NSDate *)expiration;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
The AWS credentials provider protocol used to provide credentials to the SDK in order to make calls to the AWS services.
|
||||
*/
|
||||
@protocol AWSCredentialsProvider <NSObject>
|
||||
|
||||
/**
|
||||
Asynchronously returns a valid AWS credentials or an error object if it cannot retrieve valid credentials. It should cache valid credentials as much as possible and refresh them when they are invalid.
|
||||
|
||||
@return A valid AWS credentials or an error object describing the error.
|
||||
*/
|
||||
- (AWSTask<AWSCredentials *> *)credentials;
|
||||
|
||||
/**
|
||||
Invalidates the cached temporary AWS credentials. If the credentials provider does not cache temporary credentials, this operation is a no-op.
|
||||
*/
|
||||
- (void)invalidateCachedTemporaryCredentials;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
@warning This credentials provider is intended only for testing purposes.
|
||||
We strongly discourage embedding AWS credentials in your production apps because they can be easily extracted and abused. Consider using `AWSCognitoCredentialsProvider`.
|
||||
*/
|
||||
@interface AWSStaticCredentialsProvider : NSObject <AWSCredentialsProvider>
|
||||
|
||||
/**
|
||||
Instantiates a static credentials provider.
|
||||
|
||||
@param accessKey An AWS Access key.
|
||||
@param secretKey An AWS Secret key.
|
||||
|
||||
@return An AWS credentials object.
|
||||
*/
|
||||
- (instancetype)initWithAccessKey:(NSString *)accessKey
|
||||
secretKey:(NSString *)secretKey;
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSAnonymousCredentialsProvider : NSObject <AWSCredentialsProvider>
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
A credentials provider that uses AWS STS web identity federation.
|
||||
*/
|
||||
@interface AWSWebIdentityCredentialsProvider : NSObject <AWSCredentialsProvider>
|
||||
|
||||
@property (nonatomic, strong) NSString *webIdentityToken;
|
||||
@property (nonatomic, strong) NSString *roleArn;
|
||||
@property (nonatomic, strong) NSString *roleSessionName;
|
||||
@property (nonatomic, strong) NSString *providerId;
|
||||
|
||||
- (instancetype)initWithRegionType:(AWSRegionType)regionType
|
||||
providerId:(nullable NSString *)providerId
|
||||
roleArn:(NSString *)roleArn
|
||||
roleSessionName:(NSString *)roleSessionName
|
||||
webIdentityToken:(NSString *)webIdentityToken;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
An AWSCredentialsProvider that uses Amazon Cognito to fetch temporary credentials tied to an identity.
|
||||
|
||||
To learn more about Amazon Cognito, please visit <a href="https://aws.amazon.com/cognito">https://aws.amazon.com/cognito</a>.
|
||||
|
||||
There are 3 different flows supported by this credentials provider, see factory and init methods for choosing the right one for your use case:
|
||||
|
||||
1. Enhanced flow: Uses Cognito for all operations and only requires an identity pool id to initialize.
|
||||
2. Basic flow: Uses Cognito + STS and requires identity pool plus IAM roles
|
||||
3. Developer authenticated identities: Uses your own AWSCognitoCredentialsProviderHelper to establish identity +
|
||||
Cognito (and optionally STS) to establish credentials.
|
||||
*/
|
||||
@interface AWSCognitoCredentialsProvider : NSObject <AWSCredentialsProvider>
|
||||
|
||||
/**
|
||||
The identityProvider which is responsible for establishing the identity id and (optionally) the open id token for use in the Amazon Cognito authflow.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) id<AWSCognitoCredentialsProviderHelper> identityProvider;
|
||||
|
||||
/**
|
||||
The identity id associated with this provider. This value will be fetched from the keychain at startup. If you do not want to reuse the existing identity id, you must call the clearKeychain method.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) NSString *identityId;
|
||||
|
||||
/**
|
||||
The identity pool id associated with this provider. Also used to create a namedspaced keychain area to store identity id and credentials.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSString *identityPoolId;
|
||||
|
||||
/**
|
||||
Initializer for credentials provider with enhanced authentication flow. This is the recommended constructor for first time Amazon Cognito developers. Will create an instance of `AWSEnhancedCognitoIdentityProvider`.
|
||||
|
||||
@param regionType The region in which your identity pool exists.
|
||||
@param identityPoolId The identity pool id for this provider. Value is used to communicate with Amazon Cognito as well as namespace values stored in the keychain.
|
||||
*/
|
||||
- (instancetype)initWithRegionType:(AWSRegionType)regionType
|
||||
identityPoolId:(NSString *)identityPoolId;
|
||||
|
||||
/**
|
||||
Initializer for credentials provider with enhanced authentication flow. This is the recommended method for first time Amazon Cognito developers. Will create an instance of `AWSEnhancedCognitoIdentityProvider`.
|
||||
|
||||
@param regionType The region in which your identity pool exists.
|
||||
@param identityPoolId The identity pool id for this provider. Value is used to communicate with Amazon Cognito as well as namespace values stored in the keychain.
|
||||
@param identityProviderManager An object that conforms to the `AWSIdentityProviderManager` protocol. It should return a valid `login` dictionary when requested. Can be nil if identity is unauthenticated.
|
||||
*/
|
||||
- (instancetype)initWithRegionType:(AWSRegionType)regionType
|
||||
identityPoolId:(NSString *)identityPoolId
|
||||
identityProviderManager:(nullable id<AWSIdentityProviderManager>)identityProviderManager;
|
||||
|
||||
/**
|
||||
Initializer for credentials provider with pre-created `AWSCognitoCredentialsProviderHelper`. Use this method when using developer authenticated identities.
|
||||
|
||||
@param regionType The region in which your identity pool exists.
|
||||
@param identityProvider Implementation of AWSCognitoCredentialsProviderHelper which is responsible for acquiring identity id and (optionally) OpenId Connect token.
|
||||
*/
|
||||
- (instancetype)initWithRegionType:(AWSRegionType)regionType
|
||||
identityProvider:(id<AWSCognitoCredentialsProviderHelper>)identityProvider;
|
||||
|
||||
/**
|
||||
Initializer for credentials provider with pre-created `AWSCognitoCredentialsProviderHelper`. Only use this method if you need to set your IAM roles client side and use developer authenticated identities
|
||||
|
||||
@param regionType The region in which your identity pool exists.
|
||||
@param unauthRoleArn The role ARN to use when getting credentials for unauthenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if unauthenticated identities are not supported or if using enhanced authentication flow.
|
||||
@param authRoleArn The role ARN to use when getting credentials for authenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if authenticated identities are not supported or if using enhanced authentication flow.
|
||||
@param identityProvider Implementation of AWSCognitoCredentialsProviderHelper which is responsible for acquiring identity id and (optionally) OpenId Connect token.
|
||||
*/
|
||||
- (instancetype)initWithRegionType:(AWSRegionType)regionType
|
||||
unauthRoleArn:(nullable NSString *)unauthRoleArn
|
||||
authRoleArn:(nullable NSString *)authRoleArn
|
||||
identityProvider:(id<AWSCognitoCredentialsProviderHelper>)identityProvider;
|
||||
|
||||
/**
|
||||
Initializer for credentials provider with basic auth flow. Only use this method if you still need to set your IAM roles client side. This method will create an instance of `AWSBasicCognitoIdentityProvider`.
|
||||
|
||||
@param regionType The region in which your identity pool exists.
|
||||
@param identityPoolId The identity pool id for this provider. Value is used to communicate with Amazon Cognito as well as namespace values stored in the keychain.
|
||||
@param unauthRoleArn The role ARN to use when getting credentials for unauthenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if unauthenticated identities are not supported.
|
||||
@param authRoleArn The role ARN to use when getting credentials for authenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if authenticated identities are not supported.
|
||||
@param identityProviderManager An object that conforms to the `AWSIdentityProviderManager` protocol. It should return a valid `login` dictionary when requested. Can be nil if identity is unauthenticated.
|
||||
*/
|
||||
- (instancetype)initWithRegionType:(AWSRegionType)regionType
|
||||
identityPoolId:(NSString *)identityPoolId
|
||||
unauthRoleArn:(nullable NSString *)unauthRoleArn
|
||||
authRoleArn:(nullable NSString *)authRoleArn
|
||||
identityProviderManager:(nullable id<AWSIdentityProviderManager>)identityProviderManager;
|
||||
|
||||
/**
|
||||
Get/retrieve the identity id for this provider. If an identity id is already set on this provider, no remote call is made and the identity will be returned as a result of the AWSTask (the identityId is also available as a property). If no identityId is set on this provider, one will be retrieved from the service.
|
||||
|
||||
@return AWSTask
|
||||
*/
|
||||
- (AWSTask<NSString *> *)getIdentityId;
|
||||
|
||||
/**
|
||||
Clear ALL saved values for this provider (identityId, credentials, logins).
|
||||
*/
|
||||
- (void)clearKeychain;
|
||||
|
||||
/**
|
||||
Clear the cached AWS credentials for this provider.
|
||||
*/
|
||||
- (void)clearCredentials;
|
||||
|
||||
- (void)setIdentityProviderManagerOnce:(id<AWSIdentityProviderManager>)identityProviderManager;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*!
|
||||
An object that can run a given block.
|
||||
*/
|
||||
@interface AWSExecutor : NSObject
|
||||
|
||||
/*!
|
||||
Returns a default executor, which runs continuations immediately until the call stack gets too
|
||||
deep, then dispatches to a new GCD queue.
|
||||
*/
|
||||
+ (instancetype)defaultExecutor;
|
||||
|
||||
/*!
|
||||
Returns an executor that runs continuations on the thread where the previous task was completed.
|
||||
*/
|
||||
+ (instancetype)immediateExecutor;
|
||||
|
||||
/*!
|
||||
Returns an executor that runs continuations on the main thread.
|
||||
*/
|
||||
+ (instancetype)mainThreadExecutor;
|
||||
|
||||
/*!
|
||||
Returns a new executor that uses the given block to execute continuations.
|
||||
@param block The block to use.
|
||||
*/
|
||||
+ (instancetype)executorWithBlock:(void(^)(void(^block)()))block;
|
||||
|
||||
/*!
|
||||
Returns a new executor that runs continuations on the given queue.
|
||||
@param queue The instance of `dispatch_queue_t` to dispatch all continuations onto.
|
||||
*/
|
||||
+ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue;
|
||||
|
||||
/*!
|
||||
Returns a new executor that runs continuations on the given queue.
|
||||
@param queue The instance of `NSOperationQueue` to run all continuations on.
|
||||
*/
|
||||
+ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue;
|
||||
|
||||
/*!
|
||||
Runs the given block using this executor's particular strategy.
|
||||
@param block The block to execute.
|
||||
*/
|
||||
- (void)execute:(void(^)())block;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,5 +0,0 @@
|
||||
#import "AWSFMDatabase.h"
|
||||
#import "AWSFMResultSet.h"
|
||||
#import "AWSFMDatabaseAdditions.h"
|
||||
#import "AWSFMDatabaseQueue.h"
|
||||
#import "AWSFMDatabasePool.h"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,277 +0,0 @@
|
||||
//
|
||||
// FMDatabaseAdditions.h
|
||||
// fmdb
|
||||
//
|
||||
// Created by August Mueller on 10/30/05.
|
||||
// Copyright 2005 Flying Meat Inc.. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSFMDatabase.h"
|
||||
|
||||
|
||||
/** Category of additions for `<FMDatabase>` class.
|
||||
|
||||
### See also
|
||||
|
||||
- `<FMDatabase>`
|
||||
*/
|
||||
|
||||
@interface AWSFMDatabase (AWSFMDatabaseAdditions)
|
||||
|
||||
///----------------------------------------
|
||||
/// @name Return results of SQL to variable
|
||||
///----------------------------------------
|
||||
|
||||
/** Return `int` value for query
|
||||
|
||||
@param query The SQL query to be performed.
|
||||
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
|
||||
|
||||
@return `int` value.
|
||||
|
||||
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
|
||||
*/
|
||||
|
||||
- (int)intForQuery:(NSString*)query, ...;
|
||||
|
||||
/** Return `long` value for query
|
||||
|
||||
@param query The SQL query to be performed.
|
||||
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
|
||||
|
||||
@return `long` value.
|
||||
|
||||
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
|
||||
*/
|
||||
|
||||
- (long)longForQuery:(NSString*)query, ...;
|
||||
|
||||
/** Return `BOOL` value for query
|
||||
|
||||
@param query The SQL query to be performed.
|
||||
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
|
||||
|
||||
@return `BOOL` value.
|
||||
|
||||
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
|
||||
*/
|
||||
|
||||
- (BOOL)boolForQuery:(NSString*)query, ...;
|
||||
|
||||
/** Return `double` value for query
|
||||
|
||||
@param query The SQL query to be performed.
|
||||
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
|
||||
|
||||
@return `double` value.
|
||||
|
||||
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
|
||||
*/
|
||||
|
||||
- (double)doubleForQuery:(NSString*)query, ...;
|
||||
|
||||
/** Return `NSString` value for query
|
||||
|
||||
@param query The SQL query to be performed.
|
||||
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
|
||||
|
||||
@return `NSString` value.
|
||||
|
||||
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
|
||||
*/
|
||||
|
||||
- (NSString*)stringForQuery:(NSString*)query, ...;
|
||||
|
||||
/** Return `NSData` value for query
|
||||
|
||||
@param query The SQL query to be performed.
|
||||
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
|
||||
|
||||
@return `NSData` value.
|
||||
|
||||
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
|
||||
*/
|
||||
|
||||
- (NSData*)dataForQuery:(NSString*)query, ...;
|
||||
|
||||
/** Return `NSDate` value for query
|
||||
|
||||
@param query The SQL query to be performed.
|
||||
@param ... A list of parameters that will be bound to the `?` placeholders in the SQL query.
|
||||
|
||||
@return `NSDate` value.
|
||||
|
||||
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
|
||||
*/
|
||||
|
||||
- (NSDate*)dateForQuery:(NSString*)query, ...;
|
||||
|
||||
|
||||
// Notice that there's no dataNoCopyForQuery:.
|
||||
// That would be a bad idea, because we close out the result set, and then what
|
||||
// happens to the data that we just didn't copy? Who knows, not I.
|
||||
|
||||
|
||||
///--------------------------------
|
||||
/// @name Schema related operations
|
||||
///--------------------------------
|
||||
|
||||
/** Does table exist in database?
|
||||
|
||||
@param tableName The name of the table being looked for.
|
||||
|
||||
@return `YES` if table found; `NO` if not found.
|
||||
*/
|
||||
|
||||
- (BOOL)tableExists:(NSString*)tableName;
|
||||
|
||||
/** The schema of the database.
|
||||
|
||||
This will be the schema for the entire database. For each entity, each row of the result set will include the following fields:
|
||||
|
||||
- `type` - The type of entity (e.g. table, index, view, or trigger)
|
||||
- `name` - The name of the object
|
||||
- `tbl_name` - The name of the table to which the object references
|
||||
- `rootpage` - The page number of the root b-tree page for tables and indices
|
||||
- `sql` - The SQL that created the entity
|
||||
|
||||
@return `FMResultSet` of schema; `nil` on error.
|
||||
|
||||
@see [SQLite File Format](http://www.sqlite.org/fileformat.html)
|
||||
*/
|
||||
|
||||
- (AWSFMResultSet*)getSchema;
|
||||
|
||||
/** The schema of the database.
|
||||
|
||||
This will be the schema for a particular table as report by SQLite `PRAGMA`, for example:
|
||||
|
||||
PRAGMA table_info('employees')
|
||||
|
||||
This will report:
|
||||
|
||||
- `cid` - The column ID number
|
||||
- `name` - The name of the column
|
||||
- `type` - The data type specified for the column
|
||||
- `notnull` - whether the field is defined as NOT NULL (i.e. values required)
|
||||
- `dflt_value` - The default value for the column
|
||||
- `pk` - Whether the field is part of the primary key of the table
|
||||
|
||||
@param tableName The name of the table for whom the schema will be returned.
|
||||
|
||||
@return `FMResultSet` of schema; `nil` on error.
|
||||
|
||||
@see [table_info](http://www.sqlite.org/pragma.html#pragma_table_info)
|
||||
*/
|
||||
|
||||
- (AWSFMResultSet*)getTableSchema:(NSString*)tableName;
|
||||
|
||||
/** Test to see if particular column exists for particular table in database
|
||||
|
||||
@param columnName The name of the column.
|
||||
|
||||
@param tableName The name of the table.
|
||||
|
||||
@return `YES` if column exists in table in question; `NO` otherwise.
|
||||
*/
|
||||
|
||||
- (BOOL)columnExists:(NSString*)columnName inTableWithName:(NSString*)tableName;
|
||||
|
||||
/** Test to see if particular column exists for particular table in database
|
||||
|
||||
@param columnName The name of the column.
|
||||
|
||||
@param tableName The name of the table.
|
||||
|
||||
@return `YES` if column exists in table in question; `NO` otherwise.
|
||||
|
||||
@see columnExists:inTableWithName:
|
||||
|
||||
@warning Deprecated - use `<columnExists:inTableWithName:>` instead.
|
||||
*/
|
||||
|
||||
- (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __attribute__ ((deprecated));
|
||||
|
||||
|
||||
/** Validate SQL statement
|
||||
|
||||
This validates SQL statement by performing `sqlite3_prepare_v2`, but not returning the results, but instead immediately calling `sqlite3_finalize`.
|
||||
|
||||
@param sql The SQL statement being validated.
|
||||
|
||||
@param error This is a pointer to a `NSError` object that will receive the autoreleased `NSError` object if there was any error. If this is `nil`, no `NSError` result will be returned.
|
||||
|
||||
@return `YES` if validation succeeded without incident; `NO` otherwise.
|
||||
|
||||
*/
|
||||
|
||||
- (BOOL)validateSQL:(NSString*)sql error:(NSError**)error;
|
||||
|
||||
|
||||
///-----------------------------------
|
||||
/// @name Application identifier tasks
|
||||
///-----------------------------------
|
||||
|
||||
/** Retrieve application ID
|
||||
|
||||
@return The `uint32_t` numeric value of the application ID.
|
||||
|
||||
@see setApplicationID:
|
||||
*/
|
||||
|
||||
- (uint32_t)applicationID;
|
||||
|
||||
/** Set the application ID
|
||||
|
||||
@param appID The `uint32_t` numeric value of the application ID.
|
||||
|
||||
@see applicationID
|
||||
*/
|
||||
|
||||
- (void)setApplicationID:(uint32_t)appID;
|
||||
|
||||
#if TARGET_OS_MAC && !TARGET_OS_IPHONE
|
||||
/** Retrieve application ID string
|
||||
|
||||
@return The `NSString` value of the application ID.
|
||||
|
||||
@see setApplicationIDString:
|
||||
*/
|
||||
|
||||
|
||||
- (NSString*)applicationIDString;
|
||||
|
||||
/** Set the application ID string
|
||||
|
||||
@param string The `NSString` value of the application ID.
|
||||
|
||||
@see applicationIDString
|
||||
*/
|
||||
|
||||
- (void)setApplicationIDString:(NSString*)string;
|
||||
#endif
|
||||
|
||||
///-----------------------------------
|
||||
/// @name user version identifier tasks
|
||||
///-----------------------------------
|
||||
|
||||
/** Retrieve user version
|
||||
|
||||
@return The `uint32_t` numeric value of the user version.
|
||||
|
||||
@see setUserVersion:
|
||||
*/
|
||||
|
||||
- (uint32_t)userVersion;
|
||||
|
||||
/** Set the user-version
|
||||
|
||||
@param version The `uint32_t` numeric value of the user version.
|
||||
|
||||
@see userVersion
|
||||
*/
|
||||
|
||||
- (void)setUserVersion:(uint32_t)version;
|
||||
|
||||
@end
|
||||
@@ -1,200 +0,0 @@
|
||||
//
|
||||
// FMDatabasePool.h
|
||||
// fmdb
|
||||
//
|
||||
// Created by August Mueller on 6/22/11.
|
||||
// Copyright 2011 Flying Meat Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class AWSFMDatabase;
|
||||
|
||||
/** Pool of `<FMDatabase>` objects.
|
||||
|
||||
### See also
|
||||
|
||||
- `<FMDatabaseQueue>`
|
||||
- `<FMDatabase>`
|
||||
|
||||
@warning Before using `FMDatabasePool`, please consider using `<FMDatabaseQueue>` instead.
|
||||
|
||||
If you really really really know what you're doing and `FMDatabasePool` is what
|
||||
you really really need (ie, you're using a read only database), OK you can use
|
||||
it. But just be careful not to deadlock!
|
||||
|
||||
For an example on deadlocking, search for:
|
||||
`ONLY_USE_THE_POOL_IF_YOU_ARE_DOING_READS_OTHERWISE_YOULL_DEADLOCK_USE_FMDATABASEQUEUE_INSTEAD`
|
||||
in the main.m file.
|
||||
*/
|
||||
|
||||
@interface AWSFMDatabasePool : NSObject {
|
||||
NSString *_path;
|
||||
|
||||
dispatch_queue_t _lockQueue;
|
||||
|
||||
NSMutableArray *_databaseInPool;
|
||||
NSMutableArray *_databaseOutPool;
|
||||
|
||||
__unsafe_unretained id _delegate;
|
||||
|
||||
NSUInteger _maximumNumberOfDatabasesToCreate;
|
||||
int _openFlags;
|
||||
}
|
||||
|
||||
/** Database path */
|
||||
|
||||
@property (atomic, retain) NSString *path;
|
||||
|
||||
/** Delegate object */
|
||||
|
||||
@property (atomic, assign) id delegate;
|
||||
|
||||
/** Maximum number of databases to create */
|
||||
|
||||
@property (atomic, assign) NSUInteger maximumNumberOfDatabasesToCreate;
|
||||
|
||||
/** Open flags */
|
||||
|
||||
@property (atomic, readonly) int openFlags;
|
||||
|
||||
|
||||
///---------------------
|
||||
/// @name Initialization
|
||||
///---------------------
|
||||
|
||||
/** Create pool using path.
|
||||
|
||||
@param aPath The file path of the database.
|
||||
|
||||
@return The `FMDatabasePool` object. `nil` on error.
|
||||
*/
|
||||
|
||||
+ (instancetype)databasePoolWithPath:(NSString*)aPath;
|
||||
|
||||
/** Create pool using path and specified flags
|
||||
|
||||
@param aPath The file path of the database.
|
||||
@param openFlags Flags passed to the openWithFlags method of the database
|
||||
|
||||
@return The `FMDatabasePool` object. `nil` on error.
|
||||
*/
|
||||
|
||||
+ (instancetype)databasePoolWithPath:(NSString*)aPath flags:(int)openFlags;
|
||||
|
||||
/** Create pool using path.
|
||||
|
||||
@param aPath The file path of the database.
|
||||
|
||||
@return The `FMDatabasePool` object. `nil` on error.
|
||||
*/
|
||||
|
||||
- (instancetype)initWithPath:(NSString*)aPath;
|
||||
|
||||
/** Create pool using path and specified flags.
|
||||
|
||||
@param aPath The file path of the database.
|
||||
@param openFlags Flags passed to the openWithFlags method of the database
|
||||
|
||||
@return The `FMDatabasePool` object. `nil` on error.
|
||||
*/
|
||||
|
||||
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags;
|
||||
|
||||
///------------------------------------------------
|
||||
/// @name Keeping track of checked in/out databases
|
||||
///------------------------------------------------
|
||||
|
||||
/** Number of checked-in databases in pool
|
||||
|
||||
@returns Number of databases
|
||||
*/
|
||||
|
||||
- (NSUInteger)countOfCheckedInDatabases;
|
||||
|
||||
/** Number of checked-out databases in pool
|
||||
|
||||
@returns Number of databases
|
||||
*/
|
||||
|
||||
- (NSUInteger)countOfCheckedOutDatabases;
|
||||
|
||||
/** Total number of databases in pool
|
||||
|
||||
@returns Number of databases
|
||||
*/
|
||||
|
||||
- (NSUInteger)countOfOpenDatabases;
|
||||
|
||||
/** Release all databases in pool */
|
||||
|
||||
- (void)releaseAllDatabases;
|
||||
|
||||
///------------------------------------------
|
||||
/// @name Perform database operations in pool
|
||||
///------------------------------------------
|
||||
|
||||
/** Synchronously perform database operations in pool.
|
||||
|
||||
@param block The code to be run on the `FMDatabasePool` pool.
|
||||
*/
|
||||
|
||||
- (void)inDatabase:(void (^)(AWSFMDatabase *db))block;
|
||||
|
||||
/** Synchronously perform database operations in pool using transaction.
|
||||
|
||||
@param block The code to be run on the `FMDatabasePool` pool.
|
||||
*/
|
||||
|
||||
- (void)inTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
|
||||
|
||||
/** Synchronously perform database operations in pool using deferred transaction.
|
||||
|
||||
@param block The code to be run on the `FMDatabasePool` pool.
|
||||
*/
|
||||
|
||||
- (void)inDeferredTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
|
||||
|
||||
/** Synchronously perform database operations in pool using save point.
|
||||
|
||||
@param block The code to be run on the `FMDatabasePool` pool.
|
||||
|
||||
@return `NSError` object if error; `nil` if successful.
|
||||
|
||||
@warning You can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock. If you need to nest, use `<[FMDatabase startSavePointWithName:error:]>` instead.
|
||||
*/
|
||||
|
||||
- (NSError*)inSavePoint:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
/** FMDatabasePool delegate category
|
||||
|
||||
This is a category that defines the protocol for the FMDatabasePool delegate
|
||||
*/
|
||||
|
||||
@interface NSObject (AWSFMDatabasePoolDelegate)
|
||||
|
||||
/** Asks the delegate whether database should be added to the pool.
|
||||
|
||||
@param pool The `FMDatabasePool` object.
|
||||
@param database The `FMDatabase` object.
|
||||
|
||||
@return `YES` if it should add database to pool; `NO` if not.
|
||||
|
||||
*/
|
||||
|
||||
- (BOOL)databasePool:(AWSFMDatabasePool*)pool shouldAddDatabaseToPool:(AWSFMDatabase*)database;
|
||||
|
||||
/** Tells the delegate that database was added to the pool.
|
||||
|
||||
@param pool The `FMDatabasePool` object.
|
||||
@param database The `FMDatabase` object.
|
||||
|
||||
*/
|
||||
|
||||
- (void)databasePool:(AWSFMDatabasePool*)pool didAddDatabase:(AWSFMDatabase*)database;
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
//
|
||||
// FMDatabaseQueue.h
|
||||
// fmdb
|
||||
//
|
||||
// Created by August Mueller on 6/22/11.
|
||||
// Copyright 2011 Flying Meat Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class AWSFMDatabase;
|
||||
|
||||
/** To perform queries and updates on multiple threads, you'll want to use `FMDatabaseQueue`.
|
||||
|
||||
Using a single instance of `<FMDatabase>` from multiple threads at once is a bad idea. It has always been OK to make a `<FMDatabase>` object *per thread*. Just don't share a single instance across threads, and definitely not across multiple threads at the same time.
|
||||
|
||||
Instead, use `FMDatabaseQueue`. Here's how to use it:
|
||||
|
||||
First, make your queue.
|
||||
|
||||
FMDatabaseQueue *queue = [FMDatabaseQueue databaseQueueWithPath:aPath];
|
||||
|
||||
Then use it like so:
|
||||
|
||||
[queue inDatabase:^(FMDatabase *db) {
|
||||
[db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:1]];
|
||||
[db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:2]];
|
||||
[db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:3]];
|
||||
|
||||
FMResultSet *rs = [db executeQuery:@"select * from foo"];
|
||||
while ([rs next]) {
|
||||
//…
|
||||
}
|
||||
}];
|
||||
|
||||
An easy way to wrap things up in a transaction can be done like this:
|
||||
|
||||
[queue inTransaction:^(FMDatabase *db, BOOL *rollback) {
|
||||
[db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:1]];
|
||||
[db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:2]];
|
||||
[db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:3]];
|
||||
|
||||
if (whoopsSomethingWrongHappened) {
|
||||
*rollback = YES;
|
||||
return;
|
||||
}
|
||||
// etc…
|
||||
[db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:4]];
|
||||
}];
|
||||
|
||||
`FMDatabaseQueue` will run the blocks on a serialized queue (hence the name of the class). So if you call `FMDatabaseQueue`'s methods from multiple threads at the same time, they will be executed in the order they are received. This way queries and updates won't step on each other's toes, and every one is happy.
|
||||
|
||||
### See also
|
||||
|
||||
- `<FMDatabase>`
|
||||
|
||||
@warning Do not instantiate a single `<FMDatabase>` object and use it across multiple threads. Use `FMDatabaseQueue` instead.
|
||||
|
||||
@warning The calls to `FMDatabaseQueue`'s methods are blocking. So even though you are passing along blocks, they will **not** be run on another thread.
|
||||
|
||||
*/
|
||||
|
||||
@interface AWSFMDatabaseQueue : NSObject {
|
||||
NSString *_path;
|
||||
dispatch_queue_t _queue;
|
||||
AWSFMDatabase *_db;
|
||||
int _openFlags;
|
||||
}
|
||||
|
||||
/** Path of database */
|
||||
|
||||
@property (atomic, retain) NSString *path;
|
||||
|
||||
/** Open flags */
|
||||
|
||||
@property (atomic, readonly) int openFlags;
|
||||
|
||||
///----------------------------------------------------
|
||||
/// @name Initialization, opening, and closing of queue
|
||||
///----------------------------------------------------
|
||||
|
||||
/** Create queue using path.
|
||||
|
||||
@param aPath The file path of the database.
|
||||
|
||||
@return The `FMDatabaseQueue` object. `nil` on error.
|
||||
*/
|
||||
|
||||
+ (instancetype)databaseQueueWithPath:(NSString*)aPath;
|
||||
|
||||
/** Create queue using path and specified flags.
|
||||
|
||||
@param aPath The file path of the database.
|
||||
@param openFlags Flags passed to the openWithFlags method of the database
|
||||
|
||||
@return The `FMDatabaseQueue` object. `nil` on error.
|
||||
*/
|
||||
+ (instancetype)databaseQueueWithPath:(NSString*)aPath flags:(int)openFlags;
|
||||
|
||||
/** Create queue using path.
|
||||
|
||||
@param aPath The file path of the database.
|
||||
|
||||
@return The `FMDatabaseQueue` object. `nil` on error.
|
||||
*/
|
||||
|
||||
- (instancetype)initWithPath:(NSString*)aPath;
|
||||
|
||||
/** Create queue using path and specified flags.
|
||||
|
||||
@param aPath The file path of the database.
|
||||
@param openFlags Flags passed to the openWithFlags method of the database
|
||||
|
||||
@return The `FMDatabaseQueue` object. `nil` on error.
|
||||
*/
|
||||
|
||||
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags;
|
||||
|
||||
/** Create queue using path and specified flags.
|
||||
|
||||
@param aPath The file path of the database.
|
||||
@param openFlags Flags passed to the openWithFlags method of the database
|
||||
@param vfsName The name of a custom virtual file system
|
||||
|
||||
@return The `FMDatabaseQueue` object. `nil` on error.
|
||||
*/
|
||||
|
||||
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName;
|
||||
|
||||
/** Returns the Class of 'FMDatabase' subclass, that will be used to instantiate database object.
|
||||
|
||||
Subclasses can override this method to return specified Class of 'FMDatabase' subclass.
|
||||
|
||||
@return The Class of 'FMDatabase' subclass, that will be used to instantiate database object.
|
||||
*/
|
||||
|
||||
+ (Class)databaseClass;
|
||||
|
||||
/** Close database used by queue. */
|
||||
|
||||
- (void)close;
|
||||
|
||||
///-----------------------------------------------
|
||||
/// @name Dispatching database operations to queue
|
||||
///-----------------------------------------------
|
||||
|
||||
/** Synchronously perform database operations on queue.
|
||||
|
||||
@param block The code to be run on the queue of `FMDatabaseQueue`
|
||||
*/
|
||||
|
||||
- (void)inDatabase:(void (^)(AWSFMDatabase *db))block;
|
||||
|
||||
/** Synchronously perform database operations on queue, using transactions.
|
||||
|
||||
@param block The code to be run on the queue of `FMDatabaseQueue`
|
||||
*/
|
||||
|
||||
- (void)inTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
|
||||
|
||||
/** Synchronously perform database operations on queue, using deferred transactions.
|
||||
|
||||
@param block The code to be run on the queue of `FMDatabaseQueue`
|
||||
*/
|
||||
|
||||
- (void)inDeferredTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
|
||||
|
||||
///-----------------------------------------------
|
||||
/// @name Dispatching database operations to queue
|
||||
///-----------------------------------------------
|
||||
|
||||
/** Synchronously perform database operations using save point.
|
||||
|
||||
@param block The code to be run on the queue of `FMDatabaseQueue`
|
||||
*/
|
||||
|
||||
// NOTE: you can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock.
|
||||
// If you need to nest, use FMDatabase's startSavePointWithName:error: instead.
|
||||
- (NSError*)inSavePoint:(void (^)(AWSFMDatabase *db, BOOL *rollback))block;
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,468 +0,0 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef __has_feature // Optional.
|
||||
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
|
||||
#endif
|
||||
|
||||
#ifndef NS_RETURNS_NOT_RETAINED
|
||||
#if __has_feature(attribute_ns_returns_not_retained)
|
||||
#define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
|
||||
#else
|
||||
#define NS_RETURNS_NOT_RETAINED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@class AWSFMDatabase;
|
||||
@class AWSFMStatement;
|
||||
|
||||
/** Represents the results of executing a query on an `<FMDatabase>`.
|
||||
|
||||
### See also
|
||||
|
||||
- `<FMDatabase>`
|
||||
*/
|
||||
|
||||
@interface AWSFMResultSet : NSObject {
|
||||
AWSFMDatabase *_parentDB;
|
||||
AWSFMStatement *_statement;
|
||||
|
||||
NSString *_query;
|
||||
NSMutableDictionary *_columnNameToIndexMap;
|
||||
}
|
||||
|
||||
///-----------------
|
||||
/// @name Properties
|
||||
///-----------------
|
||||
|
||||
/** Executed query */
|
||||
|
||||
@property (atomic, retain) NSString *query;
|
||||
|
||||
/** `NSMutableDictionary` mapping column names to numeric index */
|
||||
|
||||
@property (readonly) NSMutableDictionary *columnNameToIndexMap;
|
||||
|
||||
/** `FMStatement` used by result set. */
|
||||
|
||||
@property (atomic, retain) AWSFMStatement *statement;
|
||||
|
||||
///------------------------------------
|
||||
/// @name Creating and closing database
|
||||
///------------------------------------
|
||||
|
||||
/** Create result set from `<FMStatement>`
|
||||
|
||||
@param statement A `<FMStatement>` to be performed
|
||||
|
||||
@param aDB A `<FMDatabase>` to be used
|
||||
|
||||
@return A `FMResultSet` on success; `nil` on failure
|
||||
*/
|
||||
|
||||
+ (instancetype)resultSetWithStatement:(AWSFMStatement *)statement usingParentDatabase:(AWSFMDatabase*)aDB;
|
||||
|
||||
/** Close result set */
|
||||
|
||||
- (void)close;
|
||||
|
||||
- (void)setParentDB:(AWSFMDatabase *)newDb;
|
||||
|
||||
///---------------------------------------
|
||||
/// @name Iterating through the result set
|
||||
///---------------------------------------
|
||||
|
||||
/** Retrieve next row for result set.
|
||||
|
||||
You must always invoke `next` or `nextWithError` before attempting to access the values returned in a query, even if you're only expecting one.
|
||||
|
||||
@return `YES` if row successfully retrieved; `NO` if end of result set reached
|
||||
|
||||
@see hasAnotherRow
|
||||
*/
|
||||
|
||||
- (BOOL)next;
|
||||
|
||||
/** Retrieve next row for result set.
|
||||
|
||||
You must always invoke `next` or `nextWithError` before attempting to access the values returned in a query, even if you're only expecting one.
|
||||
|
||||
@param outErr A 'NSError' object to receive any error object (if any).
|
||||
|
||||
@return 'YES' if row successfully retrieved; 'NO' if end of result set reached
|
||||
|
||||
@see hasAnotherRow
|
||||
*/
|
||||
|
||||
- (BOOL)nextWithError:(NSError **)outErr;
|
||||
|
||||
/** Did the last call to `<next>` succeed in retrieving another row?
|
||||
|
||||
@return `YES` if the last call to `<next>` succeeded in retrieving another record; `NO` if not.
|
||||
|
||||
@see next
|
||||
|
||||
@warning The `hasAnotherRow` method must follow a call to `<next>`. If the previous database interaction was something other than a call to `next`, then this method may return `NO`, whether there is another row of data or not.
|
||||
*/
|
||||
|
||||
- (BOOL)hasAnotherRow;
|
||||
|
||||
///---------------------------------------------
|
||||
/// @name Retrieving information from result set
|
||||
///---------------------------------------------
|
||||
|
||||
/** How many columns in result set
|
||||
|
||||
@return Integer value of the number of columns.
|
||||
*/
|
||||
|
||||
- (int)columnCount;
|
||||
|
||||
/** Column index for column name
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return Zero-based index for column.
|
||||
*/
|
||||
|
||||
- (int)columnIndexForName:(NSString*)columnName;
|
||||
|
||||
/** Column name for column index
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return columnName `NSString` value of the name of the column.
|
||||
*/
|
||||
|
||||
- (NSString*)columnNameForIndex:(int)columnIdx;
|
||||
|
||||
/** Result set integer value for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `int` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (int)intForColumn:(NSString*)columnName;
|
||||
|
||||
/** Result set integer value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `int` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (int)intForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set `long` value for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `long` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (long)longForColumn:(NSString*)columnName;
|
||||
|
||||
/** Result set long value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `long` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (long)longForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set `long long int` value for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `long long int` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (long long int)longLongIntForColumn:(NSString*)columnName;
|
||||
|
||||
/** Result set `long long int` value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `long long int` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (long long int)longLongIntForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set `unsigned long long int` value for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `unsigned long long int` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (unsigned long long int)unsignedLongLongIntForColumn:(NSString*)columnName;
|
||||
|
||||
/** Result set `unsigned long long int` value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `unsigned long long int` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (unsigned long long int)unsignedLongLongIntForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set `BOOL` value for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `BOOL` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (BOOL)boolForColumn:(NSString*)columnName;
|
||||
|
||||
/** Result set `BOOL` value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `BOOL` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (BOOL)boolForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set `double` value for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `double` value of the result set's column.
|
||||
|
||||
*/
|
||||
|
||||
- (double)doubleForColumn:(NSString*)columnName;
|
||||
|
||||
/** Result set `double` value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `double` value of the result set's column.
|
||||
|
||||
*/
|
||||
|
||||
- (double)doubleForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set `NSString` value for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `NSString` value of the result set's column.
|
||||
|
||||
*/
|
||||
|
||||
- (NSString*)stringForColumn:(NSString*)columnName;
|
||||
|
||||
/** Result set `NSString` value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `NSString` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (NSString*)stringForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set `NSDate` value for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `NSDate` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (NSDate*)dateForColumn:(NSString*)columnName;
|
||||
|
||||
/** Result set `NSDate` value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `NSDate` value of the result set's column.
|
||||
|
||||
*/
|
||||
|
||||
- (NSDate*)dateForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set `NSData` value for column.
|
||||
|
||||
This is useful when storing binary data in table (such as image or the like).
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `NSData` value of the result set's column.
|
||||
|
||||
*/
|
||||
|
||||
- (NSData*)dataForColumn:(NSString*)columnName;
|
||||
|
||||
/** Result set `NSData` value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `NSData` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (NSData*)dataForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set `(const unsigned char *)` value for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `(const unsigned char *)` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (const unsigned char *)UTF8StringForColumnName:(NSString*)columnName;
|
||||
|
||||
/** Result set `(const unsigned char *)` value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `(const unsigned char *)` value of the result set's column.
|
||||
*/
|
||||
|
||||
- (const unsigned char *)UTF8StringForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set object for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
|
||||
|
||||
@see objectForKeyedSubscript:
|
||||
*/
|
||||
|
||||
- (id)objectForColumnName:(NSString*)columnName;
|
||||
|
||||
/** Result set object for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
|
||||
|
||||
@see objectAtIndexedSubscript:
|
||||
*/
|
||||
|
||||
- (id)objectForColumnIndex:(int)columnIdx;
|
||||
|
||||
/** Result set object for column.
|
||||
|
||||
This method allows the use of the "boxed" syntax supported in Modern Objective-C. For example, by defining this method, the following syntax is now supported:
|
||||
|
||||
id result = rs[@"employee_name"];
|
||||
|
||||
This simplified syntax is equivalent to calling:
|
||||
|
||||
id result = [rs objectForKeyedSubscript:@"employee_name"];
|
||||
|
||||
which is, it turns out, equivalent to calling:
|
||||
|
||||
id result = [rs objectForColumnName:@"employee_name"];
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
|
||||
*/
|
||||
|
||||
- (id)objectForKeyedSubscript:(NSString *)columnName;
|
||||
|
||||
/** Result set object for column.
|
||||
|
||||
This method allows the use of the "boxed" syntax supported in Modern Objective-C. For example, by defining this method, the following syntax is now supported:
|
||||
|
||||
id result = rs[0];
|
||||
|
||||
This simplified syntax is equivalent to calling:
|
||||
|
||||
id result = [rs objectForKeyedSubscript:0];
|
||||
|
||||
which is, it turns out, equivalent to calling:
|
||||
|
||||
id result = [rs objectForColumnName:0];
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
|
||||
*/
|
||||
|
||||
- (id)objectAtIndexedSubscript:(int)columnIdx;
|
||||
|
||||
/** Result set `NSData` value for column.
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `NSData` value of the result set's column.
|
||||
|
||||
@warning If you are going to use this data after you iterate over the next row, or after you close the
|
||||
result set, make sure to make a copy of the data first (or just use `<dataForColumn:>`/`<dataForColumnIndex:>`)
|
||||
If you don't, you're going to be in a world of hurt when you try and use the data.
|
||||
|
||||
*/
|
||||
|
||||
- (NSData*)dataNoCopyForColumn:(NSString*)columnName NS_RETURNS_NOT_RETAINED;
|
||||
|
||||
/** Result set `NSData` value for column.
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `NSData` value of the result set's column.
|
||||
|
||||
@warning If you are going to use this data after you iterate over the next row, or after you close the
|
||||
result set, make sure to make a copy of the data first (or just use `<dataForColumn:>`/`<dataForColumnIndex:>`)
|
||||
If you don't, you're going to be in a world of hurt when you try and use the data.
|
||||
|
||||
*/
|
||||
|
||||
- (NSData*)dataNoCopyForColumnIndex:(int)columnIdx NS_RETURNS_NOT_RETAINED;
|
||||
|
||||
/** Is the column `NULL`?
|
||||
|
||||
@param columnIdx Zero-based index for column.
|
||||
|
||||
@return `YES` if column is `NULL`; `NO` if not `NULL`.
|
||||
*/
|
||||
|
||||
- (BOOL)columnIndexIsNull:(int)columnIdx;
|
||||
|
||||
/** Is the column `NULL`?
|
||||
|
||||
@param columnName `NSString` value of the name of the column.
|
||||
|
||||
@return `YES` if column is `NULL`; `NO` if not `NULL`.
|
||||
*/
|
||||
|
||||
- (BOOL)columnIsNull:(NSString*)columnName;
|
||||
|
||||
|
||||
/** Returns a dictionary of the row results mapped to case sensitive keys of the column names.
|
||||
|
||||
@returns `NSDictionary` of the row results.
|
||||
|
||||
@warning The keys to the dictionary are case sensitive of the column names.
|
||||
*/
|
||||
|
||||
- (NSDictionary*)resultDictionary;
|
||||
|
||||
/** Returns a dictionary of the row results
|
||||
|
||||
@see resultDictionary
|
||||
|
||||
@warning **Deprecated**: Please use `<resultDictionary>` instead. Also, beware that `<resultDictionary>` is case sensitive!
|
||||
*/
|
||||
|
||||
- (NSDictionary*)resultDict __attribute__ ((deprecated));
|
||||
|
||||
///-----------------------------
|
||||
/// @name Key value coding magic
|
||||
///-----------------------------
|
||||
|
||||
/** Performs `setValue` to yield support for key value observing.
|
||||
|
||||
@param object The object for which the values will be set. This is the key-value-coding compliant object that you might, for example, observe.
|
||||
|
||||
*/
|
||||
|
||||
- (void)kvcMagic:(id)object;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
//
|
||||
// GZIP.h
|
||||
//
|
||||
// Version 1.0.3
|
||||
//
|
||||
// Created by Nick Lockwood on 03/06/2012.
|
||||
// Copyright (C) 2012 Charcoal Design
|
||||
//
|
||||
// Distributed under the permissive zlib License
|
||||
// Get the latest version from here:
|
||||
//
|
||||
// https://github.com/nicklockwood/GZIP
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would be
|
||||
// appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||
// misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
//
|
||||
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
void awsgzip_loadGZIP();
|
||||
|
||||
@interface NSData (AWSGZIP)
|
||||
|
||||
- (NSData *)awsgzip_gzippedDataWithCompressionLevel:(float)level;
|
||||
- (NSData *)awsgzip_gzippedData;
|
||||
- (NSData *)awsgzip_gunzippedData;
|
||||
|
||||
@end
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
This exists to use along with `AWSTask` and `AWSTaskCompletionSource`.
|
||||
|
||||
Instead of returning a `AWSTask` with no generic type, or a generic type of 'NSNull'
|
||||
when there is no usable result from a task, we use the type 'AWSVoid', which will always have a value of `nil`.
|
||||
|
||||
This allows you to provide a more enforced API contract to the caller,
|
||||
as sending any message to `AWSVoid` will result in a compile time error.
|
||||
*/
|
||||
@class _AWSVoid_Nonexistant;
|
||||
typedef _AWSVoid_Nonexistant *AWSVoid;
|
||||
@@ -1,147 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSServiceEnum.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSCognitoIdentityIdChangedNotification;
|
||||
FOUNDATION_EXPORT NSString *const AWSCognitoNotificationPreviousId;
|
||||
FOUNDATION_EXPORT NSString *const AWSCognitoNotificationNewId;
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSIdentityProviderDigits;
|
||||
FOUNDATION_EXPORT NSString *const AWSIdentityProviderFacebook;
|
||||
FOUNDATION_EXPORT NSString *const AWSIdentityProviderGoogle;
|
||||
FOUNDATION_EXPORT NSString *const AWSIdentityProviderLoginWithAmazon;
|
||||
FOUNDATION_EXPORT NSString *const AWSIdentityProviderTwitter;
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSIdentityProviderAmazonCognitoIdentity;
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSCognitoCredentialsProviderHelperErrorDomain;
|
||||
typedef NS_ENUM(NSInteger, AWSCognitoCredentialsProviderHelperErrorType) {
|
||||
AWSCognitoCredentialsProviderHelperErrorTypeIdentityIsNil,
|
||||
AWSCognitoCredentialsProviderHelperErrorTypeTokenRefreshTimeout,
|
||||
};
|
||||
|
||||
@class AWSTask<__covariant ResultType>;
|
||||
|
||||
/**
|
||||
AWSIdentityProvider provides an interface for acquiring an identity token from a provider.
|
||||
*/
|
||||
@protocol AWSIdentityProvider <NSObject>
|
||||
|
||||
/**
|
||||
The name of the identity provider. e.g. graph.facebook.com.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *identityProviderName;
|
||||
|
||||
/**
|
||||
Returns the token associated with this provider. If the token is cached and invalid, should refresh and return the valid token.
|
||||
*/
|
||||
- (AWSTask<NSString *> *)token;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
`AWSIdentityProviderManager` provides an interface for creating the `logins` dictionary for Amazon Cognito Identity.
|
||||
*/
|
||||
@protocol AWSIdentityProviderManager <NSObject>
|
||||
|
||||
/**
|
||||
Each entry in logins represents a single login with an identity provider. The key is the domain of the login provider (e.g. 'graph.facebook.com') and the value is the OAuth/OpenId Connect token that results from an authentication with that login provider.
|
||||
*/
|
||||
- (AWSTask<NSDictionary<NSString *, NSString *> *> *)logins;
|
||||
|
||||
@optional
|
||||
/**
|
||||
* If the token contains the role arn and there are multiple roles, return the custom role to assume. This is currently only supported for SAML identity providers.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *customRoleArn;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
AWSCognitoCredentialsProviderHelper provides a Cognito specific identity provider. Cognito Identity providers are associated with an identity pool. If the identity pool supports authenticated access, multiple logins may be added to link to the Cognito identity.
|
||||
*/
|
||||
@protocol AWSCognitoCredentialsProviderHelper <AWSIdentityProvider, AWSIdentityProviderManager>
|
||||
|
||||
/**
|
||||
The identity pool for this provider. Used to when making calls to the Amazon Cognito service
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSString *identityPoolId;
|
||||
|
||||
/**
|
||||
The identity id as determined by the Amazon Cognito service
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) NSString *identityId;
|
||||
|
||||
/**
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) id<AWSIdentityProviderManager> identityProviderManager;
|
||||
|
||||
/**
|
||||
Get/retrieve the identity id for this provider. If an identity id is already set on this provider, no remote call is made and the identity will be returned as a result of the AWSTask (the identityId is also available as a property). If no identityId is set on this provider, one will be retrieved from the service.
|
||||
*/
|
||||
- (AWSTask<NSString *> *)getIdentityId;
|
||||
|
||||
/**
|
||||
Is this provider considered 'authenticated'. By default, only returns YES if logins is set.
|
||||
*/
|
||||
- (BOOL)isAuthenticated;
|
||||
|
||||
/**
|
||||
Clear saved values for identityId, token, and logins.
|
||||
*/
|
||||
- (void)clear;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
An abstract implementation of the AWSCognitoCredentialsProviderHelper.
|
||||
*/
|
||||
@interface AWSAbstractCognitoCredentialsProviderHelper : NSObject <AWSCognitoCredentialsProviderHelper>
|
||||
|
||||
/**
|
||||
The identity pool for this provider. Used to when making calls to the Amazon Cognito service
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSString *identityPoolId;
|
||||
|
||||
/**
|
||||
The identity id as determined by the Amazon Cognito service
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) NSString *identityId;
|
||||
|
||||
/**
|
||||
The identity provider manager that asynchronously returns `logins`.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) id<AWSIdentityProviderManager> identityProviderManager;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
An abstract implementation of the AWSCognitoCredentialsProviderHelper. Developers should extend this class when they want to implement developer authenticated identities and want to support the basic Amazon Cognito authflow in the same application.
|
||||
*/
|
||||
@interface AWSCognitoCredentialsProviderHelper : AWSAbstractCognitoCredentialsProviderHelper
|
||||
|
||||
@property (nonatomic, assign) BOOL useEnhancedFlow;
|
||||
|
||||
- (instancetype)initWithRegionType:(AWSRegionType)regionType
|
||||
identityPoolId:(NSString *)identityPoolId
|
||||
useEnhancedFlow:(BOOL)useEnhancedFlow
|
||||
identityProviderManager:(nullable id<AWSIdentityProviderManager>)identityProviderManager;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,49 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AWSServiceEnum.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
FOUNDATION_EXPORT NSString *const AWSInfoDefault;
|
||||
|
||||
@class AWSServiceInfo;
|
||||
@class AWSCognitoCredentialsProvider;
|
||||
|
||||
@interface AWSInfo : NSObject
|
||||
|
||||
@property (nonatomic, readonly) NSDictionary <NSString *, id> *rootInfoDictionary;
|
||||
|
||||
+ (instancetype)defaultAWSInfo;
|
||||
|
||||
- (nullable AWSServiceInfo *)serviceInfo:(NSString *)serviceName
|
||||
forKey:(NSString *)key;
|
||||
|
||||
- (nullable AWSServiceInfo *)defaultServiceInfo:(NSString *)serviceName;
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSServiceInfo : NSObject
|
||||
|
||||
@property (nonatomic, readonly) AWSCognitoCredentialsProvider *cognitoCredentialsProvider;
|
||||
|
||||
@property (nonatomic, readonly) AWSRegionType region;
|
||||
|
||||
@property (nonatomic, readonly) NSDictionary <NSString *, id> *infoDictionary;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,204 +0,0 @@
|
||||
//
|
||||
// KSReachability.h
|
||||
//
|
||||
// Created by Karl Stenerud on 5/5/12.
|
||||
//
|
||||
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall remain in place
|
||||
// in this source code.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <SystemConfiguration/SystemConfiguration.h>
|
||||
|
||||
|
||||
/** This is the notification name used in the Apple reachability example.
|
||||
* It is not used internally, and is merely a suggested notification name.
|
||||
*/
|
||||
#define kAWSDefaultNetworkReachabilityChangedNotification @"kAWSNetworkReachabilityChangedNotification"
|
||||
|
||||
|
||||
@class AWSKSReachability;
|
||||
|
||||
typedef void(^AWSKSReachabilityCallback)(AWSKSReachability* reachability);
|
||||
|
||||
|
||||
/** Monitors network connectivity.
|
||||
*
|
||||
* You can elect to be notified via blocks (onReachabilityChanged),
|
||||
* notifications (notificationName), or KVO (flags, reachable, and WWANOnly).
|
||||
*
|
||||
* All notification methods are disabled by default.
|
||||
*
|
||||
* Note: Upon construction, this object will fetch its initial reachability
|
||||
* state in the background. This means that the reachability status will ALWAYS
|
||||
* be "unreachable" until some time after object construction (possibly up to 10
|
||||
* seconds, depending on how long the DNS lookup takes). Use the "initialized"
|
||||
* property to monitor initialization, or set the callback "onInitializationComplete".
|
||||
*/
|
||||
@interface AWSKSReachability : NSObject
|
||||
|
||||
#pragma mark Constructors
|
||||
|
||||
/** Reachability to a specific host. Returns nil if an initialization error occurs.
|
||||
*
|
||||
* @param hostname The name or IP address of the host to monitor. If nil or
|
||||
* empty string, check reachability to the internet in general.
|
||||
*/
|
||||
+ (AWSKSReachability*) reachabilityToHost:(NSString*) hostname;
|
||||
|
||||
/** Reachability to the local (wired or wifi) network. Returns nil if an initialization error occurs.
|
||||
*/
|
||||
+ (AWSKSReachability*) reachabilityToLocalNetwork;
|
||||
|
||||
/** Reachability to the internet. Returns nil if an initialization error occurs.
|
||||
*/
|
||||
+ (AWSKSReachability*) reachabilityToInternet;
|
||||
|
||||
|
||||
#pragma mark General Information
|
||||
|
||||
/** The host we are monitoring reachability to, if any. */
|
||||
@property(nonatomic,readonly,retain) NSString* hostname;
|
||||
|
||||
|
||||
#pragma mark Notifications and Callbacks
|
||||
|
||||
/** If non-nil, called when the KSReachability object has finished initializing.
|
||||
* If initialization has already completed, calls on the next main thread run loop.
|
||||
* This block will only be called once, and then discarded (released).
|
||||
* Block will be invoked on the main thread.
|
||||
*/
|
||||
@property(atomic,readwrite,copy) AWSKSReachabilityCallback onInitializationComplete;
|
||||
|
||||
/** If non-nil, called whenever reachability flags change.
|
||||
* Block will be invoked on the main thread.
|
||||
*/
|
||||
@property(atomic,readwrite,copy) AWSKSReachabilityCallback onReachabilityChanged;
|
||||
|
||||
/** The notification to send when reachability changes (nil = don't send).
|
||||
* Default = nil
|
||||
*/
|
||||
@property(nonatomic,readwrite,retain) NSString* notificationName;
|
||||
|
||||
|
||||
#pragma mark KVO Compliant Status Properties
|
||||
|
||||
/** The current reachability flags.
|
||||
* This property will always report 0 while "initialized" property = NO.
|
||||
*/
|
||||
@property(nonatomic,readonly,assign) SCNetworkReachabilityFlags flags;
|
||||
|
||||
/** Whether the host is reachable or not.
|
||||
* This property will always report NO while "initialized" property = NO.
|
||||
*/
|
||||
@property(nonatomic,readonly,assign) BOOL reachable;
|
||||
|
||||
/* If YES, the host is only reachable by WWAN (iOS only).
|
||||
* This property will always report NO while "initialized" property = NO.
|
||||
*/
|
||||
@property(nonatomic,readonly,assign) BOOL WWANOnly;
|
||||
|
||||
/** If YES, this object's status properties are valid. */
|
||||
@property(atomic,readonly,assign) BOOL initialized;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
/** A one-time operation to perform as soon as a host is deemed reachable.
|
||||
* The operation will only be performed once, regardless of how many times a
|
||||
* host becomes reachable.
|
||||
*/
|
||||
@interface AWSKSReachableOperation: NSObject
|
||||
|
||||
/** Constructor. Returns nil if an initialization error occurs.
|
||||
*
|
||||
* @param hostname The name or IP address of the host to monitor. If nil or
|
||||
* empty string, check reachability to the internet in general.
|
||||
* If hostname is a URL string, it will use the host portion.
|
||||
*
|
||||
* @param allowWWAN If NO, a WWAN-only connection is not enough to trigger
|
||||
* this operation.
|
||||
*
|
||||
* @param onReachabilityAchieved Invoke when the host becomes reachable.
|
||||
* This will be invoked ONE TIME ONLY, no matter
|
||||
* how many times reachability changes.
|
||||
* Block will be invoked on the main thread.
|
||||
*/
|
||||
+ (AWSKSReachableOperation*) operationWithHost:(NSString*) hostname
|
||||
allowWWAN:(BOOL) allowWWAN
|
||||
onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved;
|
||||
|
||||
/** Constructor. Returns nil if an initialization error occurs.
|
||||
*
|
||||
* @param reachability A reachability instance. Note: This object will overwrite
|
||||
* the onReachabilityChanged property.
|
||||
*
|
||||
* @param allowWWAN If NO, a WWAN-only connection is not enough to trigger
|
||||
* this operation.
|
||||
*
|
||||
* @param onReachabilityAchieved Invoke when the host becomes reachable.
|
||||
* This will be invoked ONE TIME ONLY, no matter
|
||||
* how many times reachability changes.
|
||||
* Block will be invoked on the main thread.
|
||||
*/
|
||||
+ (AWSKSReachableOperation*) operationWithReachability:(AWSKSReachability*) reachability
|
||||
allowWWAN:(BOOL) allowWWAN
|
||||
onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved;
|
||||
|
||||
/** Initializer. Returns nil if an initialization error occurs.
|
||||
*
|
||||
* @param hostname The name or IP address of the host to monitor. If nil or
|
||||
* empty string, check reachability to the internet in general.
|
||||
* If hostname is a URL string, it will use the host portion.
|
||||
*
|
||||
* @param allowWWAN If NO, a WWAN-only connection is not enough to trigger
|
||||
* this operation.
|
||||
*
|
||||
* @param onReachabilityAchieved Invoke when the host becomes reachable.
|
||||
* This will be invoked ONE TIME ONLY, no matter
|
||||
* how many times reachability changes.
|
||||
* Block will be invoked on the main thread.
|
||||
*/
|
||||
- (id) initWithHost:(NSString*) hostname
|
||||
allowWWAN:(BOOL) allowWWAN
|
||||
onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved;
|
||||
|
||||
/** Initializer. Returns nil if an initialization error occurs.
|
||||
*
|
||||
* @param reachability A reachability instance. Note: This object will overwrite
|
||||
* the onReachabilityChanged property.
|
||||
*
|
||||
* @param allowWWAN If NO, a WWAN-only connection is not enough to trigger
|
||||
* this operation.
|
||||
*
|
||||
* @param onReachabilityAchieved Invoke when the host becomes reachable.
|
||||
* This will be invoked ONE TIME ONLY, no matter
|
||||
* how many times reachability changes.
|
||||
* Block will be invoked on the main thread.
|
||||
*/
|
||||
- (id) initWithReachability:(AWSKSReachability*) reachability
|
||||
allowWWAN:(BOOL) allowWWAN
|
||||
onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved;
|
||||
|
||||
/** Access to internal reachability instance. Use this to monitor for errors. */
|
||||
@property(nonatomic,readonly,retain) AWSKSReachability* reachability;
|
||||
|
||||
@end
|
||||
@@ -1,96 +0,0 @@
|
||||
//
|
||||
// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License").
|
||||
// You may not use this file except in compliance with the License.
|
||||
// A copy of the License is located at
|
||||
//
|
||||
// http://aws.amazon.com/apache2.0
|
||||
//
|
||||
// or in the "license" file accompanying this file. This file is distributed
|
||||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
// express or implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define AWSLogFormat @"%@ line:%d | %s | "
|
||||
|
||||
#define AWSLogError(fmt, ...) [[AWSLogger defaultLogger] log:AWSLogLevelError format:(AWSLogFormat fmt), [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__]
|
||||
#define AWSLogWarn(fmt, ...) [[AWSLogger defaultLogger] log:AWSLogLevelWarn format:(AWSLogFormat fmt), [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__]
|
||||
#define AWSLogInfo(fmt, ...) [[AWSLogger defaultLogger] log:AWSLogLevelInfo format:(AWSLogFormat fmt), [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__]
|
||||
#define AWSLogDebug(fmt, ...) [[AWSLogger defaultLogger] log:AWSLogLevelDebug format:(AWSLogFormat fmt), [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__]
|
||||
#define AWSLogVerbose(fmt, ...) [[AWSLogger defaultLogger] log:AWSLogLevelVerbose format:(AWSLogFormat fmt), [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__]
|
||||
|
||||
typedef NS_ENUM(NSInteger, AWSLogLevel) {
|
||||
AWSLogLevelUnknown = -1,
|
||||
AWSLogLevelNone = 0,
|
||||
AWSLogLevelError = 1,
|
||||
AWSLogLevelWarn = 2,
|
||||
AWSLogLevelInfo = 3,
|
||||
AWSLogLevelDebug = 4,
|
||||
AWSLogLevelVerbose = 5
|
||||
};
|
||||
|
||||
/**
|
||||
`AWSLogger` is an utility class that handles logging to the console. Changing log levels during development may make debugging easier. You can change the log level by importing `AWSCore.h` and calling:
|
||||
|
||||
*Swift*
|
||||
|
||||
AWSLogger.defaultLogger().logLevel = .None
|
||||
|
||||
The following logging level options are available:
|
||||
|
||||
.None
|
||||
.Error
|
||||
.Warn
|
||||
.Info
|
||||
.Debug (This is the default.)
|
||||
.Verbose
|
||||
|
||||
*Objective-C*
|
||||
|
||||
[AWSLogger defaultLogger].logLevel = AWSLogLevelNone;
|
||||
|
||||
The following logging level options are available:
|
||||
|
||||
AWSLogLevelNone
|
||||
AWSLogLevelError
|
||||
AWSLogLevelWarn
|
||||
AWSLogLevelInfo
|
||||
AWSLogLevelDebug (This is the default.)
|
||||
AWSLogLevelVerbose
|
||||
|
||||
@note We recommend setting the log level to `None` before publishing to the Apple App Store.
|
||||
*/
|
||||
@interface AWSLogger : NSObject
|
||||
|
||||
/**
|
||||
The log level setting. The default value is `Debug`.
|
||||
*/
|
||||
@property (atomic, assign) AWSLogLevel logLevel;
|
||||
|
||||
/**
|
||||
Returns the shared logger object.
|
||||
|
||||
@return The shared logger object.
|
||||
*/
|
||||
+ (instancetype)defaultLogger;
|
||||
|
||||
/**
|
||||
Prints out the formatted logs to the console. You can use the following predefined shorthand methods instead:
|
||||
|
||||
AWSLogError(fmt, ...)
|
||||
AWSLogWarn(fmt, ...)
|
||||
AWSLogInfo(fmt, ...)
|
||||
AWSLogDebug(fmt, ...)
|
||||
AWSLogVerbose(fmt, ...)
|
||||
|
||||
@param logLevel The level of this log.
|
||||
@param fmt The formatted string to log.
|
||||
*/
|
||||
- (void)log:(AWSLogLevel)logLevel
|
||||
format:(NSString *)fmt, ... NS_FORMAT_FUNCTION(2, 3);
|
||||
|
||||
@end
|
||||
@@ -1,172 +0,0 @@
|
||||
//
|
||||
// MTLJSONAdapter.h
|
||||
// Mantle
|
||||
//
|
||||
// Created by Justin Spahr-Summers on 2013-02-12.
|
||||
// Copyright (c) 2013 GitHub. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class AWSMTLModel;
|
||||
|
||||
// A MTLModel object that supports being parsed from and serialized to JSON.
|
||||
@protocol AWSMTLJSONSerializing
|
||||
@required
|
||||
|
||||
// Specifies how to map property keys to different key paths in JSON.
|
||||
//
|
||||
// Subclasses overriding this method should combine their values with those of
|
||||
// `super`.
|
||||
//
|
||||
// Any property keys not present in the dictionary are assumed to match the JSON
|
||||
// key that should be used. Any keys associated with NSNull will not participate
|
||||
// in JSON serialization.
|
||||
//
|
||||
// Returns a dictionary mapping property keys to JSON key paths (as strings) or
|
||||
// NSNull values.
|
||||
+ (NSDictionary *)JSONKeyPathsByPropertyKey;
|
||||
|
||||
@optional
|
||||
|
||||
// Specifies how to convert a JSON value to the given property key. If
|
||||
// reversible, the transformer will also be used to convert the property value
|
||||
// back to JSON.
|
||||
//
|
||||
// If the receiver implements a `+<key>JSONTransformer` method, MTLJSONAdapter
|
||||
// will use the result of that method instead.
|
||||
//
|
||||
// Returns a value transformer, or nil if no transformation should be performed.
|
||||
+ (NSValueTransformer *)JSONTransformerForKey:(NSString *)key;
|
||||
|
||||
// Overridden to parse the receiver as a different class, based on information
|
||||
// in the provided dictionary.
|
||||
//
|
||||
// This is mostly useful for class clusters, where the abstract base class would
|
||||
// be passed into -[MTLJSONAdapter initWithJSONDictionary:modelClass:], but
|
||||
// a subclass should be instantiated instead.
|
||||
//
|
||||
// JSONDictionary - The JSON dictionary that will be parsed.
|
||||
//
|
||||
// Returns the class that should be parsed (which may be the receiver), or nil
|
||||
// to abort parsing (e.g., if the data is invalid).
|
||||
+ (Class)classForParsingJSONDictionary:(NSDictionary *)JSONDictionary;
|
||||
|
||||
@end
|
||||
|
||||
// The domain for errors originating from MTLJSONAdapter.
|
||||
extern NSString * const AWSMTLJSONAdapterErrorDomain;
|
||||
|
||||
// +classForParsingJSONDictionary: returned nil for the given dictionary.
|
||||
extern const NSInteger AWSMTLJSONAdapterErrorNoClassFound;
|
||||
|
||||
// The provided JSONDictionary is not valid.
|
||||
extern const NSInteger AWSMTLJSONAdapterErrorInvalidJSONDictionary;
|
||||
|
||||
// The model's implementation of +JSONKeyPathsByPropertyKey included a key which
|
||||
// does not actually exist in +propertyKeys.
|
||||
extern const NSInteger AWSMTLJSONAdapterErrorInvalidJSONMapping;
|
||||
|
||||
// Converts a MTLModel object to and from a JSON dictionary.
|
||||
@interface AWSMTLJSONAdapter : NSObject
|
||||
|
||||
// The model object that the receiver was initialized with, or that the receiver
|
||||
// parsed from a JSON dictionary.
|
||||
@property (nonatomic, strong, readonly) AWSMTLModel<AWSMTLJSONSerializing> *model;
|
||||
|
||||
// Attempts to parse a JSON dictionary into a model object.
|
||||
//
|
||||
// modelClass - The MTLModel subclass to attempt to parse from the JSON.
|
||||
// This class must conform to <MTLJSONSerializing>. This
|
||||
// argument must not be nil.
|
||||
// JSONDictionary - A dictionary representing JSON data. This should match the
|
||||
// format returned by NSJSONSerialization. If this argument is
|
||||
// nil, the method returns nil.
|
||||
// error - If not NULL, this may be set to an error that occurs during
|
||||
// parsing or initializing an instance of `modelClass`.
|
||||
//
|
||||
// Returns an instance of `modelClass` upon success, or nil if a parsing error
|
||||
// occurred.
|
||||
+ (id)modelOfClass:(Class)modelClass fromJSONDictionary:(NSDictionary *)JSONDictionary error:(NSError **)error;
|
||||
|
||||
// Attempts to parse an array of JSON dictionary objects into a model objects
|
||||
// of a specific class.
|
||||
//
|
||||
// modelClass - The MTLModel subclass to attempt to parse from the JSON. This
|
||||
// class must conform to <MTLJSONSerializing>. This argument must
|
||||
// not be nil.
|
||||
// JSONArray - A array of dictionaries representing JSON data. This should
|
||||
// match the format returned by NSJSONSerialization. If this
|
||||
// argument is nil, the method returns nil.
|
||||
// error - If not NULL, this may be set to an error that occurs during
|
||||
// parsing or initializing an any of the instances of
|
||||
// `modelClass`.
|
||||
//
|
||||
// Returns an array of `modelClass` instances upon success, or nil if a parsing
|
||||
// error occurred.
|
||||
+ (NSArray *)modelsOfClass:(Class)modelClass fromJSONArray:(NSArray *)JSONArray error:(NSError **)error;
|
||||
|
||||
// Converts a model into a JSON representation.
|
||||
//
|
||||
// model - The model to use for JSON serialization. This argument must not be
|
||||
// nil.
|
||||
//
|
||||
// Returns a JSON dictionary, or nil if a serialization error occurred.
|
||||
+ (NSDictionary *)JSONDictionaryFromModel:(AWSMTLModel<AWSMTLJSONSerializing> *)model;
|
||||
|
||||
// Converts a array of models into a JSON representation.
|
||||
//
|
||||
// models - The array of models to use for JSON serialization. This argument
|
||||
// must not be nil.
|
||||
//
|
||||
// Returns a JSON array, or nil if a serialization error occurred for any
|
||||
// model.
|
||||
+ (NSArray *)JSONArrayFromModels:(NSArray *)models;
|
||||
|
||||
// Initializes the receiver by attempting to parse a JSON dictionary into
|
||||
// a model object.
|
||||
//
|
||||
// JSONDictionary - A dictionary representing JSON data. This should match the
|
||||
// format returned by NSJSONSerialization. If this argument is
|
||||
// nil, the method returns nil and an error with code
|
||||
// MTLJSONAdapterErrorInvalidJSONDictionary.
|
||||
// modelClass - The MTLModel subclass to attempt to parse from the JSON.
|
||||
// This class must conform to <MTLJSONSerializing>. This
|
||||
// argument must not be nil.
|
||||
// error - If not NULL, this may be set to an error that occurs during
|
||||
// parsing or initializing an instance of `modelClass`.
|
||||
//
|
||||
// Returns an initialized adapter upon success, or nil if a parsing error
|
||||
// occurred.
|
||||
- (id)initWithJSONDictionary:(NSDictionary *)JSONDictionary modelClass:(Class)modelClass error:(NSError **)error;
|
||||
|
||||
// Initializes the receiver with an existing model.
|
||||
//
|
||||
// model - The model to use for JSON serialization. This argument must not be
|
||||
// nil.
|
||||
- (id)initWithModel:(AWSMTLModel<AWSMTLJSONSerializing> *)model;
|
||||
|
||||
// Serializes the receiver's `model` into JSON.
|
||||
//
|
||||
// Returns a JSON dictionary, or nil if a serialization error occurred.
|
||||
- (NSDictionary *)JSONDictionary;
|
||||
|
||||
// Looks up the JSON key path in the model's +propertyKeys.
|
||||
//
|
||||
// Subclasses may override this method to customize the adapter's seralizing
|
||||
// behavior. You should not call this method directly.
|
||||
//
|
||||
// key - The property key to retrieve the corresponding JSON key path for. This
|
||||
// argument must not be nil.
|
||||
//
|
||||
// Returns a key path to use, or nil to omit the property from JSON.
|
||||
- (NSString *)JSONKeyPathForPropertyKey:(NSString *)key;
|
||||
|
||||
@end
|
||||
|
||||
@interface AWSMTLJSONAdapter (Deprecated)
|
||||
|
||||
+ (id)modelOfClass:(Class)modelClass fromJSONDictionary:(NSDictionary *)JSONDictionary __attribute__((deprecated("Replaced by +modelOfClass:fromJSONDictionary:error:")));
|
||||
- (id)initWithJSONDictionary:(NSDictionary *)JSONDictionary modelClass:(Class)modelClass __attribute__((deprecated("Replaced by -initWithJSONDictionary:modelClass:error:")));
|
||||
|
||||
@end
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user