Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module when Archiving in Xcode, but module is found during "Run"

Tags:

xcode

ios

swift

I installed Heap Analytics manually by copy and pasting the files over (and then added it to bridging header).

When I run on a device, everything builds fine. However, when I archive, the error is "No such module Heap".

Why is Archiving different than Running? Am I missing some configuration during the archiving process? As far as I know, nothing has been touched.

like image 849
TIMEX Avatar asked Jul 02 '15 18:07

TIMEX


People also ask

What does Xcode archive do?

Overview. When you choose Product > Archive, Xcode creates an archive of your app that will appear in the Archives organizer. If the Archives organizer reports your archive as an app archive, then you can validate or distribute it.


2 Answers

I work for Heap and want to pass along that the poster ultimately found that deleting the data in the DerivedData folder cleared up the error:

rm -frd ~/Library/Developer/Xcode/DerivedData/*
like image 159
jmc Avatar answered Oct 02 '22 18:10

jmc


I could not compile the line: @import JavaScriptCore; and the error given was Module 'JavaScriptCore' not found. For me it was only necessary to delete the folder: ModuleCache.
The path was: ~/Library/Developer/Xcode/DerivedData/ModuleCache/

In Terminal: rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache/*

like image 23
Sverrisson Avatar answered Oct 02 '22 19:10

Sverrisson