-
Notifications
You must be signed in to change notification settings - Fork 8
iOS 1.x
Cohen Adair edited this page Oct 10, 2021
·
1 revision
- Setup
- Uploading to iTunes Connect
- TestFlight distribution
- Xcode
- Adding user defines
- Core Data
- Fork and clone the Anglers' Log repository
- Make sure Cocoapods is installed on your machine
- Run
pod install
on theanglers-log/ios/
directory - Open
AnglersLog.xcworkspace
- Build project
Once the built app is uploaded to iTunes Connect it can be distributed through TestFlight for beta testing, or through the App Store for full release.
- In Xcode, update the build string
- Review archive scheme
- Product > Scheme > Edit Scheme...
- Archive
- Release
- Close
- Create archive
- Choose iOS Device in the Scheme toolbar (an archive cannot be created from a simulator build)
- Product > Archive
- Validate
- In the Archives Organizer, select the new archive
- Click Validate
- Fix validations issues (if applicable) and validate again
- In the Archives Organizer, select the archive you want to upload
- Submit
- If no issues are found, continue to submit
- In iTunes Connect, click Prereleases
- Click the version number of the build you want to test
- Click TestFlight and fill out the form
- Go back to Prereleases and add testers
- Submit for review
- Click Submit for Beta App Review
- When approved, invite external testers
-
Close Xcode
-
Rename the desired source code folder(s)
-
Right click
*.xcodeproj
file and click Show Package Contents -
Open
project.pbxproj
in Xcode -
Find and replace the old folder(s) name with the new folder's name
-
Save
-
Open Xcode
-
If necessary, manually fix new folder(s) paths
Note that this is an annoying process and requires a lot of fine detail. Code should be refactored in the future to make this process easier.
See Core Data
- Add a new
UDN_
prefixed constant for the new user define
- Create the new file in the format
CMAUserDefineName
- Class must
- Conform to the
CMAUserDefineProtocol
- Be a subclass of
CMAUserDefineObject
- Conform to the
- See
CMAWaterClarity
orCMAFishingMethod
for starting examples - If the new class has statistical components it should include
-(void)incStatPropertyName
-(void)decStatPropertyName
- If the new user define will not have it's own view controller, add a condition for it in
-emptyObjectNamed:
- Add a
NSMutableOrderedSet
property for the new user define
- Add a new property as applicable
// single
@property (strong, nonatomic)CMAWaterClarity *waterClarity;
// multiple
@property (strong, nonatomic)NSMutableOrderedSet *fishingMethods;
- Add observer for the new user define property in
-addObservers
- Confirm it is handled properly in
-observeValueForKeyPath:
- Use Google Icons if possible, fallback on Icons8
- Save 100x100 icon to
Images/LargeIcons
- Save 50x50 icon to
Images/Icons
- Add a new table cell if applicable
Note that the cell's label text needs to be exactly the same as the declared
UDN_
constant (see Constant.h, .m
- Add segue from new side menu cell to either (whichever is applicable)
-
CMAUserDefinesViewController
(not the embeddedUINavigationController
) - If the user define requires it's own view controller
- Create a new view controller
- Add segue to the new view controller
-
- Add segue
isEqualToString:
message send to-userDefineFromSelectedCell
- Add
else if
statement in-initNoXView
- Add the new user define to the Add Entry scene if applicable
- Create necessary segues
- Add
CMAEntry
property to-initializeCellsForEditing
- Add user define to
-prepareForSegue:sender:
- Add
CMAEntry
property to-checkUserInputAndSetEntry:
- Stat properties need to be
- Reset in
-countStatistics
- Handled in
-incStatsForEntry:
anddecStatsForEntry:
- Reset in
- Handle the new user define in the importing and exporting methods for both the user define and the entry (if applicable)
- For exporting, the entry should only hold the name of the user define, not the entire object
- Add an entity keeping the same naming conventions
- Auto-generate the
NSManagedObject
file, or use an existing file as a template- If the new entity is also a new user define, see Adding user defines
- Add a
CDE_
prefixed constant for the new entity
- Add initializer for the new entity; use existing methods as examples
- Add debugging
- Method to the debugging section
- Call the new method in
-debugCoreDataObjects:
- Anytime the entity’s initializer method is called, you must delete it from core data if the user, for example, cancels an Add Entry scene
- Use
-deleteManagedObject:
ofCMAStorageManager
singleton to delete core data objects that are no longer needed
- Use
- When making relationship connects, only one end of the relationship needs to be set; the other is set automatically
- Example: Setting a
CMAImage
'sentry
property will automatically add it to theCMAEntry
's images set
- Example: Setting a