Skip to content

Instantly share code, notes, and snippets.

@quellish
Created June 28, 2018 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quellish/a1b9d85d9a9e5aee80fbc8a0f6f539cf to your computer and use it in GitHub Desktop.
Save quellish/a1b9d85d9a9e5aee80fbc8a0f6f539cf to your computer and use it in GitHub Desktop.
CocoaPods conversion to Submodules Specs
  1. WordPress-iOS project must build and run all targets correctly.
  2. All dependencies must be using the version specified in the original Podfile.
  3. All work must be based on WordPress-iOS repository version 72862f6651bf5dbe77235e836607bc74717f7d21.

The WordPress-iOS app repository is: https://github.com/wordpress-mobile/WordPress-iOS

Fork or clone and create a branch for this work.

Go through the existing Podfile. For each pod listed:

  1. Locate the correct github repository for the pod source.
    • Search on https://cocoapods.org by the name of the pod.
    • On the search result, click on "View Podspec". This will in most cases have the URL of the repository that contains the source
  2. Create a git submodule within the project directory
    • git submodule add https://github.com/user/PodSource.git PodSource
  3. Make sure the submodule is using the correct version of the source
    • Most pods use tags for versioning
    • Get all the tags: cd PodSource; git fetch --all --tags --prune
    • The version number should be listed in the original Podfile
    • Check out the correct tag git checkout tags/1.0

Once all of the pods exist as submodules integrate each with the original project. Each submodule should build a dynamic framework. Dynamic frameworks should be correctly built, embedded, and linked. DO NOT just include the source in the WordPress-iOS targets!

There should be NO source changes made to either dependencies (submodules) OR the original project.

When all of the pods are integrated with the targets that require them the project should build correctly. Each target must build both clean and incrementally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment