How to check pods for target membership when archiving?

The situation is like this:

  1. I create an app using name Example App, having one target with bundle ID
  2. I install pod Reachability
  3. I import Reachability module into my Swift source code with no problem.
  4. I build, archive the app, and export it using Adhoc mode with no problem.
  5. After that, I'm required to make it a dev version and UAT version.
  6. So I duplicate the target.
  7. I renamed one into Dev Example App, and the other one as UAT Example App. I used and bundle ID respectively.
  8. I added both target to the Pod file, using the same pods settings.
  9. I run pod install to make both targets own all the pods. (Actually, I don't know how to make a pod become a target membership of a target in Xcode, so I do this instead to make sure every pod is a target membership of every targets.)
  10. I create build scheme for both targets.
  11. I deleted the Pods_Example.framework from the Framework folders. I then proceed to run Build to build the Pods_Dev_Example.framework and Pods_UAT_Example.framework with no problem.
  12. But when I tried to archive the dev app, I get error "No such module 'Reachability.swift'". I have tried cleaning project build, reinstall pod, etc, with no result.
  13. Magically, I can archive the UAT version and export it using Adhoc mode with no problem.

Can anybody give solution for this situation? I suspect this is the problem of pods target membership, hence the question. But it could be because of something else that I don't know about.

EDIT, SOLVED: It looks like I just need to restart the Xcode, clean the project folder, build, and archive again. Voila, the error is gone. So the solution was just to restart Xcode. My hair is getting thin from being pulled out...