简体   繁体   中英

Creating custom framework in iOS

I am trying to create my own iOS framework for my project. I am following the below link to create it:- Creating custom framework in iOS

I am not getting any error as well as warning but not able to see the content of Product folder generated during project creation.

I am facing problem in this step:-

To build, select the target as iOS Device and press cmd+B to perform the build. Once completed, the libRWUIControls.a product in the Products group of the Project Navigator will turn from red to black, signaling that it now exists. Right click on libRWUIControls.a and select Show in Finder.

Looking for all yours help and support on this.

Suppose you are using Xcode 6, and Apple has provided an easier way to create a custom framework. You can refer to some instruction on How to create an iOS Cocoa Touch Framework using Xcode

And you may still encounter some problems while using your custom framework in your app. Here are 3 tips to solve the problems you may face.

  1. Add your public headers:
    In your custom framework project, please select TARGETS->Build Phases->Headers->Public, and drag and drop your headers here.
  2. Build a static library framework:
    In your custom framework project, please select TARGETS->Build Settings->Linking->Mach-O Type, and select it as Static Library.
  3. To fix Xcode “Missing Submodule” warning while import your custom framework in your app:
    Please refer the solution here .

Enjoy your own framework.

There are several parts to this "step"

Assuming since frameworks are fairly advanced that building is not your issue.

This tutorial uses multiple targets. To choose which target you want to build you must select it from the drop down menu at the top left of your Xcode window. This is immediately to the left (and loosely tied to) the drop down for choosing the device/emulator type. The target selected in the drop down becomes the active target and will respond to the build menu and shortcut keys.

Once a target is built the object created by the build will be displayed in the XCode Project Navigator inside the folder named "Products" In the default view the left most panel in XCode is the Navigator panel. Selecting the folder icon at the top of this panel will display the Project Navigator and the projects file structure. This is where you will find the Products folder containing your newly created file.
If the file is still red then the build did not complete correctly.
If it is black then you can right click on the file and choose "Show in Finder" to see the file. If the file remains red or as an alternative to finding the file location you can use the build log. To show the build log - in the Navigation Panel select the "Report Navigator". This is the right most icon at the top of the panel and looks like a cartoon text bubble. In the Report Navigator highlight the "Build" Entry associated with your static library. You can now review the build log to determine why the target didn't build correctly or if it did build correctly you will see an entry near the end of the log showing the path of build files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM