CodeBloke
CodeBloke

Reputation: 71

How to add expected version for a forked and modified public pod?

I need to use Amazon's Amplify iOS pod, but because of certain application extension-unsafe code in the pod, I need to modify that code if I want to publish my app.

What I've done is:

  1. Forked https://github.com/aws-amplify/amplify-ios into my own repo
  2. Checked out a new branch, made my code changes, and then committed and pushed my changes to remote
  3. In my actual apps podfile, changed the reference to amplify from pod 'Amplify' to pod 'Amplify', :git => 'https://github.com/[my organization]/amplify-ios.git', :commit => '[commit identifier of the changed code]'
  4. pod install in my local app repo

What then happens is the following complaint:

    [!] CocoaPods could not find compatible versions for pod "Amplify":
  In Podfile:
    Amplify (from `https://github.com/[my org repo]/amplify-ios.git`, commit `[commit identifier of changed code commit]`)

    AmplifyPlugins/AWSCognitoAuthPlugin was resolved to 1.13.4, which depends on
      AWSPluginsCore (= 1.13.4) was resolved to 1.13.4, which depends on
        Amplify (= 1.13.4)

When I look in forked repo, none of the releases from the original repo are copied over. What is the correct way to provide the version for my forked pod such that dependency complaints don't occur?

Upvotes: 1

Views: 113

Answers (1)

Paul Beusterien
Paul Beusterien

Reputation: 29572

From the error message, it looks like your Podfile is also depending on AmplifyPluginsCore which depends on the original Amplify version which is no longer available because the forked pod does not include that version.

Upvotes: 1

Related Questions