Создать частный модуль из скомпилированного фреймворка без исходного кода фреймворка

Я пытаюсь создать модуль из стороннего фреймворка. Я получаю сообщение об ошибке.

Мы можем успешно создать pod с исходным кодом по ссылке: https://medium.com/@shahabejaz/create-and-distribute-private-libraries-with-cocoapods-5b6507b57a03

Выполнение следующих шагов -

  1. добавьте свой личный репозиторий в установку cocoapods. pod repo add [REPO_NAME] [SOURCE_URL]
  2. создать репозиторий pod на github
  3. запустите утилиту pod для создания и настройки проекта pod. pod lib create [POD_NAME]
  4. обновить файл podspec
  5. добавить код в проект модуля. предоставлять некоторые функции другим разработчикам.
  6. добавить тег и нажать git tag ‘1.0.1’ , git push --tags
  7. Проверьте модуль, запустив pod spec lint [POD_NAME].podspec

При проверке стручка я получаю ошибку ниже -

      FRAMEWORK_NAME(CLASS_NAME_OF_FRAMEWORK.o)
      "_OBJC_CLASS_$_SOMECLASSNAME", referenced from:
          objc-class-ref in FRAMEWORK_NAME(CLASS_NAME_OF_FRAMEWORK.o)
          objc-class-ref in FRAMEWORK_NAME(CLASS_NAME_OF_FRAMEWORK.o)
    
    ** BUILD FAILED **
    
    
    The following build commands failed:
        Ld /Users/user_name/Library/Developer/Xcode/DerivedData/App-fsaogzopfrnvnddcwfdtbzzcizpv/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/Binary/App normal x86_64
    (1 failure)
   Testing with `xcodebuild`. 
 -> POD_NAME(0.0.9)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
    - NOTE  | [iOS] xcodebuild:  note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'Pods-App' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/spec/lint.rb:104:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Ниже приведен подфайл моего проекта модуля.

      #
# Be sure to run `pod lib lint POD_NAME.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = 'POD_NAME'
  s.version          = '0.0.1'
  s.summary          = 'Summary goes here of pod project'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
Description goes here of pod project.
  DESC

  s.homepage         = 'GIT URL Of pod_project'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'Author Name' => 'author_email@domain.com' }
  s.platform         = :ios
  s.source           = { :git => 'POD URL from github', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '9.0'
  #s.swift_version = '5.0'
  #s.source_files = 'POD_NAME/Classes/**/*.{swift}'
  s.ios.vendored_framework = 'POD_NAME.framework'
  #s.public_header_files = "POD_NAME/FrameworkName.framework/Headers/*.h"
  s.framework = 'libc++'
  #s.libraries = 'libc++'
  #s.source_files = "POD_NAME/FrameworkName.framework/Headers/*.h"
  #s.preserve_path = "POD_NAME/PublicHeader/*.h"
  
  # s.resource_bundles = {
  #   'POD_NAME' => ['POD_NAME/Assets/*.png']
  # }
  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'POD_NAME'
  # s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => 'POD_NAME/' }
end

Любая помощь приветствуется.

Заранее спасибо.

0 ответов

Другие вопросы по тегам