Поддержка различных вендорных фреймворков для симулятора и iOS-устройства - PullRequest
0 голосов
/ 08 декабря 2018

Я пытаюсь написать PodSpec, который позволяет нам использовать один фреймворк JellyFrameworkForDefice.framework при установке на устройство и другой фреймворк JellyFrameworkForSimulator.framework при установке на симулятор через XCode.У кого-нибудь есть идеи по этому поводу или есть примеры, которые они видели, где это работало раньше?

Pod::Spec.new do |s|
  s.name             = 'Jelly'
  s.module_name      = 'Jelly'
  s.version          = '1.0.3'
  s.summary          = 'Jelly 4.1.2'
  s.description      = <<-DESC
     TODO: Add long description of the pod here.
                   DESC
  s.homepage         = 'https://github.com/<GITHUB_USERNAME>/Jelly'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { '' => '' }
  s.source           = { :git => 'https://github.com/<GITHUB_USERNAME>/Jelly', :tag => s.version.to_s }
  s.ios.deployment_target = '8.0'
  s.source_files = 'Jelly/Classes/**/*.h', 'Jelly/Classes/**/*.m',  'Jelly/Classes/**/*.mm'
  s.resources = 'Jelly/Assets/UX_Resources/*', 'Jelly/Classes/UX/Resources/*'
  s.libraries        = 'c++'
  s.vendored_framework = 'Jelly/Libraries/JellyFrameworkForDefice.framework', 'Jelly/Libraries/JellyFrameworkForSimulator.framework'
  s.dependency 'Cordova', '4.2.1'
  s.dependency 'DependencyContainer'
  s.dependency 'JellyService'
  s.compiler_flags = '-lstdc++', '-lc++'
  s.ios.framework  = 'AudioToolbox', 'AVFoundation', 'CoreGraphics', 
          'CoreMedia', 'CoreVideo', 'MobileCoreServices', 'OpenGLES', 
          'QuartzCore', 'Security', 'ImageIO', 'Foundation', 'UIKit'
  s.xcconfig = { 'OTHER_LDFLAGS[sdk=iphonesimulator*]' => '$(inherited) -framework "JellyFrameworkForSimulator"',
'OTHER_LDFLAGS[sdk=iphoneos*]' => '$(inherited) -framework "JellyFrameworkForDefice"' }
end
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...