Why Am I Not Able To Embed My Custom Framework?


I have a very simple framework project, MyFramework, that builds successfully. The framework defines a single, global function, myFunction. The framework also defines 2 global variables: MyFrameworkVersionNumber and MyFrameworkVersionString (These 2 variables were created for me by Xcode)

I have a very simple application project, MyApplication. I am adding the framework to the application project by dragging and dropping the framework package (i.e. the MyFramework.framework in DerivedData that was produced by building the framework) onto the Xcode Navigator and then selecting the framework in the Embedded Binaries section of the project's General tab.

If I add code to MyApplication that references the variable MyFrameworkVersionNumber then I am able to successfully build and run MyApplication.

If I add code to MyApplication that references the function myFunction then I am not able to build MyApplication.

<hr />

<strong>First Update</strong>

<hr />

I suddenly remembered that Carthage does exactly what I am trying to do. So, I used Carthage to build MyFramework and Voila! - I can drag/drop the Carthage build of the framework into the application project and successfully use it. So now my inquiry has become: What does Carthage know that I do not?


Oh for heaven's sake! It turned out to be so simple. MyFramework was being built for a Generic iOS Device (arm64 architecture). MyApplication was being built for a simulator (x86_64 architecture). As soon as I matched those two up all was well. The reason that the Carthage build worked so well is that it produces a universal binary (i.e. one that contains both architectures).

I still do not understand why the MyFrameworkVersionNumber global variable was able to be accessed regardless of the architecture. But I am okay with deferring that little mystery as some arcane bit of information that will be revealed in the goodness of time (perhaps something such as that it is in a header that is structured the same for both architectures).


  • Using Onsen, how to write server side code in NodeJs that will render Jade files as HTML in a splitt
  • What's wrong with my search that doesn't display their marker in google map?
  • How to reduce Xcode project file size
  • iOS Simulator Crash on Xcode 10
  • LLDB: Must I build it from source (XCode project) to use it from the command line?
  • Xcode 10 command-line building: Archive failed with Fabric Info.plist Error
  • Xcode 10 Migration Errors
  • replacement of asp:Treeview for ASP.NET MVC application
  • 100% height child div in parent wrap div
  • Excel VBA Cutting rows from workbook1 and paste it in workbook2
  • prevent app dragging but permit scroll of inner div elements in ios
  • Get table row based on radio button using prototype/Javascript
  • Mouse event in Java
  • SQLite UWP Error with Mobile EMulator Windows 10
  • “Buffer until quiet” behavior from Reactive?
  • Check text in a DOM element using Protractor
  • What exactly does getSubimage() of BufferedImage do?
  • jQueryUI Draggable: Constrain draggability to a single axis?
  • jQuery data value not updating
  • How to debug problems with the javafx native bundle for Windows?
  • Get MQ messageId in string format
  • Disable globe movement on click in World Wind
  • How to navigate between different html pages in Windows 8 Metro application using javascript?
  • Is it really posible to close a PhoneGap App?
  • Embedding an OpenXML document within another OpenXml document
  • How to distinguish between attribute and element nodes returned from a Saxon XPathSelector
  • How do I customize header and footer in jqgrid?
  • Removing levels from data frame read from CSV file - R
  • Can someone please explain how this implementation of bucket sort works?
  • Listen to the 'change' even of an element in the shadow DOM
  • Notepad++ - delete all lines with certain text
  • Select count of rows that have a certain number of rows in a related table
  • JNI UnsatisfiedLinkError without wrong method names and with library path specified
  • Delphi Chromium Embedded - Clear browser cache
  • addressing in assembler
  • Using SWIG with a build system [closed]
  • change color of jstree node
  • Efficient algorithm to find additions and removals from 2 collections
  • Undefined navigator.push React-native 0.43.4
  • Building Qt project for C++11 standard
  • How to access culture data in globalize.js V1.0.0
  • ViewController With Transparent Background Entering Current ViewController With Push Transition
  • Rails Find when some params will be blank
  • Jenkins: How To Build multiple projects from a TFS repository?
  • Font Awesome Showing Box instead of Icons