提交 2bb98ac8 编写于 作者: DCloud_iOS_WZT's avatar DCloud_iOS_WZT

新增 swift工程示例

上级 90dd8da1
...@@ -159,7 +159,8 @@ ...@@ -159,7 +159,8 @@
2F8F66FE2B568AB4003E6DCC /* Sources */, 2F8F66FE2B568AB4003E6DCC /* Sources */,
2F8F66FF2B568AB4003E6DCC /* Frameworks */, 2F8F66FF2B568AB4003E6DCC /* Frameworks */,
2F8F67002B568AB4003E6DCC /* Resources */, 2F8F67002B568AB4003E6DCC /* Resources */,
CB2C206228C4ADD2C3BD94DC /* [CP] Copy Pods Resources */, 0077D58063A7D1947C3D0C98 /* [CP] Embed Pods Frameworks */,
BFF9F57BCF0484F206111522 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
...@@ -219,6 +220,23 @@ ...@@ -219,6 +220,23 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
0077D58063A7D1947C3D0C98 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-HelloUniMPDemo/Pods-HelloUniMPDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-HelloUniMPDemo/Pods-HelloUniMPDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloUniMPDemo/Pods-HelloUniMPDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
15E3B50BBE06F99B7E6CAAA5 /* [CP] Check Pods Manifest.lock */ = { 15E3B50BBE06F99B7E6CAAA5 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
...@@ -241,7 +259,7 @@ ...@@ -241,7 +259,7 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
CB2C206228C4ADD2C3BD94DC /* [CP] Copy Pods Resources */ = { BFF9F57BCF0484F206111522 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
......
...@@ -9,7 +9,9 @@ source 'https://gitcode.net/dcloud/unimpsdk-ios.git' ...@@ -9,7 +9,9 @@ source 'https://gitcode.net/dcloud/unimpsdk-ios.git'
target 'HelloUniMPDemo' do target 'HelloUniMPDemo' do
## 判断需要引用哪些模块请参考文档:https://nativesupport.dcloud.net.cn/AppDocs/usemodule/iOSModuleConfig/common.html#%E5%A6%82%E4%BD%95%E9%85%8D%E7%BD%AE%E6%A8%A1%E5%9D%97-%E4%B8%89%E6%96%B9sdk ## 判断需要引用哪些模块请参考文档:https://nativesupport.dcloud.net.cn/AppDocs/usemodule/iOSModuleConfig/common.html#%E5%A6%82%E4%BD%95%E9%85%8D%E7%BD%AE%E6%A8%A1%E5%9D%97-%E4%B8%89%E6%96%B9sdk
## 根据功能对照表添加,建议一次不要Pod太多模块容易超时 ## 根据功能对照表添加,建议一次不要Pod太多模块容易超时
## Core、Video、LivePusher、Camera&Gallery、Map-XXX 等模块文件较大建议单独pod install
## Payment-Stripe、Payment-Paypal、Oauth-Google、Oauth-Facebook 为海外SDK建议设置代理后pod install
# pod 'unimp', :git => "https://gitcode.net/dcloud/unimpsdk-ios.git", :tag => "3.99"
# pod 'unimp', :path => "../", :subspecs => [ # pod 'unimp', :path => "../", :subspecs => [
pod 'unimp', :git => "https://gitcode.net/dcloud/unimpsdk-ios.git", :tag => "3.99", :subspecs => [ pod 'unimp', :git => "https://gitcode.net/dcloud/unimpsdk-ios.git", :tag => "3.99", :subspecs => [
'Core', ##核心库(必需) 'Core', ##核心库(必需)
...@@ -44,8 +46,8 @@ target 'HelloUniMPDemo' do ...@@ -44,8 +46,8 @@ target 'HelloUniMPDemo' do
# 'Payment-IAP', ##苹果内购 # 'Payment-IAP', ##苹果内购
# 'Payment-AliPay', ##支付宝支付 # 'Payment-AliPay', ##支付宝支付
# 'Payment-Wechat', ##微信支付-同时使用微信分享或登录,必需使用包含支付的依赖库 # 'Payment-Wechat', ##微信支付-同时使用微信分享或登录,必需使用包含支付的依赖库
# 'Payment-Paypal', ##Paypal支付 iOS13+ 'Payment-Paypal', ##Paypal支付 iOS13+
# 'Payment-Stripe', ##stripe支付 iOS13+ # 'Payment-Stripe', ##stripe支付 iOS13+ 依赖库较大如果超时建议使用代理
# ##分享 # ##分享
# 'Share-Wechat', ##微信分享-包含支付 # 'Share-Wechat', ##微信分享-包含支付
# 'Share-WechatNopay', ##微信分享-不包含支付 # 'Share-WechatNopay', ##微信分享-不包含支付
...@@ -58,7 +60,7 @@ target 'HelloUniMPDemo' do ...@@ -58,7 +60,7 @@ target 'HelloUniMPDemo' do
# 'Oauth-WechatNopay', ##微信登录-不包含支付 # 'Oauth-WechatNopay', ##微信登录-不包含支付
# 'Oauth-Sina', ##新浪微博登录 # 'Oauth-Sina', ##新浪微博登录
# 'Oauth-Google', ##Google登录 # 'Oauth-Google', ##Google登录
# 'Oauth-Facebook', ##Facebook登录 iOS12+ 'Oauth-Facebook', ##Facebook登录 iOS12+
] ]
end end
# Uncomment the next line to define a global platform for your project
#source 'https://gitee.com/mirrors/CocoaPods-Specs.git'
source 'https://github.com/Cocoapods/Specs.git'
source 'https://gitcode.net/dcloud/unimpsdk-ios.git'
use_frameworks!
target 'UniMPSwiftDemo' do
## 判断需要引用哪些模块请参考文档:https://nativesupport.dcloud.net.cn/AppDocs/usemodule/iOSModuleConfig/common.html#%E5%A6%82%E4%BD%95%E9%85%8D%E7%BD%AE%E6%A8%A1%E5%9D%97-%E4%B8%89%E6%96%B9sdk
## 根据功能对照表添加,建议一次不要Pod太多模块容易超时
# pod 'unimp', :git => "https://gitcode.net/dcloud/unimpsdk-ios.git", :tag => "3.99"
# pod 'unimp', :path => "../", :subspecs => [
pod 'unimp', :git => "https://gitcode.net/dcloud/unimpsdk-ios.git", :tag => "3.99", :subspecs => [
'Core', ##核心库(必需)
# 'Accelerometer', ##加速度传感器
# 'Contacts', ##通讯录
# 'Audio', ##音频
# 'Camera&Gallery', ##相机&相册
# 'File', ##文件
# 'Video', ##视频播放
# 'LivePusher', ##直播推流
# 'NativeJS', ##JS Reflection call Native
# 'Orientation', ##设备方向
# 'Message', ##邮件消息
# 'Zip', ##压缩
# 'Proximity', ##距离传感器
# 'Sqlite', ##数据库
# 'XMLHttpRequest', ##网络请求
# 'Fingerprint', ##指纹识别
# 'FaceId', ##人脸识别
# 'IBeacon', ##底功耗蓝牙
# 'BlueTooth', ##蓝牙
# 'Speech-Baidu', ##语音识别-百度
# 'Statistic-Umeng', ##友盟统计
# ##定位模块(百度高德不能同时引用)
# 'Geolocation', ##系统定位
# 'Geolocation-Gaode', ##高德定位
# 'Geolocation-Baidu', ##百度定位
# ##地图(二选一)
# 'Map-Gaode', ##高德地图
# 'Map-Baidu', ##百度地图
# ##支付
# 'Payment-IAP', ##苹果内购
# 'Payment-AliPay', ##支付宝支付
# 'Payment-Wechat', ##微信支付-同时使用微信分享或登录,必需使用包含支付的依赖库
# 'Payment-Paypal', ##Paypal支付 iOS13+
# 'Payment-Stripe', ##stripe支付 iOS13+ 依赖库较大如果超时建议使用代理
# ##分享
# 'Share-Wechat', ##微信分享-包含支付
# 'Share-WechatNopay', ##微信分享-不包含支付
# 'Share-QQ', ##QQ分享
# 'Share-Sina', ##新浪微博分享
# ##登录
# 'Oauth-Apple', ##苹果登录
# 'Oauth-QQ', ##QQ登录
# 'Oauth-Wechat', ##微信登录-包含支付
# 'Oauth-WechatNopay', ##微信登录-不包含支付
# 'Oauth-Sina', ##新浪微博登录
# 'Oauth-Google', ##Google登录
# 'Oauth-Facebook', ##Facebook登录 iOS12+
]
end
此差异已折叠。
//
// AppDelegate.swift
// UniMPSwiftDemo
//
// Created by dcloud on 2024/1/19.
//
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let options = NSMutableDictionary.init(dictionary: launchOptions ?? [:])
options.setValue(NSNumber.init(value:true), forKey: "debug")
DCUniMPSDKEngine.initSDKEnvironment(launchOptions: options as! [AnyHashable : Any]);
return true
}
func applicationDidBecomeActive(_ application: UIApplication) {
print("applicationDidBecomeActive")
}
func applicationDidEnterBackground(_ application: UIApplication) {
print("applicationDidEnterBackground")
}
}
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
//
// SplashView.swift
// UniMPSwiftDemo
//
// Created by Dcloud-M1 on 2022/1/24.
//
import UIKit
class SplashView: UIView {
/*
// Only override draw() if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
override func draw(_ rect: CGRect) {
// Drawing code
}
*/
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="SplashView" customModule="UniMPSwiftDemo" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="unilogo" translatesAutoresizingMaskIntoConstraints="NO" id="vTs-jt-cOp">
<rect key="frame" x="171" y="100" width="72" height="72"/>
<constraints>
<constraint firstAttribute="width" constant="72" id="iZD-Rz-fsb"/>
<constraint firstAttribute="height" constant="72" id="rg7-La-gfh"/>
</constraints>
</imageView>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" animating="YES" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="Md6-fJ-A7j">
<rect key="frame" x="197" y="202" width="20" height="20"/>
</activityIndicatorView>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Md6-fJ-A7j" firstAttribute="centerX" secondItem="vTs-jt-cOp" secondAttribute="centerX" id="A2v-a3-5eG"/>
<constraint firstItem="Md6-fJ-A7j" firstAttribute="top" secondItem="vTs-jt-cOp" secondAttribute="bottom" constant="30" id="jgQ-BF-fGI"/>
<constraint firstItem="vTs-jt-cOp" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="100" id="ks8-Up-c4A"/>
<constraint firstItem="vTs-jt-cOp" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="r7L-PX-3uc"/>
</constraints>
<point key="canvasLocation" x="139" y="154"/>
</view>
</objects>
<resources>
<image name="unilogo" width="36" height="36"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
//
// Test.h
// UniMPSwiftDemo
//
// Created by Dcloud-M1 on 2021/11/17.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface Test : NSObject
@end
NS_ASSUME_NONNULL_END
//
// Test.m
// UniMPSwiftDemo
//
// Created by Dcloud-M1 on 2021/11/17.
//
#import "Test.h"
@implementation Test
@end
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "DCUniMP.h"
//
// ViewController.swift
// UniMPSwiftDemo
//
// Created by dcloud on 2024/1/19.
//
import UIKit
#warning ("swift 工程仅作为运行参考,更多示例请参考 OC 工程")
class ViewController: UIViewController,DCUniMPSDKEngineDelegate {
let APPID1 = "__UNI__11E9B73"
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
DCUniMPSDKEngine.setDelegate(self)
checkUniMPResoutce(appid: APPID1)
}
func checkUniMPResoutce(appid: String) -> Void {
let wgtPath = Bundle.main.path(forResource: appid, ofType: "wgt") ?? ""
#warning ("注意:isExistsUniMP: 方法判断的仅是运行路径中是否有对应的应用资源,宿主还需要做好内置wgt版本的管理,如果更新了内置的wgt也应该执行 releaseAppResourceToRunPathWithAppid 方法应用最新的资源")
if DCUniMPSDKEngine.isExistsUniMP(appid) {
let version = DCUniMPSDKEngine.getUniMPVersionInfo(withAppid: appid)!
let name = version["code"]!
let code = version["code"]!
print("小程序:\(appid) 资源已存在,版本信息:name:\(name) code:\(code)")
} else {
do {
try DCUniMPSDKEngine.installUniMPResource(withAppid: appid, resourceFilePath: wgtPath, password: nil)
let version = DCUniMPSDKEngine.getUniMPVersionInfo(withAppid: appid)!
let name = version["code"]!
let code = version["code"]!
print("✅ 小程序:\(appid) 资源释放成功,版本信息:name:\(name) code:\(code)")
} catch let err as NSError {
print("❌ 小程序:\(appid) 资源释放失败:\(err)")
}
}
}
/// 打开uni小程序
@IBAction func openUniMP() {
let configuration = DCUniMPConfiguration.init()
configuration.enableBackground = true
DCUniMPSDKEngine.openUniMP(APPID1, configuration: configuration) { instance, error in
if instance != nil {
print("小程序打开成功")
} else {
print(error as Any)
}
}
}
// MARK: - DCUniMPSDKEngineDelegate
func uniMP(onClose appid: String) {
print("小程序:\(appid) closed")
}
func defaultMenuItemClicked(_ appid: String, identifier: String) {
print("defaultMenuItemClicked:\(appid) \(identifier)")
}
func splashView(forApp appid: String) -> UIView {
let splashView:UIView = Bundle.main.loadNibNamed("SplashView", owner: self, options: nil)?.last as! UIView
return splashView
}
}
...@@ -22,12 +22,14 @@ Pod::Spec.new do |s| ...@@ -22,12 +22,14 @@ Pod::Spec.new do |s|
### 基础库(必选) ### 基础库(必选)
s.subspec 'Core' do |ss| s.subspec 'Core' do |ss|
ss.public_header_files = 'UniMPSDK/Core/Headers/**/*.{h,swift}'
ss.source_files = 'UniMPSDK/Core/Headers/**/*.{h,swift}'
ss.frameworks = 'UIKit', 'CoreText','JavaScriptCore','WebKit','CoreTelephony','MediaPlayer','QuartzCore','CFNetwork', ss.frameworks = 'UIKit', 'CoreText','JavaScriptCore','WebKit','CoreTelephony','MediaPlayer','QuartzCore','CFNetwork',
'Foundation','CoreFoundation','CoreGraphics','QuickLook' 'Foundation','CoreFoundation','CoreGraphics','QuickLook'
ss.vendored_libraries = 'UniMPSDK/Core/Libs/*.{a}' ss.vendored_libraries = 'UniMPSDK/Core/Libs/*.{a}'
ss.vendored_frameworks = 'UniMPSDK/Core/Libs/*.{framework}' ss.vendored_frameworks = 'UniMPSDK/Core/Libs/*.{framework}'
ss.resources = 'UniMPSDK/Core/Resources/*' ss.resources = 'UniMPSDK/Core/Resources/*'
ss.public_header_files = 'UniMPSDK/Core/Headers/**/*.{h,swift}'
ss.libraries = 'c++','iconv' ss.libraries = 'c++','iconv'
end end
...@@ -47,6 +49,7 @@ Pod::Spec.new do |s| ...@@ -47,6 +49,7 @@ Pod::Spec.new do |s|
s.subspec 'Camera&Gallery' do |ss| s.subspec 'Camera&Gallery' do |ss|
ss.public_header_files = 'UniMPSDK/Camera&Gallery/Headers/**/*.{h,swift}' ss.public_header_files = 'UniMPSDK/Camera&Gallery/Headers/**/*.{h,swift}'
ss.source_files = 'UniMPSDK/Camera&Gallery/Headers/**/*.{h,swift}'
ss.resources = 'UniMPSDK/Camera&Gallery/Resources/*' ss.resources = 'UniMPSDK/Camera&Gallery/Resources/*'
ss.frameworks = 'AssetsLibrary','Photos','CoreMedia','MetalKit','GLKit' ss.frameworks = 'AssetsLibrary','Photos','CoreMedia','MetalKit','GLKit'
ss.vendored_libraries = 'UniMPSDK/Camera&Gallery/Libs/*.{a}' ss.vendored_libraries = 'UniMPSDK/Camera&Gallery/Libs/*.{a}'
...@@ -123,7 +126,8 @@ Pod::Spec.new do |s| ...@@ -123,7 +126,8 @@ Pod::Spec.new do |s|
end end
s.subspec 'Barcode' do |ss| s.subspec 'Barcode' do |ss|
s.public_header_files = 'UniMPSDK/Barcode/Headers/**/*{.h,.swift}' ss.public_header_files = 'UniMPSDK/Barcode/Headers/**/*{.h,.swift}'
ss.source_files = 'UniMPSDK/Barcode/Headers/**/*.{h,swift}'
ss.frameworks = 'AVFoundation','ImageIO','CoreVideo','CoreMedia' ss.frameworks = 'AVFoundation','ImageIO','CoreVideo','CoreMedia'
ss.vendored_libraries = 'UniMPSDK/Barcode/Libs/*.{a}' ss.vendored_libraries = 'UniMPSDK/Barcode/Libs/*.{a}'
ss.libraries = 'iconv.2' ss.libraries = 'iconv.2'
...@@ -131,6 +135,7 @@ Pod::Spec.new do |s| ...@@ -131,6 +135,7 @@ Pod::Spec.new do |s|
s.subspec 'Video' do |ss| s.subspec 'Video' do |ss|
ss.public_header_files = 'UniMPSDK/Video/Headers/**/*{.h,.swift}' ss.public_header_files = 'UniMPSDK/Video/Headers/**/*{.h,.swift}'
ss.source_files = 'UniMPSDK/Video/Headers/**/*.{h,swift}'
ss.frameworks = 'AudioToolbox','AVFoundation', ss.frameworks = 'AudioToolbox','AVFoundation',
'CoreGraphics','CoreMedia','VideoToolbox', 'CoreGraphics','CoreMedia','VideoToolbox',
'VideoToolbox','MediaPlayer','MobileCoreServices', 'VideoToolbox','MediaPlayer','MobileCoreServices',
...@@ -339,6 +344,7 @@ Pod::Spec.new do |s| ...@@ -339,6 +344,7 @@ Pod::Spec.new do |s|
s.subspec 'Masonry' do |ss| s.subspec 'Masonry' do |ss|
ss.public_header_files = 'UniMPSDK/Masonry/Headers/**/*{.h,.swift}' ss.public_header_files = 'UniMPSDK/Masonry/Headers/**/*{.h,.swift}'
ss.source_files = 'UniMPSDK/Masonry/Headers/**/*.{h,swift}'
ss.vendored_frameworks = 'UniMPSDK/Masonry/Libs/*.{framework}' ss.vendored_frameworks = 'UniMPSDK/Masonry/Libs/*.{framework}'
end end
...@@ -348,6 +354,7 @@ end ...@@ -348,6 +354,7 @@ end
s.subspec 'Wechat-Nopay' do |ss| s.subspec 'Wechat-Nopay' do |ss|
ss.public_header_files = 'UniMPSDK/Wechat-Nopay/Headers/**/*{.h,.swift}' ss.public_header_files = 'UniMPSDK/Wechat-Nopay/Headers/**/*{.h,.swift}'
ss.source_files = 'UniMPSDK/Wechat-Nopay/Headers/**/*.{h,swift}'
ss.vendored_libraries = 'UniMPSDK/Wechat-Nopay/Libs/*.{a}' ss.vendored_libraries = 'UniMPSDK/Wechat-Nopay/Libs/*.{a}'
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册