How to check pods for target membership when archiving?
The situation is like this:
- I create an app using name
Example App, having one target with bundle ID
- I install pod
- I import
Reachabilitymodule into my Swift source code with no problem.
- I build, archive the app, and export it using Adhoc mode with no problem.
- After that, I'm required to make it a dev version and UAT version.
- So I duplicate the target.
- I renamed one into
Dev Example App, and the other one as
UAT Example App. I used
com.company.uatexamplebundle ID respectively.
- I added both target to the Pod file, using the same pods settings.
- I run
pod installto 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.)
- I create build scheme for both targets.
- I deleted the
Pods_Example.frameworkfrom the Framework folders. I then proceed to run Build to build the
Pods_UAT_Example.frameworkwith no problem.
- 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.
- 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...