'눈으로'에 해당되는 글 1건

  1. 2010.06.24 static library 만드는 법을 눈으로 배웠습니다.
아이폰어플개발정보2010. 6. 24. 11:34
static library 만드는 법을 눈으로 배웠습니다.

http://vimeo.com/7699801


https://www.youtube.com/watch?v=fFn2o0aEbRQ

눈으로 배우고도 만들 수가 있었습니다. (영어로 설명을 해서 귀로는 배울 수 없었습니다.)

(^0^)/

Static libraries are particularly useful when you are developing applications for a client who is handling the submission process and you need to deliver your xcode project, but want to keep your source code private. The process is pretty simple and I’ve tried to make this tutorial a simple step by step process. Enjoy!

Step 1:

In your Xcode project control click on your target and choose “Add”, then click “New Target”.

Step 2:

From the Cocoa Touch menu choose “Static Library” and click “Next” button

Step 3:

In the next window name your library.

Step 4:

Now here’s where it gets a little more detailed. You need to drag the files from your Classes directory (or wherever you have the files you’d like to include) into the “Compile Sources” section of your new Static Library. IMPORTANT!! only drag the the implementation files not the header files. FYI, the ones with the .m extension.

Step 5:

Then we need to remove those same files from your main target. Choose the files, the press delete.

Step 6:

Then we need to add the static library to our app. To do this ctrl-click your target and choose “Get Info”.

Then click the + symbol under “Linked Libraries” which should open a dialog with your library in it. Highlight the library and click add.

It should show up in your app’s list of linked libraries after that.

Step 7:

Now edit the  target app’s linking settings and add “-ObjC” to the “Other Linker Flags”. To do this first choose “Edit Project Settings” from “Project” in the file menu. When the settings come up click the build tab and locate the “Other Linker Flags” field.

Step 8:

Next build your target for each SDK target (for example: you will need to build it separately for simulator and device)

Step 9:

You can now remove the source files from your classes folder (only those same .m files) and your project will now be built from the compiled source in your library and your source code will not be available. BACK YOUR PROJECT UP BEFORE YOU REMOVE FILES!!!



출처 : http://blog.naver.com/PostView.nhn?blogId=amoros21&logNo=140107055425
Posted by 오늘마감

댓글을 달아 주세요