欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
iPhone開(kāi)發(fā):iOS Framework制作研究

iPhone開(kāi)發(fā):iOS Framework制作研究

iOS上如何制作自己的Framework呢?(不是靜態(tài)庫)

請看stackoverflow上的提問(wèn):

http://stackoverflow.com/questions/4065052/how-to-build-a-framework-or-library-for-other-developers-the-secure-way

 

解決辦法

1,通過(guò)命令行腳本

http://www.cocoanetics.com/2010/04/making-your-own-iphone-frameworks/

由cocoa的Framework演變而來(lái)

2,通過(guò)hack  bundle

http://www.cocoanetics.com/2010/05/making-your-own-iphone-frameworks-in-xcode/

這種方法有熱心的同學(xué)做了中文翻譯 

http://www.cocoachina.com/bbs/read.php?tid-75680.html

但是需要制作2個(gè)framework,分別對應于simulator和device

這種方法這里也有詳細介紹 http://db-in.com/blog/2011/05/creating-universal-framework-to-iphone-ios/

 

3,使用別人的模板

https://github.com/kstenerud/iOS-Universal-Framework

這個(gè)算是集大成吧。當然作者有說(shuō)明,這個(gè)也是假的,并不能象SDK自帶的framework那樣自如使用

 

而code google上的pldatabase framework是可以象SDK自己的framework一樣,一個(gè)framework同時(shí)運行在模擬器和真機上的

http://code.google.com/p/pldatabase/

有待研究,以后再來(lái)補充

補充:

pldatabase framework 也只是產(chǎn)生2個(gè)靜態(tài)庫(.a)然后通過(guò)lipo合并起來(lái),但是這已經(jīng)很好了。

Lipo Binary 中的腳本如下:

FRAMEWORK="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework"

lipo \
"${BUILD_DIR}/${CONFIGURATION}-iphoneos/libPlausibleDatabase-iPhoneOS.a" \
"${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/libPlausibleDatabase-iPhoneSimulator.a" \
-create -output "${FRAMEWORK}/Versions/Current/${PRODUCT_NAME}"

cd "${FRAMEWORK}" && ln -sf "Versions/Current/${PRODUCT_NAME}" ./

看來(lái)上面的方法沒(méi)有產(chǎn)生真正意義上Framework,所謂的Framework不是hack bundle就是 hack static lib

至于第二種方法為什么可以實(shí)現,因為Framework其實(shí)也是一個(gè)bundle (a structured directory),

可以參照apple的官方說(shuō)明 http://developer.apple.com/library/mac/#documentation/General/Conceptual/DevPedia-CocoaCore/Framework.html


詳見(jiàn):http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WhatAreFrameworks.html%23//apple_ref/doc/uid/20002303-BBCEIJFI

What are Frameworks?

 

framework is a hierarchical directory that encapsulates shared resources, such as a dynamic shared library, nib files, image files, localized strings, header files, and reference documentation in a single package. Multiple applications can use all of these resources simultaneously. The system loads them into memory as needed and shares the one copy of the resource among all applications whenever possible.

A framework is also a bundle and its contents can be accessed using Core Foundation Bundle Services or the Cocoa NSBundle class. However, unlike most bundles, a framework bundle does not appear in the Finder as an opaque file. A framework bundle is a standard directory that the user can navigate. This makes it easier for developers to browse the framework contents and view any included documentation and header files.

Frameworks serve the same purpose as static and dynamic shared libraries, that is, they provide a library of routines that can be called by an application to perform a specific task. For example, the Application Kit and Foundation frameworks provide the programmatic interfaces for the Cocoa classes and methods. Frameworks offer the following advantages over static-linked libraries and other types of dynamic shared libraries:

  • Frameworks group related, but separate, resources together. This grouping makes it easier to install, uninstall, and locate those resources.

  • Frameworks can include a wider variety of resource types than libraries. For example, a framework can include any relevant header files and documentation.

  • Multiple versions of a framework can be included in the same bundle. This makes it possible to be backward compatible with older programs.

  • Only one copy of a framework’s read-only resources reside physically in-memory at any given time, regardless of how many processes are using those resources. This sharing of resources reduces the memory footprint of the system and helps improve performance.

Note: Frameworks are not required to provide a programmatic interface and can include only resource files. However, such a use is not common.

 

The Darwin layer contains many static and dynamic libraries but otherwise, most Mac OS X interfaces are packaged as frameworks. Some key frameworks—including Carbon, Cocoa, Application Services, and Core Services—provide convenient groupings of several smaller but related frameworks. These framework groups are called umbrella frameworks and they act as an abstraction layer between a technology and the subframeworks that implement that technology.

In addition to using the system frameworks, you can create your own frameworks and use them privately for your own applications or make them publicly available to other developers. Private frameworks are appropriate for code modules you want to use in your own applications but do not want other developers to use. Public frameworks are intended for use by other developers and usually include headers and documentation defining the framework’s public interface

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
WWDC2014之iOS使用動(dòng)態(tài)庫
Python開(kāi)源框架、類(lèi)庫、軟件集合
Software framework
一個(gè)打通jni,java framework,application三層的練習
xcode錯誤信息匯總
【轉】如何將自己的類(lèi)build到Android.jar
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久