-
Store and keep track of all the changes while developing the iPad app for the atelier Agnieszka Światły.
-
Deployment Target:
13.0
-
Version:
4.0
.
What you need to run this app:
-
Mac
runningmacOS Catalina
. -
Swift
andXcode
. -
Ensure you're running the latest versions macOS
10.xx.x
, Swift5.x
and Xcode11.x.x
.
Note: Xcode is not strictly required, but is highly recommended. All dependencies required to run the project (including Swift) will be installed automatically by Xcode.
After you have installed Xcode and all dependencies, you can now run the app. For that, you need to select a destination to run the project into. This can be either through a Simulator
provided by Xcode, or your own iPhone device plugged to the computer via USB.
Note: In order to be able, you need to sign in with Apple ID, so Xcode will use the development certificate. To review your Apple ID and profile, check
https://developer.apple.com/membercenter/
After selecting preferred destination, click on Product > Run
or key Cmd+R
.
-
Go to
Project/Targets > Catalog
. Make sure thatVersion
is the same set on App Store Connect. -
Go to
Product > Scheme > Edit Scheme
or keyCmd+<
. SelectArchive
and check thatBuild Configuration
is set toRelease
.
Click on Product > Archive
Note: The Archive feature is disabled if you are using a Simulator. Select
Generic iOS Device
or your own devide as destination
On the Organizer
window that will be shown after archiving, Click on Validate...
to check if there are any issues, oron Upload to App Store...
to release the build to App Store Connect.
This app supports Localization, currently in two languages: English
and Spanish
. In order to run the app in one specific language, go to Product > Scheme > Edit Scheme
or key Cmd+<
. Select Run
and select on Application Language
the preferred one.
Note: If the language selected is not supported, default language (English) will be displayed.
Any extensions needed for the project, shall try to be stored in separate files, so it can be reused freely when needed
For example, if we would like to create an extension for String:
-
Create a
String+<ExtensionName>.swift
file in theKalisten/utils/extensions
directory. -
Configure inside such file the behaviour of the extension.
-
Remember to
import Foundation
before declaring theextension String{}
.
import Foundation
extension String {
func myExtension() -> String {
//Code here...
}
}
- Then, when willing to use this extension, simply proceed as follows:
const myString: String = 'string content';
const newString: String = myString.myExtension();
As mentioned, Xcode provides a lot of facilities and transparency when it comes to develop applications using Swift. That said, there are other great editors which can also be used to develop Swift apps:
This app supports CocoaPods, so third parties from this dependency manager can be added.
Simply run the command below to install CocoaPods, using sudo
if required:
$ sudo gem install cocoapods
In the root directory, there is a Podfile, which shall have a format similar to the one that follows:
platform :ios, '8.0'
use_frameworks!
target 'Catalog' do
pod 'AFNetworking', '~> 2.6'
pod 'ORStackView', '~> 3.0'
pod 'SwiftyJSON', '~> 2.3'
end
Note: If there would not be such file, you can simply create one with the command
pod init
Now, to install all dependencies listed in the Podfile in the project:
$ pod install
Make sure you use the Xcode workspace file Catalog.xcworkspace
, instead of the default one, every time you open the project.
Now you can import your dependencies e.g.:
#import <Reachability/Reachability.h>
For more information about Cocoa Pods, check the full guide.
The following are some things that will make the build compile fail.
Don't useCatalog.xcworkspace
as file to open the project.- Don't install dependencies being used.
- Don't import properly dependencies and being in use
- Use deprecated syntax from elder versions of Swift. Refer to Swift Documentation for more info.
- iOS Developer: Pedro Solis Garcia ([email protected])
- Backend Developer: José Antonio Jiménez Hernández ([email protected])