cocoapod 框架是否需要开源?我在 git 上创建了一个 cocoapod swift 框架。
当我创建一个 ios 应用程序并在我的 Podfile 中配置 pod 信息时。
它工作正常。现在我想保护我的源代码,希望其他人可以使用我的框架,但看不到我的框架源代码。
那可能吗?
对的,这是可能的。您可以创建一个框架,编译它并作为 cocoapod 分发。在 podspec 中使用vendored_framework或vendored_frameworks键。一个示例 podspec 是Google-Mobile-Ads-SDK pod,它正是以这种方式分发的。
{
"name": "Google-Mobile-Ads-SDK",
"version": "7.6.0",
"summary": "Monetize your mobile applications with Google ads",
"description": "The Google Mobile Ads SDK is the latest generation in Google mobile advertising featuring refined ad formats and streamlined APIs for access to mobile ad networks and advertising solutions.",
"homepage": "https://developers.google.com/admob/",
"license": {
"type": "Copyright",
"text": "Copyright 2011 Google Inc. All Rights Reserved."
},
"authors": "Google Inc.",
"platforms": {
"ios": "6.0"
},
"source": {
"http": "https://dl.google.com/googleadmobadssdk/googlemobileadssdkios-7.6.0.zip"
},
"preserve_paths": "GoogleMobileAdsSdkiOS-7.6.0",
"vendored_frameworks": "GoogleMobileAdsSdkiOS-7.6.0/GoogleMobileAds.framework",
"weak_frameworks": "AdSupport",
"frameworks": [
"AudioToolbox",
"AVFoundation",
"CoreGraphics",
"CoreMedia",
"CoreTelephony",
"EventKit",
"EventKitUI",
"MessageUI",
"StoreKit",
"SystemConfiguration"
],
"requires_arc": true
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1666 次 |
| 最近记录: |