Short Note: Embedding a private framework within your OS X app bundle

Bitte teilen! Please share! Share on Facebook
Tweet about this on Twitter
Share on LinkedIn
Pin on Pinterest
Email this to someone

Sometimes solutions are so simple and yet it is so hard to find the right information that points towards them. So in the „Short Note“ posts I will share information about different topics that will hopefully make your search less time consuming.

Today: How to embed a private framework into your OS X App bundle, so that you can distribute your App as one single package.



All you have to do is to head over to your project settings‘ General tab and find the Embedded Binaries section. It should be right above the Linked Frameworks and Libraries section where you usually make frameworks available for your project. Click the plus sign and add the framework to the list. You“ll notice that the framework also appeared inside the Linked Frameworks and Libraries section. So if you have the framework listed twice there, simple remove the upper of the two entries. Now you are good to go.

Bildschirmfoto 2016-01-31 um 19.19.58

XCode will automatically set the installation path of the framework to @executable_path/../Frameworks This tells the app where to look for the framework at runtime. You can check this at the Build Settings tab at the Linking section.

Bildschirmfoto 2016-01-31 um 19.24.55

Now you can archive and export your app and it should run without any problems outside of Xcode.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.