Giter VIP home page Giter VIP logo

unimpsdk's Introduction

UniMPSDK

简介

uni小程序SDK,是为原生App打造的可运行基于 uni-app 开发的小程序前端项目的框架,从而帮助原生App快速获取小程序的能力。

集成方式

  • 参考官方的集成教程

  • 使用cocoapods集成:pod 'UniMPSDK' GitHub的免费Git LFS限额不足

  • 使用cocoapods集成本地库

    1.比如有个UniMPDemo的iOS项目,在UniMPDemo.xcodeproj所在目录新建文件夹,比如叫UniMPSDK

    image-20201223104524031

    2.在官网下载任意版本的UniMP iOS SDK,解压后将其中的Core文件夹复制到之前新建的UniMPSDK

    image-20201223105205861

    3.另外再新建一个UniMPSDK.podspec文件或者使用pod命令创建

    image-20201223111630244

    4.用文本编辑打开UniMPSDK.podspec文件,复制以下内容进去

    Pod::Spec.new do |s|
    
      s.name          = "UniMPSDK"
      #设置为你下载的版本
      s.version       = "0.0.1"
      s.summary       = "UniMPSDK"
      s.homepage      = "http://EXAMPLE/UniMPSDK"
      s.license       = "MIT"
      s.author        = {'author' => 'author'}
      s.source        = { :git => "http://EXAMPLE/UniMPSDK.git", :tag => s.version}
      s.requires_arc  = true
      s.static_framework = true
      s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'}
      s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'}
      s.frameworks = "JavaScriptCore", "CoreMedia", "MediaPlayer", "AVFoundation", "AVKit", "GLKit", "OpenGLES", "CoreText", "QuartzCore", "CoreGraphics", "QuickLook", "CoreTelephony", "AssetsLibrary", "CoreLocation", "AddressBook"
      s.libraries = "c++"
    
      s.default_subspecs = "Core"
    
      s.subspec "Core" do |ss|
        ss.subspec "Headers" do |sss|
          sss.source_files = "Core/Headers/*.h"
    
          sss.subspec "weexHeader" do |ssss|
            ssss.source_files = "Core/Headers/weexHeader/*.h"
          end
        end
    
        ss.subspec "Libs" do |sss|
          sss.vendored_library = "Core/Libs/*.a"
          sss.vendored_frameworks = "Core/Libs/*.framework"
        end
      end
    
      s.resources = ["Core/Resources/*.js", "Core/Resources/*.ttf", "Core/Resources/*.bundle"]
    end

    5.回到UniMPDemo.xcodeproj所在目录,通过命令pod init生成Podfile

    image-20201223112009664

    6.打开Podfile文件,添加一行代码pod 'UniMPSDK', :path => './UniMPSDK'

    image-20201223112309873

    7.最后使用pod install将SDK集成到项目中即可

unimpsdk's People

Contributors

moliya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.