cocoapod框架是否需要开源?
我在 git 上创建了一个 cocoapod swift 框架。
当我创建一个 ios 应用程序并在我的 Podfile 中配置 pod 信息时。
它工作正常。现在我想保护我的源代码,希望其他人可以使用我的
框架,但看不到我的框架源代码。
这可能吗?
Best Answer-推荐答案 strong>
是的,这是可能的。您可以创建一个框架,编译它并作为 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
}
关于ios - 非开源 cocoapods,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/34609087/
|