Skip to content

iOS 1.x

Cohen Adair edited this page Oct 10, 2021 · 1 revision

Contents

  • Fork and clone the Anglers' Log repository
  • Make sure Cocoapods is installed on your machine
  • Run pod install on the anglers-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.

  1. In Xcode, update the build string
  2. Review archive scheme
  • Product > Scheme > Edit Scheme...
  • Archive
  • Release
  • Close
  1. Create archive
  • Choose iOS Device in the Scheme toolbar (an archive cannot be created from a simulator build)
  • Product > Archive
  1. Validate
  • In the Archives Organizer, select the new archive
  • Click Validate
  • Fix validations issues (if applicable) and validate again
  1. In the Archives Organizer, select the archive you want to upload
  2. Submit
  3. If no issues are found, continue to submit

TestFlight distribution

  1. In iTunes Connect, click Prereleases
  2. Click the version number of the build you want to test
  3. Click TestFlight and fill out the form
  4. Go back to Prereleases and add testers
  5. Submit for review
  • Click Submit for Beta App Review
  • When approved, invite external testers

Xcode

Renaming a source code folder

  1. Close Xcode

  2. Rename the desired source code folder(s)

  3. Right click *.xcodeproj file and click Show Package Contents

  4. Open project.pbxproj in Xcode

  5. Find and replace the old folder(s) name with the new folder's name

    example.png

  6. Save

  7. Open Xcode

  8. If necessary, manually fix new folder(s) paths

Adding user defines

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
  • See CMAWaterClarity or CMAFishingMethod 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:

<name="adding-user-defines-side-menu-new-icons">Add new icon images

  • Use Google Icons if possible, fallback on Icons8
  • Save 100x100 icon to Images/LargeIcons
  • Save 50x50 icon to Images/Icons

<name="adding-user-defines-side-menu-storyboard">Storyboard

  • 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)
    1. CMAUserDefinesViewController (not the embedded UINavigationController)
    2. If the user define requires it's own view controller
    • Create a new view controller
    • Add segue to the new view controller

<name="adding-user-defines-side-menu-view-controller">CMASideMenuViewController.m

  • 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: and decStatsForEntry:
  • 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
  • Add a CDE_ prefixed constant for the new entity
  • 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: of CMAStorageManager singleton to delete core data objects that are no longer needed
  • When making relationship connects, only one end of the relationship needs to be set; the other is set automatically
    • Example: Setting a CMAImage's entry property will automatically add it to the CMAEntry's images set