非开源可可足 [英] Non open-source cocoapods

查看:88
本文介绍了非开源可可足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

cocoapod框架是否需要开源?
我已经在git上创建了一个cocoapod swift框架。

Is it required for a cocoapod framework to be open source? I have created a cocoapod swift framework on git.

当我创建ios应用程序并在Podfile中配置pod信息时。

And when I create an ios application and config the pod information in my Podfile.

工作正常。现在我想保护我的源代码,希望其他人可以使用我的
框架,但看不到我的框架源代码。

It works fine.Now I want to protect my source code, expect other guys can use my framework, but can not see my framework source code.

有可能吗?

推荐答案

是的,有可能。您可以创建一个框架,对其进行编译,然后以cocoapod的形式分发。使用podspec中的 vendored_framework vendored_frameworks 键。 Podspec示例就是 Google-Mobile-Ads-SDK 以这种方式分配的广告连播。

Yes, it is possible. You can create a framework, compile it and distribute as a cocoapod. Use the vendored_framework or vendored_frameworks key in your podspec. An example podspec is the Google-Mobile-Ads-SDK pod that is distributed exactly that way.

{
  "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
}

这篇关于非开源可可足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆