iOS development - engineering packed into SDK

The novel has recently received a project packaged into SDK, and publish to cocoapods, access for partners.

step:

1. Create a project
first create a framework

 2, add the code to be packaged

Open the need to package the project, the project name and the same folder as the project dragged into the framework created

3, create headers
project comes only .h file, you can re-create deleted

4, configure the environment

Build Setting -> Mach-O Type Library to the Static
the Build Phases -> Headers header file into the disclosure of the Public from Project

5. Create a bundle resource file

 

Dragged into the picture, and then modify the image path
set the picture code reference as follows, if the picture is many things to change too much trouble, my side project mainly H5 interface, native four interface

#pragma mark:---------图片资源文件
#define QYBUNDLE_NAME   @"Resource.bundle" #define QYBUNDLE_PATH [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:QYBUNDLE_NAME] #define QYIMAGEBUNDLE [NSBundle bundleWithPath:QYBUNDLE_PATH] [UIImage imageNamed:@"search.png" inBundle:QYIMAGEBUNDLE compatibleWithTraitCollection:nil] 

6, compiled files, project drag show in finder can be used
to compile the emulator state file selection and Real compiled state

7, the bundle also dragged into the resource file required docking project, or else can not find the picture, so I was dragged into the.

8, using the following hierarchy

Under next article about how the real machine simulator merge, publish to cocoapods

 

Guess you like

Origin www.cnblogs.com/yipianbingxin/p/11578312.html