You've already forked FinalYearProject-MyMind
mirror of
https://github.com/MrLyallCSIT/FinalYearProject-MyMind.git
synced 2026-01-17 22:59:41 +00:00
Creation of Test Plan and FYP Report
This commit is contained in:
143
Final Project Report/appendix/appendix.tex
Executable file
143
Final Project Report/appendix/appendix.tex
Executable file
@@ -0,0 +1,143 @@
|
||||
\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}
|
||||
|
||||
|
||||
|
||||
BIN
Final Project Report/appendix/images/PresentationSlides.pdf
Executable file
BIN
Final Project Report/appendix/images/PresentationSlides.pdf
Executable file
Binary file not shown.
BIN
Final Project Report/appendix/images/TemplateStructure.pdf
Executable file
BIN
Final Project Report/appendix/images/TemplateStructure.pdf
Executable file
Binary file not shown.
BIN
Final Project Report/appendix/images/samplepng.png
Executable file
BIN
Final Project Report/appendix/images/samplepng.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 160 KiB |
9
Final Project Report/background/background.tex
Executable file
9
Final Project Report/background/background.tex
Executable file
@@ -0,0 +1,9 @@
|
||||
\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.
|
||||
|
||||
|
||||
1737
Final Project Report/bath.bst
Executable file
1737
Final Project Report/bath.bst
Executable file
File diff suppressed because it is too large
Load Diff
BIN
Final Project Report/bculogo.jpg
Executable file
BIN
Final Project Report/bculogo.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 200 KiB |
11
Final Project Report/conclude/conclude.tex
Executable file
11
Final Project Report/conclude/conclude.tex
Executable file
@@ -0,0 +1,11 @@
|
||||
\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.
|
||||
9
Final Project Report/design/design.tex
Executable file
9
Final Project Report/design/design.tex
Executable file
@@ -0,0 +1,9 @@
|
||||
\chapter{Design}\label{ch:Design}
|
||||
|
||||
This chapter examines the design of the project.
|
||||
|
||||
\section{Conclusions}
|
||||
|
||||
The main conclusions for this chapter.
|
||||
|
||||
|
||||
9
Final Project Report/eval/evaluation.tex
Executable file
9
Final Project Report/eval/evaluation.tex
Executable file
@@ -0,0 +1,9 @@
|
||||
\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.
|
||||
|
||||
|
||||
9
Final Project Report/impl/implementation.tex
Executable file
9
Final Project Report/impl/implementation.tex
Executable file
@@ -0,0 +1,9 @@
|
||||
\chapter{Implementation}\label{ch:Implementation}
|
||||
|
||||
This chapter examines the implementation of the project.
|
||||
|
||||
\section{Conclusions}
|
||||
|
||||
The main conclusions for this chapter.
|
||||
|
||||
|
||||
8
Final Project Report/intro/abstract.tex
Executable file
8
Final Project Report/intro/abstract.tex
Executable file
@@ -0,0 +1,8 @@
|
||||
\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
|
||||
42
Final Project Report/intro/introduction.tex
Executable file
42
Final Project Report/intro/introduction.tex
Executable file
@@ -0,0 +1,42 @@
|
||||
\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.
|
||||
21
Final Project Report/litreview/litreview.tex
Executable file
21
Final Project Report/litreview/litreview.tex
Executable file
@@ -0,0 +1,21 @@
|
||||
\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.
|
||||
|
||||
|
||||
123
Final Project Report/template.cls
Executable file
123
Final Project Report/template.cls
Executable file
@@ -0,0 +1,123 @@
|
||||
\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}
|
||||
118
Final Project Report/thesis.bib
Executable file
118
Final Project Report/thesis.bib
Executable file
@@ -0,0 +1,118 @@
|
||||
@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},
|
||||
}
|
||||
163
Final Project Report/thesis.tex
Executable file
163
Final Project Report/thesis.tex
Executable file
@@ -0,0 +1,163 @@
|
||||
\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
|
||||
BIN
Final Project Report/usingLatex/images/VectorGraphicElementPDF.pdf
Executable file
BIN
Final Project Report/usingLatex/images/VectorGraphicElementPDF.pdf
Executable file
Binary file not shown.
BIN
Final Project Report/usingLatex/images/samplepng.png
Executable file
BIN
Final Project Report/usingLatex/images/samplepng.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 160 KiB |
9
Final Project Report/usingLatex/myCodeFile.java
Executable file
9
Final Project Report/usingLatex/myCodeFile.java
Executable file
@@ -0,0 +1,9 @@
|
||||
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();
|
||||
}
|
||||
192
Final Project Report/usingLatex/usingLatex.tex
Executable file
192
Final Project Report/usingLatex/usingLatex.tex
Executable file
@@ -0,0 +1,192 @@
|
||||
\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 +0,0 @@
|
||||
github "ortuman/SwiftForms"
|
||||
@@ -1 +0,0 @@
|
||||
github "ortuman/SwiftForms" "1.7"
|
||||
19
My Mind/Carthage/Build/.SwiftForms.version
generated
vendored
19
My Mind/Carthage/Build/.SwiftForms.version
generated
vendored
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"commitish" : "1.7",
|
||||
"iOS" : [
|
||||
{
|
||||
"hash" : "045deef96b266613799a0dd27287607b12f5b43daede54ba2359c759cd9cb0f5",
|
||||
"name" : "SwiftForms"
|
||||
}
|
||||
],
|
||||
"xcodeVersion" : "Xcode 8.3\nBuild version 8E162",
|
||||
"watchOS" : [
|
||||
|
||||
],
|
||||
"tvOS" : [
|
||||
|
||||
],
|
||||
"Mac" : [
|
||||
|
||||
]
|
||||
}
|
||||
1908
My Mind/Carthage/Build/iOS/16344ACE-31D7-3149-8D5B-49B11957E0F6.bcsymbolmap
generated
vendored
1908
My Mind/Carthage/Build/iOS/16344ACE-31D7-3149-8D5B-49B11957E0F6.bcsymbolmap
generated
vendored
File diff suppressed because one or more lines are too long
1986
My Mind/Carthage/Build/iOS/B36DDE95-FE71-3754-AC74-7C3867BCEBFC.bcsymbolmap
generated
vendored
1986
My Mind/Carthage/Build/iOS/B36DDE95-FE71-3754-AC74-7C3867BCEBFC.bcsymbolmap
generated
vendored
File diff suppressed because one or more lines are too long
20
My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Info.plist
generated
vendored
20
My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Info.plist
generated
vendored
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.com.ortulabs.SwiftForms</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.6.2</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Resources/DWARF/SwiftForms
generated
vendored
BIN
My Mind/Carthage/Build/iOS/SwiftForms.framework.dSYM/Contents/Resources/DWARF/SwiftForms
generated
vendored
Binary file not shown.
380
My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms-Swift.h
generated
vendored
380
My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms-Swift.h
generated
vendored
@@ -1,380 +0,0 @@
|
||||
// Generated by Apple Swift version 3.1 (swiftlang-802.0.48 clang-802.0.38)
|
||||
#pragma clang diagnostic push
|
||||
|
||||
#if defined(__has_include) && __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#include <objc/NSObject.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if defined(__has_include) && __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus) || __cplusplus < 201103L
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__has_attribute) && __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
#else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
#endif
|
||||
#if defined(__has_attribute) && __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
#else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
#endif
|
||||
#if defined(__has_attribute) && __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
#else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
#endif
|
||||
#if defined(__has_attribute) && __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
#else
|
||||
# define SWIFT_NOESCAPE
|
||||
#endif
|
||||
#if defined(__has_attribute) && __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if defined(__has_attribute) && __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name) enum _name : _type _name; enum SWIFT_ENUM_EXTRA _name : _type
|
||||
# if defined(__has_feature) && __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) SWIFT_ENUM(_type, _name)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if defined(__has_feature) && __has_feature(modules)
|
||||
@import UIKit;
|
||||
@import CoreGraphics;
|
||||
@import ObjectiveC;
|
||||
@import Foundation;
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
@class FormViewController;
|
||||
@class NSCoder;
|
||||
@class UIView;
|
||||
@class UIResponder;
|
||||
@class UIToolbar;
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms12FormBaseCell")
|
||||
@interface FormBaseCell : UITableViewCell
|
||||
@property (nonatomic, weak) FormViewController * _Nullable formViewController;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
- (NSArray<NSString *> * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSDictionary<NSString *, UIView *> * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT;
|
||||
- (UIResponder * _Nullable)firstResponderElement SWIFT_WARN_UNUSED_RESULT;
|
||||
- (UIToolbar * _Nonnull)inputAccesoryView SWIFT_WARN_UNUSED_RESULT;
|
||||
+ (CGFloat)formRowCellHeight SWIFT_WARN_UNUSED_RESULT;
|
||||
+ (BOOL)formRowCanBecomeFirstResponder SWIFT_WARN_UNUSED_RESULT;
|
||||
+ (void)formViewController:(FormViewController * _Nonnull)formViewController didSelectRow:(FormBaseCell * _Nonnull)didSelectRow;
|
||||
- (void)updateConstraints;
|
||||
@end
|
||||
|
||||
@class UILabel;
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms13FormTitleCell")
|
||||
@interface FormTitleCell : FormBaseCell
|
||||
@property (nonatomic, readonly, strong) UILabel * _Nonnull titleLabel;
|
||||
- (void)configure;
|
||||
- (NSDictionary<NSString *, UIView *> * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSArray<NSString *> * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms14FormButtonCell")
|
||||
@interface FormButtonCell : FormTitleCell
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms13FormCheckCell")
|
||||
@interface FormCheckCell : FormTitleCell
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
+ (void)formViewController:(FormViewController * _Nonnull)formViewController didSelectRow:(FormBaseCell * _Nonnull)selectedRow;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms13FormValueCell")
|
||||
@interface FormValueCell : FormBaseCell
|
||||
@property (nonatomic, readonly, strong) UILabel * _Nonnull titleLabel;
|
||||
@property (nonatomic, readonly, strong) UILabel * _Nonnull valueLabel;
|
||||
- (void)configure;
|
||||
- (NSDictionary<NSString *, UIView *> * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSArray<NSString *> * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms12FormDateCell")
|
||||
@interface FormDateCell : FormValueCell
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
+ (void)formViewController:(FormViewController * _Nonnull)formViewController didSelectRow:(FormBaseCell * _Nonnull)selectedRow;
|
||||
- (UIResponder * _Nullable)firstResponderElement SWIFT_WARN_UNUSED_RESULT;
|
||||
+ (BOOL)formRowCanBecomeFirstResponder SWIFT_WARN_UNUSED_RESULT;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
|
||||
SWIFT_PROTOCOL("_TtP10SwiftForms12FormSelector_")
|
||||
@protocol FormSelector <NSObject>
|
||||
@property (nonatomic, strong) FormBaseCell * _Nullable formCell;
|
||||
@end
|
||||
|
||||
@class NSBundle;
|
||||
@class UITableView;
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms29FormOptionsSelectorController")
|
||||
@interface FormOptionsSelectorController : UITableViewController <FormSelector>
|
||||
@property (nonatomic, strong) FormBaseCell * _Nullable formCell;
|
||||
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nonnull instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
|
||||
- (void)viewDidLoad;
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView * _Nonnull)tableView SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSInteger)tableView:(UITableView * _Nonnull)tableView numberOfRowsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
||||
- (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForHeaderInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
||||
- (UITableViewCell * _Nonnull)tableView:(UITableView * _Nonnull)tableView cellForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
|
||||
- (void)tableView:(UITableView * _Nonnull)tableView didSelectRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewStyle)style SWIFT_UNAVAILABLE;
|
||||
@end
|
||||
|
||||
@class UIPickerView;
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms14FormPickerCell")
|
||||
@interface FormPickerCell : FormValueCell <UIPickerViewDelegate, UIPickerViewDataSource>
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
- (UIResponder * _Nullable)firstResponderElement SWIFT_WARN_UNUSED_RESULT;
|
||||
+ (void)formViewController:(FormViewController * _Nonnull)formViewController didSelectRow:(FormBaseCell * _Nonnull)selectedRow;
|
||||
- (NSString * _Nullable)pickerView:(UIPickerView * _Nonnull)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component SWIFT_WARN_UNUSED_RESULT;
|
||||
- (void)pickerView:(UIPickerView * _Nonnull)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component;
|
||||
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView * _Nonnull)pickerView SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSInteger)pickerView:(UIPickerView * _Nonnull)pickerView numberOfRowsInComponent:(NSInteger)component SWIFT_WARN_UNUSED_RESULT;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
@class UISegmentedControl;
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms24FormSegmentedControlCell")
|
||||
@interface FormSegmentedControlCell : FormBaseCell
|
||||
@property (nonatomic, readonly, strong) UILabel * _Nonnull titleLabel;
|
||||
@property (nonatomic, readonly, strong) UISegmentedControl * _Nonnull segmentedControl;
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
- (NSDictionary<NSString *, UIView *> * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSArray<NSString *> * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms16FormSelectorCell")
|
||||
@interface FormSelectorCell : FormValueCell
|
||||
- (void)update;
|
||||
+ (void)formViewController:(FormViewController * _Nonnull)formViewController didSelectRow:(FormBaseCell * _Nonnull)selectedRow;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
@class UISlider;
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms14FormSliderCell")
|
||||
@interface FormSliderCell : FormTitleCell
|
||||
@property (nonatomic, readonly, strong) UISlider * _Nonnull sliderView;
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
- (NSDictionary<NSString *, UIView *> * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSArray<NSString *> * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
@class UIStepper;
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms15FormStepperCell")
|
||||
@interface FormStepperCell : FormTitleCell
|
||||
@property (nonatomic, readonly, strong) UIStepper * _Nonnull stepperView;
|
||||
@property (nonatomic, readonly, strong) UILabel * _Nonnull countLabel;
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
- (NSDictionary<NSString *, UIView *> * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSArray<NSString *> * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
@class UISwitch;
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms14FormSwitchCell")
|
||||
@interface FormSwitchCell : FormTitleCell
|
||||
@property (nonatomic, readonly, strong) UISwitch * _Nonnull switchView;
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
@class UITextField;
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms17FormTextFieldCell")
|
||||
@interface FormTextFieldCell : FormBaseCell
|
||||
@property (nonatomic, readonly, strong) UILabel * _Nonnull titleLabel;
|
||||
@property (nonatomic, readonly, strong) UITextField * _Nonnull textField;
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
- (NSDictionary<NSString *, UIView *> * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSArray<NSString *> * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT;
|
||||
- (UIResponder * _Nullable)firstResponderElement SWIFT_WARN_UNUSED_RESULT;
|
||||
+ (BOOL)formRowCanBecomeFirstResponder SWIFT_WARN_UNUSED_RESULT;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
@class UITextView;
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms16FormTextViewCell")
|
||||
@interface FormTextViewCell : FormBaseCell <UITextViewDelegate>
|
||||
@property (nonatomic, readonly, strong) UILabel * _Nonnull titleLabel;
|
||||
@property (nonatomic, readonly, strong) UITextView * _Nonnull textField;
|
||||
+ (CGFloat)formRowCellHeight SWIFT_WARN_UNUSED_RESULT;
|
||||
- (void)configure;
|
||||
- (void)update;
|
||||
- (NSDictionary<NSString *, UIView *> * _Nonnull)constraintsViews SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSArray<NSString *> * _Nonnull)defaultVisualConstraints SWIFT_WARN_UNUSED_RESULT;
|
||||
- (void)textViewDidChange:(UITextView * _Nonnull)textView;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString * _Null_unspecified)reuseIdentifier OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
SWIFT_CLASS("_TtC10SwiftForms18FormViewController")
|
||||
@interface FormViewController : UITableViewController
|
||||
- (nonnull instancetype)init;
|
||||
- (nonnull instancetype)initWithStyle:(UITableViewStyle)style OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER;
|
||||
- (nonnull instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
|
||||
- (void)viewDidLoad;
|
||||
- (id _Nullable)valueForTag:(NSString * _Nonnull)tag SWIFT_WARN_UNUSED_RESULT;
|
||||
- (void)setValue:(id _Nonnull)value forTag:(NSString * _Nonnull)tag;
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView * _Nonnull)tableView SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSInteger)tableView:(UITableView * _Nonnull)tableView numberOfRowsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
||||
- (UITableViewCell * _Nonnull)tableView:(UITableView * _Nonnull)tableView cellForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSString * _Nullable)tableView:(UITableView * _Nonnull)tableView titleForHeaderInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
||||
- (NSString * _Nullable)tableView:(UITableView * _Nonnull)tableView titleForFooterInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
||||
- (UIView * _Nullable)tableView:(UITableView * _Nonnull)tableView viewForFooterInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
||||
- (UIView * _Nullable)tableView:(UITableView * _Nonnull)tableView viewForHeaderInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
||||
- (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForHeaderInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
||||
- (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForFooterInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
||||
- (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
|
||||
- (void)tableView:(UITableView * _Nonnull)tableView didSelectRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
|
||||
@end
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
19
My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms.h
generated
vendored
19
My Mind/Carthage/Build/iOS/SwiftForms.framework/Headers/SwiftForms.h
generated
vendored
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// SwiftForms.h
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno Ortuno on 14/5/15.
|
||||
// Copyright (c) 2015 Miguel Angel Ortuno Ortuno. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for SwiftForms.
|
||||
FOUNDATION_EXPORT double SwiftFormsVersionNumber;
|
||||
|
||||
//! Project version string for SwiftForms.
|
||||
FOUNDATION_EXPORT const unsigned char SwiftFormsVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <SwiftForms/PublicHeader.h>
|
||||
|
||||
|
||||
BIN
My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftdoc
generated
vendored
BIN
My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/arm.swiftdoc
generated
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftdoc
generated
vendored
BIN
My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/SwiftForms.swiftmodule/i386.swiftdoc
generated
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/module.modulemap
generated
vendored
10
My Mind/Carthage/Build/iOS/SwiftForms.framework/Modules/module.modulemap
generated
vendored
@@ -1,10 +0,0 @@
|
||||
framework module SwiftForms {
|
||||
umbrella header "SwiftForms.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
|
||||
module SwiftForms.Swift {
|
||||
header "SwiftForms-Swift.h"
|
||||
}
|
||||
BIN
My Mind/Carthage/Build/iOS/SwiftForms.framework/SwiftForms
generated
vendored
BIN
My Mind/Carthage/Build/iOS/SwiftForms.framework/SwiftForms
generated
vendored
Binary file not shown.
60
My Mind/Carthage/Checkouts/SwiftForms/.gitignore
vendored
60
My Mind/Carthage/Checkouts/SwiftForms/.gitignore
vendored
@@ -1,60 +0,0 @@
|
||||
# Compiled source #
|
||||
###################
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.so
|
||||
|
||||
# Packages #
|
||||
############
|
||||
# it's better to unpack these files and commit the raw source
|
||||
# git has its own built in compression methods
|
||||
*.7z
|
||||
*.dmg
|
||||
*.gz
|
||||
*.iso
|
||||
*.jar
|
||||
*.rar
|
||||
*.tar
|
||||
*.zip
|
||||
|
||||
# Logs and databases #
|
||||
######################
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# Pods #
|
||||
########
|
||||
Pods/
|
||||
|
||||
# Xcode #
|
||||
#########
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
*.xcworkspace
|
||||
!default.xcworkspace
|
||||
xcuserdata
|
||||
profile
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
.idea/
|
||||
21
My Mind/Carthage/Checkouts/SwiftForms/LICENSE
vendored
21
My Mind/Carthage/Checkouts/SwiftForms/LICENSE
vendored
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com )
|
||||
Copyright (c) 2014 Miguel Ángel Ortuño ( ortuman@gmail.com )
|
||||
|
||||
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 be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
155
My Mind/Carthage/Checkouts/SwiftForms/README.MD
vendored
155
My Mind/Carthage/Checkouts/SwiftForms/README.MD
vendored
@@ -1,155 +0,0 @@
|
||||
|
||||
[](http://cocoadocs.org/docsets/SwiftForms)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
|
||||
[](http://cocoadocs.org/docsets/SwiftForms)
|
||||
[](http://cocoadocs.org/docsets/SwiftForms)
|
||||
|
||||
SwiftForms
|
||||
==========
|
||||
|
||||
Purpose
|
||||
-------
|
||||
SwiftForms is a powerful and extremely flexible library written in Swift that allows to create forms by just defining them in a couple of lines. It also provides the ability to customize cells appearance, use custom cells and define your own selector controllers.
|
||||
|
||||
#####Here is an screenshot from an example application using SwiftForms
|
||||
|
||||

|
||||
|
||||
How to create a form
|
||||
--------------------
|
||||
|
||||
Creating a form using SwiftForms is pretty straightforward. All you need is to derive your controller from `FormViewController` and define a `FormDescriptor` instance along with its sections and rows. Here is an example of how to create a simple form to input an email and a user password.
|
||||
|
||||
```swift
|
||||
|
||||
// Create form instace
|
||||
var form = FormDescriptor()
|
||||
form.title = "Example form"
|
||||
|
||||
// Define first section
|
||||
var section1 = FormSectionDescriptor()
|
||||
|
||||
var row = FormRowDescriptor(tag: "name", rowType: .Email, title: "Email")
|
||||
section1.rows.append(row)
|
||||
|
||||
row = FormRowDescriptor(tag: "pass", rowType: .Password, title: "Password")
|
||||
section1.rows.append(row)
|
||||
|
||||
// Define second section
|
||||
var section2 = FormSectionDescriptor()
|
||||
|
||||
row = FormRowDescriptor(tag: "button", rowType: .Button, title: "Submit")
|
||||
section2.rows.append(row)
|
||||
|
||||
form.sections = [section1, section2]
|
||||
|
||||
self.form = form
|
||||
```
|
||||
To see a more complex form definition you can take a look to the example application.
|
||||
|
||||
Cell appearance
|
||||
----------------------
|
||||
|
||||
Every row descriptor has a `configuration` dictionary that allows to customize cell's appearance and behavior. In order to change concrete visual aspects of a row simply set `row.configuration.cell.appearance` value to a dictionary containing custom key-value coding properties.
|
||||
|
||||
Here's an example:
|
||||
|
||||
```swift
|
||||
row.configuration.cell.appearance = ["titleLabel.font" : UIFont.boldSystemFontOfSize(30.0), "segmentedControl.tintColor" : UIColor.redColor()]
|
||||
```
|
||||
|
||||
Custom cells
|
||||
-----------------
|
||||
|
||||
In addition, it is possible to create 100% custom cells by deriving from `FormBaseCell` class. In that case, don't forget to override `configure` and `update` methods. First method will be called only once and after cell has been created, and the second one every time cell content should be refreshed.
|
||||
|
||||
Here are the methods that help you to define custom cell behavior.
|
||||
```swift
|
||||
func configure() {
|
||||
/// override
|
||||
}
|
||||
|
||||
func update() {
|
||||
/// override
|
||||
}
|
||||
|
||||
class func formRowCellHeight() -> CGFloat {
|
||||
return 44.0
|
||||
}
|
||||
|
||||
class func formViewController(formViewController: FormViewController, didSelectRow: FormBaseCell) {
|
||||
}
|
||||
```
|
||||
Once you have defined your custom cell, and in order to use it for a concrete row, you'll have to set `FormRowDescriptor` cellClass property.
|
||||
|
||||
Custom selector controllers
|
||||
-------------------------------------
|
||||
|
||||
In order to customize selector controller your class should conform to `FormSelector` protocol. That way you'll have access to the cell instance that pushed the controller, being able to alter its properties or setting it's row value accordingly to user interaction.
|
||||
|
||||
After defining your class, don't forget to set `row.configuration.selection.controllerClass` value in the configuration dictionary to use your custom selector controller.
|
||||
|
||||
Requirements
|
||||
---------------------
|
||||
|
||||
* iOS 8.0 and above
|
||||
|
||||
### CocoaPods
|
||||
|
||||
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects.
|
||||
|
||||
CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:
|
||||
|
||||
```bash
|
||||
$ gem install cocoapods
|
||||
```
|
||||
|
||||
To integrate SwiftForms into your Xcode project using CocoaPods, specify it in your `Podfile`:
|
||||
|
||||
```ruby
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
platform :ios, '8.0'
|
||||
use_frameworks!
|
||||
|
||||
pod 'SwiftForms'
|
||||
```
|
||||
|
||||
Then, run the following command:
|
||||
|
||||
```bash
|
||||
$ pod install
|
||||
```
|
||||
|
||||
### Carthage
|
||||
|
||||
Simply add the following line to your `Cartfile`:
|
||||
|
||||
```
|
||||
github "ortuman/SwiftForms"
|
||||
```
|
||||
|
||||
Then run:
|
||||
|
||||
```bash
|
||||
$ carthage update
|
||||
```
|
||||
|
||||
For more information on [Carthage](https://github.com/Carthage/Carthage) see the [README](https://github.com/Carthage/Carthage/blob/master/README.md)
|
||||
|
||||
Copyright
|
||||
---------
|
||||
|
||||
SwiftForms is originally based on XLForm github project. (https://github.com/xmartlabs/XLForm)
|
||||
|
||||
Check LICENSE file for more details.
|
||||
|
||||
Contact
|
||||
-------
|
||||
|
||||
If you are using SwiftForms in your project and have any suggestion or question:
|
||||
|
||||
Miguel Angel Ortuño, <ortuman@gmail.com>
|
||||
|
||||
[@ortuman](http://twitter.com/ortuman)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "SwiftForms"
|
||||
s.version = "1.7"
|
||||
s.summary = "A small and lightweight library written in Swift that allows you to easily create forms"
|
||||
s.homepage = "https://github.com/ortuman/SwiftForms"
|
||||
s.license = { :type => "MIT", :file => "LICENSE" }
|
||||
s.authors = "Miguel Ángel Ortuño"
|
||||
s.ios.deployment_target = "8.0"
|
||||
s.source = { :git => "https://github.com/ortuman/SwiftForms.git", :tag => '1.7' }
|
||||
s.source_files = 'SwiftForms/*.swift','SwiftForms/descriptors/*.swift', 'SwiftForms/cells/base/*.swift', 'SwiftForms/cells/*.swift', 'SwiftForms/controllers/*.swift'
|
||||
end
|
||||
@@ -1,12 +0,0 @@
|
||||
//
|
||||
// FormErrorType.swift
|
||||
// SwiftFormsApplication
|
||||
//
|
||||
// Created by Miguel Angel Ortuno Ortuno on 2/1/16.
|
||||
// Copyright © 2016 Miguel Angel Ortuno Ortuno. All rights reserved.
|
||||
//
|
||||
|
||||
public enum FormErrorType: Error {
|
||||
case sectionOutOfIndex
|
||||
case rowOutOfIndex
|
||||
}
|
||||
@@ -1,26 +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>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>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.6.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// SwiftForms.h
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno Ortuno on 14/5/15.
|
||||
// Copyright (c) 2015 Miguel Angel Ortuno Ortuno. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for SwiftForms.
|
||||
FOUNDATION_EXPORT double SwiftFormsVersionNumber;
|
||||
|
||||
//! Project version string for SwiftForms.
|
||||
FOUNDATION_EXPORT const unsigned char SwiftFormsVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <SwiftForms/PublicHeader.h>
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// FormButtonCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno on 21/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormButtonCell: FormTitleCell {
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
titleLabel.textAlignment = .center
|
||||
}
|
||||
|
||||
open override func update() {
|
||||
super.update()
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
//
|
||||
// FormCheckCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno on 22/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormCheckCell: FormTitleCell {
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
selectionStyle = .default
|
||||
accessoryType = .none
|
||||
}
|
||||
|
||||
open override func update() {
|
||||
super.update()
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
|
||||
var rowValue: Bool
|
||||
if let value = rowDescriptor?.value as? Bool {
|
||||
rowValue = value
|
||||
} else {
|
||||
rowValue = false
|
||||
rowDescriptor?.value = rowValue as AnyObject
|
||||
}
|
||||
|
||||
accessoryType = (rowValue) ? .checkmark : .none
|
||||
}
|
||||
|
||||
open override class func formViewController(_ formViewController: FormViewController, didSelectRow selectedRow: FormBaseCell) {
|
||||
guard let row = selectedRow as? FormCheckCell else { return }
|
||||
row.check()
|
||||
}
|
||||
|
||||
// MARK: Private interface
|
||||
|
||||
fileprivate func check() {
|
||||
var newValue: Bool
|
||||
if let value = rowDescriptor?.value as? Bool {
|
||||
newValue = !value
|
||||
}
|
||||
else {
|
||||
newValue = true
|
||||
}
|
||||
rowDescriptor?.value = newValue as AnyObject
|
||||
update()
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
//
|
||||
// FormDateCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno on 22/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormDateCell: FormValueCell {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
fileprivate let datePicker = UIDatePicker()
|
||||
fileprivate let hiddenTextField = UITextField(frame: CGRect.zero)
|
||||
|
||||
fileprivate let defaultDateFormatter = DateFormatter()
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
contentView.addSubview(hiddenTextField)
|
||||
hiddenTextField.inputView = datePicker
|
||||
datePicker.datePickerMode = .date
|
||||
datePicker.addTarget(self, action: #selector(FormDateCell.valueChanged(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
open override func update() {
|
||||
super.update()
|
||||
|
||||
if let showsInputToolbar = rowDescriptor?.configuration.cell.showsInputToolbar , showsInputToolbar && hiddenTextField.inputAccessoryView == nil {
|
||||
hiddenTextField.inputAccessoryView = inputAccesoryView()
|
||||
}
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
|
||||
if let rowType = rowDescriptor?.type {
|
||||
switch rowType {
|
||||
case .date:
|
||||
datePicker.datePickerMode = .date
|
||||
defaultDateFormatter.dateStyle = .long
|
||||
defaultDateFormatter.timeStyle = .none
|
||||
case .time:
|
||||
datePicker.datePickerMode = .time
|
||||
defaultDateFormatter.dateStyle = .none
|
||||
defaultDateFormatter.timeStyle = .short
|
||||
default:
|
||||
datePicker.datePickerMode = .dateAndTime
|
||||
defaultDateFormatter.dateStyle = .long
|
||||
defaultDateFormatter.timeStyle = .short
|
||||
}
|
||||
}
|
||||
|
||||
if let date = rowDescriptor?.value as? Date {
|
||||
datePicker.date = date
|
||||
valueLabel.text = getDateFormatter().string(from: date)
|
||||
}
|
||||
}
|
||||
|
||||
open override class func formViewController(_ formViewController: FormViewController, didSelectRow selectedRow: FormBaseCell) {
|
||||
guard let row = selectedRow as? FormDateCell else { return }
|
||||
|
||||
if row.rowDescriptor?.value == nil {
|
||||
let date = Date()
|
||||
row.rowDescriptor?.value = date as AnyObject
|
||||
row.valueLabel.text = row.getDateFormatter().string(from: date)
|
||||
row.update()
|
||||
}
|
||||
|
||||
row.hiddenTextField.becomeFirstResponder()
|
||||
}
|
||||
|
||||
open override func firstResponderElement() -> UIResponder? {
|
||||
return hiddenTextField
|
||||
}
|
||||
|
||||
open override class func formRowCanBecomeFirstResponder() -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
internal func valueChanged(_ sender: UIDatePicker) {
|
||||
rowDescriptor?.value = sender.date as AnyObject
|
||||
valueLabel.text = getDateFormatter().string(from: sender.date)
|
||||
update()
|
||||
}
|
||||
|
||||
// MARK: Private interface
|
||||
|
||||
fileprivate func getDateFormatter() -> DateFormatter {
|
||||
guard let dateFormatter = rowDescriptor?.configuration.date.dateFormatter else { return defaultDateFormatter }
|
||||
return dateFormatter
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
//
|
||||
// FormTextFieldCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Ángel Ortuño Ortuño on 20/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class FormLabelCell: FormValueCell {
|
||||
|
||||
/// MARK: FormBaseCell
|
||||
|
||||
override func configure() {
|
||||
super.configure()
|
||||
|
||||
accessoryType = .none
|
||||
|
||||
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
valueLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
valueLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
|
||||
valueLabel.textColor = UIColor.lightGray
|
||||
valueLabel.textAlignment = .right
|
||||
|
||||
contentView.addSubview(titleLabel)
|
||||
contentView.addSubview(valueLabel)
|
||||
|
||||
titleLabel.setContentHuggingPriority(500, for: .horizontal)
|
||||
titleLabel.setContentCompressionResistancePriority(1000, for: .horizontal)
|
||||
|
||||
// apply constant constraints
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: valueLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: valueLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
}
|
||||
|
||||
override func update() {
|
||||
super.update()
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
valueLabel.text = rowDescriptor?.configuration.cell.placeholder
|
||||
}
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
//
|
||||
// FormPickerCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno on 22/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormPickerCell: FormValueCell, UIPickerViewDelegate, UIPickerViewDataSource {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
fileprivate let picker = UIPickerView()
|
||||
fileprivate let hiddenTextField = UITextField(frame: CGRect.zero)
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
accessoryType = .none
|
||||
|
||||
picker.delegate = self
|
||||
picker.dataSource = self
|
||||
hiddenTextField.inputView = picker
|
||||
|
||||
contentView.addSubview(hiddenTextField)
|
||||
}
|
||||
|
||||
open override func update() {
|
||||
super.update()
|
||||
picker.reloadAllComponents()
|
||||
|
||||
if let showsInputToolbar = rowDescriptor?.configuration.cell.showsInputToolbar , showsInputToolbar && hiddenTextField.inputAccessoryView == nil {
|
||||
hiddenTextField.inputAccessoryView = inputAccesoryView()
|
||||
}
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
|
||||
if let selectedValue = rowDescriptor?.value {
|
||||
valueLabel.text = rowDescriptor?.configuration.selection.optionTitleClosure?(selectedValue)
|
||||
if let options = rowDescriptor?.configuration.selection.options , !options.isEmpty {
|
||||
var selectedIndex: Int?
|
||||
for (index, value) in options.enumerated() {
|
||||
if value === selectedValue {
|
||||
selectedIndex = index
|
||||
break
|
||||
}
|
||||
}
|
||||
if let index = selectedIndex {
|
||||
picker.selectRow(index, inComponent: 0, animated: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
open override func firstResponderElement() -> UIResponder? {
|
||||
return hiddenTextField
|
||||
}
|
||||
|
||||
open override class func formViewController(_ formViewController: FormViewController, didSelectRow selectedRow: FormBaseCell) {
|
||||
guard let row = selectedRow as? FormPickerCell else { return }
|
||||
|
||||
if selectedRow.rowDescriptor?.value == nil {
|
||||
guard let options = selectedRow.rowDescriptor?.configuration.selection.options , !options.isEmpty else { return }
|
||||
let value = options[0]
|
||||
selectedRow.rowDescriptor?.value = value
|
||||
row.valueLabel.text = selectedRow.rowDescriptor?.configuration.selection.optionTitleClosure?(value)
|
||||
row.hiddenTextField.becomeFirstResponder()
|
||||
} else {
|
||||
guard let value = selectedRow.rowDescriptor?.value else { return }
|
||||
row.valueLabel.text = selectedRow.rowDescriptor?.configuration.selection.optionTitleClosure?(value)
|
||||
row.hiddenTextField.becomeFirstResponder()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UIPickerViewDelegate
|
||||
|
||||
open func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
|
||||
guard let options = rowDescriptor?.configuration.selection.options , !options.isEmpty else { return nil }
|
||||
guard row < options.count else { return nil }
|
||||
return rowDescriptor?.configuration.selection.optionTitleClosure?(options[row])
|
||||
}
|
||||
|
||||
open func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
|
||||
guard let options = rowDescriptor?.configuration.selection.options , !options.isEmpty else { return }
|
||||
guard row < options.count else { return }
|
||||
let newValue = options[row]
|
||||
rowDescriptor?.value = newValue
|
||||
valueLabel.text = rowDescriptor?.configuration.selection.optionTitleClosure?(newValue)
|
||||
}
|
||||
|
||||
// MARK: UIPickerViewDataSource
|
||||
|
||||
open func numberOfComponents(in pickerView: UIPickerView) -> Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
open func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
|
||||
guard let options = rowDescriptor?.configuration.selection.options else { return 0 }
|
||||
return options.count
|
||||
}
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
//
|
||||
// FormSegmentedControlCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno on 21/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormSegmentedControlCell: FormBaseCell {
|
||||
|
||||
// MARK: Cell views
|
||||
|
||||
open let titleLabel = UILabel()
|
||||
open let segmentedControl = UISegmentedControl()
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
fileprivate var customConstraints: [AnyObject] = []
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
|
||||
selectionStyle = .none
|
||||
|
||||
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
segmentedControl.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
titleLabel.setContentCompressionResistancePriority(500, for: .horizontal)
|
||||
segmentedControl.setContentCompressionResistancePriority(500, for: .horizontal)
|
||||
|
||||
titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
|
||||
contentView.addSubview(titleLabel)
|
||||
contentView.addSubview(segmentedControl)
|
||||
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: segmentedControl, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
|
||||
segmentedControl.addTarget(self, action: #selector(FormSegmentedControlCell.valueChanged(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
open override func update() {
|
||||
super.update()
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
updateSegmentedControl()
|
||||
|
||||
guard let value = rowDescriptor?.value else { return }
|
||||
guard let options = rowDescriptor?.configuration.selection.options , !options.isEmpty else { return }
|
||||
|
||||
var idx = 0
|
||||
for optionValue in options {
|
||||
if optionValue === value {
|
||||
segmentedControl.selectedSegmentIndex = idx
|
||||
break
|
||||
}
|
||||
idx += 1
|
||||
}
|
||||
}
|
||||
|
||||
open override func constraintsViews() -> [String : UIView] {
|
||||
return ["titleLabel" : titleLabel, "segmentedControl" : segmentedControl]
|
||||
}
|
||||
|
||||
open override func defaultVisualConstraints() -> [String] {
|
||||
if let text = titleLabel.text , text.characters.count > 0 {
|
||||
return ["H:|-16-[titleLabel]-16-[segmentedControl]-16-|"]
|
||||
} else {
|
||||
return ["H:|-16-[segmentedControl]-16-|"]
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
internal func valueChanged(_ sender: UISegmentedControl) {
|
||||
guard let options = rowDescriptor?.configuration.selection.options , !options.isEmpty else { return }
|
||||
let value = options[sender.selectedSegmentIndex]
|
||||
rowDescriptor?.value = value
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
fileprivate func updateSegmentedControl() {
|
||||
segmentedControl.removeAllSegments()
|
||||
|
||||
guard let options = rowDescriptor?.configuration.selection.options , !options.isEmpty else { return }
|
||||
|
||||
var idx = 0
|
||||
for value in options {
|
||||
let title = rowDescriptor?.configuration.selection.optionTitleClosure?(value)
|
||||
segmentedControl.insertSegment(withTitle: title, at: idx, animated: false)
|
||||
idx += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
//
|
||||
// FormSelectorCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Ángel Ortuño Ortuño on 23/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormSelectorCell: FormValueCell {
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func update() {
|
||||
super.update()
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
|
||||
var title: String?
|
||||
if let multipleValues = rowDescriptor?.value as? [AnyObject] {
|
||||
var multipleValuesTitle = ""
|
||||
for (index, selectedValue) in multipleValues.enumerated() {
|
||||
guard let selectedValueTitle = rowDescriptor?.configuration.selection.optionTitleClosure?(selectedValue) else { continue }
|
||||
if index != 0 {
|
||||
multipleValuesTitle += ", "
|
||||
}
|
||||
multipleValuesTitle += selectedValueTitle
|
||||
}
|
||||
title = multipleValuesTitle
|
||||
} else if let singleValue = rowDescriptor?.value {
|
||||
title = rowDescriptor?.configuration.selection.optionTitleClosure?(singleValue)
|
||||
}
|
||||
|
||||
if let title = title , title.characters.count > 0 {
|
||||
valueLabel.text = title
|
||||
valueLabel.textColor = UIColor.black
|
||||
} else {
|
||||
valueLabel.text = rowDescriptor?.configuration.cell.placeholder
|
||||
valueLabel.textColor = UIColor.lightGray
|
||||
}
|
||||
}
|
||||
|
||||
open override class func formViewController(_ formViewController: FormViewController, didSelectRow selectedRow: FormBaseCell) {
|
||||
guard let row = selectedRow as? FormSelectorCell else { return }
|
||||
|
||||
formViewController.view.endEditing(true)
|
||||
|
||||
var selectorControllerClass: UIViewController.Type
|
||||
|
||||
if let controllerClass = row.rowDescriptor?.configuration.selection.controllerClass as? UIViewController.Type {
|
||||
selectorControllerClass = controllerClass
|
||||
} else { // fallback to default cell class
|
||||
selectorControllerClass = FormOptionsSelectorController.self
|
||||
}
|
||||
|
||||
let selectorController = selectorControllerClass.init()
|
||||
guard let formRowDescriptorViewController = selectorController as? FormSelector else { return }
|
||||
|
||||
formRowDescriptorViewController.formCell = row
|
||||
formViewController.navigationController?.pushViewController(selectorController, animated: true)
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
//
|
||||
// FormSliderCell.swift
|
||||
// SwiftFormsApplication
|
||||
//
|
||||
// Created by Miguel Angel Ortuno Ortuno on 23/5/15.
|
||||
// Copyright (c) 2015 Miguel Angel Ortuno Ortuno. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormSliderCell: FormTitleCell {
|
||||
|
||||
// MARK: Cell views
|
||||
|
||||
open let sliderView = UISlider()
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
|
||||
selectionStyle = .none
|
||||
|
||||
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
sliderView.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
|
||||
contentView.addSubview(titleLabel)
|
||||
contentView.addSubview(sliderView)
|
||||
|
||||
titleLabel.setContentHuggingPriority(500, for: .horizontal)
|
||||
|
||||
contentView.addConstraint(NSLayoutConstraint(item: sliderView, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
|
||||
sliderView.addTarget(self, action: #selector(FormSliderCell.valueChanged(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
open override func update() {
|
||||
super.update()
|
||||
|
||||
if let maximumValue = rowDescriptor?.configuration.stepper.maximumValue { sliderView.maximumValue = Float(maximumValue) }
|
||||
if let minimumValue = rowDescriptor?.configuration.stepper.minimumValue { sliderView.minimumValue = Float(minimumValue) }
|
||||
if let continuous = rowDescriptor?.configuration.stepper.continuous { sliderView.isContinuous = continuous }
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
|
||||
if let value = rowDescriptor?.value as? Float {
|
||||
sliderView.value = value
|
||||
} else {
|
||||
sliderView.value = sliderView.minimumValue
|
||||
rowDescriptor?.value = sliderView.minimumValue as AnyObject
|
||||
}
|
||||
}
|
||||
|
||||
open override func constraintsViews() -> [String : UIView] {
|
||||
return ["titleLabel" : titleLabel, "sliderView" : sliderView]
|
||||
}
|
||||
|
||||
open override func defaultVisualConstraints() -> [String] {
|
||||
var constraints: [String] = []
|
||||
|
||||
constraints.append("V:|[titleLabel]|")
|
||||
constraints.append("H:|-16-[titleLabel]-16-[sliderView]-16-|")
|
||||
|
||||
return constraints
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
internal func valueChanged(_: UISlider) {
|
||||
rowDescriptor?.value = sliderView.value as AnyObject
|
||||
update()
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
//
|
||||
// FormStepperCell.swift
|
||||
// SwiftFormsApplication
|
||||
//
|
||||
// Created by Miguel Angel Ortuno Ortuno on 23/5/15.
|
||||
// Copyright (c) 2015 Miguel Angel Ortuno Ortuno. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormStepperCell: FormTitleCell {
|
||||
|
||||
// MARK: Cell views
|
||||
|
||||
open let stepperView = UIStepper()
|
||||
open let countLabel = UILabel()
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
|
||||
selectionStyle = .none
|
||||
|
||||
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
stepperView.translatesAutoresizingMaskIntoConstraints = false
|
||||
countLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
countLabel.textAlignment = .right
|
||||
|
||||
contentView.addSubview(titleLabel)
|
||||
contentView.addSubview(countLabel)
|
||||
contentView.addSubview(stepperView)
|
||||
|
||||
titleLabel.setContentHuggingPriority(500, for: .horizontal)
|
||||
|
||||
contentView.addConstraint(NSLayoutConstraint(item: stepperView, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
|
||||
stepperView.addTarget(self, action: #selector(FormStepperCell.valueChanged(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
open override func update() {
|
||||
super.update()
|
||||
|
||||
if let maximumValue = rowDescriptor?.configuration.stepper.maximumValue { stepperView.maximumValue = maximumValue }
|
||||
if let minimumValue = rowDescriptor?.configuration.stepper.minimumValue { stepperView.minimumValue = minimumValue }
|
||||
if let steps = rowDescriptor?.configuration.stepper.steps { stepperView.stepValue = steps }
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
|
||||
if let value = rowDescriptor?.value as? Double {
|
||||
stepperView.value = value
|
||||
countLabel.text = String(value)
|
||||
} else {
|
||||
stepperView.value = stepperView.minimumValue
|
||||
rowDescriptor?.value = stepperView.minimumValue as AnyObject
|
||||
countLabel.text = String(stepperView.minimumValue)
|
||||
}
|
||||
}
|
||||
|
||||
open override func constraintsViews() -> [String : UIView] {
|
||||
return ["titleLabel" : titleLabel, "countLabel" : countLabel, "stepperView" : stepperView]
|
||||
}
|
||||
|
||||
open override func defaultVisualConstraints() -> [String] {
|
||||
var constraints: [String] = []
|
||||
|
||||
constraints.append("V:|[titleLabel]|")
|
||||
constraints.append("V:|[countLabel]|")
|
||||
|
||||
constraints.append("H:|-16-[titleLabel][countLabel]-[stepperView]-16-|")
|
||||
return constraints
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
internal func valueChanged(_: UISwitch) {
|
||||
rowDescriptor?.value = stepperView.value as AnyObject
|
||||
update()
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// FormSwitchCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno on 21/08/14.
|
||||
// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormSwitchCell: FormTitleCell {
|
||||
|
||||
// MARK: Cell views
|
||||
|
||||
open let switchView = UISwitch()
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
|
||||
selectionStyle = .none
|
||||
|
||||
switchView.addTarget(self, action: #selector(FormSwitchCell.valueChanged(_:)), for: .valueChanged)
|
||||
accessoryView = switchView
|
||||
}
|
||||
|
||||
open override func update() {
|
||||
super.update()
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
|
||||
if let value = rowDescriptor?.value as? Bool {
|
||||
switchView.isOn = value
|
||||
} else {
|
||||
switchView.isOn = false
|
||||
rowDescriptor?.value = false as AnyObject
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
internal func valueChanged(_: UISwitch) {
|
||||
rowDescriptor?.value = switchView.isOn as AnyObject
|
||||
update()
|
||||
}
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
//
|
||||
// FormTextFieldCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Ángel Ortuño Ortuño on 20/08/14.
|
||||
// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormTextFieldCell: FormBaseCell {
|
||||
|
||||
// MARK: Cell views
|
||||
|
||||
open let titleLabel = UILabel()
|
||||
open let textField = UITextField()
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
fileprivate var customConstraints: [AnyObject] = []
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
|
||||
selectionStyle = .none
|
||||
|
||||
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
textField.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
textField.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
|
||||
contentView.addSubview(titleLabel)
|
||||
contentView.addSubview(textField)
|
||||
|
||||
titleLabel.setContentHuggingPriority(500, for: .horizontal)
|
||||
titleLabel.setContentCompressionResistancePriority(1000, for: .horizontal)
|
||||
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: textField, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: textField, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
|
||||
textField.addTarget(self, action: #selector(FormTextFieldCell.editingChanged(_:)), for: .editingChanged)
|
||||
}
|
||||
|
||||
open override func update() {
|
||||
super.update()
|
||||
|
||||
if let showsInputToolbar = rowDescriptor?.configuration.cell.showsInputToolbar , showsInputToolbar && textField.inputAccessoryView == nil {
|
||||
textField.inputAccessoryView = inputAccesoryView()
|
||||
}
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
textField.text = rowDescriptor?.value as? String
|
||||
textField.placeholder = rowDescriptor?.configuration.cell.placeholder
|
||||
|
||||
textField.isSecureTextEntry = false
|
||||
textField.clearButtonMode = .whileEditing
|
||||
|
||||
if let type = rowDescriptor?.type {
|
||||
switch type {
|
||||
case .text:
|
||||
textField.autocorrectionType = .default
|
||||
textField.autocapitalizationType = .sentences
|
||||
textField.keyboardType = .default
|
||||
case .number:
|
||||
textField.keyboardType = .numberPad
|
||||
case .numbersAndPunctuation:
|
||||
textField.keyboardType = .numbersAndPunctuation
|
||||
case .decimal:
|
||||
textField.keyboardType = .decimalPad
|
||||
case .name:
|
||||
textField.autocorrectionType = .no
|
||||
textField.autocapitalizationType = .words
|
||||
textField.keyboardType = .default
|
||||
case .phone:
|
||||
textField.keyboardType = .phonePad
|
||||
case .namePhone:
|
||||
textField.autocorrectionType = .no
|
||||
textField.autocapitalizationType = .words
|
||||
textField.keyboardType = .namePhonePad
|
||||
case .url:
|
||||
textField.autocorrectionType = .no
|
||||
textField.autocapitalizationType = .none
|
||||
textField.keyboardType = .URL
|
||||
case .twitter:
|
||||
textField.autocorrectionType = .no
|
||||
textField.autocapitalizationType = .none
|
||||
textField.keyboardType = .twitter
|
||||
case .email:
|
||||
textField.autocorrectionType = .no
|
||||
textField.autocapitalizationType = .none
|
||||
textField.keyboardType = .emailAddress
|
||||
case .asciiCapable:
|
||||
textField.autocorrectionType = .no
|
||||
textField.autocapitalizationType = .none
|
||||
textField.keyboardType = .asciiCapable
|
||||
case .password:
|
||||
textField.isSecureTextEntry = true
|
||||
textField.clearsOnBeginEditing = false
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
open override func constraintsViews() -> [String : UIView] {
|
||||
var views = ["titleLabel" : titleLabel, "textField" : textField]
|
||||
if self.imageView!.image != nil {
|
||||
views["imageView"] = imageView
|
||||
}
|
||||
return views
|
||||
}
|
||||
|
||||
open override func defaultVisualConstraints() -> [String] {
|
||||
if self.imageView!.image != nil {
|
||||
if titleLabel.text != nil && (titleLabel.text!).characters.count > 0 {
|
||||
return ["H:[imageView]-[titleLabel]-[textField]-16-|"]
|
||||
} else {
|
||||
return ["H:[imageView]-[textField]-16-|"]
|
||||
}
|
||||
} else {
|
||||
if titleLabel.text != nil && (titleLabel.text!).characters.count > 0 {
|
||||
return ["H:|-16-[titleLabel]-[textField]-16-|"]
|
||||
} else {
|
||||
return ["H:|-16-[textField]-16-|"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
open override func firstResponderElement() -> UIResponder? {
|
||||
return textField
|
||||
}
|
||||
|
||||
open override class func formRowCanBecomeFirstResponder() -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
internal func editingChanged(_ sender: UITextField) {
|
||||
guard let text = sender.text, text.characters.count > 0 else { rowDescriptor?.value = nil; update(); return }
|
||||
rowDescriptor?.value = text as AnyObject
|
||||
}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
//
|
||||
// FormTextViewCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Joey Padot on 12/6/14.
|
||||
// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormTextViewCell : FormBaseCell, UITextViewDelegate {
|
||||
|
||||
// MARK: Cell views
|
||||
|
||||
open let titleLabel = UILabel()
|
||||
open let textField = UITextView()
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
fileprivate var customConstraints: [AnyObject]!
|
||||
|
||||
// MARK: Class Funcs
|
||||
|
||||
open override class func formRowCellHeight() -> CGFloat {
|
||||
return 110.0
|
||||
}
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
|
||||
selectionStyle = .none
|
||||
|
||||
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
textField.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
textField.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
|
||||
contentView.addSubview(titleLabel)
|
||||
contentView.addSubview(textField)
|
||||
|
||||
titleLabel.setContentHuggingPriority(500, for: .horizontal)
|
||||
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: textField, attribute: .top, relatedBy: .equal, toItem: contentView, attribute: .top, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: textField, attribute: .bottom, relatedBy: .equal, toItem: contentView, attribute: .bottom, multiplier: 1.0, constant: 0.0))
|
||||
|
||||
textField.delegate = self
|
||||
}
|
||||
|
||||
open override func update() {
|
||||
|
||||
titleLabel.text = rowDescriptor?.title
|
||||
textField.text = rowDescriptor?.value as? String
|
||||
|
||||
textField.isSecureTextEntry = false
|
||||
textField.autocorrectionType = .default
|
||||
textField.autocapitalizationType = .sentences
|
||||
textField.keyboardType = .default
|
||||
}
|
||||
|
||||
open override func constraintsViews() -> [String : UIView] {
|
||||
var views = ["titleLabel" : titleLabel, "textField" : textField]
|
||||
if self.imageView!.image != nil {
|
||||
views["imageView"] = imageView
|
||||
}
|
||||
return views
|
||||
}
|
||||
|
||||
open override func defaultVisualConstraints() -> [String] {
|
||||
if self.imageView!.image != nil {
|
||||
if let text = titleLabel.text , text.characters.count > 0 {
|
||||
return ["H:[imageView]-[titleLabel]-[textField]-16-|"]
|
||||
} else {
|
||||
return ["H:[imageView]-[textField]-16-|"]
|
||||
}
|
||||
} else {
|
||||
if let text = titleLabel.text , text.characters.count > 0 {
|
||||
return ["H:|-16-[titleLabel]-[textField]-16-|"]
|
||||
} else {
|
||||
return ["H:|-16-[textField]-16-|"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UITextViewDelegate
|
||||
|
||||
open func textViewDidChange(_ textView: UITextView) {
|
||||
guard let text = textView.text , text.characters.count > 0 else { rowDescriptor?.value = nil; update(); return }
|
||||
rowDescriptor?.value = text as AnyObject
|
||||
update()
|
||||
}
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
//
|
||||
// FormBaseCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno on 20/08/14.
|
||||
// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormBaseCell: UITableViewCell {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
open var rowDescriptor: FormRowDescriptor? {
|
||||
didSet {
|
||||
self.update()
|
||||
}
|
||||
}
|
||||
|
||||
open weak var formViewController: FormViewController?
|
||||
|
||||
fileprivate var customConstraints: [NSLayoutConstraint] = []
|
||||
|
||||
// MARK: Init
|
||||
|
||||
public required override init(style: UITableViewCellStyle, reuseIdentifier: String!) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
}
|
||||
|
||||
public required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
// MARK: Public interface
|
||||
|
||||
open func configure() {
|
||||
/// override
|
||||
}
|
||||
|
||||
open func update() {
|
||||
/// override
|
||||
}
|
||||
|
||||
open func defaultVisualConstraints() -> [String] {
|
||||
/// override
|
||||
return []
|
||||
}
|
||||
|
||||
open func constraintsViews() -> [String : UIView] {
|
||||
/// override
|
||||
return [:]
|
||||
}
|
||||
|
||||
open func firstResponderElement() -> UIResponder? {
|
||||
/// override
|
||||
return nil
|
||||
}
|
||||
|
||||
open func inputAccesoryView() -> UIToolbar {
|
||||
|
||||
let actionBar = UIToolbar()
|
||||
actionBar.isTranslucent = true
|
||||
actionBar.sizeToFit()
|
||||
actionBar.barStyle = .default
|
||||
|
||||
let doneButton = UIBarButtonItem(title: NSLocalizedString("Done", comment: ""), style: .done, target: self, action: #selector(FormBaseCell.handleDoneAction(_:)))
|
||||
|
||||
let flexible = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
|
||||
actionBar.items = [flexible, doneButton]
|
||||
|
||||
return actionBar
|
||||
}
|
||||
|
||||
internal func handleDoneAction(_: UIBarButtonItem) {
|
||||
firstResponderElement()?.resignFirstResponder()
|
||||
}
|
||||
|
||||
open class func formRowCellHeight() -> CGFloat {
|
||||
return 44.0
|
||||
}
|
||||
|
||||
open class func formRowCanBecomeFirstResponder() -> Bool {
|
||||
return false
|
||||
}
|
||||
|
||||
open class func formViewController(_ formViewController: FormViewController, didSelectRow: FormBaseCell) {
|
||||
}
|
||||
|
||||
// MARK: Constraints
|
||||
|
||||
open override func updateConstraints() {
|
||||
if customConstraints.count > 0 {
|
||||
contentView.removeConstraints(customConstraints)
|
||||
}
|
||||
|
||||
let views = constraintsViews()
|
||||
|
||||
customConstraints.removeAll()
|
||||
|
||||
var visualConstraints = [String]()
|
||||
|
||||
if let visualConstraintsClosure = rowDescriptor?.configuration.cell.visualConstraintsClosure {
|
||||
visualConstraints = visualConstraintsClosure(self)
|
||||
} else {
|
||||
visualConstraints = defaultVisualConstraints()
|
||||
}
|
||||
|
||||
for visualConstraint in visualConstraints {
|
||||
let constraints = NSLayoutConstraint.constraints(withVisualFormat: visualConstraint, options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: views)
|
||||
for constraint in constraints {
|
||||
customConstraints.append(constraint)
|
||||
}
|
||||
}
|
||||
|
||||
contentView.addConstraints(customConstraints)
|
||||
super.updateConstraints()
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// FormTitleCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Ángel Ortuño Ortuño on 13/11/14.
|
||||
// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormTitleCell: FormBaseCell {
|
||||
|
||||
// MARK: Cell views
|
||||
|
||||
open let titleLabel = UILabel()
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
|
||||
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
|
||||
// apply constant constraints
|
||||
contentView.addSubview(titleLabel)
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
}
|
||||
|
||||
open override func constraintsViews() -> [String : UIView] {
|
||||
return ["titleLabel" : titleLabel]
|
||||
}
|
||||
|
||||
open override func defaultVisualConstraints() -> [String] {
|
||||
return ["H:|-16-[titleLabel]-16-|"]
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
//
|
||||
// FormValueCell.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Ángel Ortuño Ortuño on 13/11/14.
|
||||
// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormValueCell: FormBaseCell {
|
||||
|
||||
// MARK: Cell views
|
||||
|
||||
open let titleLabel = UILabel()
|
||||
open let valueLabel = UILabel()
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
fileprivate var customConstraints: [AnyObject]!
|
||||
|
||||
// MARK: FormBaseCell
|
||||
|
||||
open override func configure() {
|
||||
super.configure()
|
||||
|
||||
accessoryType = .disclosureIndicator
|
||||
|
||||
titleLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
valueLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
titleLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
valueLabel.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
|
||||
|
||||
valueLabel.textColor = UIColor.lightGray
|
||||
valueLabel.textAlignment = .right
|
||||
|
||||
contentView.addSubview(titleLabel)
|
||||
contentView.addSubview(valueLabel)
|
||||
|
||||
titleLabel.setContentHuggingPriority(500, for: .horizontal)
|
||||
titleLabel.setContentCompressionResistancePriority(1000, for: .horizontal)
|
||||
|
||||
// apply constant constraints
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: valueLabel, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
contentView.addConstraint(NSLayoutConstraint(item: valueLabel, attribute: .centerY, relatedBy: .equal, toItem: contentView, attribute: .centerY, multiplier: 1.0, constant: 0.0))
|
||||
}
|
||||
|
||||
open override func constraintsViews() -> [String : UIView] {
|
||||
return ["titleLabel" : titleLabel, "valueLabel" : valueLabel]
|
||||
}
|
||||
|
||||
open override func defaultVisualConstraints() -> [String] {
|
||||
|
||||
// apply default constraints
|
||||
var rightPadding = 0
|
||||
if accessoryType == .none {
|
||||
rightPadding = 16
|
||||
}
|
||||
|
||||
if titleLabel.text != nil && (titleLabel.text!).characters.count > 0 {
|
||||
return ["H:|-16-[titleLabel]-[valueLabel]-\(rightPadding)-|"]
|
||||
}
|
||||
else {
|
||||
return ["H:|-16-[valueLabel]-\(rightPadding)-|"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,125 +0,0 @@
|
||||
//
|
||||
// FormOptionsSelectorController.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Ángel Ortuño Ortuño on 23/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormOptionsSelectorController: UITableViewController, FormSelector {
|
||||
|
||||
// MARK: FormSelector
|
||||
|
||||
open var formCell: FormBaseCell?
|
||||
|
||||
// MARK: Init
|
||||
|
||||
public init() {
|
||||
super.init(style: .grouped)
|
||||
}
|
||||
|
||||
public required init(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)!
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
}
|
||||
|
||||
open override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.navigationItem.title = formCell?.rowDescriptor?.title
|
||||
}
|
||||
|
||||
// MARK: UITableViewDataSource
|
||||
|
||||
open override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
guard let options = formCell?.rowDescriptor?.configuration.selection.options , !options.isEmpty else { return 0 }
|
||||
return options.count
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
|
||||
return 0.1
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
|
||||
let reuseIdentifier = NSStringFromClass(type(of: self))
|
||||
|
||||
var cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier)
|
||||
if cell == nil {
|
||||
cell = UITableViewCell(style: .default, reuseIdentifier: reuseIdentifier)
|
||||
}
|
||||
|
||||
let options = formCell!.rowDescriptor!.configuration.selection.options
|
||||
let optionValue = options[(indexPath as NSIndexPath).row]
|
||||
|
||||
cell?.textLabel?.text = formCell?.rowDescriptor?.configuration.selection.optionTitleClosure?(optionValue)
|
||||
|
||||
if let selectedOptions = formCell?.rowDescriptor?.value as? [AnyObject] {
|
||||
if let _ = selectedOptions.index(where: { $0 === optionValue }) {
|
||||
cell?.accessoryType = .checkmark
|
||||
} else {
|
||||
cell?.accessoryType = .none
|
||||
}
|
||||
|
||||
} else if let selectedOption = formCell?.rowDescriptor?.value {
|
||||
if optionValue === selectedOption {
|
||||
cell?.accessoryType = .checkmark
|
||||
} else {
|
||||
cell?.accessoryType = .none
|
||||
}
|
||||
}
|
||||
|
||||
return cell!
|
||||
}
|
||||
|
||||
// MARK: UITableViewDelegate
|
||||
|
||||
open override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
|
||||
let cell = tableView.cellForRow(at: indexPath)
|
||||
|
||||
var allowsMultipleSelection = false
|
||||
if let allowsMultipleSelectionValue = formCell?.rowDescriptor?.configuration.selection.allowsMultipleSelection {
|
||||
allowsMultipleSelection = allowsMultipleSelectionValue
|
||||
}
|
||||
|
||||
let options = formCell!.rowDescriptor!.configuration.selection.options
|
||||
let selectedOption = options[(indexPath as NSIndexPath).row]
|
||||
|
||||
if allowsMultipleSelection {
|
||||
if var selectedOptions = formCell?.rowDescriptor?.value as? [AnyObject] {
|
||||
if let index = selectedOptions.index(where: { $0 === selectedOption }) {
|
||||
selectedOptions.remove(at: index)
|
||||
cell?.accessoryType = .none
|
||||
} else {
|
||||
selectedOptions.append(selectedOption)
|
||||
cell?.accessoryType = .checkmark
|
||||
}
|
||||
formCell?.rowDescriptor?.value = selectedOptions as AnyObject
|
||||
|
||||
} else {
|
||||
formCell?.rowDescriptor?.value = [AnyObject](arrayLiteral: selectedOption) as AnyObject
|
||||
cell?.accessoryType = .checkmark
|
||||
}
|
||||
|
||||
} else {
|
||||
formCell?.rowDescriptor?.value = selectedOption
|
||||
}
|
||||
|
||||
formCell?.update()
|
||||
|
||||
if allowsMultipleSelection {
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
} else {
|
||||
let _ = self.navigationController?.popViewController(animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// FormSelector.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Ángel Ortuño Ortuño on 23/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@objc public protocol FormSelector: NSObjectProtocol {
|
||||
var formCell: FormBaseCell? { get set }
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
//
|
||||
// FormViewController.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuño on 20/08/14.
|
||||
// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class FormViewController : UITableViewController {
|
||||
|
||||
private static var __once: () = {
|
||||
FormViewController.defaultCellClasses[.text] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.label] = FormLabelCell.self
|
||||
FormViewController.defaultCellClasses[.number] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.numbersAndPunctuation] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.decimal] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.name] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.phone] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.url] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.twitter] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.namePhone] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.email] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.asciiCapable] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.password] = FormTextFieldCell.self
|
||||
FormViewController.defaultCellClasses[.button] = FormButtonCell.self
|
||||
FormViewController.defaultCellClasses[.booleanSwitch] = FormSwitchCell.self
|
||||
FormViewController.defaultCellClasses[.booleanCheck] = FormCheckCell.self
|
||||
FormViewController.defaultCellClasses[.segmentedControl] = FormSegmentedControlCell.self
|
||||
FormViewController.defaultCellClasses[.picker] = FormPickerCell.self
|
||||
FormViewController.defaultCellClasses[.date] = FormDateCell.self
|
||||
FormViewController.defaultCellClasses[.time] = FormDateCell.self
|
||||
FormViewController.defaultCellClasses[.dateAndTime] = FormDateCell.self
|
||||
FormViewController.defaultCellClasses[.stepper] = FormStepperCell.self
|
||||
FormViewController.defaultCellClasses[.slider] = FormSliderCell.self
|
||||
FormViewController.defaultCellClasses[.multipleSelector] = FormSelectorCell.self
|
||||
FormViewController.defaultCellClasses[.multilineText] = FormTextViewCell.self
|
||||
}()
|
||||
|
||||
// MARK: Class variables
|
||||
|
||||
fileprivate static var onceDefaultCellClass: Int = 0
|
||||
fileprivate static var defaultCellClasses: [FormRowDescriptor.RowType : FormBaseCell.Type] = [:]
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
open var form = FormDescriptor()
|
||||
|
||||
// MARK: Init
|
||||
|
||||
public convenience init() {
|
||||
self.init(style: .grouped)
|
||||
}
|
||||
|
||||
public convenience init(form: FormDescriptor) {
|
||||
self.init(style: .grouped)
|
||||
self.form = form
|
||||
}
|
||||
|
||||
public override init(style: UITableViewStyle) {
|
||||
super.init(style: style)
|
||||
}
|
||||
|
||||
public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
}
|
||||
|
||||
public required init(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)!
|
||||
}
|
||||
|
||||
// MARK: View life cycle
|
||||
|
||||
open override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
navigationItem.title = form.title
|
||||
}
|
||||
|
||||
// MARK: Public interface
|
||||
|
||||
open func valueForTag(_ tag: String) -> AnyObject? {
|
||||
for section in form.sections {
|
||||
for row in section.rows {
|
||||
if row.tag == tag {
|
||||
return row.value
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
open func setValue(_ value: AnyObject, forTag tag: String) {
|
||||
for (sectionIndex, section) in form.sections.enumerated() {
|
||||
for (rowIndex, row) in section.rows.enumerated() {
|
||||
if row.tag == tag {
|
||||
form.sections[sectionIndex].rows[rowIndex].value = value
|
||||
if let cell = self.tableView.cellForRow(at: IndexPath(row: rowIndex, section: sectionIndex)) as? FormBaseCell {
|
||||
cell.update()
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UITableViewDataSource
|
||||
|
||||
open override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return form.sections.count
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return form.sections[section].rows.count
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
|
||||
let rowDescriptor = formRowDescriptorAtIndexPath(indexPath)
|
||||
|
||||
let formBaseCellClass = formBaseCellClassFromRowDescriptor(rowDescriptor)
|
||||
|
||||
let reuseIdentifier = NSStringFromClass(formBaseCellClass!)
|
||||
|
||||
var cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier) as? FormBaseCell
|
||||
if cell == nil {
|
||||
cell = formBaseCellClass?.init(style: .default, reuseIdentifier: reuseIdentifier)
|
||||
cell?.formViewController = self
|
||||
cell?.configure()
|
||||
}
|
||||
|
||||
cell?.rowDescriptor = rowDescriptor
|
||||
|
||||
// apply cell custom design
|
||||
for (keyPath, value) in rowDescriptor.configuration.cell.appearance {
|
||||
cell?.setValue(value, forKeyPath: keyPath)
|
||||
}
|
||||
return cell!
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
return form.sections[section].headerTitle
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? {
|
||||
return form.sections[section].footerTitle
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
|
||||
guard let headerView = form.sections[section].headerView else { return nil }
|
||||
return headerView
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
|
||||
guard let footerView = form.sections[section].footerView else { return nil }
|
||||
return footerView
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
|
||||
guard let headerView = form.sections[section].headerView , headerView.translatesAutoresizingMaskIntoConstraints else {
|
||||
return form.sections[section].headerViewHeight
|
||||
}
|
||||
return headerView.frame.size.height
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
|
||||
guard let footerView = form.sections[section].footerView , footerView.translatesAutoresizingMaskIntoConstraints else {
|
||||
return form.sections[section].footerViewHeight
|
||||
}
|
||||
return footerView.frame.size.height
|
||||
}
|
||||
|
||||
// MARK: UITableViewDelegate
|
||||
|
||||
open override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
|
||||
let rowDescriptor = formRowDescriptorAtIndexPath(indexPath)
|
||||
|
||||
if let formBaseCellClass = formBaseCellClassFromRowDescriptor(rowDescriptor) {
|
||||
return formBaseCellClass.formRowCellHeight()
|
||||
}
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
}
|
||||
|
||||
open override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
|
||||
let rowDescriptor = formRowDescriptorAtIndexPath(indexPath)
|
||||
|
||||
if let selectedRow = tableView.cellForRow(at: indexPath) as? FormBaseCell {
|
||||
if let formBaseCellClass = formBaseCellClassFromRowDescriptor(rowDescriptor) {
|
||||
formBaseCellClass.formViewController(self, didSelectRow: selectedRow)
|
||||
}
|
||||
}
|
||||
|
||||
if let didSelectClosure = rowDescriptor.configuration.button.didSelectClosure {
|
||||
didSelectClosure(rowDescriptor)
|
||||
}
|
||||
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
}
|
||||
|
||||
fileprivate class func defaultCellClassForRowType(_ rowType: FormRowDescriptor.RowType) -> FormBaseCell.Type {
|
||||
_ = FormViewController.__once
|
||||
return FormViewController.defaultCellClasses[rowType]!
|
||||
}
|
||||
|
||||
fileprivate func formRowDescriptorAtIndexPath(_ indexPath: IndexPath) -> FormRowDescriptor {
|
||||
|
||||
let section = form.sections[(indexPath as NSIndexPath).section]
|
||||
let rowDescriptor = section.rows[(indexPath as NSIndexPath).row]
|
||||
return rowDescriptor
|
||||
}
|
||||
|
||||
fileprivate func formBaseCellClassFromRowDescriptor(_ rowDescriptor: FormRowDescriptor) -> FormBaseCell.Type! {
|
||||
|
||||
var formBaseCellClass: FormBaseCell.Type
|
||||
|
||||
if let cellClass = rowDescriptor.configuration.cell.cellClass as? FormBaseCell.Type {
|
||||
formBaseCellClass = cellClass
|
||||
} else {
|
||||
formBaseCellClass = FormViewController.defaultCellClassForRowType(rowDescriptor.type)
|
||||
}
|
||||
return formBaseCellClass
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
//
|
||||
// FormDescriptor.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno on 20/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
public final class FormDescriptor {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
public var title: String
|
||||
public var sections: [FormSectionDescriptor] = []
|
||||
|
||||
// MARK: Init
|
||||
|
||||
public init() {
|
||||
self.title = ""
|
||||
}
|
||||
|
||||
public init(title: String) {
|
||||
self.title = title
|
||||
}
|
||||
|
||||
// MARK: Public
|
||||
|
||||
public func formValues() -> [String : AnyObject] {
|
||||
|
||||
var formValues: [String : AnyObject] = [:]
|
||||
|
||||
for section in sections {
|
||||
for row in section.rows {
|
||||
if row.type != .button {
|
||||
if let value = row.value {
|
||||
formValues[row.tag] = value
|
||||
} else {
|
||||
formValues[row.tag] = NSNull()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return formValues
|
||||
}
|
||||
|
||||
public func validateForm() -> FormRowDescriptor? {
|
||||
for section in sections {
|
||||
for row in section.rows {
|
||||
if row.configuration.cell.required && row.value == nil {
|
||||
return row
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -1,159 +0,0 @@
|
||||
//
|
||||
// FormRowDescriptor.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Ángel Ortuño Ortuño on 23/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
public final class FormRowDescriptor {
|
||||
|
||||
// MARK: Types
|
||||
|
||||
public enum RowType {
|
||||
case unknown
|
||||
case label
|
||||
case text
|
||||
case url
|
||||
case number
|
||||
case numbersAndPunctuation
|
||||
case decimal
|
||||
case name
|
||||
case phone
|
||||
case namePhone
|
||||
case email
|
||||
case twitter
|
||||
case asciiCapable
|
||||
case password
|
||||
case button
|
||||
case booleanSwitch
|
||||
case booleanCheck
|
||||
case segmentedControl
|
||||
case picker
|
||||
case date
|
||||
case time
|
||||
case dateAndTime
|
||||
case stepper
|
||||
case slider
|
||||
case multipleSelector
|
||||
case multilineText
|
||||
}
|
||||
|
||||
public struct CellConfiguration {
|
||||
public var cellClass: AnyClass?
|
||||
public var appearance: [String : AnyObject]
|
||||
public var placeholder: String?
|
||||
public var showsInputToolbar: Bool
|
||||
public var required: Bool
|
||||
public var willUpdateClosure: ((FormRowDescriptor) -> Void)?
|
||||
public var didUpdateClosure: ((FormRowDescriptor) -> Void)?
|
||||
public var visualConstraintsClosure: ((FormBaseCell) -> [String])?
|
||||
|
||||
public init() {
|
||||
cellClass = nil
|
||||
appearance = [:]
|
||||
placeholder = nil
|
||||
showsInputToolbar = false
|
||||
required = true
|
||||
willUpdateClosure = nil
|
||||
didUpdateClosure = nil
|
||||
visualConstraintsClosure = nil
|
||||
}
|
||||
}
|
||||
|
||||
public struct SelectionConfiguration {
|
||||
public var controllerClass: AnyClass?
|
||||
public var options: [AnyObject]
|
||||
public var optionTitleClosure: ((AnyObject) -> String)?
|
||||
public var allowsMultipleSelection: Bool
|
||||
|
||||
public init() {
|
||||
controllerClass = nil
|
||||
options = []
|
||||
optionTitleClosure = nil
|
||||
allowsMultipleSelection = false
|
||||
}
|
||||
}
|
||||
|
||||
public struct ButtonConfiguration {
|
||||
public var didSelectClosure: ((FormRowDescriptor) -> Void)?
|
||||
|
||||
public init() {
|
||||
didSelectClosure = nil
|
||||
}
|
||||
}
|
||||
|
||||
public struct StepperConfiguration {
|
||||
public var maximumValue: Double
|
||||
public var minimumValue: Double
|
||||
public var steps: Double
|
||||
public var continuous: Bool
|
||||
|
||||
public init() {
|
||||
maximumValue = 0.0
|
||||
minimumValue = 0.0
|
||||
steps = 0.0
|
||||
continuous = false
|
||||
}
|
||||
}
|
||||
|
||||
public struct DateConfiguration {
|
||||
public var dateFormatter: DateFormatter?
|
||||
}
|
||||
|
||||
public struct RowConfiguration {
|
||||
public var cell: CellConfiguration
|
||||
public var selection: SelectionConfiguration
|
||||
public var button: ButtonConfiguration
|
||||
public var stepper: StepperConfiguration
|
||||
public var date: DateConfiguration
|
||||
public var userInfo: [String : AnyObject]
|
||||
|
||||
init() {
|
||||
cell = CellConfiguration()
|
||||
selection = SelectionConfiguration()
|
||||
button = ButtonConfiguration()
|
||||
stepper = StepperConfiguration()
|
||||
date = DateConfiguration()
|
||||
userInfo = [:]
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
public let tag: String
|
||||
public let type: RowType
|
||||
|
||||
public var title: String?
|
||||
|
||||
public var value: AnyObject? {
|
||||
willSet {
|
||||
guard let willUpdateBlock = configuration.cell.willUpdateClosure else { return }
|
||||
willUpdateBlock(self)
|
||||
}
|
||||
didSet {
|
||||
guard let didUpdateBlock = configuration.cell.didUpdateClosure else { return }
|
||||
didUpdateBlock(self)
|
||||
}
|
||||
}
|
||||
|
||||
public var configuration: RowConfiguration
|
||||
|
||||
// MARK: Init
|
||||
|
||||
public init(tag: String, type: RowType, title: String, configuration: RowConfiguration) {
|
||||
self.tag = tag
|
||||
self.type = type
|
||||
self.title = title
|
||||
self.configuration = configuration
|
||||
}
|
||||
|
||||
public init(tag: String, type: RowType, title: String) {
|
||||
self.tag = tag
|
||||
self.type = type
|
||||
self.title = title
|
||||
self.configuration = RowConfiguration()
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
//
|
||||
// FormSectionDescriptor.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno on 20/08/14.
|
||||
// Copyright (c) 2016 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
public final class FormSectionDescriptor {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
public var rows: [FormRowDescriptor] = []
|
||||
|
||||
public var headerTitle: String?
|
||||
public var footerTitle: String?
|
||||
|
||||
public var headerView: UIView?
|
||||
public var footerView: UIView?
|
||||
|
||||
public var headerViewHeight: CGFloat = UITableViewAutomaticDimension
|
||||
public var footerViewHeight: CGFloat = UITableViewAutomaticDimension
|
||||
|
||||
// MARK: Init
|
||||
|
||||
public init(headerTitle: String?, footerTitle: String?) {
|
||||
self.headerTitle = headerTitle
|
||||
self.footerTitle = footerTitle
|
||||
}
|
||||
}
|
||||
@@ -1,622 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0C9D1DF31D2267EE00909941 /* FormOptionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C9D1DF21D2267EE00909941 /* FormOptionsViewController.swift */; };
|
||||
0CB1F6C31C37F9B900CD2A7B /* FormErrorType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB1F6C21C37F9B900CD2A7B /* FormErrorType.swift */; };
|
||||
0CCA33DD1B04FA5A006D9666 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA33DC1B04FA5A006D9666 /* AppDelegate.swift */; };
|
||||
0CCA33DF1B04FA5A006D9666 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA33DE1B04FA5A006D9666 /* ViewController.swift */; };
|
||||
0CCA33E21B04FA5A006D9666 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0CCA33E01B04FA5A006D9666 /* Main.storyboard */; };
|
||||
0CCA33E41B04FA5A006D9666 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0CCA33E31B04FA5A006D9666 /* Images.xcassets */; };
|
||||
0CCA34141B04FAD3006D9666 /* ExampleFormViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA33FC1B04FAD3006D9666 /* ExampleFormViewController.swift */; };
|
||||
0CCA34311B04FBE0006D9666 /* SwiftForms.h in Headers */ = {isa = PBXBuildFile; fileRef = 0CCA34301B04FBE0006D9666 /* SwiftForms.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
0CCA34431B04FBE0006D9666 /* SwiftForms.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CCA342C1B04FBDF006D9666 /* SwiftForms.framework */; };
|
||||
0CCA34441B04FBE0006D9666 /* SwiftForms.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0CCA342C1B04FBDF006D9666 /* SwiftForms.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
0CCA34611B0502B5006D9666 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0CCA34601B0502B5006D9666 /* Launch.storyboard */; };
|
||||
0CCA34781B050525006D9666 /* FormBaseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34641B050525006D9666 /* FormBaseCell.swift */; };
|
||||
0CCA34791B050525006D9666 /* FormTitleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34651B050525006D9666 /* FormTitleCell.swift */; };
|
||||
0CCA347A1B050525006D9666 /* FormValueCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34661B050525006D9666 /* FormValueCell.swift */; };
|
||||
0CCA347B1B050525006D9666 /* FormButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34671B050525006D9666 /* FormButtonCell.swift */; };
|
||||
0CCA347C1B050525006D9666 /* FormCheckCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34681B050525006D9666 /* FormCheckCell.swift */; };
|
||||
0CCA347D1B050525006D9666 /* FormDateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34691B050525006D9666 /* FormDateCell.swift */; };
|
||||
0CCA347E1B050525006D9666 /* FormPickerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346A1B050525006D9666 /* FormPickerCell.swift */; };
|
||||
0CCA347F1B050525006D9666 /* FormSegmentedControlCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346B1B050525006D9666 /* FormSegmentedControlCell.swift */; };
|
||||
0CCA34801B050525006D9666 /* FormSelectorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346C1B050525006D9666 /* FormSelectorCell.swift */; };
|
||||
0CCA34811B050525006D9666 /* FormSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346D1B050525006D9666 /* FormSwitchCell.swift */; };
|
||||
0CCA34821B050525006D9666 /* FormTextFieldCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346E1B050525006D9666 /* FormTextFieldCell.swift */; };
|
||||
0CCA34831B050525006D9666 /* FormTextViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA346F1B050525006D9666 /* FormTextViewCell.swift */; };
|
||||
0CCA34851B050525006D9666 /* FormSelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34721B050525006D9666 /* FormSelector.swift */; };
|
||||
0CCA34861B050525006D9666 /* FormViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34731B050525006D9666 /* FormViewController.swift */; };
|
||||
0CCA34871B050525006D9666 /* FormDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34751B050525006D9666 /* FormDescriptor.swift */; };
|
||||
0CCA34881B050525006D9666 /* FormRowDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34761B050525006D9666 /* FormRowDescriptor.swift */; };
|
||||
0CCA34891B050525006D9666 /* FormSectionDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCA34771B050525006D9666 /* FormSectionDescriptor.swift */; };
|
||||
0CDBB4F11B10699A00BE6ACF /* FormStepperCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CDBB4F01B10699A00BE6ACF /* FormStepperCell.swift */; };
|
||||
0CDBB4F31B10724600BE6ACF /* FormSliderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CDBB4F21B10724600BE6ACF /* FormSliderCell.swift */; };
|
||||
BDD1087A1C925D14000EDEE5 /* FormLabelCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDD108791C925D14000EDEE5 /* FormLabelCell.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
0CCA34411B04FBE0006D9666 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0CCA33CF1B04FA5A006D9666 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 0CCA342B1B04FBDF006D9666;
|
||||
remoteInfo = SwiftForms;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
0CCA34481B04FBE0006D9666 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
0CCA34441B04FBE0006D9666 /* SwiftForms.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0C9D1DF21D2267EE00909941 /* FormOptionsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormOptionsViewController.swift; sourceTree = "<group>"; };
|
||||
0CB1F6C21C37F9B900CD2A7B /* FormErrorType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormErrorType.swift; sourceTree = "<group>"; };
|
||||
0CCA33D71B04FA5A006D9666 /* SwiftFormsApplication.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftFormsApplication.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0CCA33DB1B04FA5A006D9666 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
0CCA33DC1B04FA5A006D9666 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
0CCA33DE1B04FA5A006D9666 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
0CCA33E11B04FA5A006D9666 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
0CCA33E31B04FA5A006D9666 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
0CCA33FC1B04FAD3006D9666 /* ExampleFormViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleFormViewController.swift; sourceTree = "<group>"; };
|
||||
0CCA342C1B04FBDF006D9666 /* SwiftForms.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftForms.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0CCA342F1B04FBE0006D9666 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
0CCA34301B04FBE0006D9666 /* SwiftForms.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftForms.h; sourceTree = "<group>"; };
|
||||
0CCA343E1B04FBE0006D9666 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
0CCA343F1B04FBE0006D9666 /* SwiftFormsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftFormsTests.swift; sourceTree = "<group>"; };
|
||||
0CCA34601B0502B5006D9666 /* Launch.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Launch.storyboard; sourceTree = "<group>"; };
|
||||
0CCA34641B050525006D9666 /* FormBaseCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormBaseCell.swift; sourceTree = "<group>"; };
|
||||
0CCA34651B050525006D9666 /* FormTitleCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormTitleCell.swift; sourceTree = "<group>"; };
|
||||
0CCA34661B050525006D9666 /* FormValueCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormValueCell.swift; sourceTree = "<group>"; };
|
||||
0CCA34671B050525006D9666 /* FormButtonCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormButtonCell.swift; sourceTree = "<group>"; };
|
||||
0CCA34681B050525006D9666 /* FormCheckCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormCheckCell.swift; sourceTree = "<group>"; };
|
||||
0CCA34691B050525006D9666 /* FormDateCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormDateCell.swift; sourceTree = "<group>"; };
|
||||
0CCA346A1B050525006D9666 /* FormPickerCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormPickerCell.swift; sourceTree = "<group>"; };
|
||||
0CCA346B1B050525006D9666 /* FormSegmentedControlCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSegmentedControlCell.swift; sourceTree = "<group>"; };
|
||||
0CCA346C1B050525006D9666 /* FormSelectorCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSelectorCell.swift; sourceTree = "<group>"; };
|
||||
0CCA346D1B050525006D9666 /* FormSwitchCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSwitchCell.swift; sourceTree = "<group>"; };
|
||||
0CCA346E1B050525006D9666 /* FormTextFieldCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormTextFieldCell.swift; sourceTree = "<group>"; };
|
||||
0CCA346F1B050525006D9666 /* FormTextViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormTextViewCell.swift; sourceTree = "<group>"; };
|
||||
0CCA34721B050525006D9666 /* FormSelector.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSelector.swift; sourceTree = "<group>"; };
|
||||
0CCA34731B050525006D9666 /* FormViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormViewController.swift; sourceTree = "<group>"; };
|
||||
0CCA34751B050525006D9666 /* FormDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormDescriptor.swift; sourceTree = "<group>"; };
|
||||
0CCA34761B050525006D9666 /* FormRowDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormRowDescriptor.swift; sourceTree = "<group>"; };
|
||||
0CCA34771B050525006D9666 /* FormSectionDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSectionDescriptor.swift; sourceTree = "<group>"; };
|
||||
0CDBB4F01B10699A00BE6ACF /* FormStepperCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormStepperCell.swift; sourceTree = "<group>"; };
|
||||
0CDBB4F21B10724600BE6ACF /* FormSliderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormSliderCell.swift; sourceTree = "<group>"; };
|
||||
BDD108791C925D14000EDEE5 /* FormLabelCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormLabelCell.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
0CCA33D41B04FA5A006D9666 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0CCA34431B04FBE0006D9666 /* SwiftForms.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
0CCA34281B04FBDF006D9666 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
0CCA33CE1B04FA5A006D9666 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA33D91B04FA5A006D9666 /* SwiftFormsApplication */,
|
||||
0CCA342D1B04FBE0006D9666 /* SwiftForms */,
|
||||
0CCA343C1B04FBE0006D9666 /* SwiftFormsTests */,
|
||||
0CCA33D81B04FA5A006D9666 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA33D81B04FA5A006D9666 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA33D71B04FA5A006D9666 /* SwiftFormsApplication.app */,
|
||||
0CCA342C1B04FBDF006D9666 /* SwiftForms.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA33D91B04FA5A006D9666 /* SwiftFormsApplication */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA33FC1B04FAD3006D9666 /* ExampleFormViewController.swift */,
|
||||
0CCA33DC1B04FA5A006D9666 /* AppDelegate.swift */,
|
||||
0CCA33DE1B04FA5A006D9666 /* ViewController.swift */,
|
||||
0CCA33E01B04FA5A006D9666 /* Main.storyboard */,
|
||||
0CCA33E31B04FA5A006D9666 /* Images.xcassets */,
|
||||
0CCA33DA1B04FA5A006D9666 /* Supporting Files */,
|
||||
0CCA34601B0502B5006D9666 /* Launch.storyboard */,
|
||||
);
|
||||
path = SwiftFormsApplication;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA33DA1B04FA5A006D9666 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA33DB1B04FA5A006D9666 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA342D1B04FBE0006D9666 /* SwiftForms */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA34621B050525006D9666 /* cells */,
|
||||
0CCA34701B050525006D9666 /* controllers */,
|
||||
0CCA34741B050525006D9666 /* descriptors */,
|
||||
0CB1F6C21C37F9B900CD2A7B /* FormErrorType.swift */,
|
||||
0CCA34301B04FBE0006D9666 /* SwiftForms.h */,
|
||||
0CCA342E1B04FBE0006D9666 /* Supporting Files */,
|
||||
);
|
||||
path = SwiftForms;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA342E1B04FBE0006D9666 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA342F1B04FBE0006D9666 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA343C1B04FBE0006D9666 /* SwiftFormsTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA343F1B04FBE0006D9666 /* SwiftFormsTests.swift */,
|
||||
0CCA343D1B04FBE0006D9666 /* Supporting Files */,
|
||||
);
|
||||
path = SwiftFormsTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA343D1B04FBE0006D9666 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA343E1B04FBE0006D9666 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA34621B050525006D9666 /* cells */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA34631B050525006D9666 /* base */,
|
||||
0CCA34671B050525006D9666 /* FormButtonCell.swift */,
|
||||
BDD108791C925D14000EDEE5 /* FormLabelCell.swift */,
|
||||
0CCA34681B050525006D9666 /* FormCheckCell.swift */,
|
||||
0CCA34691B050525006D9666 /* FormDateCell.swift */,
|
||||
0CCA346A1B050525006D9666 /* FormPickerCell.swift */,
|
||||
0CCA346B1B050525006D9666 /* FormSegmentedControlCell.swift */,
|
||||
0CCA346C1B050525006D9666 /* FormSelectorCell.swift */,
|
||||
0CCA346D1B050525006D9666 /* FormSwitchCell.swift */,
|
||||
0CCA346E1B050525006D9666 /* FormTextFieldCell.swift */,
|
||||
0CCA346F1B050525006D9666 /* FormTextViewCell.swift */,
|
||||
0CDBB4F01B10699A00BE6ACF /* FormStepperCell.swift */,
|
||||
0CDBB4F21B10724600BE6ACF /* FormSliderCell.swift */,
|
||||
);
|
||||
path = cells;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA34631B050525006D9666 /* base */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA34641B050525006D9666 /* FormBaseCell.swift */,
|
||||
0CCA34651B050525006D9666 /* FormTitleCell.swift */,
|
||||
0CCA34661B050525006D9666 /* FormValueCell.swift */,
|
||||
);
|
||||
path = base;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA34701B050525006D9666 /* controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA34721B050525006D9666 /* FormSelector.swift */,
|
||||
0CCA34731B050525006D9666 /* FormViewController.swift */,
|
||||
0C9D1DF21D2267EE00909941 /* FormOptionsViewController.swift */,
|
||||
);
|
||||
path = controllers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0CCA34741B050525006D9666 /* descriptors */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0CCA34751B050525006D9666 /* FormDescriptor.swift */,
|
||||
0CCA34761B050525006D9666 /* FormRowDescriptor.swift */,
|
||||
0CCA34771B050525006D9666 /* FormSectionDescriptor.swift */,
|
||||
);
|
||||
path = descriptors;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
0CCA34291B04FBDF006D9666 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0CCA34311B04FBE0006D9666 /* SwiftForms.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
0CCA33D61B04FA5A006D9666 /* SwiftFormsApplication */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 0CCA33F61B04FA5A006D9666 /* Build configuration list for PBXNativeTarget "SwiftFormsApplication" */;
|
||||
buildPhases = (
|
||||
0CCA33D31B04FA5A006D9666 /* Sources */,
|
||||
0CCA33D41B04FA5A006D9666 /* Frameworks */,
|
||||
0CCA33D51B04FA5A006D9666 /* Resources */,
|
||||
0CCA34481B04FBE0006D9666 /* Embed Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
0CCA34421B04FBE0006D9666 /* PBXTargetDependency */,
|
||||
);
|
||||
name = SwiftFormsApplication;
|
||||
productName = SwiftFormsApplication;
|
||||
productReference = 0CCA33D71B04FA5A006D9666 /* SwiftFormsApplication.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
0CCA342B1B04FBDF006D9666 /* SwiftForms */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 0CCA34451B04FBE0006D9666 /* Build configuration list for PBXNativeTarget "SwiftForms" */;
|
||||
buildPhases = (
|
||||
0CCA34271B04FBDF006D9666 /* Sources */,
|
||||
0CCA34281B04FBDF006D9666 /* Frameworks */,
|
||||
0CCA34291B04FBDF006D9666 /* Headers */,
|
||||
0CCA342A1B04FBDF006D9666 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = SwiftForms;
|
||||
productName = SwiftForms;
|
||||
productReference = 0CCA342C1B04FBDF006D9666 /* SwiftForms.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
0CCA33CF1B04FA5A006D9666 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftMigration = 0700;
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0800;
|
||||
ORGANIZATIONNAME = "Miguel Angel Ortuno Ortuno";
|
||||
TargetAttributes = {
|
||||
0CCA33D61B04FA5A006D9666 = {
|
||||
CreatedOnToolsVersion = 6.3.1;
|
||||
LastSwiftMigration = 0800;
|
||||
};
|
||||
0CCA342B1B04FBDF006D9666 = {
|
||||
CreatedOnToolsVersion = 6.3.1;
|
||||
LastSwiftMigration = 0800;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 0CCA33D21B04FA5A006D9666 /* Build configuration list for PBXProject "SwiftFormsApplication" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 0CCA33CE1B04FA5A006D9666;
|
||||
productRefGroup = 0CCA33D81B04FA5A006D9666 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
0CCA33D61B04FA5A006D9666 /* SwiftFormsApplication */,
|
||||
0CCA342B1B04FBDF006D9666 /* SwiftForms */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
0CCA33D51B04FA5A006D9666 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0CCA33E21B04FA5A006D9666 /* Main.storyboard in Resources */,
|
||||
0CCA34611B0502B5006D9666 /* Launch.storyboard in Resources */,
|
||||
0CCA33E41B04FA5A006D9666 /* Images.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
0CCA342A1B04FBDF006D9666 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
0CCA33D31B04FA5A006D9666 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0CCA33DF1B04FA5A006D9666 /* ViewController.swift in Sources */,
|
||||
0CCA34141B04FAD3006D9666 /* ExampleFormViewController.swift in Sources */,
|
||||
0CCA33DD1B04FA5A006D9666 /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
0CCA34271B04FBDF006D9666 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0CCA34851B050525006D9666 /* FormSelector.swift in Sources */,
|
||||
0CCA34791B050525006D9666 /* FormTitleCell.swift in Sources */,
|
||||
0CDBB4F31B10724600BE6ACF /* FormSliderCell.swift in Sources */,
|
||||
0CCA34891B050525006D9666 /* FormSectionDescriptor.swift in Sources */,
|
||||
0CCA34871B050525006D9666 /* FormDescriptor.swift in Sources */,
|
||||
0CCA34781B050525006D9666 /* FormBaseCell.swift in Sources */,
|
||||
BDD1087A1C925D14000EDEE5 /* FormLabelCell.swift in Sources */,
|
||||
0CCA34831B050525006D9666 /* FormTextViewCell.swift in Sources */,
|
||||
0CB1F6C31C37F9B900CD2A7B /* FormErrorType.swift in Sources */,
|
||||
0CCA34861B050525006D9666 /* FormViewController.swift in Sources */,
|
||||
0CCA347B1B050525006D9666 /* FormButtonCell.swift in Sources */,
|
||||
0CDBB4F11B10699A00BE6ACF /* FormStepperCell.swift in Sources */,
|
||||
0CCA34801B050525006D9666 /* FormSelectorCell.swift in Sources */,
|
||||
0CCA34811B050525006D9666 /* FormSwitchCell.swift in Sources */,
|
||||
0CCA347C1B050525006D9666 /* FormCheckCell.swift in Sources */,
|
||||
0CCA347A1B050525006D9666 /* FormValueCell.swift in Sources */,
|
||||
0CCA347F1B050525006D9666 /* FormSegmentedControlCell.swift in Sources */,
|
||||
0CCA34821B050525006D9666 /* FormTextFieldCell.swift in Sources */,
|
||||
0CCA347E1B050525006D9666 /* FormPickerCell.swift in Sources */,
|
||||
0C9D1DF31D2267EE00909941 /* FormOptionsViewController.swift in Sources */,
|
||||
0CCA347D1B050525006D9666 /* FormDateCell.swift in Sources */,
|
||||
0CCA34881B050525006D9666 /* FormRowDescriptor.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
0CCA34421B04FBE0006D9666 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 0CCA342B1B04FBDF006D9666 /* SwiftForms */;
|
||||
targetProxy = 0CCA34411B04FBE0006D9666 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
0CCA33E01B04FA5A006D9666 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
0CCA33E11B04FA5A006D9666 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
0CCA33F41B04FA5A006D9666 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
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_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_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_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
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 = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
0CCA33F51B04FA5A006D9666 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
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_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 = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
0CCA33F71B04FA5A006D9666 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = SwiftFormsApplication/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ortulabs.SwiftFormsApplication;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
0CCA33F81B04FA5A006D9666 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = SwiftFormsApplication/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ortulabs.SwiftFormsApplication;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
0CCA34461B04FBE0006D9666 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = SwiftForms/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.ortulabs.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 3.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
0CCA34471B04FBE0006D9666 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = SwiftForms/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.ortulabs.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 3.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
0CCA33D21B04FA5A006D9666 /* Build configuration list for PBXProject "SwiftFormsApplication" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
0CCA33F41B04FA5A006D9666 /* Debug */,
|
||||
0CCA33F51B04FA5A006D9666 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
0CCA33F61B04FA5A006D9666 /* Build configuration list for PBXNativeTarget "SwiftFormsApplication" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
0CCA33F71B04FA5A006D9666 /* Debug */,
|
||||
0CCA33F81B04FA5A006D9666 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
0CCA34451B04FBE0006D9666 /* Build configuration list for PBXNativeTarget "SwiftForms" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
0CCA34461B04FBE0006D9666 /* Debug */,
|
||||
0CCA34471B04FBE0006D9666 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 0CCA33CF1B04FA5A006D9666 /* Project object */;
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "0CCA342B1B04FBDF006D9666"
|
||||
BuildableName = "SwiftForms.framework"
|
||||
BlueprintName = "SwiftForms"
|
||||
ReferencedContainer = "container:SwiftFormsApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<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">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "0CCA342B1B04FBDF006D9666"
|
||||
BuildableName = "SwiftForms.framework"
|
||||
BlueprintName = "SwiftForms"
|
||||
ReferencedContainer = "container:SwiftFormsApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "0CCA342B1B04FBDF006D9666"
|
||||
BuildableName = "SwiftForms.framework"
|
||||
BlueprintName = "SwiftForms"
|
||||
ReferencedContainer = "container:SwiftFormsApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,35 +0,0 @@
|
||||
//
|
||||
// AppDelegate.swift
|
||||
// SwiftForms
|
||||
//
|
||||
// Created by Miguel Angel Ortuno on 20/08/14.
|
||||
// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : Any]?) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func applicationWillResignActive(_ application: UIApplication) {
|
||||
}
|
||||
|
||||
func applicationDidEnterBackground(_ application: UIApplication) {
|
||||
}
|
||||
|
||||
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_ application: UIApplication) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="2fJ-Vj-Fx4">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Root View Controller-->
|
||||
<scene sceneID="prn-mK-S9o">
|
||||
<objects>
|
||||
<tableViewController id="cOw-JX-PpI" customClass="ExampleFormViewController" customModule="SwiftFormsApplication" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="Dpr-KM-eKs">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="518"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="cOw-JX-PpI" id="zuU-br-WUC"/>
|
||||
<outlet property="delegate" destination="cOw-JX-PpI" id="2Oh-6L-e8h"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Root View Controller" id="W98-Fb-phH"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<size key="freeformSize" width="320" height="518"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="ndw-47-Ukh" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-166" y="423.75"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="4el-7P-abp">
|
||||
<objects>
|
||||
<navigationController id="2fJ-Vj-Fx4" sceneMemberID="viewController">
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<size key="freeformSize" width="320" height="518"/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="l3z-Dv-0Yo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
<segue destination="cOw-JX-PpI" kind="relationship" relationship="rootViewController" id="nL3-AH-WsZ"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="k9y-Jx-GyC" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-816" y="424"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 MiB |
@@ -1,211 +0,0 @@
|
||||
//
|
||||
// ExampleFormViewController.swift
|
||||
// SwiftForms
|
||||
//®
|
||||
// Created by Miguel Angel Ortuno on 20/08/14.
|
||||
// Copyright (c) 2014 Miguel Angel Ortuño. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SwiftForms
|
||||
|
||||
class ExampleFormViewController: FormViewController {
|
||||
|
||||
struct Static {
|
||||
static let nameTag = "name"
|
||||
static let passwordTag = "password"
|
||||
static let lastNameTag = "lastName"
|
||||
static let jobTag = "job"
|
||||
static let emailTag = "email"
|
||||
static let URLTag = "url"
|
||||
static let phoneTag = "phone"
|
||||
static let enabled = "enabled"
|
||||
static let check = "check"
|
||||
static let segmented = "segmented"
|
||||
static let picker = "picker"
|
||||
static let birthday = "birthday"
|
||||
static let categories = "categories"
|
||||
static let button = "button"
|
||||
static let stepper = "stepper"
|
||||
static let slider = "slider"
|
||||
static let textView = "textview"
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.loadForm()
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Submit", style: .plain, target: self, action: #selector(ExampleFormViewController.submit(_:)))
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
func submit(_: UIBarButtonItem!) {
|
||||
|
||||
let message = self.form.formValues().description
|
||||
|
||||
let alertController = UIAlertController(title: "Form output", message: message, preferredStyle: .alert)
|
||||
|
||||
let cancel = UIAlertAction(title: "OK", style: .cancel) { (action) in
|
||||
}
|
||||
|
||||
alertController.addAction(cancel)
|
||||
|
||||
self.present(alertController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
// MARK: Private interface
|
||||
|
||||
fileprivate func loadForm() {
|
||||
|
||||
let form = FormDescriptor(title: "Example Form")
|
||||
|
||||
let section1 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil)
|
||||
|
||||
var row = FormRowDescriptor(tag: Static.emailTag, type: .email, title: "Email")
|
||||
row.configuration.cell.appearance = ["textField.placeholder" : "john@gmail.com" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject]
|
||||
section1.rows.append(row)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.passwordTag, type: .password, title: "Password")
|
||||
row.configuration.cell.appearance = ["textField.placeholder" : "Enter password" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject]
|
||||
section1.rows.append(row)
|
||||
|
||||
let section2 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.nameTag, type: .name, title: "First Name")
|
||||
row.configuration.cell.appearance = ["textField.placeholder" : "e.g. Miguel Ángel" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject]
|
||||
section2.rows.append(row)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.lastNameTag, type: .name, title: "Last Name")
|
||||
row.configuration.cell.appearance = ["textField.placeholder" : "e.g. Ortuño" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject]
|
||||
section2.rows.append(row)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.jobTag, type: .text, title: "Job")
|
||||
row.configuration.cell.appearance = ["textField.placeholder" : "e.g. Entrepreneur" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject]
|
||||
section2.rows.append(row)
|
||||
|
||||
let section3 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.URLTag, type: .url, title: "URL")
|
||||
row.configuration.cell.appearance = ["textField.placeholder" : "e.g. gethooksapp.com" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject]
|
||||
section3.rows.append(row)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.phoneTag, type: .phone, title: "Phone")
|
||||
row.configuration.cell.appearance = ["textField.placeholder" : "e.g. 0034666777999" as AnyObject, "textField.textAlignment" : NSTextAlignment.right.rawValue as AnyObject]
|
||||
section3.rows.append(row)
|
||||
|
||||
let section4 = FormSectionDescriptor(headerTitle: "An example header title", footerTitle: "An example footer title")
|
||||
|
||||
row = FormRowDescriptor(tag: Static.enabled, type: .booleanSwitch, title: "Enable")
|
||||
section4.rows.append(row)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.check, type: .booleanCheck, title: "Doable")
|
||||
section4.rows.append(row)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.segmented, type: .segmentedControl, title: "Priority")
|
||||
row.configuration.selection.options = ([0, 1, 2, 3] as [Int]) as [AnyObject]
|
||||
row.configuration.selection.optionTitleClosure = { value in
|
||||
guard let option = value as? Int else { return "" }
|
||||
switch option {
|
||||
case 0:
|
||||
return "None"
|
||||
case 1:
|
||||
return "!"
|
||||
case 2:
|
||||
return "!!"
|
||||
case 3:
|
||||
return "!!!"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
row.configuration.cell.appearance = ["titleLabel.font" : UIFont.boldSystemFont(ofSize: 30.0), "segmentedControl.tintColor" : UIColor.red]
|
||||
|
||||
section4.rows.append(row)
|
||||
|
||||
let section5 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.picker, type: .picker, title: "Gender")
|
||||
row.configuration.cell.showsInputToolbar = true
|
||||
row.configuration.selection.options = (["F", "M", "U"] as [String]) as [AnyObject]
|
||||
row.configuration.selection.optionTitleClosure = { value in
|
||||
guard let option = value as? String else { return "" }
|
||||
switch option {
|
||||
case "F":
|
||||
return "Female"
|
||||
case "M":
|
||||
return "Male"
|
||||
case "U":
|
||||
return "I'd rather not to say"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
row.value = "M" as AnyObject
|
||||
|
||||
section5.rows.append(row)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.birthday, type: .date, title: "Birthday")
|
||||
row.configuration.cell.showsInputToolbar = true
|
||||
section5.rows.append(row)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.categories, type: .multipleSelector, title: "Categories")
|
||||
row.configuration.selection.options = ([0, 1, 2, 3, 4] as [Int]) as [AnyObject]
|
||||
row.configuration.selection.allowsMultipleSelection = true
|
||||
row.configuration.selection.optionTitleClosure = { value in
|
||||
guard let option = value as? Int else { return "" }
|
||||
switch option {
|
||||
case 0:
|
||||
return "Restaurant"
|
||||
case 1:
|
||||
return "Pub"
|
||||
case 2:
|
||||
return "Shop"
|
||||
case 3:
|
||||
return "Hotel"
|
||||
case 4:
|
||||
return "Camping"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
section5.rows.append(row)
|
||||
|
||||
let section6 = FormSectionDescriptor(headerTitle: "Stepper & Slider", footerTitle: nil)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.stepper, type: .stepper, title: "Step count")
|
||||
row.configuration.stepper.maximumValue = 200.0
|
||||
row.configuration.stepper.minimumValue = 20.0
|
||||
row.configuration.stepper.steps = 2.0
|
||||
section6.rows.append(row)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.slider, type: .slider, title: "Slider")
|
||||
row.configuration.stepper.maximumValue = 200.0
|
||||
row.configuration.stepper.minimumValue = 20.0
|
||||
row.configuration.stepper.steps = 2.0
|
||||
row.value = 0.5 as AnyObject
|
||||
section6.rows.append(row)
|
||||
|
||||
let section7 = FormSectionDescriptor(headerTitle: "Multiline TextView", footerTitle: nil)
|
||||
row = FormRowDescriptor(tag: Static.textView, type: .multilineText, title: "Notes")
|
||||
section7.rows.append(row)
|
||||
|
||||
let section8 = FormSectionDescriptor(headerTitle: nil, footerTitle: nil)
|
||||
|
||||
row = FormRowDescriptor(tag: Static.button, type: .button, title: "Dismiss")
|
||||
row.configuration.button.didSelectClosure = { _ in
|
||||
self.view.endEditing(true)
|
||||
}
|
||||
section8.rows.append(row)
|
||||
|
||||
form.sections = [section1, section2, section3, section4, section5, section6, section7, section8]
|
||||
|
||||
self.form = form
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "8.0",
|
||||
"subtype" : "736h",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "8.0",
|
||||
"subtype" : "736h",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "8.0",
|
||||
"subtype" : "667h",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "retina4",
|
||||
"filename" : "iphone5_splash.png",
|
||||
"minimum-system-version" : "7.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"subtype" : "retina4",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,38 +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>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>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>Launch</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="9SR-7b-Iwg">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="zNr-CX-2hl">
|
||||
<objects>
|
||||
<navigationController id="9SR-7b-Iwg" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="boM-fp-avT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
<segue destination="zU2-zy-5lE" kind="relationship" relationship="rootViewController" id="RaG-Zs-crm"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="rIS-OV-1jL" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-664" y="297"/>
|
||||
</scene>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="9pp-lP-Cyp">
|
||||
<objects>
|
||||
<viewController id="zU2-zy-5lE" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="kba-MB-gng"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="cvL-oJ-V4X"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="2CP-3f-vjZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="49I-cM-xVU"/>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Ywx-qZ-bIj" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="358" y="297"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 65 KiB |
@@ -1,23 +0,0 @@
|
||||
//
|
||||
// ViewController.swift
|
||||
// SwiftFormsApplication
|
||||
//
|
||||
// Created by Miguel Angel Ortuno Ortuno on 14/5/15.
|
||||
// Copyright (c) 2015 Miguel Angel Ortuno Ortuno. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ViewController: UIViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
}
|
||||
|
||||
override func didReceiveMemoryWarning() {
|
||||
super.didReceiveMemoryWarning()
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,55 +3,74 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objectVersion = 48;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
5F28BC9A1E920172000BA78E /* SwiftForms.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F28BC991E920172000BA78E /* SwiftForms.framework */; };
|
||||
5FCEBEBA1E91A00900BA379D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBEB91E91A00900BA379D /* AppDelegate.swift */; };
|
||||
5FCEBEC11E91A00900BA379D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5FCEBEC01E91A00900BA379D /* Assets.xcassets */; };
|
||||
5FCEBEC41E91A00900BA379D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5FCEBEC21E91A00900BA379D /* LaunchScreen.storyboard */; };
|
||||
5FCEBECF1E91A00900BA379D /* My_MindTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBECE1E91A00900BA379D /* My_MindTests.swift */; };
|
||||
5FCEBEDA1E91A00900BA379D /* My_MindUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBED91E91A00900BA379D /* My_MindUITests.swift */; };
|
||||
5FCEBEEA1E91A0B800BA379D /* OnBoard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5FCEBEE91E91A0B800BA379D /* OnBoard.storyboard */; };
|
||||
5FCEBEEC1E91A20100BA379D /* OnBoardingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBEEB1E91A20100BA379D /* OnBoardingController.swift */; };
|
||||
5FCEBEF11E91A25200BA379D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5FCEBEF01E91A25200BA379D /* Main.storyboard */; };
|
||||
5FCEBEF31E91A25900BA379D /* Login.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5FCEBEF21E91A25900BA379D /* Login.storyboard */; };
|
||||
5FCEBEF51E91A27B00BA379D /* LoginViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBEF41E91A27B00BA379D /* LoginViews.swift */; };
|
||||
5FCEBEF71E91A28800BA379D /* ForumView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBEF61E91A28800BA379D /* ForumView.swift */; };
|
||||
5FCEBEF91E91A29D00BA379D /* ReferralViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBEF81E91A29D00BA379D /* ReferralViews.swift */; };
|
||||
5FCEBEFB1E91A2A400BA379D /* AppointmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBEFA1E91A2A400BA379D /* AppointmentView.swift */; };
|
||||
5FCEBEFD1E91A2B200BA379D /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBEFC1E91A2B200BA379D /* SettingsView.swift */; };
|
||||
5FCEBEFF1E91A2BB00BA379D /* EmergencyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBEFE1E91A2BB00BA379D /* EmergencyView.swift */; };
|
||||
5FCEBF011E91A74100BA379D /* SignUpViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBF001E91A74100BA379D /* SignUpViews.swift */; };
|
||||
5FCEBF051E91A81000BA379D /* WelcomeScreenViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FCEBF041E91A81000BA379D /* WelcomeScreenViews.swift */; };
|
||||
5FE993361E92C3D4002B0FF6 /* OnlineViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FE993351E92C3D4002B0FF6 /* OnlineViews.swift */; };
|
||||
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 */
|
||||
5FCEBECB1E91A00900BA379D /* PBXContainerItemProxy */ = {
|
||||
5F5A1D3A1E8DB0F300BCE63D /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 5FCEBEAE1E91A00900BA379D /* Project object */;
|
||||
containerPortal = 5F5A1D1D1E8DB0F300BCE63D /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 5FCEBEB51E91A00900BA379D;
|
||||
remoteGlobalIDString = 5F5A1D241E8DB0F300BCE63D;
|
||||
remoteInfo = "My Mind";
|
||||
};
|
||||
5FCEBED61E91A00900BA379D /* PBXContainerItemProxy */ = {
|
||||
5F5A1D451E8DB0F300BCE63D /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 5FCEBEAE1E91A00900BA379D /* Project object */;
|
||||
containerPortal = 5F5A1D1D1E8DB0F300BCE63D /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 5FCEBEB51E91A00900BA379D;
|
||||
remoteGlobalIDString = 5F5A1D241E8DB0F300BCE63D;
|
||||
remoteInfo = "My Mind";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
5FA02E161E91F52C00C6F0A5 /* Embed Frameworks */ = {
|
||||
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;
|
||||
@@ -59,56 +78,69 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
4D61387F6D0645AD417E6994 /* Pods_My_Mind.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_My_Mind.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4EB7D250E5F6F6ED4ECEE61D /* Pods-My Mind.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-My Mind.release.xcconfig"; path = "Pods/Target Support Files/Pods-My Mind/Pods-My Mind.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5F28BC991E920172000BA78E /* SwiftForms.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SwiftForms.framework; sourceTree = "<group>"; };
|
||||
5FCEBEB61E91A00900BA379D /* My Mind.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "My Mind.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5FCEBEB91E91A00900BA379D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
5FCEBEC01E91A00900BA379D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
5FCEBEC31E91A00900BA379D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
5FCEBEC51E91A00900BA379D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
5FCEBECA1E91A00900BA379D /* My MindTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "My MindTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5FCEBECE1E91A00900BA379D /* My_MindTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = My_MindTests.swift; sourceTree = "<group>"; };
|
||||
5FCEBED01E91A00900BA379D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
5FCEBED51E91A00900BA379D /* My MindUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "My MindUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5FCEBED91E91A00900BA379D /* My_MindUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = My_MindUITests.swift; sourceTree = "<group>"; };
|
||||
5FCEBEDB1E91A00900BA379D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
5FCEBEE91E91A0B800BA379D /* OnBoard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = OnBoard.storyboard; path = ../OnBoard.storyboard; sourceTree = "<group>"; };
|
||||
5FCEBEEB1E91A20100BA379D /* OnBoardingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OnBoardingController.swift; path = ../OnBoardingController.swift; sourceTree = "<group>"; };
|
||||
5FCEBEF01E91A25200BA379D /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
|
||||
5FCEBEF21E91A25900BA379D /* Login.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Login.storyboard; sourceTree = "<group>"; };
|
||||
5FCEBEF41E91A27B00BA379D /* LoginViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViews.swift; sourceTree = "<group>"; };
|
||||
5FCEBEF61E91A28800BA379D /* ForumView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ForumView.swift; sourceTree = "<group>"; };
|
||||
5FCEBEF81E91A29D00BA379D /* ReferralViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReferralViews.swift; sourceTree = "<group>"; };
|
||||
5FCEBEFA1E91A2A400BA379D /* AppointmentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppointmentView.swift; sourceTree = "<group>"; };
|
||||
5FCEBEFC1E91A2B200BA379D /* SettingsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
|
||||
5FCEBEFE1E91A2BB00BA379D /* EmergencyView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmergencyView.swift; sourceTree = "<group>"; };
|
||||
5FCEBF001E91A74100BA379D /* SignUpViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignUpViews.swift; sourceTree = "<group>"; };
|
||||
5FCEBF041E91A81000BA379D /* WelcomeScreenViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeScreenViews.swift; sourceTree = "<group>"; };
|
||||
5FCEBF061E91D95D00BA379D /* My Mind.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "My Mind.entitlements"; sourceTree = "<group>"; };
|
||||
5FE993351E92C3D4002B0FF6 /* OnlineViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnlineViews.swift; sourceTree = "<group>"; };
|
||||
706096029E2D8926F6A27630 /* Pods-My Mind.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-My Mind.debug.xcconfig"; path = "Pods/Target Support Files/Pods-My Mind/Pods-My Mind.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
D801D285CF8D71FD32F6DC0E /* Pods_My_MindTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_My_MindTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F44006E7B7F6F6FB9AB0F4C6 /* Pods_My_MindUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_My_MindUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
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 */
|
||||
5FCEBEB31E91A00900BA379D /* Frameworks */ = {
|
||||
5F5A1D221E8DB0F300BCE63D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5F28BC9A1E920172000BA78E /* SwiftForms.framework in Frameworks */,
|
||||
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;
|
||||
};
|
||||
5FCEBEC71E91A00900BA379D /* Frameworks */ = {
|
||||
5F5A1D361E8DB0F300BCE63D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5FCEBED21E91A00900BA379D /* Frameworks */ = {
|
||||
5F5A1D411E8DB0F300BCE63D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -118,129 +150,154 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
2678CCB1C2283411544C78DB /* Frameworks */ = {
|
||||
5F5A1D1C1E8DB0F300BCE63D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5F28BC991E920172000BA78E /* SwiftForms.framework */,
|
||||
4D61387F6D0645AD417E6994 /* Pods_My_Mind.framework */,
|
||||
D801D285CF8D71FD32F6DC0E /* Pods_My_MindTests.framework */,
|
||||
F44006E7B7F6F6FB9AB0F4C6 /* Pods_My_MindUITests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FCEBEAD1E91A00900BA379D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FCEBEB81E91A00900BA379D /* My Mind */,
|
||||
5FCEBECD1E91A00900BA379D /* My MindTests */,
|
||||
5FCEBED81E91A00900BA379D /* My MindUITests */,
|
||||
5FCEBEB71E91A00900BA379D /* Products */,
|
||||
A5B37CCAF9726F0EEDFD6142 /* Pods */,
|
||||
2678CCB1C2283411544C78DB /* Frameworks */,
|
||||
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>";
|
||||
};
|
||||
5FCEBEB71E91A00900BA379D /* Products */ = {
|
||||
5F5A1D261E8DB0F300BCE63D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FCEBEB61E91A00900BA379D /* My Mind.app */,
|
||||
5FCEBECA1E91A00900BA379D /* My MindTests.xctest */,
|
||||
5FCEBED51E91A00900BA379D /* My MindUITests.xctest */,
|
||||
5F5A1D251E8DB0F300BCE63D /* My Mind.app */,
|
||||
5F5A1D391E8DB0F300BCE63D /* My MindTests.xctest */,
|
||||
5F5A1D441E8DB0F300BCE63D /* My MindUITests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FCEBEB81E91A00900BA379D /* My Mind */ = {
|
||||
5F5A1D271E8DB0F300BCE63D /* My Mind */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FCEBF061E91D95D00BA379D /* My Mind.entitlements */,
|
||||
5FCEBEC51E91A00900BA379D /* Info.plist */,
|
||||
5FCEBEB91E91A00900BA379D /* AppDelegate.swift */,
|
||||
5FCEBEC01E91A00900BA379D /* Assets.xcassets */,
|
||||
5FCEBEC21E91A00900BA379D /* LaunchScreen.storyboard */,
|
||||
5FCEBEEE1E91A21900BA379D /* Login Sequences */,
|
||||
5FCEBEEF1E91A22800BA379D /* Main Sequences */,
|
||||
5FCEBEED1E91A20D00BA379D /* OnBoarding Sequences */,
|
||||
5F5A1D561E8DB24C00BCE63D /* Sdk */,
|
||||
5FB1172E1E8DE5C800BB1B9B /* My Mind.entitlements */,
|
||||
5F5A1D341E8DB0F300BCE63D /* Info.plist */,
|
||||
5F5A1D281E8DB0F300BCE63D /* AppDelegate.swift */,
|
||||
5F5A1D2F1E8DB0F300BCE63D /* Assets.xcassets */,
|
||||
5FDAA1361E9483B200FF80D4 /* Classes */,
|
||||
5F5A1D311E8DB0F300BCE63D /* LaunchScreen.storyboard */,
|
||||
5F5A1D2C1E8DB0F300BCE63D /* Main.storyboard */,
|
||||
);
|
||||
path = "My Mind";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FCEBECD1E91A00900BA379D /* My MindTests */ = {
|
||||
5F5A1D3C1E8DB0F300BCE63D /* My MindTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FCEBECE1E91A00900BA379D /* My_MindTests.swift */,
|
||||
5FCEBED01E91A00900BA379D /* Info.plist */,
|
||||
5F5A1D3D1E8DB0F300BCE63D /* My_MindTests.swift */,
|
||||
5F5A1D3F1E8DB0F300BCE63D /* Info.plist */,
|
||||
);
|
||||
path = "My MindTests";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FCEBED81E91A00900BA379D /* My MindUITests */ = {
|
||||
5F5A1D471E8DB0F300BCE63D /* My MindUITests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FCEBED91E91A00900BA379D /* My_MindUITests.swift */,
|
||||
5FCEBEDB1E91A00900BA379D /* Info.plist */,
|
||||
5F5A1D481E8DB0F300BCE63D /* My_MindUITests.swift */,
|
||||
5F5A1D4A1E8DB0F400BCE63D /* Info.plist */,
|
||||
);
|
||||
path = "My MindUITests";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FCEBEED1E91A20D00BA379D /* OnBoarding Sequences */ = {
|
||||
5F5A1D671E8DB2A300BCE63D /* AmazonAws */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FCEBEE91E91A0B800BA379D /* OnBoard.storyboard */,
|
||||
5FCEBEEB1E91A20100BA379D /* OnBoardingController.swift */,
|
||||
5FCEBF041E91A81000BA379D /* WelcomeScreenViews.swift */,
|
||||
5F5A1D681E8DB2A300BCE63D /* AWSConfiguration.swift */,
|
||||
5F5A1D691E8DB2A300BCE63D /* AWSMobileClient.swift */,
|
||||
5F5A1D6A1E8DB2A300BCE63D /* AWSMobileHubHelper.framework */,
|
||||
);
|
||||
name = "OnBoarding Sequences";
|
||||
name = AmazonAws;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FCEBEEE1E91A21900BA379D /* Login Sequences */ = {
|
||||
5F5A1D6E1E8DB2F000BCE63D /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FCEBEF21E91A25900BA379D /* Login.storyboard */,
|
||||
5FCEBEF41E91A27B00BA379D /* LoginViews.swift */,
|
||||
5FCEBF001E91A74100BA379D /* SignUpViews.swift */,
|
||||
5FE993351E92C3D4002B0FF6 /* OnlineViews.swift */,
|
||||
5F5A1D6F1E8DB2F100BCE63D /* libsqlite3.tbd */,
|
||||
5F5A1D701E8DB2F100BCE63D /* libz.tbd */,
|
||||
);
|
||||
name = "Login Sequences";
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5FCEBEEF1E91A22800BA379D /* Main Sequences */ = {
|
||||
5FDAA1361E9483B200FF80D4 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5FCEBEF01E91A25200BA379D /* Main.storyboard */,
|
||||
5FCEBEFA1E91A2A400BA379D /* AppointmentView.swift */,
|
||||
5FCEBEFE1E91A2BB00BA379D /* EmergencyView.swift */,
|
||||
5FCEBEF61E91A28800BA379D /* ForumView.swift */,
|
||||
5FCEBEF81E91A29D00BA379D /* ReferralViews.swift */,
|
||||
5FCEBEFC1E91A2B200BA379D /* SettingsView.swift */,
|
||||
5F5A1D671E8DB2A300BCE63D /* AmazonAws */,
|
||||
5FF972191E8DBA65007AE280 /* User Controller Group */,
|
||||
5FF972181E8DBA4C007AE280 /* Main Controller Group */,
|
||||
5FF9721C1E8DBAA6007AE280 /* OnBoarding Controller Group */,
|
||||
);
|
||||
name = "Main Sequences";
|
||||
name = Classes;
|
||||
path = AmazonAws;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A5B37CCAF9726F0EEDFD6142 /* Pods */ = {
|
||||
5FF72FE71E8DDECA00FFD64D /* UserPools */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
706096029E2D8926F6A27630 /* Pods-My Mind.debug.xcconfig */,
|
||||
4EB7D250E5F6F6ED4ECEE61D /* Pods-My Mind.release.xcconfig */,
|
||||
5FF72FE81E8DDECA00FFD64D /* SignInViewControllerExtensions.swift */,
|
||||
5FF72FE91E8DDECA00FFD64D /* UserPoolForgotPasswordViewController.swift */,
|
||||
5FF72FEA1E8DDECA00FFD64D /* UserPoolMFAViewController.swift */,
|
||||
5FF72FEB1E8DDECA00FFD64D /* UserPoolNewPasswordViewController.swift */,
|
||||
5FF72FED1E8DDECA00FFD64D /* UserPoolSignUpConfirmationViewController.swift */,
|
||||
5FF72FEE1E8DDECA00FFD64D /* UserPoolSignUpViewController.swift */,
|
||||
);
|
||||
name = Pods;
|
||||
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 */
|
||||
5FCEBEB51E91A00900BA379D /* My Mind */ = {
|
||||
5F5A1D241E8DB0F300BCE63D /* My Mind */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 5FCEBEDE1E91A00900BA379D /* Build configuration list for PBXNativeTarget "My Mind" */;
|
||||
buildConfigurationList = 5F5A1D4D1E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My Mind" */;
|
||||
buildPhases = (
|
||||
C7C5637EC49A098E10C2ABE0 /* [CP] Check Pods Manifest.lock */,
|
||||
5FCEBEB21E91A00900BA379D /* Sources */,
|
||||
5FCEBEB31E91A00900BA379D /* Frameworks */,
|
||||
5FCEBEB41E91A00900BA379D /* Resources */,
|
||||
5FA02E161E91F52C00C6F0A5 /* Embed Frameworks */,
|
||||
72970A95DE21C41243D290B0 /* [CP] Embed Pods Frameworks */,
|
||||
E3E2E445B46619A044835673 /* [CP] Copy Pods Resources */,
|
||||
5F5A1D211E8DB0F300BCE63D /* Sources */,
|
||||
5F5A1D221E8DB0F300BCE63D /* Frameworks */,
|
||||
5F5A1D231E8DB0F300BCE63D /* Resources */,
|
||||
5F5A1D651E8DB26200BCE63D /* Embed Frameworks */,
|
||||
5F5A1D661E8DB27100BCE63D /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -248,58 +305,57 @@
|
||||
);
|
||||
name = "My Mind";
|
||||
productName = "My Mind";
|
||||
productReference = 5FCEBEB61E91A00900BA379D /* My Mind.app */;
|
||||
productReference = 5F5A1D251E8DB0F300BCE63D /* My Mind.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
5FCEBEC91E91A00900BA379D /* My MindTests */ = {
|
||||
5F5A1D381E8DB0F300BCE63D /* My MindTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 5FCEBEE11E91A00900BA379D /* Build configuration list for PBXNativeTarget "My MindTests" */;
|
||||
buildConfigurationList = 5F5A1D501E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My MindTests" */;
|
||||
buildPhases = (
|
||||
5FCEBEC61E91A00900BA379D /* Sources */,
|
||||
5FCEBEC71E91A00900BA379D /* Frameworks */,
|
||||
5FCEBEC81E91A00900BA379D /* Resources */,
|
||||
5F5A1D351E8DB0F300BCE63D /* Sources */,
|
||||
5F5A1D361E8DB0F300BCE63D /* Frameworks */,
|
||||
5F5A1D371E8DB0F300BCE63D /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
5FCEBECC1E91A00900BA379D /* PBXTargetDependency */,
|
||||
5F5A1D3B1E8DB0F300BCE63D /* PBXTargetDependency */,
|
||||
);
|
||||
name = "My MindTests";
|
||||
productName = "My MindTests";
|
||||
productReference = 5FCEBECA1E91A00900BA379D /* My MindTests.xctest */;
|
||||
productReference = 5F5A1D391E8DB0F300BCE63D /* My MindTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
5FCEBED41E91A00900BA379D /* My MindUITests */ = {
|
||||
5F5A1D431E8DB0F300BCE63D /* My MindUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 5FCEBEE41E91A00900BA379D /* Build configuration list for PBXNativeTarget "My MindUITests" */;
|
||||
buildConfigurationList = 5F5A1D531E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My MindUITests" */;
|
||||
buildPhases = (
|
||||
5FCEBED11E91A00900BA379D /* Sources */,
|
||||
5FCEBED21E91A00900BA379D /* Frameworks */,
|
||||
5FCEBED31E91A00900BA379D /* Resources */,
|
||||
5F5A1D401E8DB0F300BCE63D /* Sources */,
|
||||
5F5A1D411E8DB0F300BCE63D /* Frameworks */,
|
||||
5F5A1D421E8DB0F300BCE63D /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
5FCEBED71E91A00900BA379D /* PBXTargetDependency */,
|
||||
5F5A1D461E8DB0F300BCE63D /* PBXTargetDependency */,
|
||||
);
|
||||
name = "My MindUITests";
|
||||
productName = "My MindUITests";
|
||||
productReference = 5FCEBED51E91A00900BA379D /* My MindUITests.xctest */;
|
||||
productReference = 5F5A1D441E8DB0F300BCE63D /* My MindUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.ui-testing";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
5FCEBEAE1E91A00900BA379D /* Project object */ = {
|
||||
5F5A1D1D1E8DB0F300BCE63D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0830;
|
||||
LastUpgradeCheck = 0830;
|
||||
ORGANIZATIONNAME = "Alexander Davis";
|
||||
TargetAttributes = {
|
||||
5FCEBEB51E91A00900BA379D = {
|
||||
5F5A1D241E8DB0F300BCE63D = {
|
||||
CreatedOnToolsVersion = 8.3;
|
||||
DevelopmentTeam = 28CC8SCVUN;
|
||||
ProvisioningStyle = Automatic;
|
||||
SystemCapabilities = {
|
||||
com.apple.BackgroundModes = {
|
||||
@@ -313,61 +369,60 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
5FCEBEC91E91A00900BA379D = {
|
||||
5F5A1D381E8DB0F300BCE63D = {
|
||||
CreatedOnToolsVersion = 8.3;
|
||||
DevelopmentTeam = 28CC8SCVUN;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = 5FCEBEB51E91A00900BA379D;
|
||||
TestTargetID = 5F5A1D241E8DB0F300BCE63D;
|
||||
};
|
||||
5FCEBED41E91A00900BA379D = {
|
||||
5F5A1D431E8DB0F300BCE63D = {
|
||||
CreatedOnToolsVersion = 8.3;
|
||||
DevelopmentTeam = 28CC8SCVUN;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = 5FCEBEB51E91A00900BA379D;
|
||||
TestTargetID = 5F5A1D241E8DB0F300BCE63D;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 5FCEBEB11E91A00900BA379D /* Build configuration list for PBXProject "My Mind" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
buildConfigurationList = 5F5A1D201E8DB0F300BCE63D /* Build configuration list for PBXProject "My Mind" */;
|
||||
compatibilityVersion = "Xcode 8.0";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 5FCEBEAD1E91A00900BA379D;
|
||||
productRefGroup = 5FCEBEB71E91A00900BA379D /* Products */;
|
||||
mainGroup = 5F5A1D1C1E8DB0F300BCE63D;
|
||||
productRefGroup = 5F5A1D261E8DB0F300BCE63D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
5FCEBEB51E91A00900BA379D /* My Mind */,
|
||||
5FCEBEC91E91A00900BA379D /* My MindTests */,
|
||||
5FCEBED41E91A00900BA379D /* My MindUITests */,
|
||||
5F5A1D241E8DB0F300BCE63D /* My Mind */,
|
||||
5F5A1D381E8DB0F300BCE63D /* My MindTests */,
|
||||
5F5A1D431E8DB0F300BCE63D /* My MindUITests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
5FCEBEB41E91A00900BA379D /* Resources */ = {
|
||||
5F5A1D231E8DB0F300BCE63D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5FCEBEEA1E91A0B800BA379D /* OnBoard.storyboard in Resources */,
|
||||
5FCEBEC41E91A00900BA379D /* LaunchScreen.storyboard in Resources */,
|
||||
5FCEBEC11E91A00900BA379D /* Assets.xcassets in Resources */,
|
||||
5FCEBEF31E91A25900BA379D /* Login.storyboard in Resources */,
|
||||
5FCEBEF11E91A25200BA379D /* Main.storyboard in Resources */,
|
||||
5F5A1D331E8DB0F300BCE63D /* LaunchScreen.storyboard in Resources */,
|
||||
5F5A1D571E8DB24C00BCE63D /* Sdk in Resources */,
|
||||
5F5A1D301E8DB0F300BCE63D /* Assets.xcassets in Resources */,
|
||||
5F5A1D2E1E8DB0F300BCE63D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5FCEBEC81E91A00900BA379D /* Resources */ = {
|
||||
5F5A1D371E8DB0F300BCE63D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5FCEBED31E91A00900BA379D /* Resources */ = {
|
||||
5F5A1D421E8DB0F300BCE63D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -377,108 +432,90 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
72970A95DE21C41243D290B0 /* [CP] Embed Pods Frameworks */ = {
|
||||
5F5A1D661E8DB27100BCE63D /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
C7C5637EC49A098E10C2ABE0 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
E3E2E445B46619A044835673 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-My Mind/Pods-My Mind-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework/strip-frameworks.sh\"";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
5FCEBEB21E91A00900BA379D /* Sources */ = {
|
||||
5F5A1D211E8DB0F300BCE63D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5FCEBEFF1E91A2BB00BA379D /* EmergencyView.swift in Sources */,
|
||||
5FCEBEFD1E91A2B200BA379D /* SettingsView.swift in Sources */,
|
||||
5FCEBEEC1E91A20100BA379D /* OnBoardingController.swift in Sources */,
|
||||
5FCEBEBA1E91A00900BA379D /* AppDelegate.swift in Sources */,
|
||||
5FCEBEF91E91A29D00BA379D /* ReferralViews.swift in Sources */,
|
||||
5FCEBF051E91A81000BA379D /* WelcomeScreenViews.swift in Sources */,
|
||||
5FCEBEF71E91A28800BA379D /* ForumView.swift in Sources */,
|
||||
5FCEBEFB1E91A2A400BA379D /* AppointmentView.swift in Sources */,
|
||||
5FCEBF011E91A74100BA379D /* SignUpViews.swift in Sources */,
|
||||
5FE993361E92C3D4002B0FF6 /* OnlineViews.swift in Sources */,
|
||||
5FCEBEF51E91A27B00BA379D /* LoginViews.swift in Sources */,
|
||||
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;
|
||||
};
|
||||
5FCEBEC61E91A00900BA379D /* Sources */ = {
|
||||
5F5A1D351E8DB0F300BCE63D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5FCEBECF1E91A00900BA379D /* My_MindTests.swift in Sources */,
|
||||
5F5A1D3E1E8DB0F300BCE63D /* My_MindTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
5FCEBED11E91A00900BA379D /* Sources */ = {
|
||||
5F5A1D401E8DB0F300BCE63D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5FCEBEDA1E91A00900BA379D /* My_MindUITests.swift in Sources */,
|
||||
5F5A1D491E8DB0F300BCE63D /* My_MindUITests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
5FCEBECC1E91A00900BA379D /* PBXTargetDependency */ = {
|
||||
5F5A1D3B1E8DB0F300BCE63D /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5FCEBEB51E91A00900BA379D /* My Mind */;
|
||||
targetProxy = 5FCEBECB1E91A00900BA379D /* PBXContainerItemProxy */;
|
||||
target = 5F5A1D241E8DB0F300BCE63D /* My Mind */;
|
||||
targetProxy = 5F5A1D3A1E8DB0F300BCE63D /* PBXContainerItemProxy */;
|
||||
};
|
||||
5FCEBED71E91A00900BA379D /* PBXTargetDependency */ = {
|
||||
5F5A1D461E8DB0F300BCE63D /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 5FCEBEB51E91A00900BA379D /* My Mind */;
|
||||
targetProxy = 5FCEBED61E91A00900BA379D /* PBXContainerItemProxy */;
|
||||
target = 5F5A1D241E8DB0F300BCE63D /* My Mind */;
|
||||
targetProxy = 5F5A1D451E8DB0F300BCE63D /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
5FCEBEC21E91A00900BA379D /* LaunchScreen.storyboard */ = {
|
||||
5F5A1D2C1E8DB0F300BCE63D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
5FCEBEC31E91A00900BA379D /* Base */,
|
||||
5F5A1D2D1E8DB0F300BCE63D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5F5A1D311E8DB0F300BCE63D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
5F5A1D321E8DB0F300BCE63D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
@@ -486,7 +523,7 @@
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
5FCEBEDC1E91A00900BA379D /* Debug */ = {
|
||||
5F5A1D4B1E8DB0F400BCE63D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
@@ -536,7 +573,7 @@
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5FCEBEDD1E91A00900BA379D /* Release */ = {
|
||||
5F5A1D4C1E8DB0F400BCE63D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
@@ -579,58 +616,57 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5FCEBEDF1E91A00900BA379D /* Debug */ = {
|
||||
5F5A1D4E1E8DB0F400BCE63D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 706096029E2D8926F6A27630 /* Pods-My Mind.debug.xcconfig */;
|
||||
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",
|
||||
"$(PROJECT_DIR)/My\\ Mind",
|
||||
"$(PROJECT_DIR)/My\\ Mind",
|
||||
"$(PROJECT_DIR)/My\\ Mind",
|
||||
"$(PROJECT_DIR)/Pods",
|
||||
"$(PROJECT_DIR)",
|
||||
"$(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";
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-Mind";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5FCEBEE01E91A00900BA379D /* Release */ = {
|
||||
5F5A1D4F1E8DB0F400BCE63D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 4EB7D250E5F6F6ED4ECEE61D /* Pods-My Mind.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = "My Mind/My Mind.entitlements";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer: Alexander Davis (6S4KYV4QU7)";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = 28CC8SCVUN;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/My\\ Mind",
|
||||
"$(PROJECT_DIR)/My\\ Mind",
|
||||
"$(PROJECT_DIR)/My\\ Mind",
|
||||
"$(PROJECT_DIR)/My\\ Mind",
|
||||
"$(PROJECT_DIR)/Pods",
|
||||
"$(PROJECT_DIR)",
|
||||
"$(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";
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ADCMNetworks.My-Mind";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5FCEBEE21E91A00900BA379D /* Debug */ = {
|
||||
5F5A1D511E8DB0F400BCE63D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
@@ -645,7 +681,7 @@
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5FCEBEE31E91A00900BA379D /* Release */ = {
|
||||
5F5A1D521E8DB0F400BCE63D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
@@ -660,7 +696,7 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5FCEBEE51E91A00900BA379D /* Debug */ = {
|
||||
5F5A1D541E8DB0F400BCE63D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
@@ -674,7 +710,7 @@
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5FCEBEE61E91A00900BA379D /* Release */ = {
|
||||
5F5A1D551E8DB0F400BCE63D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
@@ -691,43 +727,43 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
5FCEBEB11E91A00900BA379D /* Build configuration list for PBXProject "My Mind" */ = {
|
||||
5F5A1D201E8DB0F300BCE63D /* Build configuration list for PBXProject "My Mind" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5FCEBEDC1E91A00900BA379D /* Debug */,
|
||||
5FCEBEDD1E91A00900BA379D /* Release */,
|
||||
5F5A1D4B1E8DB0F400BCE63D /* Debug */,
|
||||
5F5A1D4C1E8DB0F400BCE63D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
5FCEBEDE1E91A00900BA379D /* Build configuration list for PBXNativeTarget "My Mind" */ = {
|
||||
5F5A1D4D1E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My Mind" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5FCEBEDF1E91A00900BA379D /* Debug */,
|
||||
5FCEBEE01E91A00900BA379D /* Release */,
|
||||
5F5A1D4E1E8DB0F400BCE63D /* Debug */,
|
||||
5F5A1D4F1E8DB0F400BCE63D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
5FCEBEE11E91A00900BA379D /* Build configuration list for PBXNativeTarget "My MindTests" */ = {
|
||||
5F5A1D501E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My MindTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5FCEBEE21E91A00900BA379D /* Debug */,
|
||||
5FCEBEE31E91A00900BA379D /* Release */,
|
||||
5F5A1D511E8DB0F400BCE63D /* Debug */,
|
||||
5F5A1D521E8DB0F400BCE63D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
5FCEBEE41E91A00900BA379D /* Build configuration list for PBXNativeTarget "My MindUITests" */ = {
|
||||
5F5A1D531E8DB0F400BCE63D /* Build configuration list for PBXNativeTarget "My MindUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
5FCEBEE51E91A00900BA379D /* Debug */,
|
||||
5FCEBEE61E91A00900BA379D /* Release */,
|
||||
5F5A1D541E8DB0F400BCE63D /* Debug */,
|
||||
5F5A1D551E8DB0F400BCE63D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 5FCEBEAE1E91A00900BA379D /* Project object */;
|
||||
rootObject = 5F5A1D1D1E8DB0F300BCE63D /* Project object */;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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>
|
||||
@@ -14,7 +14,7 @@
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5FCEBEB51E91A00900BA379D"
|
||||
BlueprintIdentifier = "5F5A1D241E8DB0F300BCE63D"
|
||||
BuildableName = "My Mind.app"
|
||||
BlueprintName = "My Mind"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
@@ -32,7 +32,7 @@
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5FCEBEC91E91A00900BA379D"
|
||||
BlueprintIdentifier = "5F5A1D381E8DB0F300BCE63D"
|
||||
BuildableName = "My MindTests.xctest"
|
||||
BlueprintName = "My MindTests"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
@@ -42,7 +42,7 @@
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5FCEBED41E91A00900BA379D"
|
||||
BlueprintIdentifier = "5F5A1D431E8DB0F300BCE63D"
|
||||
BuildableName = "My MindUITests.xctest"
|
||||
BlueprintName = "My MindUITests"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
@@ -52,7 +52,7 @@
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5FCEBEB51E91A00900BA379D"
|
||||
BlueprintIdentifier = "5F5A1D241E8DB0F300BCE63D"
|
||||
BuildableName = "My Mind.app"
|
||||
BlueprintName = "My Mind"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
@@ -75,7 +75,7 @@
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5FCEBEB51E91A00900BA379D"
|
||||
BlueprintIdentifier = "5F5A1D241E8DB0F300BCE63D"
|
||||
BuildableName = "My Mind.app"
|
||||
BlueprintName = "My Mind"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
@@ -94,7 +94,7 @@
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5FCEBEB51E91A00900BA379D"
|
||||
BlueprintIdentifier = "5F5A1D241E8DB0F300BCE63D"
|
||||
BuildableName = "My Mind.app"
|
||||
BlueprintName = "My Mind"
|
||||
ReferencedContainer = "container:My Mind.xcodeproj">
|
||||
|
||||
@@ -12,17 +12,17 @@
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>5FCEBEB51E91A00900BA379D</key>
|
||||
<key>5F5A1D241E8DB0F300BCE63D</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>5FCEBEC91E91A00900BA379D</key>
|
||||
<key>5F5A1D381E8DB0F300BCE63D</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>5FCEBED41E91A00900BA379D</key>
|
||||
<key>5F5A1D431E8DB0F300BCE63D</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
|
||||
10
My Mind/My Mind.xcworkspace/contents.xcworkspacedata
generated
10
My Mind/My Mind.xcworkspace/contents.xcworkspacedata
generated
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:My Mind.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
Binary file not shown.
29
My Mind/My Mind/AmazonAws/AWSConfiguration.swift
Executable file
29
My Mind/My Mind/AmazonAws/AWSConfiguration.swift
Executable file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// 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"
|
||||
110
My Mind/My Mind/AmazonAws/AWSMobileClient.swift
Executable file
110
My Mind/My Mind/AmazonAws/AWSMobileClient.swift
Executable file
@@ -0,0 +1,110 @@
|
||||
//
|
||||
// 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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
BIN
My Mind/My Mind/AmazonAws/AWSMobileHubHelper.framework/AWSMobileHubHelper
Executable file
BIN
My Mind/My Mind/AmazonAws/AWSMobileHubHelper.framework/AWSMobileHubHelper
Executable file
Binary file not shown.
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// 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
|
||||
140
My Mind/My Mind/AmazonAws/AWSMobileHubHelper.framework/Headers/AWSCloudLogic.h
Executable file
140
My Mind/My Mind/AmazonAws/AWSMobileHubHelper.framework/Headers/AWSCloudLogic.h
Executable file
@@ -0,0 +1,140 @@
|
||||
//
|
||||
// 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
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// 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
|
||||
@@ -0,0 +1,601 @@
|
||||
//
|
||||
// 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
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// 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
|
||||
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// 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
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// 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
|
||||
@@ -0,0 +1,118 @@
|
||||
//
|
||||
// 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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user